mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(tui): use paste timeout when rearming paste watchdog
Match the buffered-stdin rearm cadence to IN_PASTE state so large pastes do not spin the normal escape timeout while waiting for readable data to drain.
This commit is contained in:
parent
f542d17b00
commit
10ad7006b6
1 changed files with 4 additions and 1 deletions
|
|
@ -332,7 +332,10 @@ export default class App extends PureComponent<Props, State> {
|
||||||
// drain stdin next and clear this timer. Prevents both the spurious
|
// drain stdin next and clear this timer. Prevents both the spurious
|
||||||
// Escape key and the lost scroll event.
|
// Escape key and the lost scroll event.
|
||||||
if (this.props.stdin.readableLength > 0) {
|
if (this.props.stdin.readableLength > 0) {
|
||||||
this.incompleteEscapeTimer = setTimeout(this.flushIncomplete, this.NORMAL_TIMEOUT)
|
this.incompleteEscapeTimer = setTimeout(
|
||||||
|
this.flushIncomplete,
|
||||||
|
this.keyParseState.mode === 'IN_PASTE' ? this.PASTE_TIMEOUT : this.NORMAL_TIMEOUT
|
||||||
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue