mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 03:39:54 +00:00
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 (busy && sid) {
|
||||
if (hasSelection) {
|
||||
const copied = selection.copySelection()
|
||||
|
||||
if (copied) {
|
||||
sys('copied selection')
|
||||
}
|
||||
} else if (busy && sid) {
|
||||
interruptedRef.current = true
|
||||
gw.request('session.interrupt', { session_id: sid }).catch(() => {})
|
||||
const partial = (streaming || buf.current).trimStart()
|
||||
@@ -1423,12 +1429,6 @@ export function App({ gw }: { gw: GatewayClient }) {
|
||||
statusTimerRef.current = null
|
||||
setStatus('ready')
|
||||
}, 1500)
|
||||
} else if (hasSelection) {
|
||||
const copied = selection.copySelection()
|
||||
|
||||
if (copied) {
|
||||
sys('copied selection')
|
||||
}
|
||||
} else if (input || inputBuf.length) {
|
||||
clearIn()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user