claudeship 0.2.10 → 0.2.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.
Files changed (53) hide show
  1. package/apps/server/dist/chat/prompts/fullstack-express-prompt.d.ts +1 -1
  2. package/apps/server/dist/chat/prompts/fullstack-express-prompt.js +16 -0
  3. package/apps/server/dist/chat/prompts/fullstack-express-prompt.js.map +1 -1
  4. package/apps/server/dist/chat/prompts/fullstack-fastapi-prompt.d.ts +1 -1
  5. package/apps/server/dist/chat/prompts/fullstack-fastapi-prompt.js +16 -0
  6. package/apps/server/dist/chat/prompts/fullstack-fastapi-prompt.js.map +1 -1
  7. package/apps/server/dist/chat/prompts/web-system-prompt.d.ts +1 -1
  8. package/apps/server/dist/chat/prompts/web-system-prompt.js +15 -0
  9. package/apps/server/dist/chat/prompts/web-system-prompt.js.map +1 -1
  10. package/apps/server/dist/tsconfig.tsbuildinfo +1 -1
  11. package/apps/server/package.json +1 -1
  12. package/apps/web/.next/BUILD_ID +1 -1
  13. package/apps/web/.next/app-build-manifest.json +5 -5
  14. package/apps/web/.next/app-path-routes-manifest.json +1 -1
  15. package/apps/web/.next/build-manifest.json +2 -2
  16. package/apps/web/.next/cache/.previewinfo +1 -1
  17. package/apps/web/.next/cache/.rscinfo +1 -1
  18. package/apps/web/.next/cache/.tsbuildinfo +1 -1
  19. package/apps/web/.next/cache/config.json +3 -3
  20. package/apps/web/.next/cache/eslint/.cache_j3uhuz +1 -1
  21. package/apps/web/.next/cache/webpack/client-production/0.pack +0 -0
  22. package/apps/web/.next/cache/webpack/client-production/index.pack +0 -0
  23. package/apps/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
  24. package/apps/web/.next/cache/webpack/server-production/0.pack +0 -0
  25. package/apps/web/.next/cache/webpack/server-production/index.pack +0 -0
  26. package/apps/web/.next/prerender-manifest.json +3 -3
  27. package/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  28. package/apps/web/.next/server/app/_not-found.html +1 -1
  29. package/apps/web/.next/server/app/_not-found.rsc +1 -1
  30. package/apps/web/.next/server/app/index.html +1 -1
  31. package/apps/web/.next/server/app/index.rsc +2 -2
  32. package/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  33. package/apps/web/.next/server/app/project/[id]/page.js +1 -1
  34. package/apps/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
  35. package/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  36. package/apps/web/.next/server/app/settings.html +1 -1
  37. package/apps/web/.next/server/app/settings.rsc +1 -1
  38. package/apps/web/.next/server/app-paths-manifest.json +1 -1
  39. package/apps/web/.next/server/pages/404.html +1 -1
  40. package/apps/web/.next/server/pages/500.html +1 -1
  41. package/apps/web/.next/server/server-reference-manifest.json +1 -1
  42. package/apps/web/.next/static/chunks/298-6f3d6b321c288cd3.js +1 -0
  43. package/apps/web/.next/static/chunks/app/page-3d093f7f480a8599.js +1 -0
  44. package/apps/web/.next/static/chunks/app/project/[id]/page-e5cda6f9050b0a52.js +1 -0
  45. package/apps/web/.next/trace +17 -17
  46. package/apps/web/package.json +1 -1
  47. package/apps/web/src/stores/useChatStore.ts +34 -9
  48. package/package.json +1 -1
  49. package/apps/web/.next/static/chunks/298-0052659e33e4d728.js +0 -1
  50. package/apps/web/.next/static/chunks/app/page-38144e6d92a7262e.js +0 -1
  51. package/apps/web/.next/static/chunks/app/project/[id]/page-fda0243fd985a398.js +0 -1
  52. /package/apps/web/.next/static/{BkxwYU6TU6sW5wqk0e_iF → zw4FcukMOho6_dzgpEdNW}/_buildManifest.js +0 -0
  53. /package/apps/web/.next/static/{BkxwYU6TU6sW5wqk0e_iF → zw4FcukMOho6_dzgpEdNW}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudeship/web",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "node scripts/dev-with-recovery.mjs",
@@ -1,6 +1,12 @@
1
1
  import { create } from "zustand";
2
2
  import { api, type UploadedFile } from "@/lib/api";
3
3
  import { Role, type ChatMessage, type StreamEvent, type ChatMode, type AskUserQuestionData } from "@claudeship/shared";
4
+ import { usePreviewStore } from "./usePreviewStore";
5
+
6
+ // Marker detection constants
7
+ const RESTART_MARKER_REGEX = /<restart-preview\s*\/>/g;
8
+ const RESTART_DEBOUNCE_MS = 3000;
9
+ let lastRestartTime = 0;
4
10
 
5
11
  export interface AttachedFile {
6
12
  id: string;
@@ -452,15 +458,34 @@ export const useChatStore = create<ChatState>((set, get) => ({
452
458
  console.log("[SSE Event]", data.type, data);
453
459
 
454
460
  if (data.type === "text" && data.content) {
455
- // Add text block
456
- const textBlock: StreamingBlock = {
457
- id: `text-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
458
- type: "text",
459
- content: data.content,
460
- };
461
- set((state) => ({
462
- streamingBlocks: [...state.streamingBlocks, textBlock],
463
- }));
461
+ // Check for restart-preview marker
462
+ const hasRestartMarker = RESTART_MARKER_REGEX.test(data.content);
463
+ // Reset regex lastIndex after test()
464
+ RESTART_MARKER_REGEX.lastIndex = 0;
465
+
466
+ // Filter out the marker from content
467
+ const filteredContent = data.content.replace(RESTART_MARKER_REGEX, '').trim();
468
+
469
+ // Trigger preview restart with debouncing
470
+ if (hasRestartMarker) {
471
+ const now = Date.now();
472
+ if (now - lastRestartTime > RESTART_DEBOUNCE_MS) {
473
+ lastRestartTime = now;
474
+ usePreviewStore.getState().restartPreview(projectId);
475
+ }
476
+ }
477
+
478
+ // Only add text block if there's content after filtering
479
+ if (filteredContent) {
480
+ const textBlock: StreamingBlock = {
481
+ id: `text-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
482
+ type: "text",
483
+ content: filteredContent,
484
+ };
485
+ set((state) => ({
486
+ streamingBlocks: [...state.streamingBlocks, textBlock],
487
+ }));
488
+ }
464
489
  } else if (data.type === "tool_use" && data.tool) {
465
490
  // Add tool_use block
466
491
  const toolBlock: StreamingBlock = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeship",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "AI-Powered App Builder using Claude Code CLI",
5
5
  "bin": {
6
6
  "claudeship": "./bin/claudeship.js"