|
|
|
@ -57,13 +57,40 @@ We now show a special attachment control in the chat input that gives a hint abo
|
|
|
|
|
|
|
|
|
|
There are no changes to the behavior of the editor context. When the active editor has a selection, then just the selection is included. Otherwise, just the code that is scrolled into view is included. You can still attach other files or the full file by using the paperclip button or by typing `#` in the chat prompt.
|
|
|
|
|
|
|
|
|
|
### Symbol links in responses
|
|
|
|
|
### Interactive workspace symbol links
|
|
|
|
|
|
|
|
|
|
<!-- TODO: mjbvz -->
|
|
|
|
|
One common use case of Copilot chat is asking questions about code in your workspace, such as using `/tests` to generate new unit tests for the selected code or asking `@workspace` to find some specific class or function in your project. This iteration we've added enhanced links for any workspace symbols that Copilot mentions when answering these questions. These symbol links can help you better understand Copilot responses and learn more about the symbols used in them.
|
|
|
|
|
|
|
|
|
|
### Workspace indexing
|
|
|
|
|
Symbol links are rendered as little pills in the response, just like the [file links](./v1_94#improved-file-links-in-chat-responses) we added last iteration. To start learn more about a symbol, just click on the symbol link to jump to that symbol's definition:
|
|
|
|
|
|
|
|
|
|
<!-- TODO: mjbvz -->
|
|
|
|
|
<video src="images/1_95/copilot-symbol-links-overview.mp4" title="Symbols links being rendered in a Copilot response. Clicking on then navigates to the symbol definition." autoplay loop controls muted></video>
|
|
|
|
|
|
|
|
|
|
You can also hover over the symbol link to see which file the symbol is defined in:
|
|
|
|
|
|
|
|
|
|
![Hovering over a symbol link to see the file it's defined in](images/1_95/copilot-symbol-link-hover.png)
|
|
|
|
|
|
|
|
|
|
To start exploring a symbol in more detail, just right click on the symbol link to bring up a context menu with options such as `Go to Implementations` and
|
|
|
|
|
`Go to References`:
|
|
|
|
|
|
|
|
|
|
![Using the context menu on a symbol link to learn more about a symbol](images/1_95/copilot-symbol-link-context-menu.png)
|
|
|
|
|
|
|
|
|
|
Basic symbol links should work for any language that supports `Go to definition`. More advanced IntelliSense options such `Go to Implementations` also require support for language. Make sure to install language extensions to get the best symbol support for any programming languages used in Copilot responses.
|
|
|
|
|
|
|
|
|
|
### Workspace indexing UI
|
|
|
|
|
|
|
|
|
|
[`@workspace`](../docs/copilot/workspace-context.md) lets you ask questions about code in your current project. This is implemented using either [GitHub's code search](https://github.blog/2023-02-06-the-technology-behind-githubs-new-code-search) or an smart local index that we construct. This iteration, we've added a few more UI elements that let you understand how this workspace index is being used.
|
|
|
|
|
|
|
|
|
|
First up, the new `GitHub Copilot: Build Local Workspace index` command lets you explicitly start indexing the currently workspace. This indexing is normally kicked off automatically the first time you ask a `@workspace` question. With the command you can instead start indexing any time. The command also enables indexing of larger workspaces, currently up to 2000 files (not including ignored files such the `node_modules` or `out` directories).
|
|
|
|
|
|
|
|
|
|
While the index is being built, we now also show a progress item in the status bar:
|
|
|
|
|
|
|
|
|
|
![A status bar item showing the progress of indexing the current workspace](images/1_95/copilot-workspace-ui-progress.png)
|
|
|
|
|
|
|
|
|
|
Indexing workspaces with many hundreds of files can take a little time. If you try to ask a `@workspace` question while indexing is being constructed, instead of waiting Copilot will try to respond quickly using a simpler local index that can be built up more quickly. We now show a warning in the response when this happens:
|
|
|
|
|
|
|
|
|
|
![A warning showing on a response telling the user the Copilot user](copilot-workspace-ui-warning.png)
|
|
|
|
|
|
|
|
|
|
Notice that Copilot still was able to answer the question in this case, even through it was using the simpler local index instead of the more advanced one. That's often the case, although more ambagious or complex questions may only be answerable once the smarter index has been constructed. Also keep in mind that if your workspace is backed by a GitHub repository, we can instead use [GitHub's code search](https://github.blog/2023-02-06-the-technology-behind-githubs-new-code-search) to answer questions. That means that code search will be used instead of the simpler local index.
|
|
|
|
|
|
|
|
|
|
### Chat settings updates
|
|
|
|
|
|
|
|
|
@ -291,7 +318,19 @@ The [VS Code Speech](https://marketplace.visualstudio.com/items?itemName=ms-vsco
|
|
|
|
|
|
|
|
|
|
### TypeScript 5.7
|
|
|
|
|
|
|
|
|
|
<!-- TODO: mjbvz -->
|
|
|
|
|
We've continued improving our support the upcoming TypeScript 5.7 release. Check out the and the [TypeScript 5.7 beta blog post](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/) and the [TypeScript 5.7 plan](https://github.com/microsoft/TypeScript/issues/59905) for details.
|
|
|
|
|
|
|
|
|
|
To start using preview builds of TypeScript 5.7, install the [TypeScript Nightly extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next).
|
|
|
|
|
|
|
|
|
|
### Update imports on paste for JavaScript and TypeScript
|
|
|
|
|
|
|
|
|
|
Tried of having to add imports after moving code between files? Try out our experimental support for updating imports on paste! This this feature, when you copy and paste code between editors, VS Code will automatically add imports when the code is pasted:
|
|
|
|
|
|
|
|
|
|
<video src="images/1_95/jsts-update-imports-paste.mp4" title="Title" autoplay loop controls muted></video>
|
|
|
|
|
|
|
|
|
|
Notice how it not only added imports, it even added a new export for a local variable that was used in the pasted code!
|
|
|
|
|
|
|
|
|
|
Try try this out today, make sure you are using TypeScript 5.7+. Then enable `javascript.experimental.updateImportsOnPaste`/`typescript.experimental.updateImportsOnPaste`. Currently this is only support when pasting between text editors in the same VS Code window.
|
|
|
|
|
|
|
|
|
|
## Proposed APIs
|
|
|
|
|
|
|
|
|
@ -310,7 +349,7 @@ In addition, <https://vscode.dev> is now also running 100% with ESM (ECMAScript
|
|
|
|
|
|
|
|
|
|
### Migration to ESLint 9
|
|
|
|
|
|
|
|
|
|
<!-- TODO: mjbvz -->
|
|
|
|
|
We've updated both the main VS Code repo and all of our [extension samples](https://github.com/microsoft/vscode-extension-samples) to use ESLint 9. This included migrating all of our ESLint configuration to use modern [flat configs](https://eslint.org/blog/2023/10/flat-config-rollout-plans/).
|
|
|
|
|
|
|
|
|
|
## Notable fixes
|
|
|
|
|
|
|
|
|
|