feat(ai): session persist + continue HTTP/UI, checkpoints, queue

落地 docs/16 P1:会话落盘与真续跑(prior tool 轨迹)、incomplete「加预算继续」、
awaiting_confirm outcome、同参拒+第4/6轮检查点、侧栏忙时单槽排队。
Ask 真 token 流式记缺口(三协议 SSE 成本高)。
This commit is contained in:
logan committed 2026-10-15 14:18:18 +08:00
1 parent 1513f4bc2d
commit d543f3b924
10 files changed
+783 -104

No files matched your search

+11
View File
@@ -217,6 +217,11 @@ export type AiMessage = {
content: string;
at: string;
runId?: string;
sessionId?: string;
runOutcome?: string;
incompleteReason?: string;
resumable?: boolean;
stepsBudget?: number;
/** Agent 工具步骤时间线(仅 assistant) */
steps?: AiAgentStepView[];
streaming?: boolean;
@@ -266,6 +271,10 @@ type State = {
aiBusy: boolean;
/** Ask=不调工具;Agent=多轮 aitools */
aiMode: AiChatMode;
/** 当前 Agent 会话 id(落盘续跑) */
aiSessionId: string | null;
/** 忙时单槽排队文案;再提交覆盖 */
aiQueuedPrompt: string | null;
status: string;
notifyModal: NotifyPayload | null;
notifyToasts: NotifyPayload[];
@@ -501,6 +510,8 @@ export const useWorkspaceStore = create<State>((set, get) => ({
aiModel: "opsxdb-stub",
aiBusy: false,
aiMode: "ask",
aiSessionId: null,
aiQueuedPrompt: null,
status: "就绪",
notifyModal: null,
notifyToasts: [],