Skip to content

Commit a658282

Browse files
committed
fix: refine preview switching logic and fix code generation prompt
1 parent 37e5ef5 commit a658282

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/routes/chat/chat.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,10 @@ export default function Chat() {
482482
hasSeenPreview.current = true;
483483
} else if (previewUrl) {
484484
const isExistingChat = urlChatId !== 'new';
485-
const shouldSwitch = behaviorType === 'agentic' || isPhase1Complete || isExistingChat;
485+
const shouldSwitch =
486+
behaviorType === 'agentic' ||
487+
(behaviorType === 'phasic' && isPhase1Complete) ||
488+
(isExistingChat && behaviorType !== 'phasic');
486489

487490
if (shouldSwitch) {
488491
setView('preview');

worker/agents/operations/SimpleCodeGeneration.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ Your task is to generate production-ready code files specifically based on the p
3333
## Critical Guidelines
3434
- Write clean, type-safe TypeScript code
3535
- Follow best practices for the specific project type
36-
- For Workflows: use WorkflowEntrypoint, step.do(), step.sleep() patterns
37-
- For Workers: use standard Worker patterns with Request/Response
3836
- Ensure all imports are correct
3937
- Add proper error handling
4038
- Include JSDoc comments where helpful

0 commit comments

Comments
 (0)