Skip to content

Conversation

@didacog
Copy link
Contributor

@didacog didacog commented Dec 15, 2025

Summary
This PR (updated from PR #112 to latest dev branch rebase) adds support for loading DCP config from $OPENCODE_CONFIG_DIR/dcp.jsonc (or dcp.json), aligning the plugin with OpenCode’s custom config directory behavior.

Details

  • lib/config.ts:
    • Extends getConfigPaths to also resolve a config path from $OPENCODE_CONFIG_DIR/dcp.jsoncordcp.jsonwhenOPENCODE_CONFIG_DIR is set.
    • getConfig now merges config in this order:
      • Defaults
      • Global: ~/.config/opencode/dcp.jsonc
      • Config dir: $OPENCODE_CONFIG_DIR/dcp.jsonc
      • Project: .opencode/dcp.jsonc
        - Global config behavior is unchanged:
    • ~/.config/opencode/dcp.jsonc is still created automatically on first run.
    • No config file is created under OPENCODE_CONFIG_DIR.

This makes DCP configuration placement align with OpenCode’s OPENCODE_CONFIG_DIR behavior, without changing any existing defaults or project-level overrides.

@Tarquinen Tarquinen force-pushed the feature/custom-config-path branch from c517f0c to e1eb62e Compare December 15, 2025 18:37
@Tarquinen Tarquinen merged commit 6693dd4 into Opencode-DCP:dev Dec 15, 2025
2 checks passed
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.

2 participants