Revert "feat(speech): add realtime prompt dictation support"

This reverts commit f9b5e2b529.
This commit is contained in:
Shantur Rathore
2026-03-24 20:52:04 +00:00
parent f9b5e2b529
commit 4e576829b7
29 changed files with 263 additions and 1572 deletions

View File

@@ -22,7 +22,7 @@ type HistorySelectOptions = {
type PromptState = {
prompt: Accessor<string>
setPrompt: (value: string, options?: { persistDraft?: boolean }) => void
setPrompt: (value: string) => void
clearPrompt: () => void
draftLoadedNonce: Accessor<number>
@@ -48,11 +48,11 @@ export function usePromptState(options: PromptStateOptions): PromptState {
const [historyDraft, setHistoryDraft] = createSignal<string | null>(null)
const [draftLoadedNonce, setDraftLoadedNonce] = createSignal(0)
const setPrompt = (value: string, setOptions?: { persistDraft?: boolean }) => {
const setPrompt = (value: string) => {
setPromptInternal(value)
// Persist drafts only when the user is at the "fresh" position (not browsing history).
// This keeps the bottom-of-history draft stable even if the user edits recalled history entries.
if (setOptions?.persistDraft !== false && historyIndex() === -1) {
if (historyIndex() === -1) {
setSessionDraftPrompt(options.instanceId(), options.sessionId(), value)
}
}