mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 16:10:59 -07:00
feat(sdk): implement support for custom skills (#19031)
This commit is contained in:
@@ -158,6 +158,7 @@ export * from './tools/read-many-files.js';
|
||||
export * from './tools/mcp-client.js';
|
||||
export * from './tools/mcp-tool.js';
|
||||
export * from './tools/write-todos.js';
|
||||
export * from './tools/activate-skill.js';
|
||||
export * from './tools/ask-user.js';
|
||||
|
||||
// MCP OAuth
|
||||
|
||||
@@ -107,6 +107,13 @@ export class SkillManager {
|
||||
this.addSkillsWithPrecedence(builtinSkills);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds skills to the manager programmatically.
|
||||
*/
|
||||
addSkills(skills: SkillDefinition[]): void {
|
||||
this.addSkillsWithPrecedence(skills);
|
||||
}
|
||||
|
||||
private addSkillsWithPrecedence(newSkills: SkillDefinition[]): void {
|
||||
const skillMap = new Map<string, SkillDefinition>(
|
||||
this.skills.map((s) => [s.name, s]),
|
||||
|
||||
Reference in New Issue
Block a user