feat(desktop): Desktop 无工作区绑定模式#55
Merged
Merged
Conversation
InstructionDiscoveryContext 增加 includeWorkspaceScope;discoverRuleEntries/discoverSkillEntries 可仅发现用户级。McpService 支持 includeWorkspaceConfig 以跳过工作区 mcp.json 合并,并补充单元测试。
配置持久化 workspaceBinding 与 lastProjectWorkspaceRoot;bootstrap 可进入 none 模式并仅加载用户级 MCP/指令。runtime 暴露 switchToNoWorkspaceBinding。
EmptyStateWorkspaceSelector 支持进入 none 绑定;无工作区模式下非空会话仍显示工作区切换条。补充中英文文案。
SessionSidebar 支持 flat 布局并过滤当前 cwd 会话;设置页隐藏工作区级 MCP/Skills 创建项并提示仅用户级。补充 workspaceBinding 宿主测试。
侧栏在 binding 为 none 时仅将主目录会话列于「无工作区」扁平区,项目工作区会话仍保留折叠分组;工作区下拉不再把用户主目录当作 pc 工作区。打开无工作区会话时 resolveWorkspaceBindingForRequestedRoot 保持 none,避免 Composer 显示 pc。
打开 cwd 为用户主目录的会话时 workspaceBinding 一律为 none,避免会话切换后空会话将 pc 误当作项目工作区。recent 与下拉列表永久排除主目录。侧栏以 userHomeDirectory 划分无工作区扁平区与项目分组,不再随 binding 切换布局。
工作区列表滚动与模型选择器一致,采用 ScrollArea 与滚轮事件隔离。将「不使用工作区」图标由用户头像改为 MessageSquareText,更符合无绑定会话语义。
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.
Summary
为 Desktop 增加「不使用工作区」模式:Composer 以用户主目录为 cwd,不加载工作区级 MCP / Skills / Rules,且不把主目录写入 recent 工作区列表。
workspaceBinding(project|none)、includeWorkspaceScope/includeWorkspaceConfig,bootstrap 与配置持久化。userHomeDirectory划分,与 binding 解耦)。none绑定,避免切回空会话后pc误入工作区列表;工作区下拉列表使用与模型选择器一致的ScrollArea(固定高度 + 内层滚动)。