mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-30 01:41:43 +00:00
fix(tui): queue busy submissions gracefully
This commit is contained in:
parent
5cd41d2b3b
commit
ee7ef33b02
3 changed files with 51 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { REASONING_PULSE_MS, STREAM_BATCH_MS } from '../config/timing.js'
|
||||
import { REASONING_PULSE_MS, STREAM_BATCH_MS, STREAM_IDLE_BATCH_MS, STREAM_TYPING_BATCH_MS } from '../config/timing.js'
|
||||
import type { SessionInterruptResponse, SubagentEventPayload } from '../gatewayTypes.js'
|
||||
import { hasReasoningTag, splitReasoning } from '../lib/reasoning.js'
|
||||
import {
|
||||
|
|
@ -75,8 +75,17 @@ class TurnController {
|
|||
private reasoningStreamingTimer: Timer = null
|
||||
private reasoningTimer: Timer = null
|
||||
private streamTimer: Timer = null
|
||||
private streamDelay = STREAM_IDLE_BATCH_MS
|
||||
private toolProgressTimer: Timer = null
|
||||
|
||||
boostStreamingForTyping() {
|
||||
this.streamDelay = STREAM_TYPING_BATCH_MS
|
||||
}
|
||||
|
||||
relaxStreaming() {
|
||||
this.streamDelay = STREAM_IDLE_BATCH_MS
|
||||
}
|
||||
|
||||
clearReasoning() {
|
||||
this.reasoningTimer = clear(this.reasoningTimer)
|
||||
this.reasoningText = ''
|
||||
|
|
@ -493,7 +502,7 @@ class TurnController {
|
|||
const raw = this.bufRef.trimStart()
|
||||
const visible = hasReasoningTag(raw) ? splitReasoning(raw).text : raw
|
||||
patchTurnState({ streaming: visible })
|
||||
}, STREAM_BATCH_MS)
|
||||
}, this.streamDelay)
|
||||
}
|
||||
|
||||
startMessage() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue