xiyue718/dsh-ui-message-nav0

@dsh-external/ui-message-nav

Standalone session message navigation rail for the DSH conversation view

包名
@dsh-external/ui-message-nav
版本
0.1.0
最近更新
2026年8月17日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

配置项

插件支持通过 profile bundle 装配时的 config 传入配置。

配置示例(cordis.yml / bundle entry)

- id: ui-message-nav
  name: '@dsh-external/ui-message-nav'
  config:
    position: right
    previewMaxLength: 60
    autoLoadOlder: true
    autoLoadThreshold: 40
    showPreview: true
    activeColor: 'var(--dsw-alias-state-info-primary, #4a90d9)'
    idleColor: 'var(--dsw-alias-label-tertiary, #999)'
    barWidthActive: 6
    barWidthIdle: 4
    barHeightActive: 20
    barHeightIdle: 12

配置项说明

配置项类型默认值说明
position'left' | 'right'right导航栏显示在对话视图左侧或右侧
previewMaxLengthnumber60悬停预览最大字符数
autoLoadOlderbooleantrue是否在滚动到顶部时自动加载更早消息
autoLoadThresholdnumber40触发自动加载的顶部距离阈值(px)
showPreviewbooleantrue是否显示悬停消息预览
activeColorstring蓝色 token当前消息高亮颜色
idleColorstring灰色 token非高亮图标颜色
barWidthActivenumber6高亮图标宽度(px)
barWidthIdlenumber4非高亮图标宽度(px)
barHeightActivenumber20高亮图标高度(px)
barHeightIdlenumber12非高亮图标高度(px)

未配置时自动使用默认值。

配置示例(cordis.yml / bundle entry)

- id: ui-message-nav
  name: '@dsh-external/ui-message-nav'
  config:
    position: right
    previewMaxLength: 60
    autoLoadOlder: true
    autoLoadThreshold: 40
    showPreview: true
    activeColor: 'var(--dsw-alias-state-info-primary, #4a90d9)'
    idleColor: 'var(--dsw-alias-label-tertiary, #999)'
    barWidthActive: 6
    barWidthIdle: 4
    barHeightActive: 20
    barHeightIdle: 12

配置项说明

配置项类型默认值说明
position'left' | 'right'right导航栏显示在对话视图左侧或右侧
previewMaxLengthnumber60悬停预览最大字符数
autoLoadOlderbooleantrue是否在滚动到顶部时自动加载更早消息
autoLoadThresholdnumber40触发自动加载的顶部距离阈值(px)
showPreviewbooleantrue是否显示悬停消息预览
activeColorstring蓝色 token当前消息高亮颜色
idleColorstring灰色 token非高亮图标颜色
barWidthActivenumber6高亮图标宽度(px)
barWidthIdlenumber4非高亮图标宽度(px)
barHeightActivenumber20高亮图标高度(px)
barHeightIdlenumber12非高亮图标高度(px)

未配置时自动使用默认值。

获取当前配置

GET /@dsh-external/ui-message-nav/api/config

响应:

{
  "config": {
    "position": "right",
    "previewMaxLength": 60,
    "autoLoadOlder": true,
    "autoLoadThreshold": 40,
    "showPreview": true,
    "activeColor": "var(--dsw-alias-state-info-primary, #4a90d9)",
    "idleColor": "var(--dsw-alias-label-tertiary, #999)",
    "barWidthActive": 6,
    "barWidthIdle": 4,
    "barHeightActive": 20,
    "barHeightIdle": 12
  }
}

使用示例

  1. 打开任意会话。
  2. 对话视图右侧会出现垂直导航栏。
  3. 每个长条对应一条用户消息。
  4. 当前正在查看的消息对应长条为蓝色且较长。
  5. 鼠标悬停任意长条,左侧显示该消息内容预览。
  6. 点击长条,对话自动滚动到对应消息。
  7. 滚动到对话顶部,自动加载更早消息。