Open
Conversation
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.
关联 Issue
Closes #123
变更说明
本 PR 为 LeanSpec 增加了完整的 OpenCode 支持,覆盖 runner、
init初始化流程以及 MCP 配置接入。具体包括:
opencode run执行-mprovider/model格式返回,便于跨 provider 选择模型leanspec init中识别 OpenCode 项目标记.opencode/或opencode.json时,自动创建或合并opencode.jsonnpx -y @leanspec/mcp背景
虽然仓库中之前已经出现了部分 OpenCode 相关代码,但实际还不能完整工作,主要问题包括:
opencode runleanspec init不会自动为 OpenCode 项目生成 MCP 配置本 PR 将这些缺口补齐,使 OpenCode 可以像其他已支持工具一样完成接入和初始化。
兼容性与行为
opencode.json会执行合并,不会覆盖已有 MCP 配置opencode.json内容非法,会返回错误,避免静默覆盖损坏配置