Skip to content

Commit dadbde2

Browse files
committed
format
1 parent c9c11e0 commit dadbde2

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

prompts/tests/prompt-builder.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ describe("prompt builder (real implementation)", () => {
283283
history: [],
284284
});
285285
expect(result.systemPrompt).toMatch(/include a Demo Data button/i);
286-
expect(result.systemPrompt).not.toMatch(/vivid description of the app's purpose/i);
286+
expect(result.systemPrompt).not.toMatch(
287+
/vivid description of the app's purpose/i,
288+
);
287289
});
288290

289291
it("makeBaseSystemPrompt: respects demoDataOverride=false to disable demo data", async () => {
@@ -296,7 +298,9 @@ describe("prompt builder (real implementation)", () => {
296298
demoDataOverride: false,
297299
});
298300
expect(result.systemPrompt).not.toMatch(/include a Demo Data button/i);
299-
expect(result.systemPrompt).not.toMatch(/vivid description of the app's purpose/i);
301+
expect(result.systemPrompt).not.toMatch(
302+
/vivid description of the app's purpose/i,
303+
);
300304
});
301305

302306
it("makeBaseSystemPrompt: respects demoDataOverride=true to force demo data", async () => {
@@ -309,6 +313,8 @@ describe("prompt builder (real implementation)", () => {
309313
demoDataOverride: true,
310314
});
311315
expect(result.systemPrompt).toMatch(/include a Demo Data button/i);
312-
expect(result.systemPrompt).not.toMatch(/vivid description of the app's purpose/i);
316+
expect(result.systemPrompt).not.toMatch(
317+
/vivid description of the app's purpose/i,
318+
);
313319
});
314320
});

use-vibes/tests/useVibes.basic.test.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ const { mockMakeBaseSystemPrompt, mockCallAI } = vi.hoisted(() => ({
1313
mockCallAI: vi.fn().mockImplementation((messages) => {
1414
// First call is for dependency selection (has catalog in system prompt)
1515
if (messages.some((m: { content?: string }) => m.content && m.content.includes('catalog'))) {
16-
return Promise.resolve(
17-
'{"selected": ["fireproof", "callai"], "demoData": false}'
18-
);
16+
return Promise.resolve('{"selected": ["fireproof", "callai"], "demoData": false}');
1917
}
2018
// Second call is for component generation
2119
return Promise.resolve(
@@ -54,9 +52,7 @@ describe('useVibes - Basic Structure', () => {
5452
mockCallAI.mockImplementation((messages) => {
5553
// First call is for dependency selection (has catalog in system prompt)
5654
if (messages.some((m: { content?: string }) => m.content && m.content.includes('catalog'))) {
57-
return Promise.resolve(
58-
'{"selected": ["fireproof", "callai"], "demoData": false}'
59-
);
55+
return Promise.resolve('{"selected": ["fireproof", "callai"], "demoData": false}');
6056
}
6157
// Second call is for component generation
6258
return Promise.resolve(

vibes.diy/pkg/app/components/ResultPreview/ResultPreview.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ function ResultPreview({
3333
onSyntaxErrorChange,
3434
}: ResultPreviewProps & { children?: React.ReactNode }) {
3535
const { isDarkMode } = useTheme();
36-
const {
37-
vibeDoc,
38-
updateDependencies,
39-
updateDemoDataOverride,
40-
} = useSession(sessionId);
36+
const { vibeDoc, updateDependencies, updateDemoDataOverride } =
37+
useSession(sessionId);
4138
const showWelcome = !isStreaming && (!code || code.length === 0);
4239

4340
// Use title from props directly

0 commit comments

Comments
 (0)