Repository navigation
Replies: 6 comments
|
This would be very helpful. I wish this existed. |
|
Linking #8524, which was closed with two concerns: durable shared state, and no user control. I'd like to propose a smaller design that answers both, and I'm happy to implement it if you approve the direction. 1. Ephemeral state.
2. Explicit control.
3. Scope.
Questions
I'd follow the one-problem rule and send the PR only after a maintainer approves the direction. |
|
+1 from a daily T3 user (macOS desktop, Claude provider). This is the Claude Code feature I miss most since switching. On @thedrowsywinger's questions, from a user's point of view:
The ephemeral design also matches how I'd use it. The suggestion only matters right after a turn finishes, so I wouldn't expect it to survive a restart or show up on another device. @thedrowsywinger if the direction gets approved, I'm happy to help test on macOS or take a part of the implementation. |
|
I built the smaller design from @thedrowsywinger's comment on a fork to check that it holds up: tobymarks/t3code@feat/claude-prompt-suggestions
I tested it in a dev build with Claude Sonnet 5.5 and added focused tests for the adapter and the store. One finding: the CLI did emit a suggestion after the first turn, even though the SDK typings say it is suppressed there.
@thedrowsywinger this isn't meant to take over your proposal. If the direction is approved, feel free to use any of it, or I can open the PR, whichever you and the maintainers prefer. |
|
I opened a PR for this: #17618. It builds on @tobymarks' fork. Suggestions appear as placeholder ghost text: Tab fills the draft and Esc hides it. The toggle lives under Settings → Providers → Claude and is off by default. It also follows the close note on #8524:
Feedback on the product behavior is very welcome. I'm happy to adjust it. |






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