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:
2026-07-07 15:33:53 +08:00
parent 2afbb83c43
commit aa2c7dfed3
41 changed files with 1315 additions and 168 deletions
+14 -1
View File
@@ -1,6 +1,8 @@
import { contextBridge, ipcRenderer, IpcRendererEvent } from 'electron'
import { IPC } from '../shared/ipc-channels'
import type {
KnowledgeSuggestOptions,
ScoredKnowledge,
ActionId,
Bookmark,
BookMeta,
@@ -346,6 +348,12 @@ const electronAPI = {
config: Partial<AutoWritingConfig>
): Promise<IpcResult<InteractiveFlow>> =>
ipcRenderer.invoke(IPC.AUTO_SET_GOAL, { bookId, flowId, config }),
confirmContext: (
bookId: string,
flowId: string,
binding: AiContextBinding
): Promise<IpcResult<InteractiveFlow>> =>
ipcRenderer.invoke(IPC.AUTO_CONFIRM_CONTEXT, { bookId, flowId, binding }),
planScenes: (
bookId: string,
flowId: string,
@@ -448,7 +456,12 @@ const electronAPI = {
stats: (
bookId: string
): Promise<IpcResult<{ buried: number; resolved: number; forgotten: number }>> =>
ipcRenderer.invoke(IPC.KNOWLEDGE_STATS, { bookId })
ipcRenderer.invoke(IPC.KNOWLEDGE_STATS, { bookId }),
suggestContext: (
bookId: string,
opts?: KnowledgeSuggestOptions
): Promise<IpcResult<ScoredKnowledge[]>> =>
ipcRenderer.invoke(IPC.KNOWLEDGE_SUGGEST_CONTEXT, { bookId, opts })
},
cockpit: {
getSummary: (bookId: string, volumeId?: string): Promise<IpcResult<CockpitSummary>> =>