vscode-pi-companion 0.0.10 → 0.1.2

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/.mcp.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "mcpServers": {
3
+ "forge_extension": {
4
+ "url": "http://localhost:15045/mcp"
5
+ }
6
+ }
7
+ }
package/.vscodeignore CHANGED
@@ -2,6 +2,7 @@ src/
2
2
  .vscode/
3
3
  .github/
4
4
  .gitignore
5
+ .git/
5
6
  *.ts
6
7
  *.map
7
8
  !out/**/*.js
@@ -10,3 +11,6 @@ node_modules/
10
11
  extensions/node_modules/
11
12
  *.vsix
12
13
  tsconfig.json
14
+ .envrc
15
+ hooks/
16
+ scripts/
@@ -13,6 +13,12 @@ import * as http from "http";
13
13
  import { execSync } from "child_process";
14
14
  import { Type } from "@sinclair/typebox";
15
15
 
16
+ function isLocalPackageInstall(): boolean {
17
+ const filename = __filename;
18
+ return !filename.includes(`${path.sep}.pi${path.sep}agent${path.sep}git${path.sep}`)
19
+ && !filename.includes(`${path.sep}.pi${path.sep}git${path.sep}`);
20
+ }
21
+
16
22
  // Check if running in VS Code integrated terminal
17
23
  function isRunningInVSCode(): boolean {
18
24
  return process.env.TERM_PROGRAM === 'vscode';
@@ -47,11 +53,13 @@ async function installVSCodeExtension(ctx: ExtensionContext): Promise<void> {
47
53
  const isInstalled = isExtensionInstalled();
48
54
 
49
55
  if (isInstalled) {
50
- // Already installed - check for updates
51
- const latestVersion = await getLatestVersion();
52
- if (latestVersion) {
53
- console.log(`[PI Companion] Update available: v${latestVersion}`);
54
- console.log(`[PI Companion] Run: pi install git:github.com/ravshansbox/vscode-pi-companion`);
56
+ // Already installed - check for updates, but skip for local package installs
57
+ if (!isLocalPackageInstall()) {
58
+ const latestVersion = await getLatestVersion();
59
+ if (latestVersion) {
60
+ console.log(`[PI Companion] Update available: v${latestVersion}`);
61
+ console.log(`[PI Companion] Run: pi install git:github.com/ravshansbox/vscode-pi-companion`);
62
+ }
55
63
  }
56
64
  return;
57
65
  }
@@ -289,7 +297,7 @@ export default function (pi: ExtensionAPI) {
289
297
  ctx.ui.notify("PI Companion: Connected to VS Code", "info");
290
298
  connectSSE();
291
299
  } else {
292
- ctx.ui.notify("PI Companion: VS Code extension not detected", "warning");
300
+ ctx.ui.notify("PI Companion: VS Code companion server not running. Run 'PI Companion: Start Server' in VS Code.", "warning");
293
301
  }
294
302
  });
295
303
 
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.0.10",
6
+ "version": "0.1.2",
7
7
  "publisher": "ravshansbox",
8
8
  "keywords": [
9
9
  "pi-package"
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ version="${1:-}"
5
+ if [[ -z "$version" ]]; then
6
+ echo "Usage: ./scripts/release.sh <version>"
7
+ exit 1
8
+ fi
9
+
10
+ if [[ -z "${VSCE_TOKEN:-}" ]]; then
11
+ echo "VSCE_TOKEN is required"
12
+ exit 1
13
+ fi
14
+
15
+ if ! command -v gh >/dev/null 2>&1; then
16
+ echo "gh CLI is required"
17
+ exit 1
18
+ fi
19
+
20
+ branch=$(git symbolic-ref --short HEAD 2>/dev/null || true)
21
+ if [[ "$branch" != "main" ]]; then
22
+ echo "Release must be run from main"
23
+ exit 1
24
+ fi
25
+
26
+ if [[ -n "$(git status --porcelain)" ]]; then
27
+ echo "Working tree must be clean"
28
+ exit 1
29
+ fi
30
+
31
+ npm version "$version" --no-git-tag-version
32
+ npm run compile
33
+ npx vsce publish "$version" --pat "$VSCE_TOKEN" --skip-duplicate --no-git-tag-version
34
+
35
+ git add package.json package-lock.json
36
+ if ! git diff --cached --quiet; then
37
+ git commit -m "$version"
38
+ fi
39
+
40
+ tag="v$version"
41
+ git tag -f "$tag"
42
+ git push origin main "$tag"
43
+
44
+ gh release view "$tag" --repo ravshansbox/vscode-pi-companion >/dev/null 2>&1 || \
45
+ gh release create "$tag" --repo ravshansbox/vscode-pi-companion --title "$tag" --generate-notes
46
+
47
+ echo "Released $tag"
@@ -1,62 +0,0 @@
1
- name: Publish to VS Code Marketplace & npm
2
-
3
- on:
4
- push:
5
- branches: [main]
6
-
7
- jobs:
8
- publish-vscode:
9
- runs-on: ubuntu-latest
10
- permissions:
11
- contents: write
12
-
13
- steps:
14
- - uses: actions/checkout@v4
15
- with:
16
- persist-credentials: true
17
-
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: '20'
21
- cache: 'npm'
22
-
23
- - name: Install dependencies
24
- run: npm ci
25
-
26
- - name: Install vsce
27
- run: npm install -g @vscode/vsce
28
-
29
- - name: Publish to VS Code Marketplace
30
- env:
31
- VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
32
- run: |
33
- git config --local user.name "github-actions"
34
- git config --local user.email "github-actions@github.com"
35
-
36
- # Package and publish with version bump
37
- npx vsce package
38
- vsce publish patch --pat $VSCE_TOKEN --skip-duplicate
39
-
40
- # Push the tag created by vsce
41
- git push --follow-tags origin main
42
-
43
- publish-npm:
44
- runs-on: ubuntu-latest
45
- needs: publish-vscode
46
- if: startsWith(github.ref, 'refs/tags/v')
47
- permissions:
48
- id-token: write # Required for OIDC Trusted Publishing
49
-
50
- steps:
51
- - uses: actions/checkout@v4
52
-
53
- - uses: actions/setup-node@v4
54
- with:
55
- node-version: '20'
56
- cache: 'npm'
57
-
58
- - name: Install dependencies
59
- run: npm ci
60
-
61
- - name: Publish to npm
62
- run: npm publish --access public --skip-duplicate
@@ -1,19 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches: [main]
6
-
7
- permissions:
8
- contents: write
9
- pull-requests: write
10
-
11
- jobs:
12
- release:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: googleapis/release-please-action@v4
16
- with:
17
- release-type: node
18
- package-name: vscode-pi-companion
19
- target-branch: main
@@ -1,17 +0,0 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "name": "Run Extension",
6
- "type": "extensionHost",
7
- "request": "launch",
8
- "args": [
9
- "--extensionDevelopmentPath=${workspaceFolder}"
10
- ],
11
- "outFiles": [
12
- "${workspaceFolder}/out/**/*.js"
13
- ],
14
- "preLaunchTask": "${defaultBuildTask}"
15
- }
16
- ]
17
- }
@@ -1,12 +0,0 @@
1
- {
2
- "version": "2.0.0",
3
- "tasks": [
4
- {
5
- "type": "npm",
6
- "script": "compile",
7
- "problemMatcher": [],
8
- "label": "npm: compile",
9
- "detail": "tsc -p ./"
10
- }
11
- ]
12
- }
package/screenshot.png DELETED
Binary file
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "commonjs",
5
- "lib": ["ES2020"],
6
- "outDir": "./out",
7
- "rootDir": "./src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "moduleResolution": "node"
13
- },
14
- "include": ["src/**/*"],
15
- "exclude": ["node_modules", "out"]
16
- }