mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 05:24:34 -07:00
feat(core): Add tracker CRUD tools & visualization (#19489)
Co-authored-by: Jerop Kipruto <jerop@google.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2026 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
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';
|
||||
|
||||
describe('Config Tracker Feature Flag', () => {
|
||||
const baseParams = {
|
||||
sessionId: 'test-session',
|
||||
targetDir: os.tmpdir(),
|
||||
cwd: os.tmpdir(),
|
||||
model: 'gemini-1.5-pro',
|
||||
debugMode: false,
|
||||
};
|
||||
|
||||
it('should not register tracker tools by default', async () => {
|
||||
const config = new Config(baseParams);
|
||||
await config.initialize();
|
||||
const registry = config.getToolRegistry();
|
||||
expect(registry.getTool(TRACKER_CREATE_TASK_TOOL_NAME)).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should register tracker tools when tracker is enabled', async () => {
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
tracker: true,
|
||||
});
|
||||
await config.initialize();
|
||||
const registry = config.getToolRegistry();
|
||||
expect(registry.getTool(TRACKER_CREATE_TASK_TOOL_NAME)).toBeDefined();
|
||||
});
|
||||
|
||||
it('should not register tracker tools when tracker is explicitly disabled', async () => {
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
tracker: false,
|
||||
});
|
||||
await config.initialize();
|
||||
const registry = config.getToolRegistry();
|
||||
expect(registry.getTool(TRACKER_CREATE_TASK_TOOL_NAME)).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user