@lyra_wang/dsh-pending-queue 0.3.2 → 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 +1 -0
- package/client.js +24 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,6 +63,7 @@ node --test test/routes.test.mjs
|
|
|
63
63
|
## 版本
|
|
64
64
|
|
|
65
65
|
- 0.1.0 — 首个版本:新增、编辑、删除、排序、发送、填入、已发送留痕。
|
|
66
|
+
- 0.3.3 — 编辑态补上「引用选中」:编辑某条时也能把聊天里选中的文字加进去,和草稿区一致。
|
|
66
67
|
- 0.3.2 — 编辑态也能加图:点「编辑」后,在编辑框里粘贴/拖入图片同样生效,编辑项里也有「+ 图片」。
|
|
67
68
|
- 0.3.1 — 粘贴更稳:剪贴板只给 `items` 不给 `files` 的截图也能接住;补「+ 图片」选文件入口;未存下的草稿按会话暂存到 localStorage。
|
|
68
69
|
- 0.3.0 — 图片:面板可粘贴/拖入图片,存本机、条目带缩略图,推送时按“路径 + read_image 提示”进对话;删除行时清理不再被引用的图片文件。
|
package/client.js
CHANGED
|
@@ -646,6 +646,26 @@ window.__ModuleLoader__.load({
|
|
|
646
646
|
}))
|
|
647
647
|
}, [uploadFile])
|
|
648
648
|
|
|
649
|
+
/** Edit-mode quote: the selection joins the row being edited. */
|
|
650
|
+
const addEditingQuote = useCallback(() => {
|
|
651
|
+
let live = ''
|
|
652
|
+
try {
|
|
653
|
+
live = String(window.getSelection() || '')
|
|
654
|
+
} catch {
|
|
655
|
+
live = ''
|
|
656
|
+
}
|
|
657
|
+
const text = (live.trim() !== '' ? live : lastChatSelection).trim()
|
|
658
|
+
if (text === '') {
|
|
659
|
+
setError(t('quote.empty'))
|
|
660
|
+
return
|
|
661
|
+
}
|
|
662
|
+
setEditing((current) => current === null ? current : ({
|
|
663
|
+
id: current.id,
|
|
664
|
+
segments: [...current.segments, { type: 'quote', text }],
|
|
665
|
+
}))
|
|
666
|
+
setError('')
|
|
667
|
+
}, [t])
|
|
668
|
+
|
|
649
669
|
const openPicker = useCallback((target) => {
|
|
650
670
|
pickerTarget.current = target
|
|
651
671
|
if (fileInput.current) fileInput.current.click()
|
|
@@ -793,6 +813,10 @@ window.__ModuleLoader__.load({
|
|
|
793
813
|
})
|
|
794
814
|
}),
|
|
795
815
|
h('div', { key: 'acts', className: ROOT + '-acts' }, [
|
|
816
|
+
h('button', {
|
|
817
|
+
key: 'quote', type: 'button', className: ROOT + '-act',
|
|
818
|
+
onClick: addEditingQuote,
|
|
819
|
+
}, t('action.quote')),
|
|
796
820
|
h('button', {
|
|
797
821
|
key: 'image', type: 'button', className: ROOT + '-act',
|
|
798
822
|
onClick: () => openPicker('edit'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyra_wang/dsh-pending-queue",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Right-sidebar draft queue for DeepSeek Harness: jot ideas down, quote chat text, attach images, then push one into the session when the previous task is finished.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|