feat: ship v0.7.0 with AI knowledge context integration
Add semi-automatic knowledge suggestions and user-confirmed injection across chat, interactive, auto, and wizard modes; fix writing flows to persist full systemPrompt in contextJson. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,6 +19,7 @@ interface AutoState {
|
||||
loadFlow: (bookId: string, sessionId: string) => Promise<void>
|
||||
start: (bookId: string, sessionId: string) => Promise<void>
|
||||
setGoal: (bookId: string, config: Partial<AutoWritingConfig>) => Promise<void>
|
||||
confirmContext: (bookId: string) => Promise<void>
|
||||
planScenes: (bookId: string) => Promise<void>
|
||||
generateNext: (bookId: string) => Promise<void>
|
||||
resolveNaming: (bookId: string, chosenName: string) => Promise<void>
|
||||
@@ -64,11 +65,24 @@ export const useAutoStore = create<AutoState>((set, get) => ({
|
||||
set({ flow })
|
||||
},
|
||||
|
||||
confirmContext: async (bookId) => {
|
||||
const flowId = get().flow?.id
|
||||
const session = useAiStore.getState().sessions.find(
|
||||
(s) => s.id === useAiStore.getState().activeSessionId
|
||||
)
|
||||
if (!flowId || !session) return
|
||||
const flow = await ipcCall(() =>
|
||||
window.electronAPI.auto.confirmContext(bookId, flowId, session.context)
|
||||
)
|
||||
set({ flow })
|
||||
},
|
||||
|
||||
planScenes: async (bookId) => {
|
||||
const flowId = get().flow?.id
|
||||
if (!flowId) return
|
||||
set({ streaming: true })
|
||||
try {
|
||||
await get().confirmContext(bookId)
|
||||
const summary = useAiStore.getState().contextSummary
|
||||
const flow = await ipcCall(() =>
|
||||
window.electronAPI.auto.planScenes(bookId, flowId, summary)
|
||||
|
||||
@@ -67,7 +67,8 @@ export const useInteractiveStore = create<InteractiveState>((set, get) => ({
|
||||
chapterIds: [],
|
||||
outlineIds: [],
|
||||
settingIds: [],
|
||||
inspirationIds: []
|
||||
inspirationIds: [],
|
||||
knowledgeIds: []
|
||||
}
|
||||
const flow = await ipcCall(() =>
|
||||
window.electronAPI.interactive.confirmContext(bookId, flowId, binding)
|
||||
|
||||
@@ -22,6 +22,8 @@ export const useSettingsStore = create<SettingsState>((set, get) => ({
|
||||
shortcuts: {} as Record<ActionId, string>,
|
||||
aiConfig: { ...DEFAULT_AI_CONFIG },
|
||||
namingIgnoreWords: [] as string[],
|
||||
knowledgeAutoSuggest: true,
|
||||
knowledgeSuggestTopN: 8,
|
||||
loaded: false,
|
||||
load: async () => {
|
||||
const data = await ipcCall(() => window.electronAPI.settings.get())
|
||||
|
||||
Reference in New Issue
Block a user