Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Support DCP config in $OPENCODE_CONFIG_DIR (updated from PR #112 to latest dev branch rebase) #135

Merged
Tarquinen merged 1 commit intoOpencode-DCP:devOpencode-DCP/opencode-dynamic-context-pruning:devfrom
didacog:feature/custom-config-pathdidacog/opencode-dynamic-context-pruning:feature/custom-config-pathCopy head branch name to clipboard
Dec 15, 2025
Merged

Support DCP config in $OPENCODE_CONFIG_DIR (updated from PR #112 to latest dev branch rebase) #135
Tarquinen merged 1 commit intoOpencode-DCP:devOpencode-DCP/opencode-dynamic-context-pruning:devfrom
didacog:feature/custom-config-pathdidacog/opencode-dynamic-context-pruning:feature/custom-config-pathCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.