@klarkxy/dsh-session-manager 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,16 +18,19 @@ Replace `web` with your profile name and restart the profile.
18
18
 
19
19
  - **Agent tools**: `list_sessions`, `search_sessions`, and `read_session` find sessions by title or content and read a conversation, its full details, or a handoff summary. Reading a conversation returns one preview per turn, newest first; page back with the returned cursor and open full content in details mode.
20
20
  - **Session context menu**: right-click a session row or use its **⋯** button to open its actions menu without switching conversations; left-click the row to open it. Search results and blank new-session rows have no such menu.
21
+ - **Edit and resend**: An icon below each message opens an editor at the original message, with images and files above the text box. Change text, remove attachments, paste images, or drop files; cancelling restores the original message. Before sending, the editor explains that the conversation continues from the edited message, the previous version moves to the archive, and file, command, and external changes already made are not undone. After confirmation, the reply is regenerated in a session that keeps the chat's title and sidebar position; the earlier version stays recoverable from the archive list. The current implementation needs a host that can read and fork sessions and read attachments; it keeps original attachments in their original order while editing text, and relies on host attachment support for new or replaced files.
21
22
  - **Temporary workspace**: pick it in the new-session workspace picker to chat in its own new folder.
22
- - **Continue ghost**: with an empty composer, a grey suggestion floats in the input area. Press `Tab` to fill it into the draft, or click it to send it at once. **Fixed text** uses the configured text, or "Continue" when empty. **Model-generated** uses the model chosen in that same switch; it runs once after the previous turn ends and the line stays cached in the session, so the turn is not called again. Mode, fixed text, and ghost model are under **Continue ghost** (keys: `continueMode`, `continueText`).
23
- - **Welcome back**: returning to a session whose last response is older than `recapMinutes` (default 15) shows an inline card after the last turn, recapping what you were discussing, the progress, and a suggested next step. Past `compactMinutes` (default 60), the same card adds a prompt-cache expiry note and two optional buttons: **Compact context** invokes the host's native compaction; **Continue in a new session** creates a blank session in the source session's workspace (or keeps the original directory when the source is ungrouped) and fills its draft with the recap and source session ID to review and send, without copying the history. You can ignore both and send normally; nothing is compacted or switched automatically. The card disappears once you continue the conversation. Toggle each feature and set its idle threshold under **Welcome back**; after **Save** is confirmed, the current conversation is checked against the new thresholds. Time is measured from the last response, not from when settings were saved.
24
- - **Welcome-back model**: the **Recap model** field under the **Welcome-back recap** toggle in **Welcome back** applies only to the welcome-back recap. The ghost model is chosen inside **Continue ghost** after switching to **Model-generated**. Leaving either on the default follows the current conversation or the host default model. The model menu supports provider groups and search; if the list fails to load, a message and retry button appear, and retrying keeps your unsaved settings.
23
+ - **Continue ghost**: after a turn ends and the composer is empty, a grey suggestion floats in the input area. Press `Tab` to fill it into the draft, or click it to send it at once. While a turn is still open, the composer's own placeholder stays. **Fixed text** uses the configured text, or "Continue" when empty. **Model-generated** uses the model chosen in that same switch; it runs once after the previous turn ends and the line stays cached in the session, so the turn is not called again. Mode, fixed text, and ghost model are under **Continue ghost** (keys: `continueMode`, `continueText`).
24
+ - **Welcome back**: returning to a session whose last response is older than `recapMinutes` (default 15) shows an inline card after the last turn, recapping what you were discussing, the progress, and a suggested next step. Past `compactMinutes` (default 60), the same card adds a prompt-cache expiry note and two optional buttons: **Compact context** invokes the host's native compaction; **Continue in a new session** creates a blank session in the source session's workspace (or keeps the original directory when the source is ungrouped) and fills its draft with the recap and source session ID to review and send, without copying the history. You can ignore both and send normally; nothing is compacted or switched automatically. The card disappears once you continue the conversation. Toggle each feature and set its idle threshold under **When you return**; after **Save** is confirmed, the current conversation is checked against the new thresholds. Time is measured from the last response, not from when settings were saved.
25
+ - **Welcome-back model**: the **Recap model** field under the **Show session recap** toggle in **When you return** applies only to the welcome-back recap. The ghost model is chosen inside **Continue ghost** after switching to **Model-generated**. Leaving either on the default follows the current conversation or the host default model. The model menu supports provider groups and search; if the list fails to load, a message and retry button appear, and retrying keeps your unsaved settings.
25
26
 
