Feature: surface ACP prompt-result usage (token counts) in the existing token usage UI
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust, typescript
- Ambito
- backend-api-design, frontend
Direzione di ricerca
Traccia le risposte ai prompt ACP in src/crates/interfaces/acp/src/client/stream.rs e manager.rs, quindi segui la pipeline dei token esistente attraverso src/web-ui/src/flow_chat/types/flow-chat.ts e src/web-ui/src/flow_chat/utils/tokenUsageDisplay.ts. Verifica come fluiscono oggi ContextUsageUpdated e TokenUsage. Il lavoro è completato quando l’utilizzo della sessione/del prompt ACP viene visualizzato nell’UI esistente sull’utilizzo dei token quando la risposta lo fornisce, senza interrompere gli agenti che omettono l’utilizzo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
BitFun's ACP client currently only surfaces context-window usage (ContextUsageUpdated / AcpSessionContextUsage) for attached agents. However, the ACP wire already carries per-session cumulative token usage on session/prompt responses, per the ACP spec's SessionUsage type:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"stopReason": "end_turn",
"usage": { "inputTokens": 19683, "outputTokens": 3, "totalTokens": 19686 }
}
}
(captured from a real session/prompt round against the omp acp agent, i.e. oh-my-pi's native ACP server)
Proposal
Consume the usage field from prompt results in the ACP client layer (src/crates/interfaces/acp/src/client/stream.rs / manager.rs) and feed it into the existing web-ui token usage pipeline (src/web-ui/src/flow_chat/types/flow-chat.ts → TokenUsage, src/web-ui/src/flow_chat/utils/tokenUsageDisplay.ts), so ACP-attached agents show per-session token usage the same way internal-harness agents already do.
Notes
- Today only some agents emit the field (omp does; kimi-code's
kimi acpand zed'sclaude-code-acp/codex-acpadapters currently don't). Displaying it where available costs nothing and gives adapter authors an incentive to fill it in. - This is about token counts, not plan quota — I'll file the quota display idea separately.
Happy to test a PR branch against my local fleet (kimi / omp / claude / codex adapters) if useful.
- Lingua principale
- Rust
- Stelle
- 2.3k
- Fork
- 236
- Merge medio
- 2h 56m
- PR unite (30g)
- 619
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GCWing/OpenBitFun
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
GCWing/OpenBitFun#3213 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
GCWing/OpenBitFun#2363 ·
-
question
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
GCWing/OpenBitFun#2340 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
GCWing/OpenBitFun#3210 ·
-
GCWing/OpenBitFun#3195 · 2 commenti · 1 assegnatario ·
Tutte le issue di GCWing/OpenBitFun
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·