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.
- package/apps/server/dist/chat/prompts/fullstack-express-prompt.d.ts +1 -1
- package/apps/server/dist/chat/prompts/fullstack-express-prompt.js +16 -0
- package/apps/server/dist/chat/prompts/fullstack-express-prompt.js.map +1 -1
- package/apps/server/dist/chat/prompts/fullstack-fastapi-prompt.d.ts +1 -1
- package/apps/server/dist/chat/prompts/fullstack-fastapi-prompt.js +16 -0
- package/apps/server/dist/chat/prompts/fullstack-fastapi-prompt.js.map +1 -1
- package/apps/server/dist/chat/prompts/web-system-prompt.d.ts +1 -1
- package/apps/server/dist/chat/prompts/web-system-prompt.js +15 -0
- package/apps/server/dist/chat/prompts/web-system-prompt.js.map +1 -1
- package/apps/server/dist/tsconfig.tsbuildinfo +1 -1
- package/apps/server/package.json +1 -1
- package/apps/web/.next/BUILD_ID +1 -1
- package/apps/web/.next/app-build-manifest.json +5 -5
- package/apps/web/.next/app-path-routes-manifest.json +1 -1
- package/apps/web/.next/build-manifest.json +2 -2
- package/apps/web/.next/cache/.previewinfo +1 -1
- package/apps/web/.next/cache/.rscinfo +1 -1
- package/apps/web/.next/cache/.tsbuildinfo +1 -1
- package/apps/web/.next/cache/config.json +3 -3
- package/apps/web/.next/cache/eslint/.cache_j3uhuz +1 -1
- package/apps/web/.next/cache/webpack/client-production/0.pack +0 -0
- package/apps/web/.next/cache/webpack/client-production/index.pack +0 -0
- package/apps/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/apps/web/.next/cache/webpack/server-production/0.pack +0 -0
- package/apps/web/.next/cache/webpack/server-production/index.pack +0 -0
- package/apps/web/.next/prerender-manifest.json +3 -3
- package/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/_not-found.html +1 -1
- package/apps/web/.next/server/app/_not-found.rsc +1 -1
- package/apps/web/.next/server/app/index.html +1 -1
- package/apps/web/.next/server/app/index.rsc +2 -2
- package/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/project/[id]/page.js +1 -1
- package/apps/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/settings.html +1 -1
- package/apps/web/.next/server/app/settings.rsc +1 -1
- package/apps/web/.next/server/app-paths-manifest.json +1 -1
- package/apps/web/.next/server/pages/404.html +1 -1
- package/apps/web/.next/server/pages/500.html +1 -1
- package/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/apps/web/.next/static/chunks/298-6f3d6b321c288cd3.js +1 -0
- package/apps/web/.next/static/chunks/app/page-3d093f7f480a8599.js +1 -0
- package/apps/web/.next/static/chunks/app/project/[id]/page-e5cda6f9050b0a52.js +1 -0
- package/apps/web/.next/trace +17 -17
- package/apps/web/package.json +1 -1
- package/apps/web/src/stores/useChatStore.ts +34 -9
- package/package.json +1 -1
- package/apps/web/.next/static/chunks/298-0052659e33e4d728.js +0 -1
- package/apps/web/.next/static/chunks/app/page-38144e6d92a7262e.js +0 -1
- package/apps/web/.next/static/chunks/app/project/[id]/page-fda0243fd985a398.js +0 -1
- /package/apps/web/.next/static/{BkxwYU6TU6sW5wqk0e_iF → zw4FcukMOho6_dzgpEdNW}/_buildManifest.js +0 -0
- /package/apps/web/.next/static/{BkxwYU6TU6sW5wqk0e_iF → zw4FcukMOho6_dzgpEdNW}/_ssgManifest.js +0 -0
package/apps/web/package.json
CHANGED
|
@@ -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
|
-
//
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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 = {
|