mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-14 15:21:01 -07:00
Disallow Object.create() and reflect. (#22408)
This commit is contained in:
committed by
GitHub
parent
e3df87cf1a
commit
ef5627eece
@@ -233,6 +233,15 @@ export class ToolRegistry {
|
||||
return this.messageBus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a shallow clone of the registry and its current known tools.
|
||||
*/
|
||||
clone(): ToolRegistry {
|
||||
const clone = new ToolRegistry(this.config, this.messageBus);
|
||||
clone.allKnownTools = new Map(this.allKnownTools);
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a tool definition.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user