Skip to content

Offer the predicted next prompt in the composer - #198

Merged
splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:prompt-suggestions
Nov 26, 2026
Merged

splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:prompt-suggestions

Conversation

@splitbrain-bot

Copy link
Copy Markdown

This PR replaces #177. It contains the changes of #177, rebased on the current main, with some additions.

After a turn, the Claude Code CLI shows the prompt that it expects next as gray text in the empty prompt. The Boxes
composer showed nothing. claude-agent-acp sends this prediction as session_info_update._meta.promptSuggestions. It
sends it only to an AIR client, and the gateway already declares this capability at initialize.

Changes

  • translate.ts reads the prediction into the thread model. A user message of the thread clears it. The updates of a
    sub agent do not change it.
  • ThreadStore publishes the prediction and clears it when this browser sends a prompt.
  • The composer shows the prediction as the placeholder of an empty draft. The placeholder does not show while a turn
    runs. The text area grows to show a long prediction.
  • Tab writes the prediction into the draft without sending it. On a touch screen, a long press does the same. A timer
    measures the press, because iOS sends no contextmenu event for a long press. The thread rows of the box list use
    the same method.

Compared to #177, the version bump of claude-agent-acp is not necessary, because main already uses ^0.108.0.

Tests

Unit tests cover the translation, the store and the sub agent case. An e2e test covers the placeholder, the height
of the text area, Tab and the long press. All dashboard tests pass, and npm run check and Biome are clean. A built
box image and a real phone were not tested.