Trim online context from AI chat editors

This commit is contained in:
2026-06-09 00:06:35 +08:00
parent cd355180f6
commit 0a86fa80b4
7 changed files with 29 additions and 63 deletions
@@ -91,7 +91,7 @@ export function useChatApi(props: AiChatPanelProps): {
const adapter: ChatApiAdapter = {
sendMessage: (
message: string,
inputs: Record<string, any> | undefined,
_inputs: Record<string, any> | undefined,
onEvent: (event: StreamEvent) => void,
onError: (error: Error) => void,
onComplete: () => void,
@@ -110,16 +110,12 @@ export function useChatApi(props: AiChatPanelProps): {
type: att.type,
}));
// 从 inputs 中提取 form_code(如果存在)
const formCode = inputs?.form_code;
return sendAgentMessageStream(
props.agentId,
{
message,
conversation_id: conversationId.value || undefined,
attachments: attachmentInputs,
form_code: formCode,
},
(event) => {
// 捕获 conversation_id