feat(settings): 开放 Claude Code CLI 实验功能并兼容 settings.json 配置 - #113
Open
JupiterTheWarlock wants to merge 2 commits into
Open
JupiterTheWarlock wants to merge 2 commits into
JupiterTheWarlock wants to merge 2 commits into
Conversation
JupiterTheWarlock
marked this pull request as ready for review
July 14, 2026 15:57
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.
背景
Locus 已具备 Claude Code CLI 接入能力,但此前通过发布开关隐藏,用户无法在正式界面中主动启用。
同时,Locus 使用隔离模式启动 Claude Code CLI,导致
~/.claude/settings.json中配置的认证及模型路由环境变量不会自动生效。主要改动
claudeCodeEnabled持久化字段控制 Claude Code CLI。settings.json读取允许的认证及路由环境变量。settings.json。安全性
仅转发以下范围的 Claude Code 配置:
ANTHROPIC_*CLAUDE_CODE_*路由配置ENABLE_TOOL_SEARCH不会从
settings.json注入NODE_OPTIONS等可执行代码相关环境变量。验证
功能实现阶段
以下验证基于最初的上游基线
5a54258(Locus 0.5.8):bun run typecheckbun run typecheck:test上游同步状态
upstream/main@b5ea1b2(Locus 0.6.0)60de1cf,不落后于当时的main已知基线问题
以下结果来自功能实现阶段的上游基线
5a54258: