mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 03:24:42 -07:00
feat(core): Thread AgentLoopContext through core. (#21944)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
import { randomUUID } from 'node:crypto';
|
||||
import type { Config } from '../../config/config.js';
|
||||
import { type AgentLoopContext } from '../../config/agent-loop-context.js';
|
||||
import { LocalAgentExecutor } from '../local-executor.js';
|
||||
import { safeJsonToMarkdown } from '../../utils/markdownUtils.js';
|
||||
import {
|
||||
@@ -179,7 +180,7 @@ export class BrowserAgentInvocation extends BaseToolInvocation<
|
||||
ToolResult
|
||||
> {
|
||||
constructor(
|
||||
private readonly config: Config,
|
||||
private readonly context: AgentLoopContext,
|
||||
params: AgentInputs,
|
||||
messageBus: MessageBus,
|
||||
_toolName?: string,
|
||||
@@ -194,6 +195,10 @@ export class BrowserAgentInvocation extends BaseToolInvocation<
|
||||
);
|
||||
}
|
||||
|
||||
private get config(): Config {
|
||||
return this.context.config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a concise, human-readable description of the invocation.
|
||||
*/
|
||||
@@ -409,7 +414,7 @@ export class BrowserAgentInvocation extends BaseToolInvocation<
|
||||
// Create and run executor with the configured definition
|
||||
const executor = await LocalAgentExecutor.create(
|
||||
definition,
|
||||
this.config,
|
||||
this.context,
|
||||
onActivity,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user