{"version":"2.1.246","anchor":"prompt-input-state-moved-behind-one-shared-draft-object","canonical_anchor":"prompt-input-state-moved-behind-one-shared-draft-object","heading":"Prompt input state moved behind one shared draft object","tier":"internal","area":"Prompt Input","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/prompt-input-state-moved-behind-one-shared-draft-object","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Prompt input state moved behind one shared draft object\n\nPrompt text, cursor and paste state now live in one shared object; nothing changes for you.\n\n**What**\n\nThe prompt text, cursor position, mode and pasted content are no longer passed around as eight separate values and setters. The REPL, autocomplete, voice input, the cloud-session reply box and the submit handler now share one draft handle that owns them. Nothing changes for you: restoring a stashed draft still reports `Draft restored`.\n\n**Details**\n\n- The handle exposes `replaceValue`, `setValue`, `setValueWithCursor`, `setCursorOffset`, `setMode`, `setPastedContents`, `value`, `cursorOffset` and `shellCompletionAbort`.\n- Stashing and unstashing the prompt and inserting text are now the draft's own operations rather than the component's, and submits are subscribed to via `onSubmitRequest` rather than the submit handler adjusting text, cursor and pasted content itself.\n- Autocomplete suggestions moved out of component state into a store read on demand.\n- Both the main prompt and the cloud-session reply box now hand the voice keybinding handler a single composer instead of a bag of refs.\n- The state machine for pressing left arrow to open agents or background the current turn moved out of the input component; the remaining hook still reads the `leftArrowOpensAgents` setting and treats any value other than `false` as on.\n\n**Evidence**\n\n`setValueWithCursor`, `shellCompletionAbort`, `onSubmitRequest`, `leftArrowOpensAgents`\n\n- Area: Prompt Input\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}