Skip to content

Commit 181bf86

Browse files
authored
Code chat - subcommands should be sorted alphabetically (fix microsoft#253299) (microsoft#253454)
1 parent 6befe2e commit 181bf86

File tree

1 file changed

+19
-20
lines changed
  • src/vs/platform/environment/node

1 file changed

+19
-20
lines changed

src/vs/platform/environment/node/argv.ts

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ export type OptionDescriptions<T> = {
4848
export const NATIVE_CLI_COMMANDS = ['tunnel', 'serve-web'] as const;
4949

5050
export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
51+
'chat': {
52+
type: 'subcommand',
53+
description: 'Pass in a prompt to run in a chat session in the current working directory.',
54+
options: {
55+
'_': { type: 'string[]', description: localize('prompt', "The prompt to use as chat.") },
56+
'mode': { type: 'string', cat: 'o', alias: 'm', args: 'mode', description: localize('chatMode', "The mode to use for the chat session. Defaults to 'agent'.") },
57+
'add-file': { type: 'string[]', cat: 'o', alias: 'a', args: 'path', description: localize('addFile', "Add files as context to the chat session.") },
58+
'help': { type: 'boolean', cat: 'o', alias: 'h', description: localize('help', "Print usage.") }
59+
}
60+
},
61+
'serve-web': {
62+
type: 'subcommand',
63+
description: 'Run a server that displays the editor UI in browsers.',
64+
options: {
65+
'cli-data-dir': { type: 'string', args: 'dir', description: localize('cliDataDir', "Directory where CLI metadata should be stored.") },
66+
'disable-telemetry': { type: 'boolean' },
67+
'telemetry-level': { type: 'string' },
68+
}
69+
},
5170
'tunnel': {
5271
type: 'subcommand',
5372
description: 'Make the current machine accessible from vscode.dev or other machines through a secure tunnel.',
@@ -69,26 +88,6 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
6988
}
7089
}
7190
},
72-
'serve-web': {
73-
type: 'subcommand',
74-
description: 'Run a server that displays the editor UI in browsers.',
75-
options: {
76-
'cli-data-dir': { type: 'string', args: 'dir', description: localize('cliDataDir', "Directory where CLI metadata should be stored.") },
77-
'disable-telemetry': { type: 'boolean' },
78-
'telemetry-level': { type: 'string' },
79-
}
80-
},
81-
'chat': {
82-
type: 'subcommand',
83-
description: 'Pass in a prompt to run in a chat session in the current working directory.',
84-
options: {
85-
'_': { type: 'string[]', description: localize('prompt', "The prompt to use as chat.") },
86-
'mode': { type: 'string', cat: 'o', alias: 'm', args: 'mode', description: localize('chatMode', "The mode to use for the chat session. Defaults to 'agent'.") },
87-
'add-file': { type: 'string[]', cat: 'o', alias: 'a', args: 'path', description: localize('addFile', "Add files as context to the chat session.") },
88-
'help': { type: 'boolean', cat: 'o', alias: 'h', description: localize('help', "Print usage.") }
89-
}
90-
},
91-
9291
'diff': { type: 'boolean', cat: 'o', alias: 'd', args: ['file', 'file'], description: localize('diff', "Compare two files with each other.") },
9392
'merge': { type: 'boolean', cat: 'o', alias: 'm', args: ['path1', 'path2', 'base', 'result'], description: localize('merge', "Perform a three-way merge by providing paths for two modified versions of a file, the common origin of both modified versions and the output file to save merge results.") },
9493
'add': { type: 'boolean', cat: 'o', alias: 'a', args: 'folder', description: localize('add', "Add folder(s) to the last active window.") },

0 commit comments

Comments
 (0)