Skip to content

Conversation

@code-yeongyu
Copy link
Owner

Summary

  • Sets Sisyphus as the default agent when sisyphus_agent is enabled (not disabled)
  • Uses OpenCode's new default_agent config option (added in PR #5843)
  • Replaces the previous TODO comment with the actual implementation

Changes

When Sisyphus agent is available and not disabled, the plugin now sets:

config.default_agent = "Sisyphus"

This uses OpenCode's native default agent configuration instead of only relying on agent ordering workarounds.

Related

Closes #283


🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode

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)
@code-yeongyu code-yeongyu merged commit 776d857 into dev Dec 27, 2025
3 checks passed
@code-yeongyu code-yeongyu deleted the set-sisyphus-as-default branch December 27, 2025 15:28
@greptile-apps
Copy link

greptile-apps bot commented Dec 27, 2025

Greptile Summary

Replaces TODO comment with actual implementation to set Sisyphus as the default agent when enabled. The change uses OpenCode's default_agent config option (added in upstream PR #5843) by setting config.default_agent = "Sisyphus" when sisyphus_agent is not disabled.

Key Changes:

  • Removed TODO comment referencing old PR #5313
  • Added one-line implementation using type assertion to set default_agent property
  • Updated comment to reference the correct upstream PR (#5843)

The implementation is straightforward and correctly placed within the existing conditional block that already checks isSisyphusEnabled && builtinAgents.Sisyphus.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Simple, focused change that replaces a TODO with clean implementation. The logic correctly uses the existing isSisyphusEnabled check and only sets the property when appropriate. No edge cases or error conditions introduced.
  • No files require special attention

Important Files Changed

Filename Overview
src/index.ts Sets default_agent to "Sisyphus" when enabled, replacing TODO comment with implementation

Sequence Diagram

sequenceDiagram
    participant Plugin as OhMyOpenCodePlugin
    participant Config as OpenCode Config
    participant PluginConfig as Plugin Config
    participant Agents as Agent System

    Plugin->>PluginConfig: Load oh-my-opencode.json
    PluginConfig-->>Plugin: sisyphus_agent config
    Plugin->>Plugin: Check isSisyphusEnabled
    alt Sisyphus enabled && agent exists
        Plugin->>Config: Set default_agent = "Sisyphus"
        Plugin->>Agents: Register Sisyphus agent
        Plugin->>Agents: Configure agent ordering
        Config-->>Agents: Sisyphus becomes default
    else Sisyphus disabled
        Plugin->>Agents: Use standard agent ordering
    end
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make sisyphus agent to be default agent by changing config value, when sisyphus agent is available on the oh my opencode config

2 participants