mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 11:04:42 -07:00
feat(core): refactor subagent tool to unified invoke_subagent tool (#24489)
This commit is contained in:
@@ -54,7 +54,9 @@ describe('browser-agent-localhost', () => {
|
||||
|
||||
const toolLogs = rig.readToolLogs();
|
||||
const browserAgentCall = toolLogs.find(
|
||||
(t) => t.toolRequest.name === 'browser_agent',
|
||||
(t) =>
|
||||
t.toolRequest.name === 'invoke_agent' &&
|
||||
JSON.parse(t.toolRequest.args).agent_name === 'browser_agent',
|
||||
);
|
||||
expect(
|
||||
browserAgentCall,
|
||||
@@ -79,7 +81,9 @@ describe('browser-agent-localhost', () => {
|
||||
|
||||
const toolLogs = rig.readToolLogs();
|
||||
const browserAgentCall = toolLogs.find(
|
||||
(t) => t.toolRequest.name === 'browser_agent',
|
||||
(t) =>
|
||||
t.toolRequest.name === 'invoke_agent' &&
|
||||
JSON.parse(t.toolRequest.args).agent_name === 'browser_agent',
|
||||
);
|
||||
expect(
|
||||
browserAgentCall,
|
||||
@@ -104,7 +108,9 @@ describe('browser-agent-localhost', () => {
|
||||
|
||||
const toolLogs = rig.readToolLogs();
|
||||
const browserAgentCall = toolLogs.find(
|
||||
(t) => t.toolRequest.name === 'browser_agent',
|
||||
(t) =>
|
||||
t.toolRequest.name === 'invoke_agent' &&
|
||||
JSON.parse(t.toolRequest.args).agent_name === 'browser_agent',
|
||||
);
|
||||
expect(
|
||||
browserAgentCall,
|
||||
@@ -129,7 +135,9 @@ describe('browser-agent-localhost', () => {
|
||||
|
||||
const toolLogs = rig.readToolLogs();
|
||||
const browserAgentCall = toolLogs.find(
|
||||
(t) => t.toolRequest.name === 'browser_agent',
|
||||
(t) =>
|
||||
t.toolRequest.name === 'invoke_agent' &&
|
||||
JSON.parse(t.toolRequest.args).agent_name === 'browser_agent',
|
||||
);
|
||||
expect(
|
||||
browserAgentCall,
|
||||
@@ -154,7 +162,9 @@ describe('browser-agent-localhost', () => {
|
||||
|
||||
const toolLogs = rig.readToolLogs();
|
||||
const browserCalls = toolLogs.filter(
|
||||
(t) => t.toolRequest.name === 'browser_agent',
|
||||
(t) =>
|
||||
t.toolRequest.name === 'invoke_agent' &&
|
||||
JSON.parse(t.toolRequest.args).agent_name === 'browser_agent',
|
||||
);
|
||||
expect(browserCalls.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user