mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
Merge branch 'main' into feature/arena-agent-collaboration
This commit is contained in:
commit
f9d4fa0a39
292 changed files with 28467 additions and 8155 deletions
|
|
@ -59,6 +59,7 @@ import {
|
|||
type TrackedToolCall,
|
||||
type TrackedCompletedToolCall,
|
||||
type TrackedCancelledToolCall,
|
||||
type TrackedExecutingToolCall,
|
||||
type TrackedWaitingToolCall,
|
||||
} from './useReactToolScheduler.js';
|
||||
import { promises as fs } from 'node:fs';
|
||||
|
|
@ -358,6 +359,23 @@ export const useGeminiStream = (
|
|||
if (toolCalls.some((tc) => tc.status === 'awaiting_approval')) {
|
||||
return StreamingState.WaitingForConfirmation;
|
||||
}
|
||||
// Check if any executing subagent task has a pending confirmation
|
||||
if (
|
||||
toolCalls.some((tc) => {
|
||||
if (tc.status !== 'executing') return false;
|
||||
const liveOutput = (tc as TrackedExecutingToolCall).liveOutput;
|
||||
return (
|
||||
typeof liveOutput === 'object' &&
|
||||
liveOutput !== null &&
|
||||
'type' in liveOutput &&
|
||||
liveOutput.type === 'task_execution' &&
|
||||
'pendingConfirmation' in liveOutput &&
|
||||
liveOutput.pendingConfirmation != null
|
||||
);
|
||||
})
|
||||
) {
|
||||
return StreamingState.WaitingForConfirmation;
|
||||
}
|
||||
if (
|
||||
isResponding ||
|
||||
toolCalls.some(
|
||||
|
|
@ -1026,6 +1044,15 @@ export const useGeminiStream = (
|
|||
clearRetryCountdown();
|
||||
}
|
||||
break;
|
||||
case ServerGeminiEventType.HookSystemMessage:
|
||||
// Display system message from hooks (e.g., Ralph Loop iteration info)
|
||||
// This is handled as a content event to show in the UI
|
||||
geminiMessageBuffer = handleContentEvent(
|
||||
event.value + '\n',
|
||||
geminiMessageBuffer,
|
||||
userMessageTimestamp,
|
||||
);
|
||||
break;
|
||||
default: {
|
||||
// enforces exhaustive switch-case
|
||||
const unreachable: never = event;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue