## 重大变更
如果您正在使用 opencode 插件或 SDK,本次发布包含一系列细微的重大变更
1. 存储事件已被移除(我们可能会重新引入此功能,但此前存在一些问题)
2. `app` 概念已取消——现引入名为 `project` 的新概念,并提供了用于列出项目和获取当前项目的端点
3. 插件现在接收 `directory`(当前工作目录)和 `worktree`(如果项目是 git 仓库,则指向项目根目录)参数
4. SDK 中的 `session.chat` 函数已更名为 `session.prompt`。不再需要传入模型参数(模型现在是一个对象)
5. 所有端点现在都接受可选的 `directory` 参数,以便模拟 opencode 在该目录下运行的操作
- 为整个 cargo 工作区使用单一 Rust LSP 服务器实例 (#2292)
- 修复:调整命令选择逻辑,优先精确匹配而非模糊搜索… (#2314)
- 优化:确保运行命令在无提示内容时不发送请求 (#2332)
- 修复:当将粘贴内容作为命令参数传递时,正确解析 [粘贴行] (#2333)
- 新增对 lsp workspace/didChangeConfiguration 的支持 (#2334)
- 修复:确保命令使用当前选定的模型 (#2336)
- 修复:为 Python LSP 解析虚拟环境 (#2155) 贡献者:rekram1-node <
[email protected]>
- 修复:调整标题生成提示,防止直接响应而非生成标题 (#2338)
- 修复:确保 shell 命令可被正常中止 (#2339)
- 功能:允许覆盖提供程序超时设置 (#1982)
- 修复:确保 gopls lsp id 与文档一致 (#2344)
- 为 opencode run 新增 --command 参数 (#2348)
- 修复:tui 附件边界问题 (#2361)
## Breaking Changes
This release has a bunch of minor breaking changes if you are using opencode plugins or sdk
1. storage events have been removed (we might bring this back but had some issues)
2. concept of `app` is gone - there is a new concept called `project` and endpoints to list projects and get the current project
3. plugin receives `directory` which is cwd and `worktree` which is where the root of the project is if it's a git repo
4. the session.chat function has been renamed to session.prompt in sdk. it no longer requires model to be passed in (model is now an object)
5. every endpoint takes an optional `directory` parameter to operate as though opencode is running in that directory
- Use a single rust LSP server instance for entire cargo workspace (#2292)
- fix: change command selection to prefer exact matches over fuzzy sear… (#2314)
- tweak: ensure run command doesn't send request if no prompt present (#2332)
- fix: resolve [pasted lines] when passing paste as arguments for command (#2333)
- add support for lsp workspace/didChangeConfiguration (#2334)
- fix: ensure command uses currently selected model (#2336)
- fix: resolve virtual envs for python LSP (#2155) Co-authored-by: rekram1-node <
[email protected]>
- fix: adjust title generation prompt to prevent direct response instead of title gen (#2338)
- fix: ensure shell cmds can be properly aborted (#2339)
- feat: Allow provider timeout override (#1982)
- fix: ensure gopls lsp id matches docs (#2344)
- add --command to opencode run (#2348)
- fix: tui attachment bound (#2361)