mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: display permission dialog immediately when bash commands require approval
This commit is contained in:
parent
a317048d3d
commit
ef40a92387
1 changed files with 6 additions and 4 deletions
|
|
@ -57,14 +57,16 @@ export namespace PermissionNext {
|
|||
const id = input.id ?? Identifier.ascending("permission")
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
const s = state()
|
||||
const info: Info = {
|
||||
id,
|
||||
...input,
|
||||
}
|
||||
s.pending[id] = {
|
||||
info: {
|
||||
id,
|
||||
...input,
|
||||
},
|
||||
info,
|
||||
resolve,
|
||||
reject,
|
||||
}
|
||||
Bus.publish(Event.Updated, info)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue