vscode-pi-companion 0.2.1 → 0.2.3

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.
package/.vscodeignore CHANGED
@@ -12,3 +12,4 @@ tsconfig.json
12
12
  .envrc
13
13
  hooks/
14
14
  scripts/
15
+ test/
@@ -177,7 +177,10 @@ function updateWidget(): void {
177
177
 
178
178
  async function connectSSE(): Promise<void> {
179
179
  const port = await getLivePort();
180
- if (!port) return;
180
+ if (!port) {
181
+ scheduleReconnect();
182
+ return;
183
+ }
181
184
 
182
185
  if (sseRequest) {
183
186
  sseRequest.destroy();
@@ -222,6 +225,8 @@ async function connectSSE(): Promise<void> {
222
225
  }
223
226
 
224
227
  function scheduleReconnect(): void {
228
+ isConnected = false;
229
+ updateWidget();
225
230
  if (reconnectTimer || !currentCtx) return;
226
231
  reconnectTimer = setTimeout(() => {
227
232
  reconnectTimer = undefined;
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.1",
6
+ "version": "0.2.3",
7
7
  "publisher": "ravshansbox",
8
8
  "keywords": [
9
9
  "pi-package"
@@ -20,7 +20,8 @@
20
20
  "compile": "tsc -p ./",
21
21
  "watch": "tsc -watch -p ./",
22
22
  "package": "vsce package",
23
- "vscode:prepublish": "npm run compile"
23
+ "vscode:prepublish": "npm run compile",
24
+ "test": "node --import ./test/setup.mjs --test test/*.test.mjs"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/cors": "^2.8.19",