mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 05:42:54 -07:00
feat(core): Thread AgentLoopContext through core. (#21944)
This commit is contained in:
@@ -7,12 +7,16 @@
|
||||
import type { GeminiClient } from '../core/client.js';
|
||||
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
||||
import type { ToolRegistry } from '../tools/tool-registry.js';
|
||||
import type { Config } from './config.js';
|
||||
|
||||
/**
|
||||
* AgentLoopContext represents the execution-scoped view of the world for a single
|
||||
* agent turn or sub-agent loop.
|
||||
*/
|
||||
export interface AgentLoopContext {
|
||||
/** The global runtime configuration. */
|
||||
readonly config: Config;
|
||||
|
||||
/** The unique ID for the current user turn or agent thought loop. */
|
||||
readonly promptId: string;
|
||||
|
||||
|
||||
@@ -1100,6 +1100,10 @@ export class Config implements McpContext, AgentLoopContext {
|
||||
);
|
||||
}
|
||||
|
||||
get config(): Config {
|
||||
return this;
|
||||
}
|
||||
|
||||
isInitialized(): boolean {
|
||||
return this.initialized;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user