dsh-quote-annotate-pro 0.2.3 → 0.2.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  本项目的所有重要变更都记在这里。版本号遵循 [SemVer](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## 0.2.5 — 引用块样式:贴在输入框上沿
6
+
7
+ - 0.2.4 曾把引用块挪进 `conversation.input.overlay`,实测该槽位是**浮动弹层**(放的是 slash-menu / command-popup 这类弹窗),静态内容放进去不可见 → **改回 `conversation.input.dock`**
8
+ - DSH 没有"输入框卡片内部、文字上方"的静态槽位:
9
+ - `conversation.input.overlay` = 浮动弹层(不适用)
10
+ - `conversation.input.attachments` = 官方草稿附件栏(single 槽位,占用会顶掉官方附件 UI,不能碰)
11
+ - 折中方案:引用块留在卡片上沿,用样式做成**贴着输入框**(顶部大圆角、底部小圆角、无间隙),视觉上与输入框连成一体
12
+ - 对话页里的紧凑引用(0.2.3)不受影响
13
+
14
+ ## 0.2.4 — 输入框里的引用块(挪进输入框卡片内)
15
+
16
+ - 引用块从「输入框卡片**上方**」挪到「输入框卡片**内部**、文字上方」(`conversation.input.overlay` 槽位),与参考产品一致:引用跟着输入内容走,看起来是一体的
17
+ - 输入框会话探针仍留在 `conversation.input.dock`(用来解析 sessionId),两个槽位互不干扰
18
+ - 对话页里的紧凑引用(0.2.3)保持不变
19
+
5
20
  ## 0.2.3 — 对话页里的引用也变紧凑(隐藏位置标签)
6
21
 
7
22
  - **已发送消息里的引用**:原来显示 `【引用 · 第N轮 · 角色】` + `> 原文` 两行,现在只显示一个**紧凑的原文块**(最多 3 行、超出省略),**位置标签不再显示**
package/lib/client.js CHANGED
@@ -905,7 +905,8 @@ window.__ModuleLoader__.load({
905
905
  }
906
906
 
907
907
  const QuoteDock = (props) => {
908
- const sessionId = props && typeof props.sessionId === 'string' && props.sessionId !== '' ? props.sessionId : null
908
+ // 槽位作用域是 session,正常会带 sessionId;拿不到时退回模块级解析结果
909
+ const sessionId = (props && typeof props.sessionId === 'string' && props.sessionId !== '' ? props.sessionId : null) || resolveSessionId() || null
909
910
  const [rows, setRows] = React.useState([])
910
911
  React.useEffect(() => {
911
912
  if (!sessionId) { setRows([]); return undefined }
@@ -986,9 +987,9 @@ window.__ModuleLoader__.load({
986
987
  /* 根因:textarea(透明文字、absolute、inset:0)渲染在 backdrop 之后,整层盖住 chip。
987
988
  给 chip 提升 z-index 使其浮到 textarea 之上,点击才能落到 chip 上。 */
988
989
  [data-occurrence]{pointer-events:auto;cursor:pointer;position:relative;z-index:1}
989
- /* 引用块:输入框上方,紧凑单行(点一下跳回原文,但不显示任何"跳转"提示) */
990
- .dshq-dock{display:flex;flex-direction:column;gap:4px;padding:0 2px;min-width:0}
991
- .dshq-quote-block{display:flex;align-items:center;min-width:0;max-width:100%;box-sizing:border-box;padding:5px 10px;border-radius:8px;background:var(--dsw-alias-bg-layer-2);background:color-mix(in oklab,var(--dsw-alias-brand-primary) 8%,var(--dsw-alias-bg-layer-1));color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;cursor:pointer;transition:background .12s ease,color .12s ease}
990
+ /* 引用块:贴在输入框卡片上沿(点一下跳回原文,不显示任何"跳转"提示) */
991
+ .dshq-dock{display:flex;flex-direction:column;gap:4px;padding:0 6px;margin:6px 0 -2px;min-width:0;box-sizing:border-box}
992
+ .dshq-quote-block{display:flex;align-items:center;min-width:0;max-width:100%;box-sizing:border-box;padding:6px 10px;border-radius:12px 12px 4px 4px;background:var(--dsw-alias-bg-layer-2);background:color-mix(in oklab,var(--dsw-alias-brand-primary) 8%,var(--dsw-alias-bg-layer-1));color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;cursor:pointer;transition:background .12s ease,color .12s ease}
992
993
  .dshq-quote-block:hover{color:var(--dsw-alias-label-primary)}
993
994
  .dshq-quote-block-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
994
995
  /* 已发送消息里的引用:隐藏位置标签,只显示紧凑的原文块(点击可跳回原文,无可见引导) */
@@ -1343,8 +1344,12 @@ window.__ModuleLoader__.load({
1343
1344
  { name: 'conversation.input.dock', id: 'quote-pro-session-probe', order: 1 },
1344
1345
  SessionProbe,
1345
1346
  )))
1347
+ // 引用块回到「输入框卡片上沿」的 dock 槽位(官方说明:Full-width entries above the composer card),
1348
+ // 用样式把它做成"贴在输入框上沿"的样子 —— DSH 没有"卡片内部、文字上方"的静态槽位:
1349
+ // conversation.input.overlay 是浮动弹层(放的是 slash-menu / command-popup 这类),
1350
+ // conversation.input.attachments 是官方草稿附件栏(single,占用会顶掉官方附件 UI,不能碰)。
1346
1351
  tryRegister('dock:quote-nav', () => slots.inject('conversation.input.dock', () => slots.register(
1347
- { name: 'conversation.input.dock', id: 'quote-pro-quote-dock', order: 2 },
1352
+ { name: 'conversation.input.dock', id: 'quote-pro-quote-block', order: 2 },
1348
1353
  QuoteDock,
1349
1354
  )))
1350
1355
  tryRegister('turnTail', () => slots.inject('conversation.chat.turnTail', () => slots.register(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-quote-annotate-pro",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "选区引用与锚点批注(增强 fork):划词 → 批注 → 带精确锚点的引用;输入框上方只显示原文片段,点一下跳回原文;发送时把轮次/角色写入引用块,让模型精确知道你指的是哪一处。",
5
5
  "keywords": ["dsh", "dsh-plugin", "deepseek-harness", "quote", "annotate", "selection", "reference", "anchor"],
6
6
  "license": "MIT",