@zhe_xuan/dsh-paper-desk 0.3.1 → 0.3.2
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/lib/client.js +24 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1698,6 +1698,7 @@ window.__ModuleLoader__.load({
|
|
|
1698
1698
|
"ai.stop": "\u505C\u6B62",
|
|
1699
1699
|
"ai.send": "\u53D1\u9001",
|
|
1700
1700
|
"ai.placeholder": "\u7EE7\u7EED\u63D0\u95EE\u2026\uFF08Enter \u53D1\u9001\uFF0CShift+Enter \u6362\u884C\uFF09",
|
|
1701
|
+
"ai.composingHint": "\u8F93\u5165\u6CD5\u9009\u8BCD\u4E2D\uFF1A\u6309 Enter \u5B8C\u6210\u9009\u8BCD\uFF0C\u518D\u6309\u4E00\u6B21 Enter \u53D1\u9001",
|
|
1701
1702
|
"ai.saveToNotes": "\u4FDD\u5B58\u5230\u7B14\u8BB0",
|
|
1702
1703
|
"ai.saved": "\u5DF2\u4FDD\u5B58\u5230\u7B14\u8BB0",
|
|
1703
1704
|
"ai.saveFailed": "\u4FDD\u5B58\u5230\u7B14\u8BB0\u5931\u8D25",
|
|
@@ -2183,6 +2184,7 @@ window.__ModuleLoader__.load({
|
|
|
2183
2184
|
"ai.stop": "Stop",
|
|
2184
2185
|
"ai.send": "Send",
|
|
2185
2186
|
"ai.placeholder": "Ask a follow-up\u2026 (Enter to send, Shift+Enter for a newline)",
|
|
2187
|
+
"ai.composingHint": "IME composing: press Enter to finish the candidate, then press Enter again to send",
|
|
2186
2188
|
"ai.saveToNotes": "Save to notes",
|
|
2187
2189
|
"ai.saved": "Saved to notes",
|
|
2188
2190
|
"ai.saveFailed": "Failed to save to notes",
|
|
@@ -6490,6 +6492,8 @@ window.__ModuleLoader__.load({
|
|
|
6490
6492
|
const snapshot = (0, import_react6.useSyncExternalStore)(subscribe, getSnapshot);
|
|
6491
6493
|
const [draft, setDraft] = (0, import_react6.useState)("");
|
|
6492
6494
|
const [sending, setSending] = (0, import_react6.useState)(false);
|
|
6495
|
+
const [composing, setComposing] = (0, import_react6.useState)(false);
|
|
6496
|
+
const composingRef = (0, import_react6.useRef)(false);
|
|
6493
6497
|
const [follow, setFollow] = (0, import_react6.useState)(true);
|
|
6494
6498
|
const [hasNew, setHasNew] = (0, import_react6.useState)(false);
|
|
6495
6499
|
const scrollRef = (0, import_react6.useRef)(null);
|
|
@@ -6674,8 +6678,17 @@ window.__ModuleLoader__.load({
|
|
|
6674
6678
|
"aria-label": labels.placeholder,
|
|
6675
6679
|
disabled,
|
|
6676
6680
|
onChange: (event) => setDraft(event.target.value),
|
|
6681
|
+
onCompositionStart: () => {
|
|
6682
|
+
composingRef.current = true;
|
|
6683
|
+
setComposing(true);
|
|
6684
|
+
},
|
|
6685
|
+
onCompositionEnd: () => {
|
|
6686
|
+
composingRef.current = false;
|
|
6687
|
+
setComposing(false);
|
|
6688
|
+
},
|
|
6677
6689
|
onKeyDown: (event) => {
|
|
6678
|
-
if (event.key !== "Enter" || event.shiftKey
|
|
6690
|
+
if (event.key !== "Enter" || event.shiftKey) return;
|
|
6691
|
+
if (composingRef.current || event.nativeEvent.isComposing || event.keyCode === 229) return;
|
|
6679
6692
|
event.preventDefault();
|
|
6680
6693
|
void send();
|
|
6681
6694
|
}
|
|
@@ -6691,7 +6704,8 @@ window.__ModuleLoader__.load({
|
|
|
6691
6704
|
children: labels.send
|
|
6692
6705
|
}
|
|
6693
6706
|
)
|
|
6694
|
-
] })
|
|
6707
|
+
] }),
|
|
6708
|
+
composing ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "pd-ai-ime-hint", role: "status", children: labels.composingHint }) : null
|
|
6695
6709
|
] })
|
|
6696
6710
|
] });
|
|
6697
6711
|
}
|
|
@@ -9087,6 +9101,7 @@ window.__ModuleLoader__.load({
|
|
|
9087
9101
|
newAnswer: t("ai.newAnswer"),
|
|
9088
9102
|
reasoning: t("ai.reasoning"),
|
|
9089
9103
|
createCard: t("cards.createFromAnswer"),
|
|
9104
|
+
composingHint: t("ai.composingHint"),
|
|
9090
9105
|
taskLabels: {
|
|
9091
9106
|
summary: t("assist.summary"),
|
|
9092
9107
|
method: t("assist.method"),
|
|
@@ -15130,6 +15145,13 @@ window.__ModuleLoader__.load({
|
|
|
15130
15145
|
.pd-ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
|
|
15131
15146
|
.pd-ai-actions .pd-btn { min-height: 24px; padding: 2px 6px; color: ${FG_22}; font-size: 11.5px; }
|
|
15132
15147
|
.pd-ai-actions .pd-btn:hover:not(:disabled) { color: ${FG2}; }
|
|
15148
|
+
.pd-ai-ime-hint {
|
|
15149
|
+
margin-top: 3px;
|
|
15150
|
+
color: ${FG_22};
|
|
15151
|
+
font-size: 11px;
|
|
15152
|
+
line-height: 1.4;
|
|
15153
|
+
}
|
|
15154
|
+
|
|
15133
15155
|
.pd-ai-inputRow { display: flex; align-items: flex-end; gap: 6px; }
|
|
15134
15156
|
.pd-ai-input { flex: 1 1 auto; min-height: 34px; max-height: 120px; resize: vertical; font-size: 12px; padding: 6px 8px; }
|
|
15135
15157
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhe_xuan/dsh-paper-desk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "PaperDesk: a Mendeley-style paper library for DeepSeek Harness — import PDFs, keep notes and highlights, ask the agent to explain papers, and sync the library folder through your cloud drive.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|