xiyue718/dsh-ui-message-nav ↗★ 0
@dsh-external/ui-message-nav
Standalone session message navigation rail for the DSH conversation view
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 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 | 导航栏显示在对话视图左侧或右侧 |
previewMaxLength | number | 60 | 悬停预览最大字符数 |
autoLoadOlder | boolean | true | 是否在滚动到顶部时自动加载更早消息 |
autoLoadThreshold | number | 40 | 触发自动加载的顶部距离阈值(px) |
showPreview | boolean | true | 是否显示悬停消息预览 |
activeColor | string | 蓝色 token | 当前消息高亮颜色 |
idleColor | string | 灰色 token | 非高亮图标颜色 |
barWidthActive | number | 6 | 高亮图标宽度(px) |
barWidthIdle | number | 4 | 非高亮图标宽度(px) |
barHeightActive | number | 20 | 高亮图标高度(px) |
barHeightIdle | number | 12 | 非高亮图标高度(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 | 导航栏显示在对话视图左侧或右侧 |
previewMaxLength | number | 60 | 悬停预览最大字符数 |
autoLoadOlder | boolean | true | 是否在滚动到顶部时自动加载更早消息 |
autoLoadThreshold | number | 40 | 触发自动加载的顶部距离阈值(px) |
showPreview | boolean | true | 是否显示悬停消息预览 |
activeColor | string | 蓝色 token | 当前消息高亮颜色 |
idleColor | string | 灰色 token | 非高亮图标颜色 |
barWidthActive | number | 6 | 高亮图标宽度(px) |
barWidthIdle | number | 4 | 非高亮图标宽度(px) |
barHeightActive | number | 20 | 高亮图标高度(px) |
barHeightIdle | number | 12 | 非高亮图标高度(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
}
}
使用示例
- 打开任意会话。
- 对话视图右侧会出现垂直导航栏。
- 每个长条对应一条用户消息。
- 当前正在查看的消息对应长条为蓝色且较长。
- 鼠标悬停任意长条,左侧显示该消息内容预览。
- 点击长条,对话自动滚动到对应消息。
- 滚动到对话顶部,自动加载更早消息。