mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-19 17:50:37 -07:00
Add function processOutput to AgentDefinition and typing for an agent's output (#10447)
This commit is contained in:
@@ -15,6 +15,7 @@ import type {
|
||||
SubagentActivityEvent,
|
||||
} from './types.js';
|
||||
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
||||
import { type z } from 'zod';
|
||||
|
||||
const INPUT_PREVIEW_MAX_LENGTH = 50;
|
||||
const DESCRIPTION_MAX_LENGTH = 200;
|
||||
@@ -29,10 +30,9 @@ const DESCRIPTION_MAX_LENGTH = 200;
|
||||
* live output stream.
|
||||
* 4. Formatting the final result into a {@link ToolResult}.
|
||||
*/
|
||||
export class SubagentInvocation extends BaseToolInvocation<
|
||||
AgentInputs,
|
||||
ToolResult
|
||||
> {
|
||||
export class SubagentInvocation<
|
||||
TOutput extends z.ZodTypeAny,
|
||||
> extends BaseToolInvocation<AgentInputs, ToolResult> {
|
||||
/**
|
||||
* @param params The validated input parameters for the agent.
|
||||
* @param definition The definition object that configures the agent.
|
||||
@@ -41,7 +41,7 @@ export class SubagentInvocation extends BaseToolInvocation<
|
||||
*/
|
||||
constructor(
|
||||
params: AgentInputs,
|
||||
private readonly definition: AgentDefinition,
|
||||
private readonly definition: AgentDefinition<TOutput>,
|
||||
private readonly config: Config,
|
||||
messageBus?: MessageBus,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user