feat(ai): 业务上下文感知与 A2UI 链路统一
- 新增代码内业务上下文元数据层(实体字典 + 三大闭环工作流) - 新增 get_business_context / get_entity_schema / get_pending_tasks 运行时工具 - SYSTEM_PROMPT 与技能目录改为先查业务流程/待办再执行 - A2UI 增加 ai_a2ui_submissions 幂等表、表单过期、ui.artifact 事件 - 提交回灌携带 submissionId / fieldErrors / 下一步建议 - 前端 uiArtifacts 归一化与过期表单禁用
This commit is contained in:
@@ -84,6 +84,7 @@ const FormPreview: React.FC<FormPreviewProps> = ({ form, disabled, onAction }) =
|
||||
);
|
||||
if (!form) return null;
|
||||
const finished = Boolean(form.submitted) || form.status === 'submitted';
|
||||
const expired = form.status === 'expired';
|
||||
|
||||
const handleFinish = (values: Record<string, unknown>) => {
|
||||
onAction?.('form:submit', { values: normalizeValues(form.fields, values) });
|
||||
@@ -97,7 +98,9 @@ const FormPreview: React.FC<FormPreviewProps> = ({ form, disabled, onAction }) =
|
||||
{form.description}
|
||||
</Typography.Text>
|
||||
)}
|
||||
{finished ? (
|
||||
{expired ? (
|
||||
<Alert type="warning" showIcon title="表单已失效" description="此表单已被新的请求替代,请让助手重新生成。" />
|
||||
) : finished ? (
|
||||
<Alert type="success" showIcon title="已提交,AI 正在处理…" />
|
||||
) : (
|
||||
<Form
|
||||
|
||||
Reference in New Issue
Block a user