feat(agent): 增强 Agent 配置,新增结构化字段与聊天功能支持

This commit is contained in:
hugo committed 2026-07-07 11:10:32 +08:00
1 parent ac4262cd75
commit c8ce77199e
183 files changed
+11690 -2300

No files matched your search

@@ -85,6 +85,21 @@ const isResumableTask = (task: ShippingTaskSummary | ShippingTaskDetail) =>
const resolveWorkspaceActionButtons = (task: ShippingTaskSummary | ShippingTaskDetail): ShippingChatAction[] =>
resolveShippingWorkspaceActionButtons(task);
const rpaRuntimeMode = (task: ShippingTaskSummary | ShippingTaskDetail) =>
String(task.rpa_runtime?.mode || '').trim().toLowerCase();
const rpaRuntimeLabel = (task: ShippingTaskSummary | ShippingTaskDetail) => {
const mode = rpaRuntimeMode(task);
if (mode === 'mock') return t('chat.shippingNoticeUi.rpaModeMock');
if (mode === 'browser') return t('chat.shippingNoticeUi.rpaModeBrowser');
return String(task.rpa_runtime?.label || '').trim() || t('chat.shippingNoticeUi.rpaModeUnknown');
};
const rpaRuntimeBadgeClass = (task: ShippingTaskSummary | ShippingTaskDetail) =>
rpaRuntimeMode(task) === 'mock'
? 'border-amber-200 bg-amber-50 text-amber-700'
: 'border-emerald-200 bg-emerald-50 text-emerald-700';
/**
* 渲染工作台任务卡中的辅助动作按钮样式。
* 核心逻辑:把“聚焦当前任务 / 查询缺口明细”降级成轻量辅助入口,避免与后端主业务动作抢视觉权重。
@@ -503,7 +518,16 @@ const handleSwitchBatch = (batchNo: string) => {
<div class="mt-0.5 truncate text-xs text-muted">
{{ task.source_file_name || task.customer_name || t('chat.shippingNoticeUi.currentNotice') }}
</div>
<div class="mt-1 text-xs font-medium text-secondary">{{ taskStepHeadline(task) }}</div>
<div class="mt-1 flex flex-wrap items-center gap-1.5 text-xs font-medium text-secondary">
<span>{{ taskStepHeadline(task) }}</span>
<span
v-if="task.rpa_runtime"
class="rounded border px-1.5 py-0.5 text-[10px] font-bold leading-none"
:class="rpaRuntimeBadgeClass(task)"
>
{{ rpaRuntimeLabel(task) }}
</span>
</div>
</div>
<span class="rounded border px-2 py-1 text-[10px] font-bold" :class="resolveTaskStateMeta(task).className">
{{ resolveTaskStateMeta(task).text }}