feat: set Sisyphus as default agent when enabled (#285)

Uses OpenCode's `default_agent` config (PR #5843)
Sets Sisyphus as default when sisyphus_agent is not disabled
Closes #283

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-28 00:28:26 +09:00
committed by GitHub
parent 90d43dc292
commit 776d857fd2

View File

@@ -432,9 +432,8 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
const replacePlan = pluginConfig.sisyphus_agent?.replace_plan ?? true; const replacePlan = pluginConfig.sisyphus_agent?.replace_plan ?? true;
if (isSisyphusEnabled && builtinAgents.Sisyphus) { if (isSisyphusEnabled && builtinAgents.Sisyphus) {
// TODO: When OpenCode releases `default_agent` config option (PR #5313), // Set Sisyphus as default agent (feature added in OpenCode PR #5843)
// use `config.default_agent = "Sisyphus"` instead of demoting build/plan. (config as { default_agent?: string }).default_agent = "Sisyphus";
// Tracking: https://github.com/sst/opencode/pull/5313
const agentConfig: Record<string, unknown> = { const agentConfig: Record<string, unknown> = {
Sisyphus: builtinAgents.Sisyphus, Sisyphus: builtinAgents.Sisyphus,