@sveltejs/opencode 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.ts +20 -16
- package/package.json +1 -1
package/config.ts
CHANGED
|
@@ -113,28 +113,32 @@ export function get_mcp_config(ctx: PluginInput) {
|
|
|
113
113
|
if (path && existsSync(path)) {
|
|
114
114
|
const result = load_config_file(path);
|
|
115
115
|
if (result.parse_error) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
setTimeout(() => {
|
|
117
|
+
ctx.client.tui.showToast({
|
|
118
|
+
body: {
|
|
119
|
+
title: 'Svelte: Invalid opencode plugin config',
|
|
120
|
+
message: `${result.parse_error}\nUsing default values`,
|
|
121
|
+
variant: 'warning',
|
|
122
|
+
duration: 7000,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}, 7000);
|
|
124
126
|
return default_config;
|
|
125
127
|
}
|
|
126
128
|
const parsed = v.safeParse(config_schema, result.data);
|
|
127
129
|
if (parsed.success) {
|
|
128
130
|
return merge_with_defaults(parsed.output);
|
|
129
131
|
} else {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
setTimeout(() => {
|
|
133
|
+
ctx.client.tui.showToast({
|
|
134
|
+
body: {
|
|
135
|
+
title: 'Svelte: Invalid opencode plugin config',
|
|
136
|
+
message: `${result.parse_error}\nUsing default values`,
|
|
137
|
+
variant: 'warning',
|
|
138
|
+
duration: 7000,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}, 7000);
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
144
|
}
|