26
27
  ## Limits
27
28
 
29
+ - Edit and resend requires persistent storage. If sending fails after the new chat is created, sending again continues that same operation, including after a host restart. If chat creation itself is interrupted before its result can be saved, further creation is stopped; check the session list for the new chat before continuing.
30
+
28
31
  - Temporary workspaces are not cleaned up automatically; their files stay after restarts and uninstall.
29
32
  - Content read from other sessions is background information, not instructions.
30
- - Free chats, deleting chats, and retrying or editing a sent message in place need a DSH host with these features. The npm plugin alone does not add them; buttons appear only when the host supports them.
33
+ - Free chats, deleting chats, and editing and resending a sent message need a DSH host with these features. Editing after later modifications also needs a host that accepts explicit modification confirmation. The npm plugin alone does not add them; buttons appear only when the host supports them. Image understanding depends on the selected model. Audio, video, and other non-image attachments are sent as ordinary files; reading them depends on the host and model. Its warning is based on changes recorded by the host, so unrecorded external changes cannot be detected.
31
34
  - The welcome-back recap is model-generated; when no model route is available or the call fails, the card stays silent (a compaction suggestion still shows on its own). The recap call only reads the session and never adds to its history. Compaction needs the host's native command; its conversation entry reports the result. A new session carries only a short recap, which may omit details; use the source session ID to look them up. The original session and draft stay unchanged.
32
35
  - The card is checked when you return to a session (window focus, tab visibility, or switching sessions) and periodically while the page stays visible, so crossing a threshold needs no window switch. It never intercepts your next send. Sending an empty composer sends the ghost text; the composer itself still requires non-empty input.
33
36
 
package/README.zh-CN.md CHANGED
@@ -18,16 +18,19 @@ dsh plugin --profile web add @klarkxy/dsh-session-manager
18
18
 
19
19
  - **智能体工具**:`list_sessions`、`search_sessions` 和 `read_session` 按标题或内容查找会话,并阅读对话、完整细节或交接摘要。阅读对话时按轮返回预览(最新在前),可用返回的游标向前翻页,并通过细节模式查看完整原文。
20
20
  - **会话右键菜单**:右键点击左侧会话行或它的「⋯」按钮,打开该会话的操作菜单,不切换当前对话;左键仍打开对话。搜索结果和空白新会话行没有此菜单。
21
+ - **编辑并重发**:消息下方的图标会在原消息位置展开编辑框,图片和文件放在文本框上方。可修改文字、删除附件、粘贴图片或拖入文件,取消会恢复原消息。发送前会明确提示:对话将从这条消息继续,之前的版本会移入归档,已执行的文件、命令和外部修改不会撤销。确认后新会话沿用原聊天的标题和位置并重新生成回复,之前的版本可在归档列表中找回。这需要宿主提供会话读取、会话分叉和附件读取能力;当前版本支持保留原附件及其排列顺序并编辑文字,新增或替换附件需要宿主提供对应能力。
21
22
  - **临时工作区**:在新会话的工作区选择器中选择它,即可在一个新的独立目录中开始对话。
