mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-28 23:11:19 -07:00
Serialize function calls that mutate state (#8513)
This commit is contained in:
committed by
GitHub
parent
efb57e1cef
commit
e76dda37ad
@@ -167,6 +167,7 @@ Signal: Signal number or \`(none)\` if no signal was received.
|
||||
}
|
||||
|
||||
export class ToolRegistry {
|
||||
// The tools keyed by tool name as seen by the LLM.
|
||||
private tools: Map<string, AnyDeclarativeTool> = new Map();
|
||||
private config: Config;
|
||||
private mcpClientManager: McpClientManager;
|
||||
|
||||
@@ -532,6 +532,14 @@ export enum Kind {
|
||||
Other = 'other',
|
||||
}
|
||||
|
||||
// Function kinds that have side effects
|
||||
export const MUTATOR_KINDS: Kind[] = [
|
||||
Kind.Edit,
|
||||
Kind.Delete,
|
||||
Kind.Move,
|
||||
Kind.Execute,
|
||||
] as const;
|
||||
|
||||
export interface ToolLocation {
|
||||
// Absolute path to the file
|
||||
path: string;
|
||||
|
||||
Reference in New Issue
Block a user