feat(models): expose connection affinity and native-state provenance

This commit is contained in:
Agent Workbench Dev
2026-11-07 20:31:50 +08:00
parent 9e1feeebb3
commit ee97aaae73
14 changed files with 368 additions and 10 deletions
+2
View File
@@ -5,6 +5,7 @@ import { Modal } from './components';
import { ModelUsageDetails } from './ModelUsageDetails';
import type { ContextHistory, ContextHistoryGroup, ContextPlan, Session } from './types';
import { ModelRequestDetails } from './ModelRequestDetails';
import { ModelProviderStateDetails } from './ModelProviderStateDetails';
const number = (value: number | null | undefined) => (value ?? 0).toLocaleString('zh-CN');
const states: Record<string, string> = { prepared: '已准备', requesting: '正在请求', completed: '已收到响应', failed: '请求失败', interrupted: '请求已中断' };
@@ -57,6 +58,7 @@ export function RequestContextPanel({ session, runId, openArtifact, onError }: {
{!!plan.skillCatalogEntries && <><dt>技能目录</dt><dd>{plan.skillCatalogEntries} 项本次目录记录</dd></>}
<dt>发送内容</dt><dd>{number(plan.requestBytes)} B<code className="context-sha" title={plan.requestSha256}>{plan.requestSha256.slice(0, 16)}</code></dd>
</dl>
<ModelProviderStateDetails audit={plan.nativeStateAudit} />
<ModelUsageDetails key={'usage-' + plan.id} usage={plan.actualUsage} expanded />
{surface && <details className="context-tool-surface" key={plan.id}><summary>本轮工具 · 可见 {surface.entries.filter(entry => entry.visible).length} / 已登记 {surface.entries.length}</summary>
<p className="record-footnote">这是本次实际发送的工具范围。资源和权限在执行时重新核对;登记不代表本轮可用。</p>