Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature: surface ACP prompt-result usage (token counts) in the existing token usage UI

Aperta
#3,077 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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 acp and zed's claude-code-acp / codex-acp adapters 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GCWing/OpenBitFun

Tutte le issue di GCWing/OpenBitFun

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.