bailinghub 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +20 -0
- package/README.en.md +6 -6
- package/README.md +6 -6
- package/SECURITY.md +20 -0
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_CONVERSATION_AUDIT.en.md +8 -2
- package/docs/AGENT_CONVERSATION_AUDIT.md +8 -1
- package/docs/CHANGELOG.en.md +29 -1
- package/docs/CHANGELOG.md +29 -1
- package/docs/IMPLEMENTATION_STATUS.en.md +12 -3
- package/docs/IMPLEMENTATION_STATUS.md +12 -3
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/MODEL_CONTINUATION.en.md +8 -0
- package/docs/MODEL_CONTINUATION.md +8 -0
- package/docs/MODEL_OUTPUT_BUDGET.en.md +1 -0
- package/docs/MODEL_OUTPUT_BUDGET.md +1 -0
- package/docs/README.en.md +6 -0
- package/docs/README.md +6 -0
- package/docs/RELEASE_NOTES_v0.10.1.en.md +41 -0
- package/docs/RELEASE_NOTES_v0.10.1.md +41 -0
- package/docs/RELEASE_NOTES_v0.11.0.en.md +19 -0
- package/docs/RELEASE_NOTES_v0.11.0.md +19 -0
- package/docs/RELEASE_NOTES_v0.11.1.en.md +25 -0
- package/docs/RELEASE_NOTES_v0.11.1.md +25 -0
- package/docs/UPGRADE_v0.10.1.en.md +66 -0
- package/docs/UPGRADE_v0.10.1.md +66 -0
- package/docs/UPGRADE_v0.11.0.en.md +24 -0
- package/docs/UPGRADE_v0.11.0.md +24 -0
- package/docs/UPGRADE_v0.11.1.en.md +28 -0
- package/docs/UPGRADE_v0.11.1.md +28 -0
- package/docs/security/GRC_EVIDENCE.md +54 -0
- package/docs/user-guide/console-map.md +2 -2
- package/package.json +5 -3
- package/scripts/check-doc-links.mjs +6 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-php-sdk-artifacts.mjs +152 -0
- package/scripts/check-php-sdk-artifacts.test.mjs +99 -0
- package/scripts/check-release-consistency.test.mjs +2 -2
- package/scripts/copy-acr-platform-image.sh +42 -0
- package/scripts/e2e-console-runtime-audit.mjs +7 -0
- package/scripts/e2e-console-troubleshooting-extra.mjs +4 -4
- package/scripts/e2e-console.mjs +90 -23
- package/scripts/install.sh +1 -1
- package/scripts/notification-console-test.mjs +2 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +13 -1
- package/scripts/restore-ghcr-version.sh +48 -0
- package/scripts/sdk-declaration-contract-test.ts +34 -0
- package/scripts/sdk-p1-check.mjs +62 -26
- package/scripts/test-acr-platform-copy.sh +152 -0
- package/scripts/verify-github-repo.mjs +12 -0
- package/sdk/dotnet/Bailing.Connect/BailingConnect.cs +4 -4
- package/sdk/dotnet/README.md +8 -0
- package/sdk/dotnet/tests/Declaration/Declaration.csproj +11 -0
- package/sdk/dotnet/tests/Declaration/Program.cs +74 -0
- package/sdk/go/README.md +8 -0
- package/sdk/go/bailingconnect/connect.go +5 -5
- package/sdk/go/bailingconnect/declaration_test.go +107 -0
- package/sdk/java/README.md +13 -0
- package/sdk/java/src/main/java/com/bailing/connect/BailingConnect.java +4 -4
- package/sdk/java/tests/DeclarationTest.java +70 -0
- package/sdk/node/README.md +8 -0
- package/sdk/node/src/index.mjs +4 -4
- package/sdk/node/tests/declaration.test.mjs +41 -0
- package/sdk/php/README.md +16 -0
- package/sdk/php/src/Attributes/AiTool.php +4 -4
- package/sdk/php/src/SpecBuilder.php +8 -8
- package/sdk/php/tests/declaration-serialization.php +103 -0
- package/sdk/php7/README.md +14 -0
- package/sdk/php7/src/ToolDef.php +3 -3
- package/sdk/php7/src/ToolSpec.php +8 -13
- package/sdk/php7/tests/declaration-serialization.php +103 -0
- package/sdk/python/README.md +8 -0
- package/sdk/python/bailing_connect/__init__.py +6 -6
- package/sdk/python/tests/test_declaration.py +61 -0
- package/src/core/config/console-task-location.test.ts +12 -24
- package/src/core/contracts/explicit-capability-values.test.ts +62 -0
- package/src/core/contracts/openapi-tools.ts +2 -2
- package/src/core/contracts/tool-annotations.ts +4 -4
- package/src/core/runtime/credential-resolver.ts +3 -3
- package/src/infrastructure/config/config-agent-conversation-audit-repository.test.ts +29 -0
- package/src/infrastructure/config/config-agent-conversation-audit-repository.ts +142 -9
- package/src/infrastructure/config/config-conversation-feed.integration.test.ts +134 -0
- package/src/infrastructure/config/config-conversation-ledger.test.ts +47 -1
- package/src/infrastructure/config/config-conversation-ledger.ts +24 -8
- package/src/infrastructure/config/config-observability-ledger.ts +32 -4
- package/src/infrastructure/config/config-recent-jobs.integration.test.ts +45 -0
- package/src/infrastructure/config/configstore.ts +4 -4
- package/src/infrastructure/config/conversation-delivery-message.ts +12 -0
- package/src/modules/usage/contracts.ts +1 -0
- package/src/modules/usage/model-context.test.ts +106 -0
- package/src/modules/usage/model-context.ts +54 -0
- package/src/modules/usage/model-continuation.test.ts +27 -0
- package/src/modules/usage/provider.test.ts +40 -0
- package/src/modules/usage/provider.ts +21 -3
- package/src/modules/usage/repository.ts +2 -1
- package/src/routes/admin-conversation-audit.ts +20 -3
- package/src/routes/admin-history-cursor.ts +12 -0
- package/src/routes/admin-runtime.test.ts +47 -0
- package/src/routes/admin-runtime.ts +32 -3
- package/src/routes/admin-usage.ts +12 -1
- package/src/routes/admin.ts +6 -1
- package/src/routes/agent-conversation-audit.test.ts +47 -3
- package/src/test-support/agent-conversation-audit-fixture.ts +9 -1
- package/web/connect/bailing-connect-php.tgz +0 -0
- package/web/connect/bailing-connect-php7.tgz +0 -0
- package/web/console/assets/{Accounts-Dhyw-7wF.js → Accounts-B1Ne8Xx2.js} +1 -1
- package/web/console/assets/AgentClients-CiGQ-n2i.js +1 -0
- package/web/console/assets/AgentClients-xEIfsj7w.css +1 -0
- package/web/console/assets/AgentTasks-CaCeYv60.css +1 -0
- package/web/console/assets/AgentTasks-CylHZHHq.js +2 -0
- package/web/console/assets/{Approvals-CQx1YWxW.js → Approvals-wD4Iv80G.js} +1 -1
- package/web/console/assets/{Audit--QcdVlMh.js → Audit-BStlxkPw.js} +1 -1
- package/web/console/assets/{BrandLockup-DQcaW4Nt.js → BrandLockup-BAhrPnhy.js} +1 -1
- package/web/console/assets/Channels-DAlIgNxo.js +105 -0
- package/web/console/assets/Channels-WwRHFKJn.css +1 -0
- package/web/console/assets/ChatEntries-CPx-E9aJ.js +7 -0
- package/web/console/assets/ChatEntries-DALYfRDP.css +1 -0
- package/web/console/assets/Clients-gqNFusNW.css +1 -0
- package/web/console/assets/Clients-w97QPpFD.js +3 -0
- package/web/console/assets/Cost-CNDZaif-.css +1 -0
- package/web/console/assets/Cost-CxtN0mca.js +1 -0
- package/web/console/assets/Credentials-6c6aktzZ.css +1 -0
- package/web/console/assets/Credentials-BhpoH-hR.js +1 -0
- package/web/console/assets/{Diagnostics-CyoM1XrZ.js → Diagnostics-DnC-ODuy.js} +1 -1
- package/web/console/assets/Executors-CCTYuZf4.js +1 -0
- package/web/console/assets/Executors-CQ8iw3kK.css +1 -0
- package/web/console/assets/{HelpTip-DLlhaGQp.js → HelpTip-piedkqU-.js} +1 -1
- package/web/console/assets/Kb-CFCa-7LY.css +1 -0
- package/web/console/assets/Kb-DKp3mwWB.js +2 -0
- package/web/console/assets/Login-g_aZWHQd.js +1 -0
- package/web/console/assets/Login-krXZsvoF.css +1 -0
- package/web/console/assets/Projects-BexeaCxT.css +1 -0
- package/web/console/assets/Projects-DurExYV9.js +1 -0
- package/web/console/assets/Routes-CKoIjkCM.css +1 -0
- package/web/console/assets/Routes-CX7Q7bkz.js +138 -0
- package/web/console/assets/Runs-C48kdEwk.css +1 -0
- package/web/console/assets/Runs-CQKEDsrH.js +3 -0
- package/web/console/assets/Setup-CtWCXXpj.css +1 -0
- package/web/console/assets/Setup-DzI8rEAc.js +1 -0
- package/web/console/assets/Shell-BQ-g_O7K.js +1 -0
- package/web/console/assets/Shell-Y2fZK5LV.css +1 -0
- package/web/console/assets/StorageBuckets-CWxzIh0x.css +1 -0
- package/web/console/assets/StorageBuckets-DoZIzA7B.js +1 -0
- package/web/console/assets/SystemSettings-C3pFFzAQ.js +1 -0
- package/web/console/assets/SystemSettings-C5nv0K2a.css +1 -0
- package/web/console/assets/SystemStatus-Bbxu2dp4.css +1 -0
- package/web/console/assets/SystemStatus-BgekIK52.js +1 -0
- package/web/console/assets/Targets-CbLq7rgm.css +1 -0
- package/web/console/assets/Targets-DH1ZcK0J.js +1 -0
- package/web/console/assets/Tools-CMS1wVOm.js +5 -0
- package/web/console/assets/Tools-Qk1c5Rp8.css +1 -0
- package/web/console/assets/Usage-C0OkK7Jg.js +1 -0
- package/web/console/assets/Usage-Cue7CYnT.css +1 -0
- package/web/console/assets/UsageAccess-CHdWXvE8.js +1 -0
- package/web/console/assets/UsageAccess-nOa03hGb.css +1 -0
- package/web/console/assets/{UsageHelp-BmuiE1Ew.js → UsageHelp-BkIsuFUj.js} +1 -1
- package/web/console/assets/{console-location-Csv-xsnl.js → console-location-C_az_xHo.js} +1 -1
- package/web/console/assets/index-CbI5fbiD.js +2 -0
- package/web/console/assets/{index-B_5UfiTw.js → index-DwlsLKwM.js} +1 -1
- package/web/console/assets/request-WgSVj8ie.js +1 -0
- package/web/console/assets/{schema-o3mK4mid.js → schema-rb4T_2cj.js} +1 -1
- package/web/console/assets/task-page-location-BGxGar7H.js +1 -0
- package/web/console/assets/{use-list-location-cIPy2cKM.js → use-list-location-DeVfTTII.js} +1 -1
- package/web/console/assets/{use-unsaved-form-DScKD0h9.js → use-unsaved-form-B10XHC-n.js} +1 -1
- package/web/console/assets/{util-B40VqOwl.js → util-C0YJ70YU.js} +1 -1
- package/web/console/assets/{vendor-element-BT8tHCFk.js → vendor-element-BCC2kYn_.js} +7 -7
- package/web/console/assets/{vendor-mammoth-CVIXVxTN.js → vendor-mammoth-C7l0Q30g.js} +1 -1
- package/web/console/index.html +2 -2
- package/web-admin/package-lock.json +4 -4
- package/web-admin/package.json +1 -1
- package/web-admin/scripts/agent-task-control-smoke.mjs +26 -3
- package/web-admin/src/components/AgentSetupPanel.vue +19 -15
- package/web-admin/src/components/ChannelThread.vue +441 -0
- package/web-admin/src/components/ClientConversations.vue +397 -134
- package/web-admin/src/components/ConversationSourceTag.vue +24 -0
- package/web-admin/src/components/JobStatusTag.vue +18 -0
- package/web-admin/src/components/NotificationOutboxPanel.vue +5 -2
- package/web-admin/src/components/UsageServiceReferences.vue +6 -24
- package/web-admin/src/components/conversation-audit.ts +67 -2
- package/web-admin/src/components/conversation-reading-position.ts +27 -0
- package/web-admin/src/layout/Shell.vue +15 -17
- package/web-admin/src/onboarding-state.ts +5 -5
- package/web-admin/src/pages/AgentClients.vue +33 -27
- package/web-admin/src/pages/AgentTasks.vue +88 -43
- package/web-admin/src/pages/Channels.vue +15 -41
- package/web-admin/src/pages/ChatEntries.vue +13 -51
- package/web-admin/src/pages/Clients.vue +2 -2
- package/web-admin/src/pages/Cost.vue +10 -51
- package/web-admin/src/pages/Credentials.vue +1 -1
- package/web-admin/src/pages/Executors.vue +4 -3
- package/web-admin/src/pages/Kb.vue +4 -4
- package/web-admin/src/pages/Login.vue +7 -8
- package/web-admin/src/pages/Projects.vue +1 -1
- package/web-admin/src/pages/Routes.vue +46 -83
- package/web-admin/src/pages/Runs.vue +239 -567
- package/web-admin/src/pages/Setup.vue +20 -20
- package/web-admin/src/pages/StorageBuckets.vue +1 -1
- package/web-admin/src/pages/SystemSettings.vue +1 -2
- package/web-admin/src/pages/SystemStatus.vue +4 -6
- package/web-admin/src/pages/Targets.vue +0 -2
- package/web-admin/src/pages/Tools.vue +31 -22
- package/web-admin/src/pages/Usage.vue +110 -60
- package/web-admin/src/pages/UsageAccess.vue +2 -5
- package/web-admin/src/request.ts +5 -1
- package/web-admin/src/task-page-location.ts +6 -12
- package/web-admin/src/task-trace-presentation.ts +143 -0
- package/web-admin/tests/conversation-audit.test.mjs +23 -1
- package/web-admin/tests/model-context.browser.mjs +238 -0
- package/web-admin/tests/model-output-budget.browser.mjs +1 -0
- package/web/console/assets/AgentClients-BA0M26-I.css +0 -1
- package/web/console/assets/AgentClients-DWxb8-ko.js +0 -1
- package/web/console/assets/AgentTasks-DOyxANnx.css +0 -1
- package/web/console/assets/AgentTasks-DUHD4dzr.js +0 -2
- package/web/console/assets/Channels-DJJU3ksE.css +0 -1
- package/web/console/assets/Channels-cGS5WfQ-.js +0 -105
- package/web/console/assets/ChatEntries-BYpji27B.css +0 -1
- package/web/console/assets/ChatEntries-nh23Iz5O.js +0 -7
- package/web/console/assets/Clients-CX5EeYio.js +0 -3
- package/web/console/assets/Clients-CbZAou8E.css +0 -1
- package/web/console/assets/Cost-C6oQvz9P.css +0 -1
- package/web/console/assets/Cost-DOZfdNS9.js +0 -1
- package/web/console/assets/Credentials--aHs57yV.css +0 -1
- package/web/console/assets/Credentials-sy6W9Sac.js +0 -1
- package/web/console/assets/Executors-2Upi6bOS.css +0 -1
- package/web/console/assets/Executors-BQqqiFwt.js +0 -1
- package/web/console/assets/Kb-5R3ce4UU.js +0 -5
- package/web/console/assets/Kb-BM_PYi11.css +0 -1
- package/web/console/assets/Login-YKeUwdgo.js +0 -1
- package/web/console/assets/Login-xtPwDB5_.css +0 -1
- package/web/console/assets/Projects-DHwHrPT9.css +0 -1
- package/web/console/assets/Projects-Grgb6fOv.js +0 -1
- package/web/console/assets/Routes-DR_Yf02e.css +0 -1
- package/web/console/assets/Routes-DYgrXlRJ.js +0 -138
- package/web/console/assets/Runs-CwTddJJj.js +0 -3
- package/web/console/assets/Runs-D4FOvNfu.css +0 -1
- package/web/console/assets/Setup-Ca0b1d1-.css +0 -1
- package/web/console/assets/Setup-D_xUPNDq.js +0 -1
- package/web/console/assets/Shell-BTg8Vw_L.css +0 -1
- package/web/console/assets/Shell-Dfam2Uoj.js +0 -1
- package/web/console/assets/StorageBuckets-7QLBpV4a.css +0 -1
- package/web/console/assets/StorageBuckets-CP6e50wI.js +0 -1
- package/web/console/assets/SystemSettings-BRYKyJNa.js +0 -1
- package/web/console/assets/SystemSettings-HsXGx0aH.css +0 -1
- package/web/console/assets/SystemStatus-B-VfRsQd.css +0 -1
- package/web/console/assets/SystemStatus-CbPsDsGt.js +0 -1
- package/web/console/assets/Targets-1j4-g6rC.css +0 -1
- package/web/console/assets/Targets-C2LkR2AF.js +0 -1
- package/web/console/assets/Tools-C9HPJqJb.css +0 -1
- package/web/console/assets/Tools-C9JNJUS0.js +0 -2
- package/web/console/assets/Usage-D1Mv6vGY.js +0 -1
- package/web/console/assets/Usage-DMOzUsqh.css +0 -1
- package/web/console/assets/UsageAccess-77LmGCm6.js +0 -1
- package/web/console/assets/UsageAccess-C6ZGxEgJ.css +0 -1
- package/web/console/assets/index-MjZJEFIN.js +0 -2
- package/web/console/assets/request-rqm6MT0s.js +0 -1
- package/web/console/assets/task-page-location-DWiGtAln.js +0 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="paneRef" class="pane" :class="{ feed: feed }" v-loading="threadDataLoading" :aria-label="feed ? '渠道会话正文与轨迹' : '原记录正文与轨迹'">
|
|
3
|
+
<el-alert v-if="threadDataError" :title="threadDataError" type="error" :closable="false" show-icon />
|
|
4
|
+
<template v-if="threadData">
|
|
5
|
+
<div class="paneHead" data-reading-header>
|
|
6
|
+
<div v-if="feed" class="detailTitle"><ConversationSourceTag :source="threadSource" /><h2>{{ heading || threadData.messages.find(m => m.direction === 'in')?.content?.slice(0, 96) || partyLabel(threadData.thread) }}</h2></div>
|
|
7
|
+
<div class="ph1">
|
|
8
|
+
<el-tag v-if="partyVisible(threadData.thread)" size="small" effect="plain" :type="partyType(threadData.thread)">{{ partyLabel(threadData.thread) }}</el-tag>
|
|
9
|
+
<b class="mono" :title="identityTitle(threadData.thread)">{{ whoLabel(threadData.thread) }}</b>
|
|
10
|
+
<el-tag v-if="threadData.thread.route_name || threadData.thread.route_key" size="small" effect="plain" type="info" class="mono">{{ threadData.thread.route_name || threadData.thread.route_key }}</el-tag>
|
|
11
|
+
<span class="muted">{{ threadData.thread.message_count }} 条消息 · 最近 {{ fmtTime(threadData.thread.last_active_at, true) }}</span>
|
|
12
|
+
</div>
|
|
13
|
+
<div v-if="!feed" class="ph2 muted mono" :title="threadData.thread.scope_key">scope: {{ threadData.thread.scope_key }}</div>
|
|
14
|
+
<details v-else class="ph2 muted"><summary>会话标识</summary><div class="mono">Thread:{{ threadData.thread.thread_id }}</div><div class="mono">Scope:{{ threadData.thread.scope_key }}</div></details>
|
|
15
|
+
</div>
|
|
16
|
+
<el-collapse v-if="threadData.thread.summary" class="coll summcoll">
|
|
17
|
+
<el-collapse-item title="历史对话摘要">
|
|
18
|
+
<pre class="block">{{ cap(threadData.thread.summary) }}</pre>
|
|
19
|
+
</el-collapse-item>
|
|
20
|
+
</el-collapse>
|
|
21
|
+
|
|
22
|
+
<p v-if="!threadData.messages.length" class="muted">此会话暂无已记录的消息。</p>
|
|
23
|
+
<div v-if="earlierMessageId != null" class="messagePager historyControl">
|
|
24
|
+
<span v-if="pageError" role="alert">{{ pageError }}</span>
|
|
25
|
+
<el-button link :loading="moreLoading" :disabled="threadDataLoading" @click="loadEarlierMessages">加载更早消息</el-button>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="chat">
|
|
28
|
+
<div v-for="m in threadData.messages" :key="m.id" class="turn" :data-reading-id="m.id"
|
|
29
|
+
:class="{ fromUser: m.direction === 'in', fromHub: m.direction === 'out', deliveryMessage: isDelivery(m) }">
|
|
30
|
+
<div class="bubbleWrap">
|
|
31
|
+
<div class="bMeta muted"><strong class="actorName"><el-icon aria-hidden="true"><Promotion v-if="isDelivery(m)" /><User v-else-if="m.direction === 'in'" /><ChatLineSquare v-else /></el-icon>{{ messageActorLabel(m) }}</strong>
|
|
32
|
+
<span v-if="m.direction === 'in'" class="actorIdentity" :title="identityTitle(threadData.thread)">{{ whoLabel(threadData.thread) }}</span>
|
|
33
|
+
<time :datetime="m.created_at">{{ fmtTime(m.created_at, true) }}</time></div>
|
|
34
|
+
<div class="bubble"><RichText :text="m.content" /></div>
|
|
35
|
+
<div v-if="traceOwners.has(m.id)" class="traceLine">
|
|
36
|
+
<span v-if="m.direction === 'in'" class="pendingReply muted">已显示的记录中暂无对应回复</span>
|
|
37
|
+
<button type="button" class="tracetoggle" :aria-expanded="Boolean(traces[traceKey(m)]?.open)" @click="toggleTrace(m)">
|
|
38
|
+
<svg class="traceCaret" :class="{ open: traces[traceKey(m)]?.open }" viewBox="0 0 1024 1024" aria-hidden="true">
|
|
39
|
+
<path d="M0.085333 239.36L512 784.64l511.914667-545.28z" fill="currentColor"></path>
|
|
40
|
+
</svg>
|
|
41
|
+
执行轨迹
|
|
42
|
+
<span v-if="traceBadge(traceKey(m))" class="muted">{{ traceBadge(traceKey(m)) }}</span>
|
|
43
|
+
</button>
|
|
44
|
+
<div v-if="traces[traceKey(m)]?.open" class="tracebox" v-loading="traces[traceKey(m)]?.loading">
|
|
45
|
+
<template v-if="traces[traceKey(m)]?.detail">
|
|
46
|
+
<div class="tmeta2">
|
|
47
|
+
<template v-if="isAgentTrace(traceKey(m))">
|
|
48
|
+
<el-tag size="small" type="primary" effect="plain">本地智能体编排</el-tag>
|
|
49
|
+
<HelpTip title="本地智能体执行轨迹">客户端负责规划和工具选择,隐藏推理不会上传。中枢记录可核验的工具调用、审批与执行结果。</HelpTip>
|
|
50
|
+
</template>
|
|
51
|
+
<el-tag size="small" :title="traces[traceKey(m)].detail.status" :type="statusType(traces[traceKey(m)].detail.status)" effect="plain">{{ traceStatusLabel(traces[traceKey(m)].detail.status) }}</el-tag>
|
|
52
|
+
<span v-if="traceModel(traceKey(m))" class="mono muted">{{ traceModel(traceKey(m)) }}</span>
|
|
53
|
+
<span v-if="traceDuration(traceKey(m))" class="muted">{{ (traceDuration(traceKey(m)) / 1000).toFixed(1) }}s</span>
|
|
54
|
+
<span v-if="traceTokenCount(traceKey(m))" class="muted">{{ traceTokenCount(traceKey(m)) }} tok</span>
|
|
55
|
+
</div>
|
|
56
|
+
<el-button v-if="traces[traceKey(m)].detail.conversation_audit_id" size="small" plain type="primary" class="traceDetailBtn" @click="emit('open-audit', traces[traceKey(m)].detail.conversation_audit_id, traces[traceKey(m)].detail.client_turn_id)">查看客户端完整对话</el-button>
|
|
57
|
+
<div v-if="isAgentTrace(traceKey(m)) && traces[traceKey(m)].summary?.partial" class="agentTracePartial">
|
|
58
|
+
本轮工具记录超过单次展示上限,以下是已通过归属校验的部分轨迹,不代表全量。
|
|
59
|
+
</div>
|
|
60
|
+
<div v-if="!isAgentTrace(traceKey(m))" class="muted toolsum">{{ fmtTools(traces[traceKey(m)].detail?.dispatch?.tools) }}</div>
|
|
61
|
+
<div v-if="isAgentTrace(traceKey(m)) && traces[traceKey(m)].invocations.length" class="agentInvocations">
|
|
62
|
+
<div v-for="inv in traces[traceKey(m)].invocations" :key="inv.job_id" class="agentInvocation">
|
|
63
|
+
<el-tag size="small" effect="plain" type="primary" class="mono">{{ inv.tool }}</el-tag>
|
|
64
|
+
<span class="muted">{{ invocationStateLabel(inv) }}</span>
|
|
65
|
+
<span v-if="inv.duration_ms" class="muted">{{ (inv.duration_ms / 1000).toFixed(1) }}s</span>
|
|
66
|
+
<el-button link type="primary" size="small" @click.stop="emit('open-job', inv.job_id)">工具详情</el-button>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<el-timeline v-if="traces[traceKey(m)].events?.length" class="tline">
|
|
70
|
+
<el-timeline-item v-for="(a, i) in traces[traceKey(m)].events" :key="i" :timestamp="fmtTime(a.ts)" placement="top">
|
|
71
|
+
<b>{{ traceTitle(a) }}</b>
|
|
72
|
+
<el-tag v-if="a.source" size="small" effect="plain" :type="a.source === 'local_agent' ? 'primary' : 'info'" class="traceSource">{{ traceSourceLabel(a.source) }}</el-tag>
|
|
73
|
+
<el-tag size="small" effect="plain" :type="traceStageType(a.stage)" class="traceStage">{{ traceStageLabel(a.stage) }}</el-tag>
|
|
74
|
+
<el-tag v-if="a.severity && a.severity !== 'info'" size="small" effect="plain" :type="traceSeverityType(a.severity)" class="traceSeverity">{{ a.severity }}</el-tag>
|
|
75
|
+
<span v-if="traceSummaryText(a)" class="muted auditTag">{{ traceSummaryText(a) }}</span>
|
|
76
|
+
<template v-if="detailLen(a.detail)">
|
|
77
|
+
<el-collapse v-if="detailLen(a.detail) > 160" class="auditcoll">
|
|
78
|
+
<el-collapse-item :title="shortDetail(a.detail)"><pre class="block">{{ fullDetail(a.detail) }}</pre></el-collapse-item>
|
|
79
|
+
</el-collapse>
|
|
80
|
+
<div v-else class="muted detail-json">{{ shortDetail(a.detail) }}</div>
|
|
81
|
+
</template>
|
|
82
|
+
</el-timeline-item>
|
|
83
|
+
</el-timeline>
|
|
84
|
+
<div v-else class="muted notrace">这一轮没有可展示的执行事件</div>
|
|
85
|
+
<div v-if="isAgentTrace(traceKey(m)) && traces[traceKey(m)].summary?.tool_invocations === 0 && !traces[traceKey(m)].invocations.length" class="muted notrace">本轮未调用中枢治理工具。</div>
|
|
86
|
+
<el-button v-if="m.job_id" plain type="primary" size="small" class="traceDetailBtn" @click="emit('open-job', m.job_id)">查看完整详情</el-button>
|
|
87
|
+
</template>
|
|
88
|
+
<div v-else-if="!traces[traceKey(m)]?.loading" class="muted">未能取得本轮执行轨迹。<el-button link type="primary" @click="retryTrace(m)">重试读取</el-button></div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<footer v-if="nextMessageId || pageError || threadData.messages.length < threadData.thread.message_count" class="messagePager">
|
|
95
|
+
<span class="muted">已显示 {{ threadData.messages.length }} 条消息,共记录 {{ threadData.thread.message_count }} 条。</span>
|
|
96
|
+
<span v-if="pageError && !earlierMessageId" role="alert">{{ pageError }}</span>
|
|
97
|
+
<el-button v-if="nextMessageId" :loading="moreLoading" :disabled="threadDataLoading" @click="loadMoreMessages">加载后续消息</el-button>
|
|
98
|
+
</footer>
|
|
99
|
+
</template>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<script setup lang="ts">
|
|
104
|
+
import { computed, nextTick, onBeforeUnmount, reactive, ref, watch } from 'vue';
|
|
105
|
+
import { User, ChatLineSquare, Promotion } from '@element-plus/icons-vue';
|
|
106
|
+
import { api } from '../request';
|
|
107
|
+
import ConversationSourceTag from './ConversationSourceTag.vue';
|
|
108
|
+
import type { ConversationFeedItem } from './conversation-audit';
|
|
109
|
+
import { readingPosition, restoreReadingPosition } from './conversation-reading-position';
|
|
110
|
+
import { fmtTime } from '../util';
|
|
111
|
+
import RichText from './RichText.vue';
|
|
112
|
+
import HelpTip from './HelpTip.vue';
|
|
113
|
+
import { traceKey, threadTraceOwners } from './conversation-audit';
|
|
114
|
+
import { cap, detailLen, shortDetail, fullDetail, fmtTools, statusType, traceStatusLabel, traceTitle, traceSummaryText, traceStageLabel, traceStageType, traceSeverityType,
|
|
115
|
+
partyLabel, partyVisible, partyType, whoLabel, identityTitle, type TraceEvent, type TracePayload } from '../task-trace-presentation';
|
|
116
|
+
|
|
117
|
+
const props = defineProps<{ threadId: number; feed?: boolean; heading?: string; source?: ConversationFeedItem['source'] }>();
|
|
118
|
+
const emit = defineEmits<{ 'open-audit': [id: string, turn?: string]; 'open-job': [id: string] }>();
|
|
119
|
+
interface AgentRunInvocation {
|
|
120
|
+
job_id: string;
|
|
121
|
+
invocation_id: string;
|
|
122
|
+
tool: string;
|
|
123
|
+
status: string;
|
|
124
|
+
state: string | null;
|
|
125
|
+
ok: boolean | null;
|
|
126
|
+
business_status: string | number | null;
|
|
127
|
+
approval_status: string | null;
|
|
128
|
+
approval_id: number | null;
|
|
129
|
+
event_count: number;
|
|
130
|
+
duration_ms?: number;
|
|
131
|
+
created_at: string;
|
|
132
|
+
updated_at: string;
|
|
133
|
+
}
|
|
134
|
+
interface AgentRunTracePayload {
|
|
135
|
+
kind: 'agent_client_run';
|
|
136
|
+
run: any;
|
|
137
|
+
trace: { summary?: any; events: TraceEvent[] };
|
|
138
|
+
invocations: AgentRunInvocation[];
|
|
139
|
+
}
|
|
140
|
+
interface ThreadMessage {
|
|
141
|
+
id: number;
|
|
142
|
+
direction: 'in' | 'out';
|
|
143
|
+
content: string;
|
|
144
|
+
channel?: string;
|
|
145
|
+
is_channel_delivery?: boolean;
|
|
146
|
+
created_at: string;
|
|
147
|
+
job_id?: string | null;
|
|
148
|
+
agent_run_id?: string | null;
|
|
149
|
+
}
|
|
150
|
+
interface ConversationTraceState {
|
|
151
|
+
kind: 'job' | 'agent-run';
|
|
152
|
+
open: boolean;
|
|
153
|
+
loading: boolean;
|
|
154
|
+
detail: any;
|
|
155
|
+
events: TraceEvent[];
|
|
156
|
+
summary: any | null;
|
|
157
|
+
invocations: AgentRunInvocation[];
|
|
158
|
+
}
|
|
159
|
+
interface ThreadPage {
|
|
160
|
+
thread: any;
|
|
161
|
+
messages: ThreadMessage[];
|
|
162
|
+
has_more?: boolean;
|
|
163
|
+
next_after_id?: number | null;
|
|
164
|
+
has_earlier?: boolean;
|
|
165
|
+
next_before_id?: number | null;
|
|
166
|
+
}
|
|
167
|
+
const threadData = ref<ThreadPage | null>(null);
|
|
168
|
+
const earlierMessageId = computed(() => threadData.value?.has_earlier ? threadData.value.next_before_id : null);
|
|
169
|
+
const nextMessageId = computed(() => messageCursor(threadData.value));
|
|
170
|
+
const moreLoading = ref(false), pageError = ref('');
|
|
171
|
+
let loadedPages = 0;
|
|
172
|
+
const threadDataLoading = ref(false);
|
|
173
|
+
const threadDataError = ref('');
|
|
174
|
+
let threadLoadGeneration = 0;
|
|
175
|
+
const paneRef = ref<HTMLElement | null>(null);
|
|
176
|
+
// 逐轮执行轨迹缓存:job:<id> / agent-run:<id> 分开命名,避免两类 UUID 语义混淆。
|
|
177
|
+
const traces = reactive<Record<string, ConversationTraceState>>({});
|
|
178
|
+
function channelSource(channel?: string): ConversationFeedItem['source'] {
|
|
179
|
+
if (channel?.startsWith('chat:')) return 'web';
|
|
180
|
+
if (channel?.startsWith('agent:')) return 'client';
|
|
181
|
+
if (channel?.startsWith('wecom:')) return 'wecom';
|
|
182
|
+
return 'other';
|
|
183
|
+
}
|
|
184
|
+
const threadSource = computed(() => props.source ?? (threadData.value?.thread.delivery_only ? 'delivery' : channelSource(threadData.value?.thread.channel)));
|
|
185
|
+
function isDelivery(message: ThreadMessage): boolean {
|
|
186
|
+
return message.direction === 'out' && (message.is_channel_delivery ?? ['delivery', 'brain-send'].includes(message.channel || ''));
|
|
187
|
+
}
|
|
188
|
+
function messageActorLabel(message: ThreadMessage): string {
|
|
189
|
+
if (isDelivery(message)) return '渠道送达';
|
|
190
|
+
if (message.direction === 'in') {
|
|
191
|
+
const source = channelSource(message.channel || threadData.value?.thread.channel);
|
|
192
|
+
if (source === 'client' && !message.agent_run_id) return '客户端发起';
|
|
193
|
+
return source === 'other' ? '接入方发起' : '用户';
|
|
194
|
+
}
|
|
195
|
+
if (message.agent_run_id) return '本地智能体';
|
|
196
|
+
return message.channel === 'hub' ? '中枢回复' : '出站消息';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const traceOwners = computed(() => threadTraceOwners(threadData.value?.messages || []));
|
|
200
|
+
function isAgentTrace(key: string): boolean {
|
|
201
|
+
return traces[key]?.kind === 'agent-run';
|
|
202
|
+
}
|
|
203
|
+
function traceSourceLabel(source: TraceEvent['source']): string {
|
|
204
|
+
return source === 'local_agent' ? '本地编排' : '中枢治理';
|
|
205
|
+
}
|
|
206
|
+
function invocationStateLabel(invocation: AgentRunInvocation): string {
|
|
207
|
+
if (invocation.approval_status === 'denied') return '审批拒绝';
|
|
208
|
+
if (invocation.approval_status === 'pending') return '等待审批';
|
|
209
|
+
if (invocation.approval_status === 'approved' && invocation.state === 'awaiting_approval') return '已批准,等待本地智能体续执行';
|
|
210
|
+
const labels: Record<string, string> = {
|
|
211
|
+
executed: '执行成功', business_rejected: '业务拒绝', awaiting_approval: '等待审批', denied: '审批拒绝',
|
|
212
|
+
rejected_before_dispatch: '派发前拦截', reconciliation_required: '需要人工对账', in_progress: '执行中',
|
|
213
|
+
};
|
|
214
|
+
return labels[invocation.state || ''] || invocation.state || traceStatusLabel(invocation.status);
|
|
215
|
+
}
|
|
216
|
+
// 轨迹徽标(懒拉后才有):工具次数 / 识图次数 / 耗时
|
|
217
|
+
function traceBadge(key: string): string {
|
|
218
|
+
const tr = traces[key];
|
|
219
|
+
if (!tr || !tr.detail) return '';
|
|
220
|
+
const parts: string[] = [];
|
|
221
|
+
const tools = tr.summary?.tool_invocations ?? tr.summary?.tool_results ?? (tr.events || []).filter((a) => a.event === 'tool_result').length;
|
|
222
|
+
if (tools) parts.push(tools + ' 次工具');
|
|
223
|
+
const vc = tr.summary?.perceptions ?? (tr.events || []).filter((a) => a.event === 'perception').length;
|
|
224
|
+
if (vc) parts.push(vc + ' 次识图');
|
|
225
|
+
const warn = tr.summary?.warning_count ?? 0;
|
|
226
|
+
if (warn) parts.push(warn + ' 警告');
|
|
227
|
+
const err = tr.summary?.error_count ?? 0;
|
|
228
|
+
if (err) parts.push(err + ' 错误');
|
|
229
|
+
const dur = traceDuration(key);
|
|
230
|
+
if (dur) parts.push((dur / 1000).toFixed(1) + 's');
|
|
231
|
+
return parts.length ? '· ' + parts.join(' · ') : '';
|
|
232
|
+
}
|
|
233
|
+
function traceModel(key: string): string {
|
|
234
|
+
const d = traces[key]?.detail;
|
|
235
|
+
return String(d?.model || d?.runtime || d?.dispatch?.target_config?.model || d?.target || '');
|
|
236
|
+
}
|
|
237
|
+
function traceDuration(key: string): number {
|
|
238
|
+
const trace = traces[key];
|
|
239
|
+
return Number(trace?.summary?.duration_ms ?? trace?.detail?.usage?.duration_ms ?? 0) || 0;
|
|
240
|
+
}
|
|
241
|
+
function traceTokenCount(key: string): number {
|
|
242
|
+
const usage = traces[key]?.detail?.usage ?? {};
|
|
243
|
+
return Number(usage.total_tokens ?? usage.tokens ?? 0) || 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function messageCursor(page: ThreadPage | null): number | null {
|
|
247
|
+
const id = page?.next_after_id;
|
|
248
|
+
return page?.has_more === true && typeof id === 'number' && Number.isSafeInteger(id) && id > 0 ? id : null;
|
|
249
|
+
}
|
|
250
|
+
function appendPage(current: ThreadPage, next: ThreadPage, after: number): ThreadPage {
|
|
251
|
+
const cursor = messageCursor(next);
|
|
252
|
+
if (next.thread.thread_id !== current.thread.thread_id || (next.has_more && (cursor === null || cursor <= after))) {
|
|
253
|
+
throw new Error('消息分页位置未能核对');
|
|
254
|
+
}
|
|
255
|
+
return { ...next, messages: [...current.messages, ...next.messages.filter(message => message.id > after)] };
|
|
256
|
+
}
|
|
257
|
+
function readPage(id: number, query = ''): Promise<ThreadPage> {
|
|
258
|
+
return api<ThreadPage>(`/admin/api/threads/${id}${query ? '?' + query : ''}`);
|
|
259
|
+
}
|
|
260
|
+
function prependPage(current: ThreadPage, older: ThreadPage, before: number): ThreadPage {
|
|
261
|
+
if (older.thread.thread_id !== current.thread.thread_id ||
|
|
262
|
+
(older.has_earlier && (older.next_before_id == null || older.next_before_id >= before))) {
|
|
263
|
+
throw new Error('消息分页位置未能核对');
|
|
264
|
+
}
|
|
265
|
+
return { ...current, messages: [...older.messages.filter(m => m.id < before), ...current.messages],
|
|
266
|
+
has_earlier: older.has_earlier, next_before_id: older.next_before_id };
|
|
267
|
+
}
|
|
268
|
+
async function loadEarlierMessages(): Promise<void> {
|
|
269
|
+
const before = earlierMessageId.value;
|
|
270
|
+
if (!before || !threadData.value || threadDataLoading.value || moreLoading.value) return;
|
|
271
|
+
const generation = threadLoadGeneration;
|
|
272
|
+
moreLoading.value = true; pageError.value = '';
|
|
273
|
+
try {
|
|
274
|
+
const older = await readPage(props.threadId, 'before_id=' + before);
|
|
275
|
+
if (generation !== threadLoadGeneration || !threadData.value) return;
|
|
276
|
+
const position = readingPosition(paneRef.value);
|
|
277
|
+
threadData.value = prependPage(threadData.value, older, before);
|
|
278
|
+
await nextTick();
|
|
279
|
+
if (generation === threadLoadGeneration) restoreReadingPosition(paneRef.value, position, false);
|
|
280
|
+
} catch { if (generation === threadLoadGeneration) pageError.value = '更早消息读取失败,请重试。'; }
|
|
281
|
+
finally { if (generation === threadLoadGeneration) moreLoading.value = false; }
|
|
282
|
+
}
|
|
283
|
+
async function loadMoreMessages(): Promise<void> {
|
|
284
|
+
const after = nextMessageId.value;
|
|
285
|
+
if (!after || !threadData.value || threadDataLoading.value || moreLoading.value) return;
|
|
286
|
+
const generation = threadLoadGeneration;
|
|
287
|
+
moreLoading.value = true; pageError.value = '';
|
|
288
|
+
try {
|
|
289
|
+
const next = await readPage(props.threadId, 'after_id=' + after);
|
|
290
|
+
if (generation !== threadLoadGeneration || !threadData.value) return;
|
|
291
|
+
threadData.value = appendPage(threadData.value, next, after);
|
|
292
|
+
loadedPages++;
|
|
293
|
+
} catch {
|
|
294
|
+
if (generation === threadLoadGeneration) pageError.value = '后续消息读取失败,请重试。';
|
|
295
|
+
} finally {
|
|
296
|
+
if (generation === threadLoadGeneration) moreLoading.value = false;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
async function loadThread(id: number): Promise<void> {
|
|
300
|
+
const generation = ++threadLoadGeneration;
|
|
301
|
+
const isNew = threadData.value?.thread.thread_id !== id;
|
|
302
|
+
const pagesToRefresh = isNew ? 1 : Math.max(loadedPages, 1);
|
|
303
|
+
if (isNew) { threadData.value = null; loadedPages = 0; }
|
|
304
|
+
threadDataLoading.value = true; threadDataError.value = ''; moreLoading.value = false; pageError.value = '';
|
|
305
|
+
const openKeys = new Set(Object.keys(traces).filter(key => !isNew && traces[key].open));
|
|
306
|
+
for (const key of Object.keys(traces)) if (isNew || traces[key].loading) delete traces[key];
|
|
307
|
+
try {
|
|
308
|
+
const firstLoaded = !isNew ? threadData.value?.messages[0]?.id : undefined;
|
|
309
|
+
let data = await readPage(id, props.feed ? 'tail=1' : '');
|
|
310
|
+
while (generation === threadLoadGeneration && data.has_earlier && firstLoaded != null &&
|
|
311
|
+
data.next_before_id != null && data.next_before_id > firstLoaded) {
|
|
312
|
+
const before = data.next_before_id;
|
|
313
|
+
data = prependPage(data, await readPage(id, 'before_id=' + before), before);
|
|
314
|
+
}
|
|
315
|
+
let pages = 1;
|
|
316
|
+
while (generation === threadLoadGeneration && pages < pagesToRefresh) {
|
|
317
|
+
const after = messageCursor(data);
|
|
318
|
+
if (!after) break;
|
|
319
|
+
data = appendPage(data, await readPage(id, 'after_id=' + after), after);
|
|
320
|
+
pages++;
|
|
321
|
+
}
|
|
322
|
+
if (generation !== threadLoadGeneration) return;
|
|
323
|
+
const position = isNew ? null : readingPosition(paneRef.value);
|
|
324
|
+
threadData.value = data; loadedPages = pages;
|
|
325
|
+
for (const key of Object.keys(traces)) delete traces[key];
|
|
326
|
+
for (const message of data.messages) {
|
|
327
|
+
if (traceOwners.value.has(message.id) && openKeys.has(traceKey(message))) void toggleTrace(message);
|
|
328
|
+
}
|
|
329
|
+
await nextTick();
|
|
330
|
+
if (generation === threadLoadGeneration && (isNew || props.feed)) restoreReadingPosition(paneRef.value, position, true);
|
|
331
|
+
} catch {
|
|
332
|
+
if (generation === threadLoadGeneration) threadDataError.value = threadData.value ? '会话读取失败,当前展示旧快照,请刷新重试。' : '未能读取此会话,请刷新重试。';
|
|
333
|
+
} finally {
|
|
334
|
+
if (generation === threadLoadGeneration) threadDataLoading.value = false;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
async function toggleTrace(message: ThreadMessage): Promise<void> {
|
|
338
|
+
const generation = threadLoadGeneration;
|
|
339
|
+
const key = traceKey(message);
|
|
340
|
+
const cur = traces[key];
|
|
341
|
+
if (cur?.open || cur?.loading) { cur.open = !cur.open; return; }
|
|
342
|
+
if (cur?.detail) { cur.open = true; return; }
|
|
343
|
+
const kind: ConversationTraceState['kind'] = message.job_id ? 'job' : 'agent-run';
|
|
344
|
+
traces[key] = { kind, open: true, loading: true, detail: null, events: [], summary: null, invocations: [] };
|
|
345
|
+
try {
|
|
346
|
+
if (message.job_id) {
|
|
347
|
+
const t = await api<TracePayload>('/admin/api/runs/' + message.job_id + '/trace');
|
|
348
|
+
if (generation !== threadLoadGeneration) return;
|
|
349
|
+
traces[key] = { kind, open: Boolean(traces[key]?.open), loading: false, detail: t.job, events: t.trace.events, summary: t.trace.summary ?? null, invocations: [] };
|
|
350
|
+
} else if (message.agent_run_id) {
|
|
351
|
+
const t = await api<AgentRunTracePayload>(`/admin/api/threads/${props.threadId}/agent-runs/${message.agent_run_id}/trace`);
|
|
352
|
+
if (generation !== threadLoadGeneration) return;
|
|
353
|
+
traces[key] = { kind, open: Boolean(traces[key]?.open), loading: false, detail: t.run, events: t.trace.events, summary: t.trace.summary ?? null, invocations: t.invocations ?? [] };
|
|
354
|
+
} else {
|
|
355
|
+
throw new Error('该轮缺少可追溯标识');
|
|
356
|
+
}
|
|
357
|
+
} catch {
|
|
358
|
+
if (generation !== threadLoadGeneration) return;
|
|
359
|
+
traces[key] = { kind, open: Boolean(traces[key]?.open), loading: false, detail: null, events: [], summary: null, invocations: [] };
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function retryTrace(message: ThreadMessage): void {
|
|
364
|
+
delete traces[traceKey(message)];
|
|
365
|
+
void toggleTrace(message);
|
|
366
|
+
}
|
|
367
|
+
function refresh(): Promise<void> { return loadThread(props.threadId); }
|
|
368
|
+
watch(() => props.threadId, id => void loadThread(id), { immediate: true });
|
|
369
|
+
onBeforeUnmount(() => { threadLoadGeneration++; });
|
|
370
|
+
function scrollToLatest(): void { restoreReadingPosition(paneRef.value, null, true); }
|
|
371
|
+
defineExpose({ refresh, scrollToLatest, loading: threadDataLoading });
|
|
372
|
+
</script>
|
|
373
|
+
|
|
374
|
+
<style scoped>
|
|
375
|
+
.muted { color: var(--el-text-color-secondary); font-size: 12px; }
|
|
376
|
+
.mono { font-family: var(--bz-mono); font-size: 12px; }
|
|
377
|
+
.block { background: var(--el-fill-color-light); border: 1px solid var(--el-border-color-lighter); border-radius: 0; padding: 10px 12px; margin: 0; font: 12px/1.55 var(--bz-mono); white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; }
|
|
378
|
+
.toolsum { margin-bottom: 8px; }
|
|
379
|
+
.detail-json { font-family: var(--bz-mono); font-size: 11px; word-break: break-all; }
|
|
380
|
+
.auditTag { margin-left: 8px; font-family: var(--bz-mono); font-size: 11px; }
|
|
381
|
+
.traceStage { margin-left: 8px; vertical-align: 1px; }
|
|
382
|
+
.traceSeverity { margin-left: 4px; vertical-align: 1px; }
|
|
383
|
+
.auditcoll { margin-top: 2px; border-top: none; }
|
|
384
|
+
.auditcoll :deep(.el-collapse-item__header) { font-family: var(--bz-mono); font-size: 11px; height: auto; line-height: 1.6; padding: 2px 0; border-bottom: none; color: var(--el-text-color-secondary); white-space: nowrap; overflow: hidden; }
|
|
385
|
+
.auditcoll :deep(.el-collapse-item__content) { padding-bottom: 6px; }
|
|
386
|
+
.auditcoll :deep(.el-collapse-item__wrap) { border-bottom: none; }
|
|
387
|
+
.pane { --pane-inset: 18px; flex: 1; overflow-y: auto; padding: 0 var(--pane-inset) 14px; min-width: 0; }
|
|
388
|
+
.paneHead { position: sticky; top: 0; background: var(--el-bg-color); padding: 14px var(--pane-inset) 10px; margin: 0 calc(-1 * var(--pane-inset)) 6px; border-bottom: 1px solid var(--el-border-color-lighter); z-index: 1; }
|
|
389
|
+
.ph1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
|
|
390
|
+
.ph2 { margin-top: 4px; word-break: break-all; }
|
|
391
|
+
.ph1 { overflow-wrap: anywhere; }
|
|
392
|
+
.agentInvocation, .tmeta { overflow-wrap: anywhere; }
|
|
393
|
+
.summcoll { margin-bottom: 8px; }
|
|
394
|
+
.chat { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
|
|
395
|
+
.turn { display: flex; }
|
|
396
|
+
.turn.fromUser { justify-content: flex-end; }
|
|
397
|
+
.turn.fromHub { justify-content: flex-start; }
|
|
398
|
+
.bubbleWrap { max-width: 80%; min-width: 0; }
|
|
399
|
+
.bMeta { font-size: 11px; margin-bottom: 3px; }
|
|
400
|
+
.turn.fromUser .bMeta { text-align: right; }
|
|
401
|
+
.bubble { border-radius: 0; padding: 8px 12px; word-break: break-word; }
|
|
402
|
+
.turn.fromUser .bubble { background: var(--el-color-primary-light-9); border: 1px solid var(--el-color-primary-light-7); }
|
|
403
|
+
.turn.fromHub .bubble { background: var(--el-fill-color-light); border: 1px solid var(--el-border-color-lighter); }
|
|
404
|
+
.traceLine { margin-top: 4px; }
|
|
405
|
+
.tracetoggle { border: 0; padding: 2px 0; background: none; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--el-text-color-secondary); cursor: pointer; user-select: none; }
|
|
406
|
+
.tracetoggle:hover { color: var(--el-color-primary); }
|
|
407
|
+
.traceCaret { width: 10px; height: 10px; color: currentColor; transform: rotate(-90deg); transition: transform .14s ease; flex: none; }
|
|
408
|
+
.traceCaret.open { transform: rotate(0deg); }
|
|
409
|
+
.tracebox { margin-top: 6px; padding: 10px 12px; border: 1px dashed var(--el-border-color); border-radius: 0; background: var(--el-fill-color-blank); }
|
|
410
|
+
.traceDetailBtn { margin-top: 4px; height: 26px; padding: 0 10px; }
|
|
411
|
+
.tmeta2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
|
|
412
|
+
.agentTracePartial { margin: 6px 0 9px; padding: 7px 9px; background: var(--el-color-warning-light-9); color: var(--el-text-color-regular); font-size: 12px; line-height: 1.55; }
|
|
413
|
+
.agentInvocations { display: flex; flex-direction: column; gap: 5px; margin: 7px 0 10px; }
|
|
414
|
+
.agentInvocation { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 28px; padding: 4px 7px; border: 1px solid var(--el-border-color-lighter); background: var(--el-fill-color-light); }
|
|
415
|
+
.agentInvocation :deep(.el-button) { margin-left: auto; }
|
|
416
|
+
.traceSource { margin-left: 8px; vertical-align: 1px; }
|
|
417
|
+
.tline { padding-left: 4px; margin-top: 4px; }
|
|
418
|
+
.notrace { font-size: 12px; margin: 4px 0; }
|
|
419
|
+
.tracetoggle:focus-visible { outline: 2px solid var(--el-color-primary); outline-offset: 2px; }
|
|
420
|
+
.messagePager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
|
|
421
|
+
.messagePager [role=alert] { color: var(--el-color-danger); }
|
|
422
|
+
.pendingReply { display: block; margin: 5px 0; }
|
|
423
|
+
.pane.feed { --pane-inset: clamp(16px, 2vw, 32px); padding-bottom: 18px; }
|
|
424
|
+
.feed .paneHead { padding-block: 12px 9px; margin-bottom: 4px; }
|
|
425
|
+
.detailTitle { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
|
|
426
|
+
.feed h2 { font-size: 19px; line-height: 1.5; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
427
|
+
.feed summary { cursor: pointer; }
|
|
428
|
+
.feed .chat { gap: 16px; padding-top: 12px; }
|
|
429
|
+
.feed .bubbleWrap { max-width: 88%; }
|
|
430
|
+
.actorName, .bMeta { display: flex; align-items: center; gap: 5px; }
|
|
431
|
+
.actorName { font-size: 12px; color: var(--el-text-color-primary); }
|
|
432
|
+
.bMeta { gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
|
|
433
|
+
.bMeta time { font-variant-numeric: tabular-nums; }
|
|
434
|
+
.actorIdentity { overflow-wrap: anywhere; }
|
|
435
|
+
.fromUser .bMeta { justify-content: flex-end; }
|
|
436
|
+
.feed .bubble :deep(.rich) { font-size: 14px; }
|
|
437
|
+
.deliveryMessage .actorName { color: var(--el-color-warning); }
|
|
438
|
+
.feed .traceLine { margin-top: 6px; }
|
|
439
|
+
.feed .tracetoggle { color: var(--el-color-primary); }
|
|
440
|
+
.historyControl { margin-block: 6px; }
|
|
441
|
+
</style>
|