Replies: 2 comments
|
This would be very helpful. I wish this existed. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Uh oh!
There was an error while loading. Please reload this page.
Claude Code's SDK emits a predicted next prompt after each turn. T3 already receives it and throws it away:
That line came from
6f34ad3e8(#4244), which enumerated every SDK message type to satisfy themessage satisfies neverguard. It reads like a placeholder, not a decision against the feature.I built it on a fork to find out what it actually costs. Posting here instead of opening a PR because CONTRIBUTING.md routes proposals to Ideas and says to discuss non-trivial changes first.
What it does
Web/desktop: dim ghost placeholder text in the empty composer.
Tabaccepts,Escdismisses.Shift+Tabstill toggles plan mode, andTabstill reaches the mention/slash menu when that popover is open.Mobile: a dismissible chip above the input. Tap accepts, X dismisses.
Claude-only. The other adapters never emit the event, the shell field stays
null, nothing renders. No per-adapter work.Design
The value lives in an in-memory
ThreadPromptSuggestionservice, matchingThreadPlanProgressandThreadBackgroundLiveness— no migration, no column, empty after restart. A minimal persisted event exists only to trigger the shell refetch, becausews.tsonly pushes off persisted thread-aggregate events and the suggestion arrives afterturn.completed, so nothing else follows it.Cleared on
turn.startedandsession.exited, never on turn completion. Clearing on completion wipes the suggestion the moment it lands.The suggestion is stamped with the completed turn id, and ingestion drops it if a different turn is already running by the time it arrives. The CLI generates it in a fire-and-forget background query, so it can land after the user has already sent the next prompt.
Size
35 files, +2118/-95. Roughly half is tests and docs. That is past what CONTRIBUTING.md says you want, which is the other reason this is a discussion and not a PR.
Branch: https://github.com/goncharik/t3code/tree/claude-prompt-suggestions
Caveats
Always on, no T3 setting. The only off switch is
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false. I disassembled the CLI to check:promptSuggestionEnabledin settings.json gates the interactive REPL's own ghost text, not the SDK stream. The emit site is gated onC.promptSuggestions && ot.shouldQuery!==false && !Vi() && a.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION!==false— the settings key is not consulted. Adding aClaudeSettingstoggle is contained if you'd want one.While ghost text is showing,
Tabis consumed to accept it, so you can't tab out of an empty composer without dismissing first. Matches other ghost-text editors, but it is a behavior change.Suppressed on the first turn, in plan mode, and after API errors. Absence is the normal case, which the docs say explicitly so it doesn't read as a bug.
Screenshots for web/desktop, Android, and iOS in a comment below.
Happy to shrink it, split it, or drop it.
All reactions