Compare commits

..

16 Commits

Author SHA1 Message Date
Paolo Ricciuti
6e94cb5ffa docs: add comment on how to delegate to an agent 2026-01-04 22:59:42 +01:00
Paolo Ricciuti
45a0362f12 chore: apply suggestions from code review
Co-authored-by: Stanislav Khromov <stanislav.khromov+github@gmail.com>
2026-01-04 22:57:35 +01:00
paoloricciuti
7a269f9134 docs: add docs about subagent 2026-01-04 19:25:52 +01:00
Paolo Ricciuti
af5c90b3d7 chore: apply suggestions from code review
Co-authored-by: Stanislav Khromov <stanislav.khromov+github@gmail.com>
2026-01-04 18:15:59 +01:00
paoloricciuti
baa3de3556 fix: remove references 2026-01-04 18:15:03 +01:00
paoloricciuti
c52e2879be docs: direct people to release page to download skill 2026-01-04 18:10:37 +01:00
paoloricciuti
eb38793643 feat: add workflow to release skill as a github release 2026-01-04 18:08:28 +01:00
paoloricciuti
ee56b09681 fix: make the agent only about how to make the changes 2026-01-04 17:55:09 +01:00
paoloricciuti
5b0773dfb1 fix: make the skill only about the cli 2026-01-04 17:54:53 +01:00
paoloricciuti
8934e1dc04 fix: better description and prompt 2026-01-03 19:52:59 +01:00
paoloricciuti
41a80310ee feat: include subagent to execute svelte edits in their own context 2026-01-03 15:35:42 +01:00
paoloricciuti
b7fabff038 fix: improve skill with the cli tools 2026-01-03 15:29:20 +01:00
paoloricciuti
6815bee685 Merge branch 'main' into claude-plugin-and-skill 2026-01-03 15:20:48 +01:00
paoloricciuti
dc53ba05e2 fix: rename skill 2025-11-14 12:10:52 +01:00
paoloricciuti
ddfb0fe3aa fix: lint 2025-11-14 12:08:45 +01:00
paoloricciuti
9998507a08 feat: claude skill + marketplace 2025-11-14 12:03:53 +01:00
11 changed files with 16 additions and 47 deletions

View File

@@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0
version: 10.26.2
- name: Setup Node.js
uses: actions/setup-node@v6

View File

@@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0
version: 10.26.2
- name: Setup Node.js
uses: actions/setup-node@v6

View File

@@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0
version: 10.26.2
- name: Setup Node.js
uses: actions/setup-node@v6

View File

