feat: long-running session improvements
- Hang fix: 120s timeout on compression LLM call + raw_stream channel-close handling (None => break instead of spinning) - Supervisor effective active count: stop counting finished JoinHandles as occupying capacity slots - Universal tool result size cap: truncate_if_needed() on ToolResult, applied in eval_tool_calls() after escalation block; configurable via max_tool_result_chars in AppConfig/AgentConfig - Windowed compression: compression_keep_last config param keeps the N most recent messages visible after compression - Fix pre-existing flaky test: add #[serial] to handle_list_available_unrestricted_when_no_whitelist so it does not race with TestConfigDirGuard-based tests that temporarily populate the agents data dir
This commit is contained in:
+14
-11
@@ -42,18 +42,21 @@ pub async fn raw_stream(
|
||||
if abort_signal.aborted() {
|
||||
break;
|
||||
}
|
||||
if let Some(evt) = rx.recv().await {
|
||||
if let Some(spinner) = spinner.take() {
|
||||
spinner.stop();
|
||||
}
|
||||
|
||||
match evt {
|
||||
SseEvent::Text(text) => {
|
||||
print!("{text}");
|
||||
stdout().flush()?;
|
||||
match rx.recv().await {
|
||||
None => break,
|
||||
Some(evt) => {
|
||||
if let Some(spinner) = spinner.take() {
|
||||
spinner.stop();
|
||||
}
|
||||
SseEvent::Done => {
|
||||
break;
|
||||
|
||||
match evt {
|
||||
SseEvent::Text(text) => {
|
||||
print!("{text}");
|
||||
stdout().flush()?;
|
||||
}
|
||||
SseEvent::Done => {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user