tui: /models drops provider grouping when the session location differs from the default location
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #62109 来自 @andycostintoma —— 已关闭,未合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
从 packages/tui/src/component/use-connected.tsx 开始,将它的位置查询与模型和集成对话框进行比较;issue 指出这些对话框会传入 location.ref。检查 LocationProvider 如何同步当前活动位置,然后使用一个位于非默认目录中的会话复现问题。当该会话的已连接 provider 及其分组显示在 /models 中时,即为完成;issue 未指定测试文件。
由索引模型根据 Issue 内容生成。
描述
Description
When the TUI opens a session whose directory is not the client's default location, /models shows one flat list without provider groups, Favorites or Recent, and its action reads "View all integrations" as if nothing were connected. The integrations dialog in the same session shows the providers as connected.
useConnected() in packages/tui/src/component/use-connected.tsx calls data.location.integration.list() without a location, so it reads the default location's store. LocationProvider only syncs the active location, so when the two differ that store stays empty and useConnected() returns false. The model dialog and the integrations dialog already pass the active location (location.ref); useConnected() doesn't.
I hit it with --server against a remote service: the client's cwd doesn't exist on the server, so the default location falls back to the server's cwd while the session lives in a project directory. The same happens locally with -s <session> for a session in another directory.
Plugins
None needed to reproduce.
OpenCode version
2.2.1 (still present on dev)
Steps to reproduce
- Connect any provider, e.g. Anthropic.
- Start the service from one directory (
cd ~ && opencode service start). - Create a session in a different directory via
POST /api/sessionwith{"location":{"directory":"/path/to/project"}}. - From a directory that isn't that project (or from another machine with
--server), runopencode -s <session-id>. - Open
/models: flat list, "View all integrations". Open the integrations dialog: providers show as connected.
Screenshot
Not attached; /models renders a single flat list with "View all integrations" as its action.
Operating System
Linux (NixOS / Ubuntu)
Terminal
Reproduces independent of terminal (state bug, not rendering).
- 主要语言
- TypeScript
- 星标
- 224k
- 派生
- 30k
- 平均合并
- 5 小时 25 分钟
- 30 天内合并 PR
- 494
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
anomalyco/opencode#62322 · 1 条评论 ·
维护者通常 1 天内回复
-
pending close
难度 2/5 1-3 小时 新手友好度 76/100
anomalyco/opencode#62305 · 1 条评论 ·
维护者通常 1 天内回复
-
docs: AgentEditor.update creates missing agents, but the plugin docs don't say so可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 76/100
anomalyco/opencode#62210 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#62046 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#61897 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
Add: ESP 2 RO未关闭approved check:passed streams:add
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't apply未关闭
难度 2/5 1-3 小时 新手友好度 67/100
wso2/integration-control-plane#1118 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
UTDNebula/utd-notebook#311 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复