fix(ui): separate dictated prompt text

This commit is contained in:
Shantur Rathore
2026-04-11 20:34:53 +01:00
parent bc130ceb5b
commit abf4c67fcc

View File

@@ -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