feat: harden ai agent admin workflow experience

This commit is contained in:
2026-06-22 04:50:11 +08:00
parent ae29c24529
commit 4ec846a702
385 changed files with 61461 additions and 5886 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,12 +110,16 @@ 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
@@ -231,17 +235,6 @@ export function useChatApi(props: AiChatPanelProps): {
params: step.params,
node_id: step.node_id,
node_type: step.node_type,
branch_id: step.branch_id,
branch_label: step.branch_label,
agent_code: step.agent_code,
agent_name: step.agent_name,
model: step.model,
model_id: step.model_id,
subflow_name: step.subflow_name,
from_subflow: step.from_subflow,
collaboration_role: step.collaboration_role,
collaboration_mode: step.collaboration_mode,
communication: step.communication,
output: step.output,
status: step.status,
timestamp: step.timestamp,