From 454a8e61ff5f52f6364507dbe77a529378720a65 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Thu, 25 May 2023 14:46:57 +0200 Subject: [PATCH 1/3] polishing the code --- .../src/languageFeatures/quickFix.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/typescript-language-features/src/languageFeatures/quickFix.ts b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts index a6553902cbe..2c7175539c5 100644 --- a/extensions/typescript-language-features/src/languageFeatures/quickFix.ts +++ b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts @@ -28,10 +28,9 @@ type ApplyCodeActionCommand_args = { class EditorChatFollowUp implements Command { - id: string = 'needsBetterName.editorChateFollowUp'; + id: string = '_quickFix.editorChatFollowUp'; constructor(private readonly prompt: string, private readonly document: vscode.TextDocument, private readonly range: vscode.Range, private readonly client: ITypeScriptServiceClient) { - } async execute() { @@ -50,7 +49,7 @@ class EditorChatFollowUp implements Command { if (!filepath) { return; } - const response = await this.client.execute('navtree', { file: filepath }, (new vscode.CancellationTokenSource()).token); + const response = await this.client.execute('navtree', { file: filepath }, nulToken); if (response.type !== 'response' || !response.body?.childItems) { return; } From 0cce0c2f5105cf013c9621e7a11fc1266db69a37 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Thu, 25 May 2023 14:48:50 +0200 Subject: [PATCH 2/3] adding typescript in front --- .../src/languageFeatures/quickFix.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript-language-features/src/languageFeatures/quickFix.ts b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts index 2c7175539c5..bc2442046aa 100644 --- a/extensions/typescript-language-features/src/languageFeatures/quickFix.ts +++ b/extensions/typescript-language-features/src/languageFeatures/quickFix.ts @@ -28,7 +28,7 @@ type ApplyCodeActionCommand_args = { class EditorChatFollowUp implements Command { - id: string = '_quickFix.editorChatFollowUp'; + id: string = '_typescript.quickFix.editorChatFollowUp'; constructor(private readonly prompt: string, private readonly document: vscode.TextDocument, private readonly range: vscode.Range, private readonly client: ITypeScriptServiceClient) { } From 81f98eb8fe430b14cafb12f19b17673717126e58 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Thu, 25 May 2023 15:20:55 +0200 Subject: [PATCH 3/3] adding text to better explain the dependence on the AI extension --- extensions/typescript-language-features/package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript-language-features/package.nls.json b/extensions/typescript-language-features/package.nls.json index c46952747fd..22d62c851f2 100644 --- a/extensions/typescript-language-features/package.nls.json +++ b/extensions/typescript-language-features/package.nls.json @@ -8,7 +8,7 @@ "configuration.suggest.completeFunctionCalls": "Complete functions with their parameter signature.", "configuration.suggest.includeAutomaticOptionalChainCompletions": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires strict null checks to be enabled.", "configuration.suggest.includeCompletionsForImportStatements": "Enable/disable auto-import-style completions on partially-typed import statements.", - "typescript.experimental.aiQuickFix": "Enable/disable AI-assisted quick fixes.", + "typescript.experimental.aiQuickFix": "Enable/disable AI-assisted quick fixes. Requires an extension providing AI chat functionality.", "typescript.tsdk.desc": "Specifies the folder path to the tsserver and `lib*.d.ts` files under a TypeScript install to use for IntelliSense, for example: `./node_modules/typescript/lib`.\n\n- When specified as a user setting, the TypeScript version from `typescript.tsdk` automatically replaces the built-in TypeScript version.\n- When specified as a workspace setting, `typescript.tsdk` allows you to switch to use that workspace version of TypeScript for IntelliSense with the `TypeScript: Select TypeScript version` command.\n\nSee the [TypeScript documentation](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-newer-typescript-versions) for more detail about managing TypeScript versions.", "typescript.disableAutomaticTypeAcquisition": "Disables [automatic type acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition). Automatic type acquisition fetches `@types` packages from npm to improve IntelliSense for external libraries.", "typescript.enablePromptUseWorkspaceTsdk": "Enables prompting of users to use the TypeScript version configured in the workspace for Intellisense.",