Skip to content

Conversation

@didacog
Copy link
Contributor

@didacog didacog commented Dec 11, 2025

Summary
This PR 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.jsonc or dcp.json when OPENCODE_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
Copy link
Collaborator

Hey, this is definitely a good idea, I didn't know even know $OPENCODE_CONFIG_DIR existed. I'm in the middle of a big rewrite due to #5207 getting merged in opencode so I'm going to hold off on this PR until that's done, but i'll definitely get to this after.

@didacog
Copy link
Contributor Author

didacog commented Dec 12, 2025

Perfect! not in a hurry for it, I'll just wait ;) thanks!

Tarquinen and others added 9 commits December 14, 2025 01:59
…-unused-reason-param

refactor: remove unused reason parameter from buildAnalysisPrompt
…-unused-reason-param

fix: simplify prune tool schema for OAuth plugin compatibility
The nudge counter now correctly resets to zero when prune is used and
only counts tools invoked since the last prune. Previously, the counter
could become inaccurate across session reloads. Also increased tool
cache size to 1000.
…er-reset

fix: properly reset nudge counter after prune tool is used
…beta.2

v1.0.0-beta.2 - Fix nudge counter reset
@Tarquinen
Copy link
Collaborator

Hey @didacog, if you want I can merge this if you rebase it from the dev branch and PR into dev as well, otherwise I'll try to implement it in the next few days :)

@didacog
Copy link
Contributor Author

didacog commented Dec 15, 2025

Hey @didacog, if you want I can merge this if you rebase it from the dev branch and PR into dev as well, otherwise I'll try to implement it in the next few days :)

I did the rebase in PR #135.

@Tarquinen Tarquinen force-pushed the feature/custom-config-path branch from c517f0c to e1eb62e Compare December 15, 2025 18:37
Tarquinen added a commit that referenced this pull request Dec 15, 2025
 Support DCP config in $OPENCODE_CONFIG_DIR  (updated from PR #112 to latest dev branch rebase)
@Tarquinen
Copy link
Collaborator

moved to #135, thank you for the help!

@Tarquinen Tarquinen closed this Dec 15, 2025
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.

4 participants