stashes 0.2.3 → 0.2.5

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 (3) hide show
  1. package/dist/cli.js +16 -6
  2. package/dist/mcp.js +16 -6
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1164,7 +1164,7 @@ async function generate(opts) {
1164
1164
  await screenshotGit.checkout(["--detach", stash.branch]);
1165
1165
  await prepareWorktreeDeps(screenshotWorktree.path, projectPath);
1166
1166
  const devServer = spawn3({
1167
- cmd: ["npm", "run", "dev"],
1167
+ cmd: ["npm", "run", "dev", "--", "--", "--port", String(port)],
1168
1168
  cwd: screenshotWorktree.path,
1169
1169
  stdin: "ignore",
1170
1170
  stdout: "pipe",
@@ -1336,7 +1336,7 @@ ${context}` : `The user wants to vary the current UI. Apply this change: ${promp
1336
1336
  await screenshotGit.checkout(["--detach", stash.branch]);
1337
1337
  await prepareWorktreeDeps(screenshotWorktree.path, projectPath);
1338
1338
  const devServer = spawn4({
1339
- cmd: ["npm", "run", "dev"],
1339
+ cmd: ["npm", "run", "dev", "--", "--", "--port", String(port)],
1340
1340
  cwd: screenshotWorktree.path,
1341
1341
  stdin: "ignore",
1342
1342
  stdout: "pipe",
@@ -1750,7 +1750,7 @@ class PreviewPool {
1750
1750
  const worktreePath = await this.worktreeManager.createPreviewForPool(stashId);
1751
1751
  await prepareWorktreeDeps(worktreePath, this.worktreeManager.getProjectPath());
1752
1752
  const process2 = Bun.spawn({
1753
- cmd: ["npm", "run", "dev"],
1753
+ cmd: ["npm", "run", "dev", "--", "--", "--port", String(devPort)],
1754
1754
  cwd: worktreePath,
1755
1755
  stdin: "ignore",
1756
1756
  stdout: "pipe",
@@ -2550,9 +2550,19 @@ ${sourceCode.substring(0, 3000)}
2550
2550
  case "error":
2551
2551
  this.broadcast({ type: "stash:error", stashId: event.stashId, error: event.error });
2552
2552
  break;
2553
- case "ai_stream": {
2554
- const streamType = event.streamType === "tool_use" ? "tool_start" : event.streamType;
2555
- this.broadcast({ type: "ai_stream", content: event.content, streamType });
2553
+ case "ai_stream":
2554
+ break;
2555
+ case "activity": {
2556
+ const activityEvent = {
2557
+ stashId: event.stashId,
2558
+ action: event.action,
2559
+ file: event.file,
2560
+ lines: event.lines,
2561
+ content: event.content,
2562
+ timestamp: event.timestamp
2563
+ };
2564
+ this.activityStore.append(activityEvent);
2565
+ this.broadcast({ type: "stash:activity", stashId: event.stashId, event: activityEvent });
2556
2566
  break;
2557
2567
  }
2558
2568
  }
package/dist/mcp.js CHANGED
@@ -1149,7 +1149,7 @@ async function generate(opts) {
1149
1149
  await screenshotGit.checkout(["--detach", stash.branch]);
1150
1150
  await prepareWorktreeDeps(screenshotWorktree.path, projectPath);
1151
1151
  const devServer = spawn3({
1152
- cmd: ["npm", "run", "dev"],
1152
+ cmd: ["npm", "run", "dev", "--", "--", "--port", String(port)],
1153
1153
  cwd: screenshotWorktree.path,
1154
1154
  stdin: "ignore",
1155
1155
  stdout: "pipe",
@@ -1321,7 +1321,7 @@ ${context}` : `The user wants to vary the current UI. Apply this change: ${promp
1321
1321
  await screenshotGit.checkout(["--detach", stash.branch]);
1322
1322
  await prepareWorktreeDeps(screenshotWorktree.path, projectPath);
1323
1323
  const devServer = spawn4({
1324
- cmd: ["npm", "run", "dev"],
1324
+ cmd: ["npm", "run", "dev", "--", "--", "--port", String(port)],
1325
1325
  cwd: screenshotWorktree.path,
1326
1326
  stdin: "ignore",
1327
1327
  stdout: "pipe",
@@ -1974,7 +1974,7 @@ class PreviewPool {
1974
1974
  const worktreePath = await this.worktreeManager.createPreviewForPool(stashId);
1975
1975
  await prepareWorktreeDeps(worktreePath, this.worktreeManager.getProjectPath());
1976
1976
  const process2 = Bun.spawn({
1977
- cmd: ["npm", "run", "dev"],
1977
+ cmd: ["npm", "run", "dev", "--", "--", "--port", String(devPort)],
1978
1978
  cwd: worktreePath,
1979
1979
  stdin: "ignore",
1980
1980
  stdout: "pipe",
@@ -2774,9 +2774,19 @@ ${sourceCode.substring(0, 3000)}
2774
2774
  case "error":
2775
2775
  this.broadcast({ type: "stash:error", stashId: event.stashId, error: event.error });
2776
2776
  break;
2777
- case "ai_stream": {
2778
- const streamType = event.streamType === "tool_use" ? "tool_start" : event.streamType;
2779
- this.broadcast({ type: "ai_stream", content: event.content, streamType });
2777
+ case "ai_stream":
2778
+ break;
2779
+ case "activity": {
2780
+ const activityEvent = {
2781
+ stashId: event.stashId,
2782
+ action: event.action,
2783
+ file: event.file,
2784
+ lines: event.lines,
2785
+ content: event.content,
2786
+ timestamp: event.timestamp
2787
+ };
2788
+ this.activityStore.append(activityEvent);
2789
+ this.broadcast({ type: "stash:activity", stashId: event.stashId, event: activityEvent });
2780
2790
  break;
2781
2791
  }
2782
2792
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stashes",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "description": "Generate AI-powered UI design explorations in your project",
6
6
  "keywords": [