You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package-manager-cache: false # pnpm is not installed yet
31
+
32
+
- name: Install pnpm
33
+
shell: bash
34
+
run: |
35
+
PNPM_VER=$(jq -r '.packageManager | if .[0:5] == "pnpm@" then .[5:] else "packageManager in package.json does not start with pnpm@\n" | halt_error(1) end' package.json)
36
+
echo installing pnpm version $PNPM_VER
37
+
npm i -g pnpm@$PNPM_VER
38
+
39
+
- name: Setup Node.js with pnpm cache
40
+
uses: actions/setup-node@v5
41
+
with:
42
+
node-version: 24
43
+
package-manager-cache: true # caches pnpm via packageManager field in package.json
return`You are a Svelte expert tasked to build components and utilities for Svelte developers. If you need documentation for anything related to Svelte you can invoke the tool \`get_documentation\` with one of the following paths:
11
+
<available-docs>
12
+
13
+
${available_docs}
14
+
15
+
</available-docs>
16
+
17
+
Every time you write a Svelte component or a Svelte module you MUST invoke the \`svelte-autofixer\` tool providing the code. The tool will return a list of issues or suggestions. If there are any issues or suggestions you MUST fix them and call the tool again with the updated code. You MUST keep doing this until the tool returns no issues or suggestions. Only then you can return the code to the user.
18
+
19
+
This is the task you will work on:
20
+
21
+
<task>
22
+
${task}
23
+
</task>
24
+
25
+
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.`;
26
+
}
27
+
28
+
/**
29
+
* This function is used to generate the prompt to update the docs in the script `/scripts/update-docs-prompts.ts` it should use the default export
30
+
* function and pass in the arguments. Since it will be included in the documentation if it's an argument that the MCP will expose it should
31
+
* be in the format [NAME_OF_THE_ARGUMENT] to signal the user that it can substitute it.
* Human readable description of what the prompt does. It will be included in the documentation.
42
+
*
43
+
* The name NEEDS to be `docs_description`.
44
+
*/
45
+
exportconstdocs_description=
46
+
'This prompt should be used whenever you are asking the model to work on a Svelte-related task. It will instruct the LLM which documentation sections are available, which tools to invoke, when to invoke them, and how to interpret the results.';
'Use this Prompt to ask for any svelte related task. It will automatically instruct the LLM on how to best use the autofixer and how to query for documentation pages.',
12
55
schema: v.object({
13
56
task: v.pipe(v.string(),v.description('The task to be performed')),
14
57
}),
58
+
complete: {
59
+
task(){
60
+
return{
61
+
completion: {
62
+
values: [''],
63
+
},
64
+
};
65
+
},
66
+
},
15
67
},
16
68
async({ task })=>{
17
69
constavailable_docs=awaitformat_sections_list();
@@ -22,21 +74,7 @@ export function setup_svelte_task(server: SvelteMcp) {
22
74
role: 'user',
23
75
content: {
24
76
type: 'text',
25
-
text: `You are a Svelte expert tasked to build components and utilities for Svelte developers. If you need documentation for anything related to Svelte you can invoke the tool \`get_documentation\` with one of the following paths:
26
-
<available-docs>
27
-
${available_docs}
28
-
</available-docs>
29
-
30
-
Every time you write a Svelte component or a Svelte module you MUST invoke the \`svelte-autofixer\` tool providing the code. The tool will return a list of issues or suggestions. If there are any issues or suggestions you MUST fix them and call the tool again with the updated code. You MUST keep doing this until the tool returns no issues or suggestions. Only then you can return the code to the user.
31
-
32
-
This is the task you will work on:
33
-
34
-
<task>
35
-
${task}
36
-
</task>
37
-
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.
0 commit comments