@@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "The official Svelte MCP server implementation",
"type": "module",
"packageManager": "pnpm@10.27.0",
"packageManager": "pnpm@10.26.2",
"scripts": {
"build": "pnpm -r run build",
"dev": "pnpm --filter @sveltejs/mcp-remote run dev",

View File

@@ -53,18 +53,6 @@ describe('svelte-autofixer tool', () => {
);
});
it('should add suggestions for snippets declared in script tag', async () => {
const content = await autofixer_tool_call(`<script>
{#snippet my_snippet()}
some content
{/snippet}
</script>`);
expect(content.issues.length).toBeGreaterThan(0);
expect(content.suggestions).toContain(
"The code can't be compiled because a Javascript parse error. The error suggests you have a `{#snippet ...}` block inside the `<script>` tag. Snippets are template syntax and should be declared in the markup section of the component, not in the script. Move the snippet outside of the `<script>` tag. Snippets declared in the markup can also be accessed in the script tag in case you need them.",
);
});
it('should error out if async is true with a version less than 5', async () => {
const content = await autofixer_tool_call(
`<script>

View File

@@ -75,21 +75,14 @@ export async function svelte_autofixer_handler({
await add_eslint_issues(content, code, +desired_svelte_version, filename, async);
} catch (e: unknown) {
const error = e as Error & { start?: { line: number; column: number }; frame?: string };
const error = e as Error & { start?: { line: number; column: number } };
content.issues.push(
`${error.message} at line ${error.start?.line}, column ${error.start?.column}`,
);
if (error.message.includes('js_parse_error')) {
// Check if the error frame contains template syntax that was incorrectly placed in the script tag
if (error.frame?.includes('{#snippet')) {
content.suggestions.push(
"The code can't be compiled because a Javascript parse error. The error suggests you have a `{#snippet ...}` block inside the `<script>` tag. Snippets are template syntax and should be declared in the markup section of the component, not in the script. Move the snippet outside of the `<script>` tag. Snippets declared in the markup can also be accessed in the script tag in case you need them.",
);
} else {
content.suggestions.push(
"The code can't be compiled because a Javascript parse error. In case you are using runes like this `$state variable_name = 3;` or `$derived variable_name = 3 * count` that's not how runes are used. You need to use them as function calls without importing them: `const variable_name = $state(3)` and `const variable_name = $derived(3 * count)`.",
);
}
content.suggestions.push(
"The code can't be compiled because a Javascript parse error. In case you are using runes like this `$state variable_name = 3;` or `$derived variable_name = 3 * count` that's not how runes are used. You need to use them as function calls without importing them: `const variable_name = $state(3)` and `const variable_name = $derived(3 * count)`.",
);
} else if (error.message.includes('css_expected_identifier')) {
content.suggestions.push(
"The code can't be compiled because a valid CSS identifier is expected. This sometimes means you are trying to use a variable in CSS like this: `color: {my_color}` but Svelte doesn't support that. You can use inline CSS variables for that `<div style:--color={my_color}></div>` and then use the variable as usual in CSS with `color: var(--color)`.",

View File

@@ -1,11 +1,5 @@
# @sveltejs/mcp
## 0.1.17
### Patch Changes
- fix: add suggestion for snippets declared in script tag ([#132](https://github.com/sveltejs/mcp/pull/132))
## 0.1.16
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@sveltejs/mcp",
"version": "0.1.17",
"version": "0.1.16",
"type": "module",
"license": "MIT",
"mcpName": "dev.svelte/mcp",

View File

@@ -9,7 +9,7 @@
"subfolder": "packages/mcp-stdio",
"source": "github"
},
"version": "0.1.17",
"version": "0.1.16",
"websiteUrl": "https://svelte.dev/docs/mcp/overview",
"icons": [
{
@@ -25,7 +25,7 @@
{
"registryType": "npm",
"identifier": "@sveltejs/mcp",
"version": "0.1.17",
"version": "0.1.16",
"runtimeHint": "npx",
"transport": {
"type": "stdio"

14
pnpm-lock.yaml generated
View File

@@ -47,8 +47,8 @@ catalogs:
specifier: ^3.12.5
version: 3.12.5
globals:
specifier: ^17.0.0
version: 17.0.0
specifier: ^16.0.0
version: 16.4.0
prettier:
specifier: ^3.4.2
version: 3.6.2
@@ -195,7 +195,7 @@ importers:
version: 3.12.5(eslint@9.36.0(jiti@2.6.0))(svelte@5.39.6)(ts-node@10.9.2(@types/node@24.5.2)(typescript@5.9.2))
globals:
specifier: catalog:lint
version: 17.0.0
version: 16.4.0
node-resolve-ts:
specifier: catalog:tooling
version: 1.0.2
@@ -277,7 +277,7 @@ importers:
version: 3.12.5(eslint@9.36.0(jiti@2.6.0))(svelte@5.39.6)(ts-node@10.9.2(@types/node@24.5.2)(typescript@5.9.2))
globals:
specifier: catalog:lint
version: 17.0.0
version: 16.4.0
prettier:
specifier: catalog:lint
version: 3.6.2
@@ -2833,10 +2833,6 @@ packages:
resolution: {integrity: sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==}
engines: {node: '>=18'}
globals@17.0.0:
resolution: {integrity: sha512-gv5BeD2EssA793rlFWVPMMCqefTlpusw6/2TbAVMy0FzcG8wKJn4O+NqJ4+XWmmwrayJgw5TzrmWjFgmz1XPqw==}
engines: {node: '>=18'}
globalthis@1.0.4:
resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==}
engines: {node: '>= 0.4'}
@@ -6799,8 +6795,6 @@ snapshots:
globals@16.4.0: {}
globals@17.0.0: {}
globalthis@1.0.4:
dependencies:
define-properties: 1.2.1

View File

@@ -18,7 +18,7 @@ catalogs:
eslint-plugin-import: ^2.32.0
eslint-plugin-pnpm: ^1.3.0
eslint-plugin-svelte: ^3.12.5
globals: ^17.0.0
globals: ^16.0.0
prettier: ^3.4.2
prettier-plugin-svelte: ^3.3.3
svelte-eslint-parser: ^1.4.0