Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ jobs:
if: steps.check.outputs.published == 'false'
run: pnpm build

- name: Strip [Unreleased] from CHANGELOG for packaging
if: steps.check.outputs.published == 'false'
run: python3 -c "import re,pathlib;p=pathlib.Path('CHANGELOG.md');t=p.read_text();p.write_text(re.sub(r'## \[Unreleased\]\n.*?(?=\n## \d)','',t,flags=re.DOTALL) if '## [Unreleased]' in t else t)"

- name: Package VSIX
if: steps.check.outputs.published == 'false'
run: npx --yes @vscode/vsce@^3 package --no-dependencies --out extension.vsix
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# User-recorded aimock fixtures (not test fixtures)
.copilotkit/fixtures/

node_modules/
dist/
*.vsix
.vscode-test/
.DS_Store
*.tsbuildinfo
4 changes: 0 additions & 4 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
.vscode/**
.vscode-test/**
.github/**
.gitignore
docs/**
RELEASING.md
src/**
**/__tests__/**
**/*.test.ts
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# copilotkit-vscode-extension

## [Unreleased]

## 0.2.0 — 2026-05-05

### Added

- Playground — embedded chat surface powered by `vscode.lm` for interacting with CopilotKit agents directly in the editor.
- Playground scanner detects CopilotKit hooks and providers in your workspace, wires them into a local runtime, and hot-reloads on file saves.
- Fixture recording and replay — capture a conversation once, then re-run it deterministically for development and testing.
- Model picker via `vscode.lm.selectChatModels` with optional `vscode.lm.tools` forwarding.
- Tailwind v4 compile pass in the playground bundler for user component CSS.

### Fixed

- SSE error handling for `RUN_ERROR` events now uses sentinel-based detection instead of message string comparison.
- Fixture store hardened: path traversal protection, version validation, name collision avoidance, corrupt file warnings.
- Anonymous default exports are now correctly included in the playground aggregator.
- Nested `UnserializableRef` values in provider props are correctly inlined in codegen output.

## 0.1.0 — 2026-04-21

### Added
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Preview generative-UI components, explore CopilotKit hooks, and inspect AG-UI ag

## Features

The extension adds a **CopilotKit** container to the activity bar with three panels:
The extension adds a **CopilotKit** container to the activity bar with four panels:

### A2UI Catalog Preview

Expand All @@ -14,13 +14,17 @@ Live-preview A2UI catalog components from your workspace. Pick a component and a

Scans your workspace for `useCopilotAction`, `useCoAgent`, and related CopilotKit hooks, then renders each hook's generative UI — including in-progress and completed states — so you can iterate on agent UIs without running the full agent loop. Jump-to-source and copy-identity actions are available from the sidebar.

### Playground

An embedded chat surface powered by `vscode.lm` that lets you interact with CopilotKit agents directly inside the editor. The playground scanner detects CopilotKit hooks and providers in your workspace, wires them into a local runtime, and hot-reloads on file saves so you can iterate without leaving VS Code. Supports fixture recording and replay — capture a conversation once, then re-run it deterministically for development and testing.

### AG-UI Inspector

Attach to any AG-UI-compliant agent stream (e.g. a local CopilotKit runtime) and inspect the event timeline in real time: tool calls, message deltas, state patches, and lifecycle events — with payload drill-down for each event.

## Requirements

- VS Code `1.85.0` or newer
- VS Code `1.90.0` or newer
- A workspace containing CopilotKit components, hooks, or an AG-UI runtime to inspect

