mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-11 13:51:10 -07:00
feat(cli): Partial threading of AgentLoopContext. (#22978)
This commit is contained in:
@@ -46,15 +46,19 @@ describe('createMockCommandContext', () => {
|
||||
|
||||
const overrides = {
|
||||
services: {
|
||||
config: mockConfig,
|
||||
agentContext: { config: mockConfig },
|
||||
},
|
||||
};
|
||||
|
||||
const context = createMockCommandContext(overrides);
|
||||
|
||||
expect(context.services.config).toBeDefined();
|
||||
expect(context.services.config?.getModel()).toBe('gemini-pro');
|
||||
expect(context.services.config?.getProjectRoot()).toBe('/test/project');
|
||||
expect(context.services.agentContext).toBeDefined();
|
||||
expect(context.services.agentContext?.config?.getModel()).toBe(
|
||||
'gemini-pro',
|
||||
);
|
||||
expect(context.services.agentContext?.config?.getProjectRoot()).toBe(
|
||||
'/test/project',
|
||||
);
|
||||
|
||||
// Verify a default property on the same nested object is still there
|
||||
expect(context.services.logger).toBeDefined();
|
||||
|
||||
@@ -36,7 +36,7 @@ export const createMockCommandContext = (
|
||||
args: '',
|
||||
},
|
||||
services: {
|
||||
config: null,
|
||||
agentContext: null,
|
||||
|
||||
settings: {
|
||||
merged: defaultMergedSettings,
|
||||
|
||||
Reference in New Issue
Block a user