fix: ctrlc
This commit is contained in:
+7
-7
@@ -1403,7 +1403,13 @@ export function App({ gw }: { gw: GatewayClient }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctrl(key, ch, 'c')) {
|
if (ctrl(key, ch, 'c')) {
|
||||||
if (busy && sid) {
|
if (hasSelection) {
|
||||||
|
const copied = selection.copySelection()
|
||||||
|
|
||||||
|
if (copied) {
|
||||||
|
sys('copied selection')
|
||||||
|
}
|
||||||
|
} else if (busy && sid) {
|
||||||
interruptedRef.current = true
|
interruptedRef.current = true
|
||||||
gw.request('session.interrupt', { session_id: sid }).catch(() => {})
|
gw.request('session.interrupt', { session_id: sid }).catch(() => {})
|
||||||
const partial = (streaming || buf.current).trimStart()
|
const partial = (streaming || buf.current).trimStart()
|
||||||
@@ -1423,12 +1429,6 @@ export function App({ gw }: { gw: GatewayClient }) {
|
|||||||
statusTimerRef.current = null
|
statusTimerRef.current = null
|
||||||
setStatus('ready')
|
setStatus('ready')
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} else if (hasSelection) {
|
|
||||||
const copied = selection.copySelection()
|
|
||||||
|
|
||||||
if (copied) {
|
|
||||||
sys('copied selection')
|
|
||||||
}
|
|
||||||
} else if (input || inputBuf.length) {
|
} else if (input || inputBuf.length) {
|
||||||
clearIn()
|
clearIn()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user