vscode-pi-companion 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -196,6 +196,7 @@ async function connectSSE(): Promise<void> {
196
196
  (res) => {
197
197
  isConnected = true;
198
198
  updateWidget();
199
+ res.setEncoding("utf8");
199
200
  let buffer = "";
200
201
 
201
202
  res.on("data", (chunk: string) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "PI Companion",
4
4
  "description": "Share VS Code context with pi coding agent",
5
5
  "repository": "https://github.com/ravshansbox/vscode-pi-companion",
6
- "version": "0.2.3",
6
+ "version": "0.2.5",
7
7
  "publisher": "ravshansbox",
8
8
  "keywords": [
9
9
  "pi-package"
@@ -21,7 +21,7 @@
21
21
  "watch": "tsc -watch -p ./",
22
22
  "package": "vsce package",
23
23
  "vscode:prepublish": "npm run compile",
24
- "test": "node --import ./test/setup.mjs --test test/*.test.mjs"
24
+ "test": "npm run compile && node --import ./test/setup.mjs --test test/*.test.mjs"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/cors": "^2.8.19",
package/src/ide-server.ts CHANGED
@@ -122,7 +122,7 @@ export class IDEServer {
122
122
  }
123
123
  };
124
124
 
125
- await this.mcpServer!.connect(transport);
125
+ await this.createMcpServer().connect(transport);
126
126
  } else {
127
127
  res.status(400).json({
128
128
  jsonrpc: '2.0',
@@ -359,6 +359,7 @@ export class IDEServer {
359
359
  if (this.httpServer) {
360
360
  await new Promise<void>((resolve) => {
361
361
  this.httpServer!.close(() => resolve());
362
+ this.httpServer!.closeAllConnections();
362
363
  });
363
364
  this.httpServer = undefined;
364
365
  }