Repository navigation
Offer the predicted next prompt in the composer - #198
Merged
Merged
Conversation
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. The composer now shows the prediction as the placeholder of an empty draft. Tab, or a long press on a touch screen, writes it into the draft without sending it. A sent prompt or a user message of the thread clears it. The updates of a sub agent do not change it. Co-authored-by: Karsten Kosmala <kosmala@cosmocode.de>
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.
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-acpsends this prediction assession_info_update._meta.promptSuggestions. Itsends it only to an AIR client, and the gateway already declares this capability at
initialize.Changes
translate.tsreads the prediction into the thread model. A user message of the thread clears it. The updates of asub agent do not change it.
ThreadStorepublishes the prediction and clears it when this browser sends a prompt.runs. The text area grows to show a long prediction.
measures the press, because iOS sends no
contextmenuevent for a long press. The thread rows of the box list usethe same method.
Compared to #177, the version bump of
claude-agent-acpis 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 checkand Biome are clean. A builtbox image and a real phone were not tested.