## Install
Expand Down
18 changes: 13 additions & 5 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@ This package (`copilotkit-vscode-extension`) ships to two registries:
- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=copilotkit.copilotkit-vscode-extension) — primary, used by VS Code, Cursor, etc.
- [Open VSX](https://open-vsx.org/extension/copilotkit/copilotkit-vscode-extension) — used by VSCodium, Gitpod, OpenVSCode Server, Theia-based IDEs.

The flow mirrors the [`CopilotKit/aimock`](https://github.com/CopilotKit/aimock) release model for publish: a `chore: release vX.Y.Z` commit on `main` triggers CI, which self-gates on whether the version is already live and publishes if not. Unlike aimock, contributors don't hand-edit `package.json` — the **VS Code Extension — Metadata Sync** workflow (`.github/workflows/vscode-extension-changelog-sync.yml`) auto-syncs `package.json.version` (and optionally `package.json.description`) from the CHANGELOG entry (and optionally the README.md first paragraph) when the PR is opened, and commits `chore: release vX.Y.Z` on the PR branch for you. **No tag is created by hand. No `vsce publish` is run by hand.**
The flow mirrors the [`CopilotKit/aimock`](https://github.com/CopilotKit/aimock) release model for publish: a `chore: release vX.Y.Z` commit on `main` triggers CI, which self-gates on whether the version is already live and publishes if not. Unlike aimock, contributors don't hand-edit `package.json` — the **VS Code Extension — Metadata Sync** workflow (`.github/workflows/changelog-sync.yml`) auto-syncs `package.json.version` (and optionally `package.json.description`) from the CHANGELOG entry (and optionally the README.md first paragraph) when the PR is opened, and commits `chore: release vX.Y.Z` on the PR branch for you. **No tag is created by hand. No `vsce publish` is run by hand.**

## Day-to-day: the `[Unreleased]` section

CHANGELOG.md always has an `## [Unreleased]` section at the top. When you merge a PR that adds a feature, fixes a bug, or changes behavior, add a bullet under the appropriate subsection (`Added`, `Changed`, `Fixed`, `Removed`, `Deprecated`, `Security`) in `[Unreleased]`. This keeps a running record so release notes don't have to be reconstructed from git history.

The `[Unreleased]` heading is ignored by the changelog-sync workflow (it only matches `## X.Y.Z` headings), so it's always safe to accumulate entries there.

## Cutting a release

Cutting a release is one file edit, one commit, one PR.

1. Prepend an entry to `CHANGELOG.md`:
1. Move the `[Unreleased]` entries into a new versioned section in `CHANGELOG.md`. Replace the unreleased content with a fresh empty section:

```md
## [Unreleased]

## 0.1.1 — 2026-04-22

### Fixed
Expand Down Expand Up @@ -42,7 +50,7 @@ If the sync workflow is down or you can't wait, bump `package.json` yourself in

## CI publish flow

On every push to `main`, `.github/workflows/publish-vscode-extension.yml` runs:
On every push to `main`, `.github/workflows/publish.yml` runs:

1. Reads `version` from `package.json`.
2. Calls `vsce show <publisher>.<name>` and checks whether that exact version is already listed on the Marketplace.
Expand Down Expand Up @@ -118,7 +126,7 @@ If the `Login to Azure` or `Verify Marketplace credential` step fails on the fir

`VSCE_PAT` is retained in the `production` environment secrets specifically as a rollback lever for this cutover window. To revert:

1. Check out `.github/workflows/publish-vscode-extension.yml`, replace `--azure-credential` with `--pat "$VSCE_PAT"`, and re-add the `env: { VSCE_PAT: ${{ secrets.VSCE_PAT }} }` block on the `Publish to VS Code Marketplace` step.
1. Check out `.github/workflows/publish.yml`, replace `--azure-credential` with `--pat "$VSCE_PAT"`, and re-add the `env: { VSCE_PAT: ${{ secrets.VSCE_PAT }} }` block on the `Publish to VS Code Marketplace` step.
2. Push. Ship the release. Debug OIDC out of band.

### Retiring the PAT
Expand All @@ -128,7 +136,7 @@ Once OIDC publishing has been confirmed green in CI at least once, **delete `VSC
## Notes and future work

- **ADO PAT retirement (2026-12-01):** Azure DevOps is sunsetting long-lived Marketplace PATs. This workflow has been migrated to OIDC / federated credentials ahead of that date; `VSCE_PAT` is retained only as a short-lived rollback lever (see above).
- **If a release needs to pin to a specific `@copilotkit/*` version**, bump the dependency in `package.json` as part of the same PR that updates the CHANGELOG.
- **Coordinating with `@copilotkit/*` releases:** When a new CopilotKit SDK version ships breaking changes, bump the `@copilotkit/*` dependency versions in `package.json` and include a changelog entry noting the pin update.

---

Expand Down
Binary file modified icons/copilotkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 45 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "copilotkit-vscode-extension",
"displayName": "CopilotKit",
"version": "0.1.0",
"version": "0.2.0",
"description": "Preview generative-UI components, explore CopilotKit hooks, and inspect AG-UI agent runs — all without leaving your editor.",
"categories": [
"Other",
Expand Down Expand Up @@ -30,7 +30,6 @@
},
"publisher": "copilotkit",
"type": "module",
"packageManager": "pnpm@10.13.1",
"main": "dist/extension/activate.cjs",
"scripts": {
"build": "tsdown",
Expand All @@ -42,22 +41,24 @@
"package": "vsce package --no-dependencies"
},
"dependencies": {
"@ag-ui/client": "0.0.52",
"@copilotkit/runtime": "^1.56.5",
"@tailwindcss/node": "^4.1.0",
"@tailwindcss/oxide": "^4.1.0",
"ignore": "^7.0.5",
"oxc-parser": "^0.72.0",
"rolldown": "^1.0.0-rc.15",
"tailwindcss": "^4.1.0",
"zod": "^3.21.0",
"zod-to-json-schema": "^3.25.2"
},
"devDependencies": {
"@copilotkit/a2ui-renderer": "^1.56.4",
"@copilotkit/react-core": "^1.56.4",
"@copilotkit/runtime-client-gql": "^1.56.4",
"@copilotkit/shared": "^1.56.4",
"@types/node": "^22.0.0",
"@copilotkit/a2ui-renderer": "^1.56.5",
"@copilotkit/react-core": "^1.56.5",
"@testing-library/react": "^16.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/vscode": "^1.85.0",
"@types/vscode": "^1.90.0",
"@vscode/vsce": "^3.0.0",
"jsdom": "^26.0.0",
"react": "^19.0.0",
Expand Down Expand Up @@ -92,6 +93,11 @@
"id": "copilotkit.inspector",
"type": "webview",
"name": "AG-UI Inspector"
},
{
"id": "copilotkit.chat",
"type": "webview",
"name": "Chat"
}
]
},
Expand Down Expand Up @@ -138,6 +144,11 @@
{
"command": "copilotkit.hooks.focusPanel",
"title": "CopilotKit: Preview Hook Render…"
},
{
"command": "copilotkit.chat.refresh",
"title": "Refresh",
"icon": "$(refresh)"
}
],
"menus": {
Expand All @@ -162,15 +173,40 @@
"command": "copilotkit.hooks.refresh",
"when": "view == copilotkit.hooks",
"group": "navigation"
},
{
"command": "copilotkit.chat.refresh",
"when": "view == copilotkit.chat",
"group": "navigation"
}
],
"view/item/context": []
},
"configuration": {
"title": "CopilotKit",
"properties": {
"copilotkit.playground.model": {
"type": "string",
"default": "",
"description": "Preferred model id for the CopilotKit playground chat. Leave empty to use the first available model from VS Code's Language Model API."
},
"copilotkit.playground.enableVscodeLmTools": {
"type": "boolean",
"default": true,
"description": "Expose VS Code's Language Model tools (e.g. GitHub Copilot's fetch_webpage, search_workspace) to the playground model alongside your registered tools. The model can call them; they execute in the extension host via vscode.lm.invokeTool and the results feed back into the conversation. On by default so the playground model can reach the web and other system capabilities; set to false to mirror only your own tool surface."
},
"copilotkit.playground.tailwindEntryCss": {
"type": "string",
"default": "",
"description": "Optional path (absolute, or relative to the workspace root) to the CSS file the playground should pass to Tailwind v4 when compiling per-app utility styles. Leave empty to auto-detect common locations like src/app/globals.css. Set this only if your entry CSS lives somewhere non-standard."
}
}
}
},
"activationEvents": [],
"icon": "icons/copilotkit.png",
"engines": {
"vscode": "^1.85.0"
"vscode": "^1.90.0"
},
"pricing": "Free"
}
Loading
Loading