summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2026-04-15 13:32:52 +0800
committerGitHub <[email protected]>2026-04-15 05:32:52 +0000
commite24d104e943331077c7c775f08c024d9f7960c40 (patch)
tree98961e4ef5e3b6e08a00813298869ac4a6455273
parentbe3be32bf12872d536f7b21b0e1b0e98400c3031 (diff)
downloadopencode-e24d104e943331077c7c775f08c024d9f7960c40.tar.gz
opencode-e24d104e943331077c7c775f08c024d9f7960c40.zip
fix: update prompt input submit handler (#22566)
-rw-r--r--packages/app/src/components/prompt-input/submit.ts20
1 files changed, 13 insertions, 7 deletions
diff --git a/packages/app/src/components/prompt-input/submit.ts b/packages/app/src/components/prompt-input/submit.ts
index ad759d08e..d147d7b50 100644
--- a/packages/app/src/components/prompt-input/submit.ts
+++ b/packages/app/src/components/prompt-input/submit.ts
@@ -3,7 +3,7 @@ import { showToast } from "@opencode-ai/ui/toast"
import { base64Encode } from "@opencode-ai/util/encode"
import { Binary } from "@opencode-ai/util/binary"
import { useNavigate, useParams } from "@solidjs/router"
-import type { Accessor } from "solid-js"
+import { batch, type Accessor } from "solid-js"
import type { FileSelection } from "@/context/file"
import { useGlobalSync } from "@/context/global-sync"
import { useLanguage } from "@/context/language"
@@ -138,13 +138,17 @@ export async function sendFollowupDraft(input: FollowupSendInput) {
messageID,
})
- setBusy()
- add()
+ batch(() => {
+ setBusy()
+ add()
+ })
try {
if (!(await wait())) {
- setIdle()
- remove()
+ batch(() => {
+ setIdle()
+ remove()
+ })
return false
}
@@ -158,8 +162,10 @@ export async function sendFollowupDraft(input: FollowupSendInput) {
})
return true
} catch (err) {
- setIdle()
- remove()
+ batch(() => {
+ setIdle()
+ remove()
+ })
throw err
}
}