Repository navigation
feat: 临时侧聊实验与选区提问 - #210
Merged
Merged
Conversation
…posal # Conflicts: # source-receipt.json
…posal # Conflicts: # source-receipt.json
Contributor
Author
dbbDylan
marked this pull request as ready for review
October 25, 2026 14:02
Keep independent side chats for each source conversation without inactivity expiry, support live selections, and reuse native notice and action styles. Preserve shared model request queueing, restore desktop environment credential fallback, and trim the experiment workflow and research script.
Contributor
Author
|
需讨论:
|
Member
Member
|
感谢 @dbbDylan 为侧聊原型和交互完善投入的工作,复用 DSH 原生会话界面与现有批注能力的方向很有参考价值。 我们进一步核对后,目前这套侧聊实现仍依赖配套的 Runtime 扩展,涉及临时会话、参考上下文和持久化处理;仅安装插件,还不能在未修改的官方 DSH 上独立使用。后续随 DSH 升级,也需要继续适配和验证这些扩展。 考虑到我们希望尽量通过官方扩展接口交付独立插件,这个 PR 先保持开放,暂不合入正式产品。已有实现和讨论都保留,继续观察后续 DSH 对相关能力的开放情况,届时再评估如何减少 Runtime 改动、推进插件化接入。感谢付出,也欢迎后续继续一起讨论。 |
…posal # Conflicts: # source-receipt.json
Add the product-injection helper used to smoke-test the plugin in a locally assembled desktop build, and refresh the reviewed-compatibility hash for the development Studio launcher after the audit surfaced a stale entry. Local checkpoint only; not part of the published product. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
Replace the experiment build pipeline (runtime-extension.mjs,
build-side-chat-experiment.mjs, assemble-side-chat-experiment.mjs) with
a standard seed-based fork approach:
- service.js: use agents.create({ seed }) instead of setReferenceContext
and ephemeral session patches; return seedLength for UI filtering
- client/index.jsx: add hideInheritedNodes() to hide seed messages via
DOM observation; fix empty-state detection for seeded sessions
- Remove dsh-llm peer dependency (no longer needed)
- Relax dsh-session peer to >=0.2.1-rc.2 for version compatibility
- Register side-chat in assembly and distribution configs
Co-Authored-By: Claude Fable 5 <[email protected]>
DSH 0.2.1-rc.3 no longer exposes @deepseek-ai/dsh-client-ui-primitives as a shared client module, so the client bundle failed to initialise and the plugin's UI never registered. Ship the three pieces the plugin uses (Toast, Tooltip, warning icon) locally and drop the package from dsh.client.inject. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
packages/ is not a valid localPlugins source for the desktop assembler (its payload step calls npm pack on dsh-plugins paths), so registering the package there broke product assembly. The plugin stays an explicit local injection for smoke tests until it is published and added to the plugin lock. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
A side chat is a durable Session, so the sidebar classified it as Ungrouped for its whole lifetime. Attach it to the Workspace owning the source cwd when it opens and detach it on close, keeping the panel grouped with its source. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
Contributor
Author
Name a side chat from the selected text as soon as it opens, then replace the placeholder with a model-distilled title once its first turn settles. The host title action reads only the side chat's own events (skipping the seeded source history), asks the session model for a single line, and normalizes whatever comes back; the client renames through the standard session API. The annotation selection action now forwards the quoted text so the placeholder has something to name. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
…e host The views override replaced the whole session body, so an empty side chat had no composer at all. Render the native session view unconditionally and float the hint over it. Renaming now goes through the host's sessionTitle service instead of the client remote, which never reached the session: the placeholder rides the open call and the model title is applied where the agent lives. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
Wrapping the session view in a flex container broke the height chain: the whole pane scrolled instead of the transcript. Render the native body directly and portal the empty hint into the tab so it never takes part in layout; detect emptiness from the conversation nodes after the seeded boundary instead of a session projection that does not exist. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
A seeded session needs both the inherited event count and an isSeeded header, otherwise the persisted log is unreadable on reload. The title pass now dispatches through a prepared LLM call and only counts the side chat's own turns. Inherited nodes are hidden by node key, and the empty state shows only while the side chat owns no node. Quoting a streaming row is refused, matching the reference plugin's selection guard. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
A side chat ends with its pane, but its turns still produced completed items that no click could resolve, so they piled up as unreviewed tasks. Skip side-chat sessions in the attention observer; approvals and questions still notify because those need a decision. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
The first pass skipped every event of a side chat, which also silenced the approval prompt it may be waiting on. Only the settled turn stays quiet now; decisions still reach the tray. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
Closing a side chat only disposed its handle, so the stored log kept the id in the ungrouped bucket and the right sidebar restored an empty tab on every launch. Archive the session on close, sweep orphans left by an earlier Host, and close a restored tab with no chat behind it. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
A temporary chat should leave nothing behind. The runtime has no removal API, so the Host drops the session directory the JSONL store would keep listing; if that is not possible the conversation stays attached to its Workspace as an ordinary session rather than disappearing. The startup archive sweep goes away with it: anything still stored came from a close that could not run, and is kept. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
Removing the directory is a layout guess. Ask the persistence store whether the session is still listed afterwards, so a store that moved its files degrades to keeping the conversation instead of detaching an id that resurfaces later. Co-Authored-By: Claude Haiku 4.5 (1M context) <[email protected]>
…odex/side-chat-hidden-confirm
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.





参考 ChatGPT、Claude Desktop 实现了 EduWork 的侧边聊天功能: