feat(agent): 会话接续 - 首页创作带入画布原助手

This commit is contained in:
王志伟
2026-09-08 18:24:37 +08:00
parent e782009db5
commit 88f4b9ccdf
6 changed files with 153 additions and 13 deletions

View File

@@ -207,7 +207,7 @@ export function scheduleRemoteUserDataSync() {
}, 1200);
}
export async function createCanvasProjectWithRemoteSync(title: string, projectId?: string, initialContent?: Partial<Pick<CanvasProject, "nodes" | "connections">>) {
export async function createCanvasProjectWithRemoteSync(title: string, projectId?: string, initialContent?: Partial<Pick<CanvasProject, "nodes" | "connections" | "chatSessions" | "activeChatId">>) {
const id = useCanvasStore.getState().createProject(title, projectId);
if (initialContent) useCanvasStore.getState().updateProject(id, initialContent);
if (!activeRemoteUserId) return { id, syncError: new Error("尚未建立云端同步会话") };