Conversation
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent pull request
背景:针对不同渠道,他们命中率,ttft,tps都可能不相同,为了让不同渠道的信息可对比,所以新增了渠道级别的信息面板
解决:
Agent
Links
Out of scope — refuse
Open gate — do not open unless all are satisfied
Kind
Issue facts
Change
为渠道操作增加“缓存与费用”图标,按时间和模型展示缓存、费用及性能样本;显示目录价格/渠道覆盖及来源。价格覆盖复用现有定价计算器和账本快照。缺少价格仍标记未计价。
此 PR 含 AI 辅助代码,仅包含费用特性;智力检测独立处理。
Research
Duplicate / prior art
Docs and code
core/internal/storage/sqlite/pricing.go:每次上游尝试的账本;core/internal/pricing/:价格表达式及快照;PricingWorkspace.tsx:现有价格界面。Alternatives considered
Files
apps/desktop/src/ServiceStatisticsDialog.tsx、pricing-model.tsServiceManager.tsx、components/ServiceListRow.tsxapps/desktop/src-tauri/src/、contracts/control-api.openapi.yamlcore/internal/controlapi/、storage/、pricing/Behavior
Verification
bun run build:TypeScript 与生产构建成功。bun run test src/ServiceStatisticsDialog.test.tsx src/pricing-model.test.ts src/ServiceManager.test.tsx:74 项通过;包括目录分档展示、自定义价格优先、未知价格及缓存继承语义。go test ./internal/pricing ./internal/storage/sqlite ./internal/controlapi:三个包通过;统计覆盖重试去重、实际渠道归属和缺失缓存样本,价格测试覆盖历史快照保持。go vet ./...、contractsgo test ./...:通过。cargo clippy --locked --all-targets -- -D warnings、cargo fmt --all -- --check:通过。git diff --check:通过。Risks
Scope check