Skip to content

Commit 039718f

Browse files
committed
fix: ask the user to generate instead of generate by default
1 parent ac287a2 commit 039718f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/mcp/handlers/prompts/svelte-task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This is the task you will work on:
3535
${task}
3636
</task>
3737
38-
If you are not writing the code into a file, once you have the final version of the code call the \`playground-link\` tool to generate a playground link to share with the user and present the link right after the code. The playground link MUST be generated only once you have the final version of the code and you are ready to share it, it MUST include an entry point file called \`App.svelte\` where the main component should live. If you have multiple files to include in the playground link you can include them all at the root.
38+
If you are not writing the code into a file, once you have the final version of the code ask the user if it wants to generate a playground link to quickly check the code in it and if it answer yes call the \`playground-link\` tool and return the url to the user nicely formatted. The playground link MUST be generated only once you have the final version of the code and you are ready to share it, it MUST include an entry point file called \`App.svelte\` where the main component should live. If you have multiple files to include in the playground link you can include them all at the root.
3939
`,
4040
},
4141
},

src/lib/mcp/handlers/tools/playground-link.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export function playground_link(server: SvelteMcp) {
3232
{
3333
name: 'playground-link',
3434
description:
35-
'Generates a Playground link given a Svelte code snippet. Call this tool once you have the final version of the code you want to send to the user to allow it to quickly check the code in the playground. NEVER use this tool if you have already created a file for the component. The playground accept multiple files so if are importing from other files just include them all at the root level.',
35+
'Generates a Playground link given a Svelte code snippet. Once you have the final version of the code you want to send to the user, ALWAYS ask the user if it wants a playground link to allow it to quickly check the code in the playground before calling this tool. NEVER use this tool if you have written the component to a file in the user project. The playground accept multiple files so if are importing from other files just include them all at the root level.',
3636
schema: v.object({
3737
name: v.pipe(
3838
v.string(),
3939
v.description('The name of the Playground, it should reflect the user task'),
4040
),
4141
tailwind: v.pipe(
42-
v.string(),
42+
v.boolean(),
4343
v.description(
4444
"If the code requires Tailwind CSS to work...only send true if it it's using tailwind classes in the code",
4545
),

0 commit comments

Comments
 (0)