feat(subagent): display model name next to task titles in subagent view - #561
Open
cinvymoe wants to merge 21 commits into
Open
feat(subagent): display model name next to task titles in subagent view#561cinvymoe wants to merge 21 commits into
cinvymoe wants to merge 21 commits into
Conversation
File routes (fs.tree/fs.read/fs.write, media, HTML preview, upload) accept extra roots beyond the session cwd. Default: ~/.dsh/external when it exists; explicit [] disables; '~' expands; non-absolute entries fail loudly. The symlink-escape guard and the 403 contract are unchanged; fs.search stays workspace-only.
Clicking an edit-tool file link in the chat probes the file's OWN repository (new git.status-at route, fenced by extraRoots) and opens the worktree diff tab when the file has pending changes; non-repo files and unchanged files fall back to the editor. git.diff accepts external repoRoots inside the fence instead of silently retargeting the session repo. The editOpensDiff preference (default on) has a settings-page switch in 24 locales.
Edit/write file links from the chat now land in one fixed chat-preview tab: same-type editor opens patch title/path in place, diff or type switches rebuild under the same id, floated previews are patched or re-docked. The reducer path bypasses openTab's per-path dedupe so persistent editor tabs never capture the preview seed. Explorer and editor-menu opens keep one-tab-per-file behavior.
detectNewDirectSubagent fired only on the 0-to-1 transition, so sessions that ever had a subagent never auto-opened again. It now diffs direct subagent ids per snapshot (same new-id semantics as detectNewJob); the debounce window merges concurrent triggers instead of dropping them.
# Conflicts: # src/index.ts
# Conflicts: # src/fs-operations.ts # src/path-security.ts # tests/plugin-shape.spec.ts # tests/prefs.spec.ts
# Conflicts: # src/client/api.ts # src/client/builtins/tabs.tsx
# Conflicts: # src/client/TerminalView.tsx # src/client/intercept.tsx # tests/openpath-intercept.spec.ts
# Conflicts: # tests/bundle-route.spec.ts
# Conflicts: # package.json # src/client/Sidebar.tsx # src/client/subagent-detect.ts
- Diff view: default expand single-file diffs and all files in DiffTab (with wider code/config file extension matching) - Subagent navigation: directly jump to corresponding child subagent session when clicking subagent tool rows in chat
- Read tool clicks (or file links in read rows) always open as plain file in editor, never probing or showing git diff - Automatically jump and scroll to the read line/offset in the editor when available - Preserve git diff preview for actual edit/write tool links via editOpensDiff
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
在任务管理(SubagentView)显示界面的每一个执行任务标题后面,新增显示当前执行的模型名称徽章。
Changes
src/subagent-live-route.ts):subagents.live返回值增加models: Record<string, string>resolveSessionModel:依次从 Live Agent options、Live Session requestHeader/requestContext、Session snapshotEvents、以及持久化 sessionPersistence.inspect 提取模型信息src/client/api.ts,src/client/SubagentView.tsx):SubagentLiveResult类型声明包含models?: Record<string, string>useSubagentLive维护 live models 并在节点中消费resolveSessionModelsrc/client/SubagentView.tsx,src/client/SubagentView.module.css):.subagentModelBadge)--dsw-alias-hairline、--dsw-font-xxxs-11、--dsw-alias-label-tertiary令牌)tests/subagent-live-route.spec.ts、tests/subagent-live-polling.spec.tsx与tests/subagent-jobs-view.spec.tsx