Skip to content

feat(web): show compact token usage in model cards - #189

Merged
M09Ic merged 2 commits into
masterfrom
feat/card-token-usage-184
Oct 25, 2026
Merged

M09Ic merged 2 commits into
masterfrom
feat/card-token-usage-184

Conversation

@M09Ic

@M09Ic M09Ic commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Web model cards now show compact input/output token counts and an SVG cache icon with the hit percentage. Hover or keyboard focus reveals exact totals and cache read/write counts; unavailable usage adds no placeholder.

Show the same usage once across reasoning/reply cards and compiler parent/round cards. Update the cyber-ui pin for cumulative card usage and canonical cache counters.

Validation: 40 focused workflow/JEV tests, three cache icon follow-up checks, TypeScript checking, and the production frontend build; desktop and mobile screenshots checked.

Refs #184. Finer attribution across model requests, tools, retries and delegated work, and planned/executed/verified evidence linking are deferred. Path visualization is outside this change.

@M09Ic
M09Ic merged commit 1adf371 into master Oct 25, 2026
4 checks passed
@M09Ic
M09Ic deleted the feat/card-token-usage-184 branch October 26, 2026 15:07
yulan23333 pushed a commit to yulan23333/aiscan that referenced this pull request Oct 27, 2026
新增 cmd/wasm:把 pkg/agent 的 loop/evaluator 当"脑"跑进浏览器扩展,
三座 JSON 缝接到 JS host:
- Provider  -> __aiscanLLM(reqJSON)      (host 现有 provider)
- Tools     -> __aiscanTool(name, args)  (host stub,chrome.scripting 在真实 tab 执行)
- eventbus  -> onEvent(eventJSON)
外加 aiscanRunAgent / aiscanCancelAgent 导出 + aiscanAgentReady 就绪标志。

GATE 结论:
- pkg/agent(+evaluator/provider/commands)GOOS=js GOARCH=wasm 直接编过,
  无需剥离(只 import pkg/commands,不碰 pkg/tools)。
- 端到端可跑:cmd/wasm/testdata/smoke.mjs 21/21(LLM↔工具↔事件↔取消)。
- 体积:strip 17MB / gzip 4.2MB < 现网 finger.wasm 29MB,体积可接受。

不含:插件 host 侧(agent-manager.js 等)、session 持久化 host 化、TinyGo 瘦身。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant