@@ -60,6 +60,7 @@ export const codeSpecOptionsAndSubcommands = [
6060 '--version' ,
6161 '--wait' ,
6262 'tunnel' ,
63+ 'chat [<prompt>]' ,
6364 'serve-web' ,
6465 'help' ,
6566 'status' ,
@@ -71,6 +72,7 @@ export function createCodeTestSpecs(executable: string): ITestSpec[] {
7172 const categoryOptions = [ 'azure' , 'data science' , 'debuggers' , 'extension packs' , 'education' , 'formatters' , 'keymaps' , 'language packs' , 'linters' , 'machine learning' , 'notebooks' , 'programming languages' , 'scm providers' , 'snippets' , 'testing' , 'themes' , 'visualization' , 'other' ] ;
7273 const logOptions = [ 'critical' , 'error' , 'warn' , 'info' , 'debug' , 'trace' , 'off' ] ;
7374 const syncOptions = [ 'on' , 'off' ] ;
75+ const chatOptions = [ '--add-file <file>' , '--help' , '--mode <mode>' , '-a <file>' , '-h' , '-m <mode>' ] ;
7476
7577 const typingTests : ITestSpec [ ] = [ ] ;
7678 for ( let i = 1 ; i < executable . length ; i ++ ) {
@@ -119,6 +121,11 @@ export function createCodeTestSpecs(executable: string): ITestSpec[] {
119121 { input : `${ executable } --category |` , expectedCompletions : categoryOptions } ,
120122 { input : `${ executable } --category a|` , expectedCompletions : categoryOptions } ,
121123
124+ // Chat subcommand tests
125+ { input : `${ executable } chat |` , expectedCompletions : chatOptions } ,
126+ { input : `${ executable } chat --mode |` , expectedCompletions : [ 'agent' , 'ask' , 'edit' ] } ,
127+ { input : `${ executable } chat --add-file |` , expectedResourceRequests : { type : 'files' , cwd : testPaths . cwd } } ,
128+
122129 // Middle of command
123130 { input : `${ executable } | --locale` , expectedCompletions : codeSpecOptionsAndSubcommands , expectedResourceRequests : { type : 'both' , cwd : testPaths . cwd } } ,
124131 ] ;
@@ -177,6 +184,7 @@ export function createCodeTunnelTestSpecs(executable: string): ITestSpec[] {
177184 '-s' ,
178185 '-v' ,
179186 '-w' ,
187+ 'chat [<prompt>]' ,
180188 'ext' ,
181189 'help' ,
182190 'serve-web' ,
@@ -273,6 +281,9 @@ export function createCodeTunnelTestSpecs(executable: string): ITestSpec[] {
273281 { input : `${ executable } tunnel unregister |` , expectedCompletions : [ ...commonFlags ] } ,
274282 { input : `${ executable } tunnel service |` , expectedCompletions : [ ...commonFlags , 'help' , 'install' , 'log' , 'uninstall' ] } ,
275283 { input : `${ executable } tunnel help |` , expectedCompletions : helpSubcommands } ,
284+ { input : `${ executable } chat |` , expectedCompletions : [ '--mode <mode>' , '--add-file <file>' , '--help' , '-m <mode>' , '-a <file>' , '-h' ] } ,
285+ { input : `${ executable } chat --mode |` , expectedCompletions : [ 'agent' , 'ask' , 'edit' ] } ,
286+ { input : `${ executable } chat --add-file |` , expectedResourceRequests : { type : 'files' , cwd : testPaths . cwd } } ,
276287 { input : `${ executable } serve-web |` , expectedCompletions : serveWebSubcommandsAndFlags } ,
277288 { input : `${ executable } ext |` , expectedCompletions : extSubcommands } ,
278289 { input : `${ executable } ext list |` , expectedCompletions : [ ...commonFlags , '--category [<category>]' , '--show-versions' ] } ,
0 commit comments