mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
add command bar option to interrupt session
This commit is contained in:
parent
678ca757c9
commit
71b04ffa99
1 changed files with 2 additions and 11 deletions
|
|
@ -156,10 +156,11 @@ export function Prompt(props: PromptProps) {
|
|||
title: "Interrupt session",
|
||||
value: "session.interrupt",
|
||||
keybind: "session_interrupt",
|
||||
disabled: status() !== "working",
|
||||
category: "Session",
|
||||
disabled: true,
|
||||
onSelect: (dialog) => {
|
||||
if (!props.sessionID) return
|
||||
if (autocomplete.visible) return
|
||||
sdk.client.session.abort({
|
||||
path: {
|
||||
id: props.sessionID,
|
||||
|
|
@ -602,16 +603,6 @@ export function Prompt(props: PromptProps) {
|
|||
)
|
||||
input.cursorOffset = input.plainText.length
|
||||
}
|
||||
if (!autocomplete.visible) {
|
||||
if (keybind.match("session_interrupt", e) && props.sessionID) {
|
||||
sdk.client.session.abort({
|
||||
path: {
|
||||
id: props.sessionID,
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}}
|
||||
onSubmit={submit}
|
||||
onPaste={async (event: PasteEvent) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue