Skip to content

Commit a15c098

Browse files
committed
simply opencode setup
1 parent 8d23dec commit a15c098

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

packages/addons/mcp/index.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default defineAddon({
9090
mcpPath: '.gemini/settings.json'
9191
},
9292
opencode: {
93-
agentPath: '.opencode/agent/svelte.md',
93+
agentPath: 'AGENTS.md',
9494
schema: 'https://opencode.ai/config.json',
9595
mcpServersKey: 'mcp',
9696
mcpPath: 'opencode.json',
@@ -139,14 +139,7 @@ export default defineAddon({
139139
return content;
140140
}
141141
filesAdded.push(agentPath);
142-
143-
const newContent: string[] = [];
144-
145-
const prefixFile = sharedFiles.find((file) => file.name === `${ide}-prefix-AGENTS.md`);
146-
if (prefixFile) newContent.push(prefixFile.contents);
147-
if (agentFile) newContent.push(agentFile.contents);
148-
149-
return newContent.join('\n');
142+
return agentFile?.contents ?? '';
150143
});
151144
}
152145

@@ -155,7 +148,7 @@ export default defineAddon({
155148
if (schema) {
156149
data['$schema'] = schema;
157150
}
158-
const key = mcpServersKey || 'mcpServers';
151+
const key = mcpServersKey ?? 'mcpServers';
159152
data[key] ??= {};
160153
data[key].svelte =
161154
options.setup === 'local'

packages/create/shared/+mcp/opencode-prefix-AGENTS.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)