Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

🤖 perf: the chat-input handoff countdown uses provider usage while Token Budget stages open on the request estimate

オープン
#7,337 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend, desktop

調査の方向性

Start with src/common/utils/compaction/autoCompactionCheck.ts and src/browser/components/CompactionWarning/CompactionWarning.tsx, then read tests/ipc/tokenBudgetStages.fixture.integration.test.ts and the referenced changes in #7214 and #7332. Trace how the request estimate reaches the renderer and how the countdown is shown. Done when Token Budget mode never displays a handoff countdown after the handoff row has been delivered.

索引モデルが issue の本文から書いたものです。

説明

Found by the Codex review of #7332 (thread PRRT_kwDOPxxmWM6vk5R2). The problem already exists on main. No fix is in #7332.

Problem

In Token Budget mode, the chat-input bar counts down with "Handoff target in N% usage". It computes N from provider-reported usage (checkAutoCompaction in src/common/utils/compaction/autoCompactionCheck.ts, rendered by src/browser/components/CompactionWarning/CompactionWarning.tsx). The handoff and final stages open on the request estimate instead:

  1. Since #7214, the turn start opens a stage when the built request's estimate reaches its point.
  2. #7332 makes settlement use the same next-request estimate.

The estimate runs above provider usage (OpenAI about 1.3–1.6 times, Claude about 1.04–1.36 times, see #5223). So the handoff row can already be delivered while the bar still shows "Handoff target in N% usage". At a 70% target and 1.3–1.6 times, the handoff comes at about 44–54% provider usage. The bar stays hidden until 60%.

Evidence

  • On main, the fixture test "estimate-only crossing (R2a)" in tests/ipc/tokenBudgetStages.fixture.integration.test.ts delivers a handoff while saved usage stays far below every stage point.
  • CompactionWarning.tsx builds the countdown text from usagePercentage only.

Options

  1. Show the request estimate in the bar: send the last request estimate to the renderer and count down from it.
  2. Drop the countdown in Token Budget mode: show only "Past the handoff target" after the handoff row exists, and no percentage before.

Acceptance

  • In Token Budget mode, the bar never shows a countdown to a handoff that the window already received.

Refs #5223, #7214, #7332.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $527.71

主要言語
TypeScript
スター
2.1k
フォーク
140
平均マージ
3時間 23分
マージ済み PR(30日)
953

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/xum のほかの issue

coder/xum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。