mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-28 15:01:14 -07:00
Disallow unnecessary awaits. (#15172)
This commit is contained in:
committed by
GitHub
parent
3e9a0a7628
commit
7f2d33458a
@@ -270,9 +270,7 @@ describe('AgentExecutor', () => {
|
||||
);
|
||||
parentToolRegistry.registerTool(MOCK_TOOL_NOT_ALLOWED);
|
||||
|
||||
vi.spyOn(mockConfig, 'getToolRegistry').mockResolvedValue(
|
||||
parentToolRegistry,
|
||||
);
|
||||
vi.spyOn(mockConfig, 'getToolRegistry').mockReturnValue(parentToolRegistry);
|
||||
|
||||
mockedGetDirectoryContextString.mockResolvedValue(
|
||||
'Mocked Environment Context',
|
||||
|
||||
@@ -106,7 +106,7 @@ export class AgentExecutor<TOutput extends z.ZodTypeAny> {
|
||||
): Promise<AgentExecutor<TOutput>> {
|
||||
// Create an isolated tool registry for this agent instance.
|
||||
const agentToolRegistry = new ToolRegistry(runtimeContext);
|
||||
const parentToolRegistry = await runtimeContext.getToolRegistry();
|
||||
const parentToolRegistry = runtimeContext.getToolRegistry();
|
||||
|
||||
if (definition.toolConfig) {
|
||||
for (const toolRef of definition.toolConfig.tools) {
|
||||
|
||||
Reference in New Issue
Block a user