pi-project-switcher 0.3.2 → 0.4.0
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/index.ts +14 -2
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -327,7 +327,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
327
327
|
const branch = getGitBranch(path);
|
|
328
328
|
const branchStr = branch ? ` on branch \`${branch}\`` : "";
|
|
329
329
|
ctx.ui.notify(
|
|
330
|
-
`Switched to ${name}
|
|
330
|
+
`Switched to ${name} — session restored: ${basename(targetSession)}\n` +
|
|
331
|
+
`Workdir: ${path}${branchStr ? ` ${branchStr}` : ""}`,
|
|
331
332
|
"info"
|
|
332
333
|
);
|
|
333
334
|
return;
|
|
@@ -347,7 +348,18 @@ export default function (pi: ExtensionAPI) {
|
|
|
347
348
|
const branchStr = branch ? ` on branch \`${branch}\`` : "";
|
|
348
349
|
const fromStr = previous ? ` (was: ${previous})` : "";
|
|
349
350
|
|
|
350
|
-
|
|
351
|
+
// Current session identity — still valid on this path (no session replacement)
|
|
352
|
+
const currentFile = currentSessionFile ?? ctx.sessionManager.getSessionFile();
|
|
353
|
+
const sessionLine = currentFile
|
|
354
|
+
? `Continuing session: ${basename(currentFile)}`
|
|
355
|
+
: "Continuing current session";
|
|
356
|
+
|
|
357
|
+
ctx.ui.notify(
|
|
358
|
+
`Switched to ${name}${fromStr} — first session in this project\n` +
|
|
359
|
+
`Workdir: ${path}${branchStr ? ` ${branchStr}` : ""}\n` +
|
|
360
|
+
sessionLine,
|
|
361
|
+
"info"
|
|
362
|
+
);
|
|
351
363
|
|
|
352
364
|
// Announce to the agent so it operates in the new context
|
|
353
365
|
await ctx.waitForIdle();
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "pi-project-switcher", "version": "0.
|
|
1
|
+
{"name": "pi-project-switcher", "version": "0.4.0", "description": "pi coding agent extension: switch between projects under a configurable base directory via /project", "main": "index.ts", "type": "module", "scripts": {"test": "vitest run", "test:watch": "vitest", "typecheck": "tsc --noEmit"}, "keywords": ["pi", "pi-package", "pi-extension", "project", "switcher", "project-switching"], "author": "stefclawd", "license": "MIT", "repository": {"type": "git", "url": "git+https://github.com/stefclawd/pi-project-switcher.git"}, "bugs": {"url": "https://github.com/stefclawd/pi-project-switcher/issues"}, "homepage": "https://github.com/stefclawd/pi-project-switcher#readme", "files": ["index.ts", "README.md", "LICENSE"], "engines": {"node": ">=22.19.0"}, "pi": {"extensions": ["./index.ts"]}, "devDependencies": {"@earendil-works/pi-coding-agent": "^0.85.1", "@types/node": "^24.0.0", "typescript": "^5.7.0", "vitest": "^3.0.0"}}
|