@narumitw/pi-subagents 0.47.0 → 0.49.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.
Files changed (2) hide show
  1. package/package.json +8 -7
  2. package/src/config-ui.ts +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-subagents",
3
- "version": "0.47.0",
3
+ "version": "0.49.2",
4
4
  "description": "Pi extension for delegating work to specialized isolated subagents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,16 +28,12 @@
28
28
  "format": "biome check --write .",
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
31
- "dependencies": {
32
- "@narumitw/pi-tui-kit": "^0.40.0",
33
- "proper-lockfile": "^4.1.2",
34
- "typebox": "^1.3.9"
35
- },
36
31
  "peerDependencies": {
37
32
  "@earendil-works/pi-agent-core": "*",
38
33
  "@earendil-works/pi-ai": "*",
39
34
  "@earendil-works/pi-coding-agent": "*",
40
- "@earendil-works/pi-tui": "*"
35
+ "@earendil-works/pi-tui": "*",
36
+ "typebox": "*"
41
37
  },
42
38
  "devDependencies": {
43
39
  "@biomejs/biome": "2.5.6",
@@ -45,8 +41,13 @@
45
41
  "@earendil-works/pi-ai": "0.83.0",
46
42
  "@earendil-works/pi-coding-agent": "0.83.0",
47
43
  "@earendil-works/pi-tui": "0.83.0",
44
+ "typebox": "1.3.9",
48
45
  "typescript": "7.0.2"
49
46
  },
47
+ "dependencies": {
48
+ "@narumitw/pi-tui-kit": "^0.49.1",
49
+ "proper-lockfile": "^4.1.2"
50
+ },
50
51
  "repository": {
51
52
  "type": "git",
52
53
  "url": "https://github.com/narumiruna/pi-extensions",
package/src/config-ui.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
2
- import { defineMenu, runMenu } from "@narumitw/pi-tui-kit";
3
2
  import {
4
3
  type CompletionDelivery,
5
4
  type ConsultationCwdPolicy,
@@ -124,6 +123,9 @@ async function showSubagentManager(
124
123
  return;
125
124
  }
126
125
  const generation = owner.generation;
126
+ const isCurrent = () => generation === owner.generation && !owner.controller.signal.aborted;
127
+ const { defineMenu, runMenu } = await import("@narumitw/pi-tui-kit");
128
+ if (!isCurrent()) return;
127
129
  let availableAgents = discoverAgents(ctx.cwd, "user", readSubagentSettings() ?? {}).agents;
128
130
  let toolDraft: ToolDraft | undefined;
129
131
  type Screen =
@@ -482,7 +484,7 @@ async function showSubagentManager(
482
484
  await runMenu(ctx, menu, {
483
485
  getState: () => undefined,
484
486
  signal: owner.controller.signal,
485
- isCurrent: () => generation === owner.generation && !owner.controller.signal.aborted,
487
+ isCurrent,
486
488
  });
487
489
  }
488
490
 
@@ -502,6 +504,9 @@ async function showSubagentSettings(
502
504
  return;
503
505
  }
504
506
  const generation = owner.generation;
507
+ const isCurrent = () => generation === owner.generation && !owner.controller.signal.aborted;
508
+ const { defineMenu, runMenu } = await import("@narumitw/pi-tui-kit");
509
+ if (!isCurrent()) return;
505
510
  type SettingsAction =
506
511
  | "set-completion"
507
512
  | "set-consult-resources"
@@ -521,7 +526,7 @@ async function showSubagentSettings(
521
526
  await runMenu(ctx, menu, {
522
527
  getState: () => undefined,
523
528
  signal: owner.controller.signal,
524
- isCurrent: () => generation === owner.generation && !owner.controller.signal.aborted,
529
+ isCurrent,
525
530
  });
526
531
  }
527
532