fix: pass draft starter text as command arguments

This commit is contained in:
Bohdan Triapitsyn
2026-07-29 18:32:26 +03:00
parent 1fd51745c7
commit 4a56527d1b
4 changed files with 19 additions and 14 deletions
+4 -4
View File
@@ -105,14 +105,14 @@ export type InputState = {
* render the chips outside ChatInput (e.g. under the welcome message on
* narrow layouts); consumed by ChatInput, which owns the command-aware submit.
*/
pendingPresetSubmit: string | null
pendingPresetSubmit: { text: string; type: "command" | "skill" } | null
attachedFiles: AttachedFile[]
activeEditorFile: VSCodeActiveEditorFile | null
setPendingInputText: (text: string | null, mode?: "replace" | "append" | "append-inline") => void
consumePendingInputText: () => { text: string; mode: "replace" | "append" | "append-inline" } | null
requestPresetSubmit: (text: string) => void
consumePendingPresetSubmit: () => string | null
requestPresetSubmit: (text: string, type: "command" | "skill") => void
consumePendingPresetSubmit: () => { text: string; type: "command" | "skill" } | null
setPendingSyntheticParts: (parts: SyntheticContextPart[] | null) => void
consumePendingSyntheticParts: () => SyntheticContextPart[] | null
addAttachedFile: (file: File) => Promise<boolean>
@@ -144,7 +144,7 @@ export const useInputStore = create<InputState>()((set, get) => ({
return { text: pendingInputText, mode: pendingInputMode }
},
requestPresetSubmit: (text) => set({ pendingPresetSubmit: text }),
requestPresetSubmit: (text, type) => set({ pendingPresetSubmit: { text, type } }),
consumePendingPresetSubmit: () => {
const { pendingPresetSubmit } = get()