mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-16 00:51:25 -07:00
Add 'getting started' extensions documentation (#9536)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "mcp-server",
|
||||
"name": "mcp-server-example",
|
||||
"version": "1.0.0",
|
||||
"mcpServers": {
|
||||
"nodeServer": {
|
||||
"command": "node",
|
||||
"args": ["${extensionPath}${/}example.ts"]
|
||||
"args": ["${extensionPath}${/}dist${/}example.js"],
|
||||
"cwd": "${extensionPath}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "mcp-server-example",
|
||||
"version": "1.0.0",
|
||||
"description": "Example MCP Server for Gemini CLI Extension",
|
||||
"type": "module",
|
||||
"main": "example.js",
|
||||
"scripts": {
|
||||
"build": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~5.4.5",
|
||||
"@types/node": "^20.11.25"
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.11.0",
|
||||
"zod": "^3.22.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["example.ts"]
|
||||
}
|
||||
@@ -53,8 +53,18 @@ describe('extensions new command', () => {
|
||||
recursive: true,
|
||||
});
|
||||
expect(mockedFs.cp).toHaveBeenCalledWith(
|
||||
expect.stringContaining('context'),
|
||||
'/some/path',
|
||||
expect.stringContaining('context/context'),
|
||||
'/some/path/context',
|
||||
{ recursive: true },
|
||||
);
|
||||
expect(mockedFs.cp).toHaveBeenCalledWith(
|
||||
expect.stringContaining('context/custom-commands'),
|
||||
'/some/path/custom-commands',
|
||||
{ recursive: true },
|
||||
);
|
||||
expect(mockedFs.cp).toHaveBeenCalledWith(
|
||||
expect.stringContaining('context/mcp-server'),
|
||||
'/some/path/mcp-server',
|
||||
{ recursive: true },
|
||||
);
|
||||
});
|
||||
|
||||
@@ -36,7 +36,12 @@ async function copyDirectory(template: string, path: string) {
|
||||
|
||||
const examplePath = join(EXAMPLES_PATH, template);
|
||||
await mkdir(path, { recursive: true });
|
||||
await cp(examplePath, path, { recursive: true });
|
||||
const entries = await readdir(examplePath, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
const srcPath = join(examplePath, entry.name);
|
||||
const destPath = join(path, entry.name);
|
||||
await cp(srcPath, destPath, { recursive: true });
|
||||
}
|
||||
}
|
||||
|
||||
async function handleNew(args: NewArgs) {
|
||||
|
||||
Reference in New Issue
Block a user