fix(tui): suspend agent tab keybinds in shell mode
This commit is contained in:
parent
c40b478756
commit
c1ef03d53d
1 changed files with 15 additions and 0 deletions
|
|
@ -98,6 +98,21 @@ export function Prompt(props: PromptProps) {
|
||||||
const pasteStyleId = syntax().getStyleId("extmark.paste")!
|
const pasteStyleId = syntax().getStyleId("extmark.paste")!
|
||||||
let promptPartTypeId = 0
|
let promptPartTypeId = 0
|
||||||
|
|
||||||
|
createEffect(
|
||||||
|
on(
|
||||||
|
() => store.mode,
|
||||||
|
(mode, prev) => {
|
||||||
|
if (prev === "shell") command.keybinds(true)
|
||||||
|
if (mode === "shell") command.keybinds(false)
|
||||||
|
},
|
||||||
|
{ defer: true },
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
onCleanup(() => {
|
||||||
|
if (store.mode === "shell") command.keybinds(true)
|
||||||
|
})
|
||||||
|
|
||||||
sdk.event.on(TuiEvent.PromptAppend.type, (evt) => {
|
sdk.event.on(TuiEvent.PromptAppend.type, (evt) => {
|
||||||
if (!input || input.isDestroyed) return
|
if (!input || input.isDestroyed) return
|
||||||
input.insertText(evt.properties.text)
|
input.insertText(evt.properties.text)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue