mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
feat(core): Fully migrate packages/core to AgentLoopContext. (#22115)
This commit is contained in:
@@ -8,6 +8,7 @@ import { describe, it, expect } from 'vitest';
|
||||
import { Config } from './config.js';
|
||||
import { TRACKER_CREATE_TASK_TOOL_NAME } from '../tools/tool-names.js';
|
||||
import * as os from 'node:os';
|
||||
import type { AgentLoopContext } from './agent-loop-context.js';
|
||||
|
||||
describe('Config Tracker Feature Flag', () => {
|
||||
const baseParams = {
|
||||
@@ -21,7 +22,8 @@ describe('Config Tracker Feature Flag', () => {
|
||||
it('should not register tracker tools by default', async () => {
|
||||
const config = new Config(baseParams);
|
||||
await config.initialize();
|
||||
const registry = config.getToolRegistry();
|
||||
const loopContext: AgentLoopContext = config;
|
||||
const registry = loopContext.toolRegistry;
|
||||
expect(registry.getTool(TRACKER_CREATE_TASK_TOOL_NAME)).toBeUndefined();
|
||||
});
|
||||
|
||||
@@ -31,7 +33,8 @@ describe('Config Tracker Feature Flag', () => {
|
||||
tracker: true,
|
||||
});
|
||||
await config.initialize();
|
||||
const registry = config.getToolRegistry();
|
||||
const loopContext: AgentLoopContext = config;
|
||||
const registry = loopContext.toolRegistry;
|
||||
expect(registry.getTool(TRACKER_CREATE_TASK_TOOL_NAME)).toBeDefined();
|
||||
});
|
||||
|
||||
@@ -41,7 +44,8 @@ describe('Config Tracker Feature Flag', () => {
|
||||
tracker: false,
|
||||
});
|
||||
await config.initialize();
|
||||
const registry = config.getToolRegistry();
|
||||
const loopContext: AgentLoopContext = config;
|
||||
const registry = loopContext.toolRegistry;
|
||||
expect(registry.getTool(TRACKER_CREATE_TASK_TOOL_NAME)).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user