docs/design/2026-07-28-web-shell-composer-intent-suggestions.md
Extend Web Shell's existing new-topic suggestion so one conservative
classification can recommend either asking a side question with /btw or
sending a substantial new topic in a fresh session.
The composer continues to show at most one non-blocking action. A valid
none decision renders nothing. Invalid, failed, or cancelled classifications
also render nothing.
type SuggestionKind = 'btw' | 'new_session' | 'none';
interface SuggestionDecision {
suggestion: SuggestionKind;
confidence: number;
}
Only btw and new_session decisions at or above the existing confidence
threshold become actionable. The actionable state records the exact classified
draft and source session so both can be checked again when the user clicks.
btw is for a quick, self-contained side question that should not disturb
the main task.new_session is for a clearly different, substantial task or topic.none covers continuations, uncertainty, and drafts that fit neither action.btw suggestion submits /btw <draft> through the existing
editor path, which preserves the command's current history and composer-clear
semantics.btw.new_session retains the existing clear, detach, create, and auto-submit
sequence, including image preservation and session-race cancellation.The classifier remains conservative and fail-closed:
/btw action.The change stays inside Web Shell. It reuses existing daemon session generation,
editor submission, and /btw behavior. It does not add daemon or SDK routes,
change styling, or introduce a general-purpose suggestion framework.
/btw execution and composer clearing, stale draft/session
rejection, attachment rejection, and the existing new-session races.