mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
fix(browser): answer a dialog without waiting for the file chooser intercept
This commit is contained in:
parent
1529b601ee
commit
ea08948131
1 changed files with 7 additions and 1 deletions
|
|
@ -1191,8 +1191,14 @@ export function createBrowserPage(
|
|||
const signIn = origin === "agent" ? prompts.agentWait(leavable.includes(command.action.type)) : undefined
|
||||
|
||||
try {
|
||||
const intercepting = choosers.update()
|
||||
|
||||
// Turning the file chooser intercept back on after the grace period is a renderer call, which an open
|
||||
// dialog blocks until it is answered.
|
||||
if (command.action.type === "dialog") void intercepting.catch(() => undefined)
|
||||
|
||||
return await Promise.race([
|
||||
choosers.update().then(() => {
|
||||
(command.action.type === "dialog" ? Promise.resolve() : intercepting).then(() => {
|
||||
abortError(run.controller.signal)
|
||||
|
||||
return perform(command, run.controller.signal, origin, saved)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue