pi-weave 0.1.3 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-weave",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "An agent-native knowledge workspace for your life and your code. Smart notepad + repository exploration, readable by humans and agents alike.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: weave-notepad
3
- description: Take and retrieve durable notes in the pi-weave vault. Use when the user asks to remember something or to start/add to a note (aliases: notes, ai note, note-taking, note-taker), or when answering questions about past decisions, people, or projects. Also handles interview note-taking where raw dictations are appended AND expanded.
3
+ description: "Take and retrieve durable notes in the pi-weave vault. Use when the user asks to remember something or to start/add to a note (aliases: notes, ai note, note-taking, note-taker), or when answering questions about past decisions, people, or projects. Also handles interview note-taking where raw dictations are appended AND expanded."
4
4
  ---
5
5
 
6
6
  # Weave Notepad
package/src/pi/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
1
+ import type { ExtensionAPI, ExtensionCommandContext, ExtensionContext } from "@earendil-works/pi-coding-agent";
2
2
  import {
3
3
  buildRepoIndex,
4
4
  findGitRoot,
@@ -41,7 +41,7 @@ export default function piWeave(pi: ExtensionAPI): void {
41
41
 
42
42
  pi.on("session_start", async (_event, ctx) => {
43
43
  const status = await getWorkspaceStatus(ctx.cwd);
44
- ctx.ui.setStatus("weave", formatStatusLine(status));
44
+ updateStatusWidget(ctx, formatStatusLine(status));
45
45
 
46
46
  if (!ctx.hasUI) return;
47
47
  const repo = status.repository;
@@ -111,7 +111,7 @@ export default function piWeave(pi: ExtensionAPI): void {
111
111
  }
112
112
 
113
113
  const status = await getWorkspaceStatus(ctx.cwd);
114
- ctx.ui.setStatus("weave", formatStatusLine(status));
114
+ updateStatusWidget(ctx, formatStatusLine(status));
115
115
  },
116
116
  });
117
117
 
@@ -160,11 +160,11 @@ function startDeepScan(root: string, ctx: ExtensionCommandContext, baseStatus: W
160
160
  const controller = new AbortController();
161
161
  const done = (async () => {
162
162
  try {
163
- ctx.ui.setStatus("weave", "🧵 deep scan: starting…");
163
+ updateStatusWidget(ctx, "🧵 deep scan: starting…");
164
164
  const outcome = await deepScanRepository(root, ctx, {
165
165
  onProgress: ({ current, total, path }) => {
166
166
  const pct = total > 0 ? Math.round((current / total) * 100) : 100;
167
- ctx.ui.setStatus("weave", `🧵 deep scan: ${current}/${total} (${pct}%) — ${path}`);
167
+ updateStatusWidget(ctx, `🧵 deep scan: ${current}/${total} (${pct}%) — ${path}`);
168
168
  },
169
169
  signal: controller.signal,
170
170
  });
@@ -183,9 +183,13 @@ function startDeepScan(root: string, ctx: ExtensionCommandContext, baseStatus: W
183
183
  } finally {
184
184
  // Restore the settled status before removing the map entry, so a caller
185
185
  // awaiting deepScanDone() observes the settled status line.
186
- ctx.ui.setStatus("weave", formatStatusLine(baseStatus));
186
+ updateStatusWidget(ctx, formatStatusLine(baseStatus));
187
187
  inFlightDeepScans.delete(root);
188
188
  }
189
189
  })();
190
190
  inFlightDeepScans.set(root, { controller, done });
191
191
  }
192
+
193
+ function updateStatusWidget(ctx: ExtensionContext | ExtensionCommandContext, text: string | undefined): void {
194
+ ctx.ui.setWidget("weave", text ? [text] : undefined, { placement: "belowEditor" });
195
+ }
@@ -60,7 +60,7 @@ export async function runWeaveViewTui(ctx: ExtensionCommandContext): Promise<voi
60
60
 
61
61
  // Refresh the status line after close (a /weave-scan may have landed meanwhile).
62
62
  const status = await getWorkspaceStatus(ctx.cwd);
63
- ctx.ui.setStatus("weave", formatStatusLine(status));
63
+ ctx.ui.setWidget("weave", [formatStatusLine(status)], { placement: "belowEditor" });
64
64
  }
65
65
 
66
66
  /** Test seam: build the model the explorer opens with, without a terminal. */