mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 22:02:59 -07:00
refactor(core): use SubagentState enum in RemoteSessionInvocation
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
|||||||
type RemoteAgentDefinition,
|
type RemoteAgentDefinition,
|
||||||
type AgentInputs,
|
type AgentInputs,
|
||||||
type SubagentProgress,
|
type SubagentProgress,
|
||||||
|
SubagentState,
|
||||||
} from './types.js';
|
} from './types.js';
|
||||||
import { type AgentLoopContext } from '../config/agent-loop-context.js';
|
import { type AgentLoopContext } from '../config/agent-loop-context.js';
|
||||||
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
||||||
@@ -139,13 +140,13 @@ export class RemoteSessionInvocation extends BaseToolInvocation<
|
|||||||
updateOutput({
|
updateOutput({
|
||||||
isSubagentProgress: true,
|
isSubagentProgress: true,
|
||||||
agentName,
|
agentName,
|
||||||
state: 'running',
|
state: SubagentState.RUNNING,
|
||||||
recentActivity: [
|
recentActivity: [
|
||||||
{
|
{
|
||||||
id: 'pending',
|
id: 'pending',
|
||||||
type: 'thought',
|
type: 'thought',
|
||||||
content: 'Working...',
|
content: 'Working...',
|
||||||
status: 'running',
|
status: SubagentState.RUNNING,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@@ -164,7 +165,7 @@ export class RemoteSessionInvocation extends BaseToolInvocation<
|
|||||||
const errorProgress: SubagentProgress = {
|
const errorProgress: SubagentProgress = {
|
||||||
isSubagentProgress: true,
|
isSubagentProgress: true,
|
||||||
agentName,
|
agentName,
|
||||||
state: 'error',
|
state: SubagentState.ERROR,
|
||||||
result:
|
result:
|
||||||
typeof partialProgress?.result === 'string'
|
typeof partialProgress?.result === 'string'
|
||||||
? partialProgress.result
|
? partialProgress.result
|
||||||
@@ -199,7 +200,7 @@ export class RemoteSessionInvocation extends BaseToolInvocation<
|
|||||||
const errorProgress: SubagentProgress = {
|
const errorProgress: SubagentProgress = {
|
||||||
isSubagentProgress: true,
|
isSubagentProgress: true,
|
||||||
agentName,
|
agentName,
|
||||||
state: 'error',
|
state: SubagentState.ERROR,
|
||||||
result: fullDisplay,
|
result: fullDisplay,
|
||||||
recentActivity: partialProgress?.recentActivity ?? [],
|
recentActivity: partialProgress?.recentActivity ?? [],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user