From b808edabcfbf07206d0c57d42723377b8c8e55fe Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sat, 25 Oct 2025 03:42:19 -0700 Subject: [PATCH] Add basic copilot fig spec Fixes #272921 --- .../src/completions/copilot.ts | 164 ++++++++++++++++++ .../src/terminalSuggestMain.ts | 2 + 2 files changed, 166 insertions(+) create mode 100644 extensions/terminal-suggest/src/completions/copilot.ts diff --git a/extensions/terminal-suggest/src/completions/copilot.ts b/extensions/terminal-suggest/src/completions/copilot.ts new file mode 100644 index 00000000000..6457479e708 --- /dev/null +++ b/extensions/terminal-suggest/src/completions/copilot.ts @@ -0,0 +1,164 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const copilotSpec: Fig.Spec = { + name: 'copilot', + description: 'GitHub Copilot CLI - An AI-powered coding assistant', + options: [ + { + name: '--add-dir', + description: 'Add a directory to the allowed list for file access (can be used multiple times)', + args: { + name: 'directory', + template: 'folders' + }, + isRepeatable: true + }, + { + name: '--additional-mcp-config', + description: 'Additional MCP servers configuration as JSON string or file path (prefix with @)', + args: { + name: 'json', + description: 'JSON string or file path (prefix with @)' + }, + isRepeatable: true + }, + { + name: '--allow-all-paths', + description: 'Disable file path verification and allow access to any path' + }, + { + name: '--allow-all-tools', + description: 'Allow all tools to run automatically without confirmation; required for non-interactive mode' + }, + { + name: '--allow-tool', + description: 'Allow specific tools', + args: { + name: 'tools', + isVariadic: true, + isOptional: true + } + }, + { + name: '--banner', + description: 'Show the startup banner' + }, + { + name: '--continue', + description: 'Resume the most recent session' + }, + { + name: '--deny-tool', + description: 'Deny specific tools, takes precedence over --allow-tool or --allow-all-tools', + args: { + name: 'tools', + isVariadic: true, + isOptional: true + } + }, + { + name: '--disable-builtin-mcps', + description: 'Disable all built-in MCP servers (currently: github-mcp-server)' + }, + { + name: '--disable-mcp-server', + description: 'Disable a specific MCP server (can be used multiple times)', + args: { + name: 'server-name' + }, + isRepeatable: true + }, + { + name: '--disable-parallel-tools-execution', + description: 'Disable parallel execution of tools (LLM can still make parallel tool calls, but they will be executed sequentially)' + }, + { + name: '--disallow-temp-dir', + description: 'Prevent automatic access to the system temporary directory' + }, + { + name: ['-h', '--help'], + description: 'Display help for command' + }, + { + name: '--log-dir', + description: 'Set log file directory (default: ~/.copilot/logs/)', + args: { + name: 'directory', + template: 'folders' + } + }, + { + name: '--log-level', + description: 'Set the log level', + args: { + name: 'level', + suggestions: ['none', 'error', 'warning', 'info', 'debug', 'all', 'default'] + } + }, + { + name: '--model', + description: 'Set the AI model to use', + args: { + name: 'model', + suggestions: ['claude-sonnet-4.5', 'claude-sonnet-4', 'claude-haiku-4.5', 'gpt-5'] + } + }, + { + name: '--no-color', + description: 'Disable all color output' + }, + { + name: '--no-custom-instructions', + description: 'Disable loading of custom instructions from AGENTS.md and related files' + }, + { + name: ['-p', '--prompt'], + description: 'Execute a prompt directly without interactive mode', + args: { + name: 'text', + description: 'The prompt text to execute' + } + }, + { + name: '--resume', + description: 'Resume from a previous session (optionally specify session ID)', + args: { + name: 'sessionId', + isOptional: true + } + }, + { + name: '--screen-reader', + description: 'Enable screen reader optimizations' + }, + { + name: '--stream', + description: 'Enable or disable streaming mode', + args: { + name: 'mode', + suggestions: ['on', 'off'] + } + }, + { + name: ['-v', '--version'], + description: 'Show version information' + } + ], + subcommands: [ + { + name: 'help', + description: 'Display help information', + args: { + name: 'topic', + isOptional: true, + suggestions: ['config', 'commands', 'environment', 'logging', 'permissions'] + } + } + ] +}; + +export default copilotSpec; diff --git a/extensions/terminal-suggest/src/terminalSuggestMain.ts b/extensions/terminal-suggest/src/terminalSuggestMain.ts index 7ecc8affa05..13f2399d908 100644 --- a/extensions/terminal-suggest/src/terminalSuggestMain.ts +++ b/extensions/terminal-suggest/src/terminalSuggestMain.ts @@ -11,6 +11,7 @@ import codeCompletionSpec from './completions/code'; import codeInsidersCompletionSpec from './completions/code-insiders'; import codeTunnelCompletionSpec from './completions/code-tunnel'; import codeTunnelInsidersCompletionSpec from './completions/code-tunnel-insiders'; +import copilotSpec from './completions/copilot'; import gitCompletionSpec from './completions/git'; import ghCompletionSpec from './completions/gh'; import npxCompletionSpec from './completions/npx'; @@ -65,6 +66,7 @@ export const availableSpecs: Fig.Spec[] = [ codeCompletionSpec, codeTunnelCompletionSpec, codeTunnelInsidersCompletionSpec, + copilotSpec, gitCompletionSpec, ghCompletionSpec, npxCompletionSpec,