fix(canvas): 构建兼容 - 修复 Agent 缓存键与退出会话类型

This commit is contained in:
ddCat
2026-08-20 13:46:21 +08:00
parent 5906f7b5a9
commit 2e2b26ecc8
2 changed files with 2 additions and 2 deletions

View File

@@ -1578,7 +1578,7 @@ function toolCallToResponseInput(call: ResponseToolCall): ResponseInputMessage {
return { type: "function_call", call_id: call.id, name: call.function.name, arguments: call.function.arguments, ...(call.thoughtSignature ? { thoughtSignature: call.thoughtSignature } : {}) }; return { type: "function_call", call_id: call.id, name: call.function.name, arguments: call.function.arguments, ...(call.thoughtSignature ? { thoughtSignature: call.thoughtSignature } : {}) };
} }
async function requestOnlineAgentModel(config: AiConfig, messages: ResponseInputMessage[], toolChoice: "auto" | "required", prompt: string, onDelta: (text: string) => void, promptCacheKey: string) { async function requestOnlineAgentModel(config: AiConfig, messages: ResponseInputMessage[], toolChoice: "auto" | "required", prompt: string, onDelta: (text: string) => void, promptCacheKey?: string) {
if (logicalModelIDForConfig(config)) { if (logicalModelIDForConfig(config)) {
const result = await runBackendToolGenerationTask({ prompt, config, messages, tools: ONLINE_AGENT_TOOLS, toolChoice }); const result = await runBackendToolGenerationTask({ prompt, config, messages, tools: ONLINE_AGENT_TOOLS, toolChoice });
if (result.content.trim()) onDelta(result.content); if (result.content.trim()) onDelta(result.content);

View File

@@ -19,7 +19,7 @@ export function useWorkspaceLogout() {
setLoggingOut(true); setLoggingOut(true);
try { try {
await logout(); await logout();
await applyUserSession({ user: null, systemChannels: [] }); await applyUserSession({ user: null, logicalModels: [] });
message.success("已退出登录"); message.success("已退出登录");
navigate("/login", { replace: true }); navigate("/login", { replace: true });
} catch (error) { } catch (error) {