From abf4c67fccd828d9d58f7077d634c8237785da75 Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Sat, 11 Apr 2026 20:34:53 +0100 Subject: [PATCH] fix(ui): separate dictated prompt text --- packages/ui/src/components/prompt-input/usePromptVoiceInput.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/components/prompt-input/usePromptVoiceInput.ts b/packages/ui/src/components/prompt-input/usePromptVoiceInput.ts index 6bcc8746..0ff87d07 100644 --- a/packages/ui/src/components/prompt-input/usePromptVoiceInput.ts +++ b/packages/ui/src/components/prompt-input/usePromptVoiceInput.ts @@ -176,7 +176,7 @@ export function usePromptVoiceInput(options: UsePromptVoiceInputOptions) { const before = current.slice(0, start) const after = current.slice(end) const prefix = "" - const suffix = after.length > 0 && !after.startsWith("\n") ? "\n" : "" + const suffix = after.length > 0 ? (/^\s/.test(after) ? "" : " ") : " " const nextValue = `${before}${prefix}${text}${suffix}${after}` const cursor = before.length + prefix.length + text.length + suffix.length