Conversation
…ent-config-b02-config-paths
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
配置发现固定使用 home/.config,遗漏 XDG_CONFIG_HOME、OPENCODE_CONFIG 和 OPENCODE_CONFIG_DIR;用户目录之外的明确配置也会被一概拒绝。
本 PR 解析这些环境变量,增加 legacy config.json,去重并保留 Linux/WSL 大小写;识别 Windows 普通/扩展路径。主机使用继承环境,Windows 上的 WSL 单独查询所选发行版并转换为 UNC。自定义路径要求绝对路径,界面说明主机环境修改后需重启。
外部范围仅允许观察到的具体配置路径及其备份,不放开整个目录;初始化、读取、保存和恢复沿用路径及链接检查。列表顺序用于选择可编辑文件,不声称已合并所有配置来源。
依赖 #23。验证:14 个 OpenCode 核心测试、10 个存储测试、24 个实际 command 模块测试(独立 harness)、TypeScript 通过;覆盖外部文件完整流程、其他文件/符号链接拒绝、Windows 扩展路径、WSL 路径区分。Windows/WSL 原生执行未完成,保持 draft。
依据:OpenCode 配置说明及官方加载逻辑。
2026-09-23 repair verification
00182ad448fd471a1971a283fc82a4caea0dae4e.