Commit Graph

1503 Commits

Author SHA1 Message Date
Nathan Shively-Sanders
5e6ec068b2 Split TS' AI-backed code actions into separate entries (#201140)
* Split TS' AI-backed code actions into separate entries

Lets the user decide whether to add AI to their code action, which shows
intent, which is good for us to learn whether people actually want this.

Related: this should be unflagged for insiders. To do this, do I just
delete the flags?

* Stop appending a duplicate message in missingFunctionDeclaration

* Fix: quickfix was still showing Copilot-only

It's a workaround--I'm not sure of the right way to do this.

* Update to use `isAI`

* Put AI code actions after others.

* Add isAI to rest of code actions

* Remove flags for TS AI code actions

* Check for copilot-chat instead of copilot

It's possible to have copilot installed without copilot-chat.

* Fix file casing

---------

Co-authored-by: Matt Bierner <matb@microsoft.com>
2024-01-31 22:46:39 +00:00
Matt Bierner
e9ce823bf1 Fix potential race creating JS/TS temp dir (#203367)
Fixes #203335
2024-01-29 09:24:41 -08:00
Matt Bierner
34b0301287 Fix insert range of ts entries with replacement spans (#202287)
Fix #202153
2024-01-11 23:27:22 +01:00
Ronak Jain
c1bc5415f8 Fix tsserver crashing when using custom node path (#201966)
* use quotes in spawned process name

* Use JSON stringify to handle quotes as well
2024-01-09 11:02:53 -08:00
Matt Bierner
ee91ce84bb Show TS Server commands in diff editors and notebook cells (#201847)
Fixes #201734

Switches to use tabs so that we can enable TS commands if you're in a JS/TS editor in a diff editor or notebook cell
2024-01-04 15:54:50 -08:00
Johnson Chu
40c0f939e5 Fix optionalReplacementSpan not being applied to completion entries (#200945)
* Fix optionalReplacementSpan not being applied to completion entries

* Format completions.ts
2024-01-03 14:40:11 -08:00
Andrew Branch
a1cfe91f9c Fix preferTypeOnlyAutoImports preference getter (#201376) 2024-01-03 18:55:21 +00:00
Matt Bierner
9621add460 Fix undefined getting printed (#201250)
Fixes #201244
2023-12-20 00:22:43 +01:00
Isabel Duan
948f6a1aaf fix typescript/54492: check if file rename changes extension (#200220)
check if file extension has been changed
2023-12-13 01:23:10 +00:00
Matt Bierner
a0d9408921 Use satisfies in a few more places (#200181)
Avoids casing issues
2023-12-06 12:27:47 -08:00
Matt Bierner
cd9b560777 Lowercase separator title (#200184)
Matches our other labels
2023-12-06 21:13:13 +01:00
Matt Bierner
673006e0e3 Fix copilot quick fix (#200162) 2023-12-06 18:15:48 +01:00
Aiday Marlen Kyzy
30ac9a452d Making move to code action appear less often (#198864)
taking code from other pr
2023-11-29 02:00:19 +01:00
Michael Lively
e33219dde3 Add multi-document highlight provider feature (#198467)
* multi-doc api + text provider editor feature + extHost hookup + typescript semantic multi-doc

* fix disposable leak, wasn't setting providers to the disposableMap

* filter unnecessary models to fix errors with typescript provider

* fix nits (todo - doc filter)

* fix typo from merge conflict

* expose LanguageSelector in multi-doc provider, filter out 0 score models
2023-11-22 10:07:20 -08:00
Aiday Marlen Kyzy
9524207999 Reverting changes in TypeScript language features extension (#198858)
Revert "Merge pull request #198775 from microsoft/aiday/typeScriptChanges"

This reverts commit 5d9d06611b, reversing
changes made to 823d54f86e.
2023-11-22 14:55:04 +01:00
Aiday Marlen Kyzy
edf26e4bae polishing the code with review 2023-11-22 11:08:47 +01:00
Aiday Marlen Kyzy
ddc7a1e51a tweaking the recursion, so that we do not do the recursion for a long time 2023-11-21 17:40:06 +01:00
Aiday Marlen Kyzy
5e89263580 polishing the code after review 2023-11-21 15:42:14 +01:00
Aiday Marlen Kyzy
e46541edaf removing export 2023-11-21 15:06:59 +01:00
Aiday Marlen Kyzy
5b297c488c Squashed commit of the following:
commit bc4dc881ba
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 13:07:39 2023 +0100

    adding one more possibility which is lightbulb sparkle and auto-fix

commit a5dfa1f620
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 12:55:44 2023 +0100

    removing one because should be using zero based ranges

commit 78b29c0b56
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 12:49:50 2023 +0100

    using the navTree request instead

commit ba1b8fef77
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 12:20:38 2023 +0100

    polishing the code

commit 5ae767f43a
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 12:14:35 2023 +0100

    polishing the code

commit fd347bb0e2
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 11:03:04 2023 +0100

    remembering the class array that was previously set, so not removing the whole class array

commit fd5fd11bfc
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 10:54:18 2023 +0100

    using the appropriate icon

commit df29259136
Merge: 5285e1d97e 633efd8c55
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Tue Nov 21 10:47:18 2023 +0100

    Merge branch 'main' into aiday/differentLightBulbDependingOnCodeAction

commit 5285e1d97e
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Mon Nov 20 18:24:45 2023 +0100

    making the filtering function synchronous

commit a86c36c6b0
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Mon Nov 20 17:42:11 2023 +0100

    adding code in order to also include move to a new file only when on the range of interest

commit 2cedc2ffb4
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Mon Nov 20 17:11:13 2023 +0100

    not showing move to file all the time

commit 8f4ade1d3d
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Mon Nov 20 14:50:56 2023 +0100

    removing the code which does the selection check

commit 2e0e6c534e
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Mon Nov 20 14:31:55 2023 +0100

    adding code in order to execute the AI code action when it is unique

commit a037c7e8e9
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Mon Nov 20 14:05:32 2023 +0100

    adding code in order to be able to detect when different code actions partitions appear

commit abd005b78b
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Fri Nov 17 18:07:26 2023 +0100

    changing the heuristic of the move to code actions

commit e4886eab7a
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Fri Nov 17 17:25:57 2023 +0100

    removing model

commit 79102a983b
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Fri Nov 17 17:25:48 2023 +0100

    making lightbub icon appear on empty lines

commit ee8bb3475b
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Fri Nov 17 17:09:15 2023 +0100

    directly resolving the code action when it is an ai code action

commit 4d4bcb9b34
Author: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
Date:   Fri Nov 17 17:02:34 2023 +0100

    wip allow lightbulb menu to specify different icons depending on the code actions
2023-11-21 15:05:17 +01:00
Matt Bierner
620340c863 Bump hardcoded web TS version (#198713) 2023-11-21 00:25:20 +01:00
Matt Bierner
1d92f24bd8 Add telemetry for TS ai refactorings (#198708) 2023-11-20 15:01:33 -08:00
Matt Bierner
032109e5a7 Don't show references on anon function (#198711)
Fixes #198389
2023-11-20 23:08:00 +01:00
Matt Bierner
6805bb6d2b Hook up mapped code edits experiment for TS (#198478)
For https://github.com/microsoft/TypeScript/pull/55406
2023-11-17 02:07:09 +00:00
John Murray
77dc8793db Add typescript.implementationsCodeLens.showOnInterfaceMethods setting (#136282) (#198419)
* Add `typescript.implementationsCodeLens.showOnInterfaceMethods` setting (#136282)

* Update codelenses when `typescript.referencesCodeLens.showOnAllFunctions` changes

* Improve handling of disposables
2023-11-16 22:46:41 +00:00
Matt Bierner
d98713bad1 Always send CodeActionTriggerKind (#198364)
Makes us always send this along instead of sometimes sending undefined
2023-11-15 14:02:55 -08:00
Ronak Jain
d72005bfa7 Fix tsconfig resolution for navigation (#192851)
* Fix tsconfig resolution

* Resolve based on link type
2023-11-06 11:46:09 -08:00
Matt Bierner
c57992a973 Always run code lens implementations on semantic server (#197578)
Fixes #197286

Already fixed this for references code lens. Just porting it to impl code lens now too
2023-11-06 20:05:00 +01:00
Matt Bierner
0279c52a02 Switch back to node as default for moduleResolution (#197031)
Fixes #196554

Looks like bundler breaks `require()` intellisense
2023-10-31 00:40:44 +01:00
Andrew Branch
82ece597ee Add setting for preferring type-only imports (#196123) 2023-10-30 18:14:58 +00:00
Yuto Liyosa
672033e151 Resolve absolute file target links in tsconfig (#195514) (#195759)
fix #195514 again
2023-10-18 00:23:59 +00:00
Matt Bierner
6ebac1703b Updated inferred JS/TS project config (#194847)
- Switch to target es2022 by default
- Also switch default module resolution to `bundler` if using more recent TS versions
2023-10-05 12:44:38 +02:00
Matt Bierner
a12bb0543d Restore copilot fixes/refactorings (#194092)
Reverts #193810 to restore #193810
2023-09-26 09:40:27 +02:00
Johannes Rieken
b7fad0df6d Revert "Copilot-based TS refactors" 2023-09-22 16:05:04 +02:00
Nathan Shively-Sanders
d534d6b441 Tweak wording and position of copilot infer-types 2023-09-21 09:36:28 -07:00
Nathan Shively-Sanders
a9a66e4dc3 Correct+customise copilot-specific titles 2023-09-21 09:25:11 -07:00
Nathan Shively-Sanders
1e7d82c778 Code correctly treats empty config as default-false 2023-09-21 08:37:51 -07:00
Nathan Shively-Sanders
6c154dd347 Mark quickfixes/refactors with Copilot: prefix 2023-09-20 15:37:34 -07:00
Nathan Shively-Sanders
ba511b36f1 Merge branch 'main' into ai-codefixes 2023-09-20 08:35:13 -07:00
Aiday Marlen Kyzy
0a45b2737a typos 2023-09-15 15:13:50 +02:00
Nathan Shively-Sanders
968d1bd1bb Merge branch 'main' into ai-codefixes 2023-09-14 11:24:50 -07:00
Nathan Shively-Sanders
d1d6055aa5 Add more complex options 2023-09-14 11:23:16 -07:00
Nathan Shively-Sanders
b1b350626f Fix lints 2023-09-14 09:16:39 -07:00
Stephen Melvin
627cffc8ed Fixed import paths not being updated when multiple files are moved (#191403)
* Modified updatePathsOnRename.ts to fix issue where import paths were not being updated when multiple files were moved.

* Removed errant console log

* Changed return statements to continue in for-of loop

---------

Co-authored-by: Stephen Melvin <steve.melvin@dtn.com>
2023-09-13 21:23:21 +00:00
Gabriela Araujo Britto
f563e33800 [typescript-language-features] Add option for excluding library symbols in "Go to Symbol in Workspace" (#192798)
* add option for excluding library symbols

* clarify in message that new option requires ts 5.3

* remove expect error
2023-09-13 18:19:52 +00:00
Nathan Shively-Sanders
3328d54c89 Clean up for review
Remove unused, abandoned ideas.
2023-09-08 09:28:53 -07:00
Nathan Shively-Sanders
7906b2bb61 Merge branch 'main' into ai-codefixes 2023-09-07 10:46:52 -07:00
Nathan Shively-Sanders
9c5b16a444 Switch entirely to inline+action-based expansion
Except for a couple that still rely only on navtree-based expansion.
Lots of cleanup and standardisation.
2023-09-07 10:13:01 -07:00
Gabriela Araujo Britto
efc1b30976 Add custom Node option to run TS Server (#191019)
* Add config for running tsserver on custom node

* log when custom node install is used

* create node version manager

* get node path from node version manager everywhere

* modify prompt

* fix useIpc

* use spawn for custom node and set windowsHide

* detect node

* link memory setting to node setting
2023-09-06 20:27:16 +00:00
Nathan Shively-Sanders
a0a2cb4de0 Pretty good ranges based on RefactorInfo
Results are not pretty good yet. They are still below average.
2023-09-06 12:54:07 -07:00