Skip to content

Add codefix support in the TypeSpec playground#9819

Open
Copilot wants to merge 4 commits intomainfrom
copilot/separate-codefixes-implementation
Open

Add codefix support in the TypeSpec playground#9819
Copilot wants to merge 4 commits intomainfrom
copilot/separate-codefixes-implementation

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

  • Export resolveCodeFix from packages/compiler/src/index.ts
  • Add updateDiagnosticsForCodeFixes() function and working code action provider in packages/playground/src/services.ts
  • Update packages/playground/src/react/playground.tsx to call updateDiagnosticsForCodeFixes() after each compilation
  • Split changelog into separate entries for compiler and playground
  • Build and lint pass, CodeQL security check clean
Original prompt

This section details on the original issue you should resolve

<issue_title>Codefixes in the playground</issue_title>
<issue_description>PR here #2888 add codefixes support but due to how the language server and playground differ in reporting diagnostic we cannot easily make use of the codefixes in the playground.
So separating that implementation</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Separate codefixes implementation for playground Add codefix support in the TypeSpec playground Feb 26, 2026
@timotheeguerin
Copy link
Member

/azp run typespec - pr tools

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 26, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@timotheeguerin
Copy link
Member

Works well
image

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@9819
npm i https://pkg.pr.new/microsoft/typespec/@typespec/playground@9819

commit: 93422c2

@github-actions
Copy link
Contributor

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/playground
Show changes

@typespec/compiler - feature ✏️

Export resolveCodeFix function to allow resolving a CodeFix into CodeFixEdit[] without the LSP layer.

@typespec/playground - feature ✏️

Add codefix support in the playground. Quick fixes are now surfaced as Monaco code actions when the cursor is on a diagnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler ui:playground

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codefixes in the playground

4 participants