mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-14 23:31:13 -07:00
refactor(core): model-dependent tool definitions (#18563)
This commit is contained in:
@@ -825,4 +825,19 @@ describe('ShellTool', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('getSchema', () => {
|
||||
it('should return the base schema when no modelId is provided', () => {
|
||||
const schema = shellTool.getSchema();
|
||||
expect(schema.name).toBe(SHELL_TOOL_NAME);
|
||||
expect(schema.description).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should return the schema from the resolver when modelId is provided', () => {
|
||||
const modelId = 'gemini-2.0-flash';
|
||||
const schema = shellTool.getSchema(modelId);
|
||||
expect(schema.name).toBe(SHELL_TOOL_NAME);
|
||||
expect(schema.description).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user