mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 02:54:31 -07:00
feat(core): Disable topic updates for subagents (#25567)
This commit is contained in:
committed by
GitHub
parent
8379099e85
commit
f7b2632939
@@ -55,8 +55,9 @@ export const GeneralistAgent = (
|
||||
return {
|
||||
systemPrompt: getCoreSystemPrompt(
|
||||
context.config,
|
||||
/*useMemory=*/ undefined,
|
||||
/*userMemory=*/ undefined,
|
||||
/*interactiveOverride=*/ false,
|
||||
/*topicUpdateNarrationOverride=*/ false,
|
||||
),
|
||||
query: '${request}',
|
||||
};
|
||||
|
||||
@@ -82,6 +82,7 @@ import { CompleteTaskTool } from '../tools/complete-task.js';
|
||||
import {
|
||||
COMPLETE_TASK_TOOL_NAME,
|
||||
ACTIVATE_SKILL_TOOL_NAME,
|
||||
UPDATE_TOPIC_TOOL_NAME,
|
||||
} from '../tools/definitions/base-declarations.js';
|
||||
|
||||
/** A callback function to report on agent activity. */
|
||||
@@ -189,6 +190,10 @@ export class LocalAgentExecutor<TOutput extends z.ZodTypeAny> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tool.name === UPDATE_TOPIC_TOOL_NAME) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clone the tool, so it gets its own state and subagent messageBus
|
||||
const clonedTool = tool.clone(subagentMessageBus);
|
||||
agentToolRegistry.registerTool(clonedTool);
|
||||
|
||||
Reference in New Issue
Block a user