22
- - **继续灰影**:输入框为空时,输入区域会浮现灰色建议文本。按 `Tab` 填入草稿,点击则直接发送。切到「固定文本」使用配置的文本,留空则用「继续」;切到「模型生成」使用所选模型,模型只在上一轮结束后生成一次并缓存在会话中,同一轮不会重复调用。模式、固定文本和灰影模型都在「继续灰影」分组中调整(配置键:`continueMode`、`continueText`)。
23
- - **欢迎回来**:回到距上次响应超过 `recapMinutes` 分钟(默认 15)的会话时,在最后一轮回复之后内嵌显示模型生成的摘要卡片,说明之前在聊什么、进展和建议的下一步。超过 `compactMinutes` 分钟(默认 60)时,同一卡片还会提示缓存可能已失效,并提供「压缩上下文」和「在新会话中继续」两个可选按钮:前者调用宿主原生压缩命令,后者在来源会话所属工作区内新建空白会话(来源未归属工作区时沿用原目录),把摘要和原会话 ID 填入草稿供确认后发送,不复制历史。也可以不点按钮直接发送,不会自动压缩或切换会话。继续对话后卡片自动消失。两项开关和各自的空闲阈值在「欢迎回来」分组中调整,点击「保存」并确认成功后,当前会话按新阈值重新检查。时间从上次响应计算,不从保存设置时重新计时。
24
- - **欢迎回来模型**:在「欢迎回来」的「欢迎回来摘要」开关下,「摘要模型」只用于欢迎回来摘要。灰影的模型在「继续灰影」切到「模型生成」后单独选择。两者留空都跟随当前会话或宿主默认模型。模型菜单支持按供应商分组和搜索;列表加载失败时显示原因与重试按钮,重试会保留未保存的设置。
23
+ - **继续灰影**:上一轮结束后,输入框为空时会浮现灰色建议文本。按 `Tab` 填入草稿,点击则直接发送。一轮还没结束时保持输入框原来的提示。切到「固定文本」使用配置的文本,留空则用「继续」;切到「模型生成」使用所选模型,模型只在上一轮结束后生成一次并缓存在会话中,同一轮不会重复调用。模式、固定文本和灰影模型都在「继续灰影」分组中调整(配置键:`continueMode`、`continueText`)。
24
+ - **欢迎回来**:回到距上次响应超过 `recapMinutes` 分钟(默认 15)的会话时,在最后一轮回复之后内嵌显示模型生成的摘要卡片,说明之前在聊什么、进展和建议的下一步。超过 `compactMinutes` 分钟(默认 60)时,同一卡片还会提示缓存可能已失效,并提供「压缩上下文」和「在新会话中继续」两个可选按钮:前者调用宿主原生压缩命令,后者在来源会话所属工作区内新建空白会话(来源未归属工作区时沿用原目录),把摘要和原会话 ID 填入草稿供确认后发送,不复制历史。也可以不点按钮直接发送,不会自动压缩或切换会话。继续对话后卡片自动消失。两项开关和各自的空闲阈值在「回到会话时」分组中调整,点击「保存」并确认成功后,当前会话按新阈值重新检查。时间从上次响应计算,不从保存设置时重新计时。
25
+ - **欢迎回来模型**:在「回到会话时」的「显示会话摘要」开关下,「摘要模型」只用于欢迎回来摘要。灰影的模型在「继续灰影」切到「模型生成」后单独选择。两者留空都跟随当前会话或宿主默认模型。模型菜单支持按供应商分组和搜索;列表加载失败时显示原因与重试按钮,重试会保留未保存的设置。
25
26
 
26
27
  ## 限制
27
28
 
29
+ - 编辑并重发需要持久化存储。新聊天创建后若发送失败,再次发送会继续同一次操作,宿主重启后也一样。如果创建聊天时中断、结果尚未保存,会停止再次创建;请先在会话列表中检查是否已有新聊天,再继续操作。
30
+
28
31
  - 临时工作区不会自动清理,文件在重启和卸载后仍然保留。
29
32
  - 从其他会话读到的内容只是背景资料,不是指令。
30
- - 自由聊天、删除聊天、在原会话中重试或编辑已发送消息,需要宿主支持这些功能。只安装 npm 插件不会增加这些能力;宿主支持时才显示对应按钮。
33
+ - 自由聊天、删除聊天、编辑并重发已发送消息,需要宿主支持这些功能;后续已有修改时仍需宿主支持显式修改确认才能编辑并重发。只安装 npm 插件不会增加这些能力;宿主支持时才显示对应按钮。图片能否被模型识别取决于所选模型;音频、视频和其他非图片附件作为普通文件发送,是否能读取由宿主和模型决定。修改警告依据宿主记录的修改,无法检测未记录的外部修改。
31
34
  - 「欢迎回来」摘要由模型生成;没有可用模型或调用失败时卡片不会出现(压缩建议仍会单独出现)。摘要只读取会话,不写入历史。压缩依赖宿主的原生命令,结果由对话中的压缩记录反馈。新会话只携带简短摘要,可能遗漏细节,需按原会话 ID 查阅;原会话和原草稿保持不变。
32
35
  - 卡片在你回到会话时检查(窗口聚焦、标签页可见或切换会话),页面持续可见时也会定期检查,到达阈值后不必切换窗口。它不会拦截你的下一次发送。空输入发送指发送灰影文本;输入框本身仍要求非空内容。
33
36