@preapexis/pi-kit 1.0.10 → 1.0.11

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.
@@ -1,4 +1,4 @@
1
- // cSpell:words Varun Gaikwad preapexis npm PowerShell
1
+ // cSpell:words preapexis npm PowerShell
2
2
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
3
3
 
4
4
  type EventContext = Parameters<Parameters<ExtensionAPI["on"]>[1]>[1];
@@ -31,11 +31,6 @@ export default function (pi: ExtensionAPI): void {
31
31
  label: "Update installed Pi packages/extensions",
32
32
  shell: "pi update --extensions"
33
33
  },
34
- {
35
- id: "kit-local",
36
- label: "Re-link this local PreApeXis kit",
37
- shell: "pi install -l ."
38
- },
39
34
  {
40
35
  id: "kit-npm",
41
36
  label: "Update PreApeXis Pi Kit from npm",
@@ -63,18 +58,19 @@ export default function (pi: ExtensionAPI): void {
63
58
  }
64
59
 
65
60
  function startUpdateStatus(ctx: EventContext, label: string): () => void {
61
+ const frames = ["◐", "◓", "◑", "◒"];
66
62
  let seconds = 0;
67
- let dots = 0;
63
+ let frame = 0;
68
64
 
69
- ctx.ui.setStatus(UPDATE_STATUS_KEY, `update: ${label}...`);
65
+ ctx.ui.setStatus(UPDATE_STATUS_KEY, `updating: ${label} ${frames[0]} 0s`);
70
66
 
71
67
  const timer = setInterval(() => {
72
68
  seconds += 1;
73
- dots = (dots + 1) % 4;
69
+ frame = (frame + 1) % frames.length;
74
70
 
75
71
  ctx.ui.setStatus(
76
72
  UPDATE_STATUS_KEY,
77
- `update: ${label}${".".repeat(dots)} ${seconds}s`
73
+ `updating: ${label} ${frames[frame]} ${seconds}s`
78
74
  );
79
75
  }, 1000);
80
76
 
@@ -176,15 +172,13 @@ export default function (pi: ExtensionAPI): void {
176
172
  const shell = shellCommand(option.shell);
177
173
  const stopStatus = startUpdateStatus(ctx, option.label);
178
174
 
179
- let result: Awaited<ReturnType<typeof pi.exec>>;
175
+ let result: Awaited<ReturnType<typeof pi.exec>> | undefined;
180
176
 
181
177
  try {
182
178
  result = await pi.exec(shell.command, shell.args, {
183
179
  cwd: ctx.cwd
184
180
  });
185
181
  } catch (error) {
186
- stopStatus();
187
-
188
182
  ctx.ui.notify(
189
183
  [
190
184
  `Update failed: ${option.label}`,
@@ -197,9 +191,14 @@ export default function (pi: ExtensionAPI): void {
197
191
  );
198
192
 
199
193
  return false;
194
+ } finally {
195
+ stopStatus();
200
196
  }
201
197
 
202
- stopStatus();
198
+ if (!result) {
199
+ ctx.ui.notify(`Update failed: ${option.label}`, "error");
200
+ return false;
201
+ }
203
202
 
204
203
  const stdout = result.stdout?.trim() ?? "";
205
204
  const stderr = result.stderr?.trim() ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preapexis/pi-kit",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Personal Pi coding-agent kit with safety extensions, status UI, prompt workflows, skills, and themes.",
5
5
  "keywords": [
6
6
  "pi-package",