mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-13 19:40:28 -07:00
feat(core): support shipping built-in skills with the CLI (#16300)
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import * as path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { Storage } from '../config/storage.js';
|
||||
import { type SkillDefinition, loadSkillsFromDir } from './skillLoader.js';
|
||||
import type { GeminiCLIExtension } from '../config/config.js';
|
||||
@@ -56,9 +58,16 @@ export class SkillManager {
|
||||
* Discovers built-in skills.
|
||||
*/
|
||||
private async discoverBuiltinSkills(): Promise<void> {
|
||||
// Built-in skills can be added here.
|
||||
// For now, this is a placeholder for where built-in skills will be loaded from.
|
||||
// They could be loaded from a specific directory within the package.
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const builtinDir = path.join(__dirname, 'builtin');
|
||||
|
||||
const builtinSkills = await loadSkillsFromDir(builtinDir);
|
||||
|
||||
for (const skill of builtinSkills) {
|
||||
skill.isBuiltin = true;
|
||||
}
|
||||
|
||||
this.addSkillsWithPrecedence(builtinSkills);
|
||||
}
|
||||
|
||||
private addSkillsWithPrecedence(newSkills: SkillDefinition[]): void {
|
||||
|
||||
Reference in New Issue
Block a user