dsh-link-pulse 0.1.4 → 0.1.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
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.5] - 2026-08-25
4
+
5
+ ### Changed
6
+ - 侧边栏常驻条目排版样式优化:将延迟数值(如 `126ms`)改为与 OpenCode / CPA 规范统一的紧凑分段格式(`● CPA · Gemini 3.7 · 126ms`),去除两端强行两极分散的 `space-between`,实现视觉规格 100% 像素级对齐。
7
+
3
8
  ## [0.1.4] - 2026-08-25
4
9
 
5
10
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-link-pulse",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Dynamic LLM provider gateway latency and health pulse probe for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/src/client.js CHANGED
@@ -201,6 +201,12 @@ window.__ModuleLoader__.load({
201
201
 
202
202
  const otherProviders = (data?.providers || []).filter((p) => p.id !== activeProviderInfo?.id)
203
203
 
204
+ const segments = [
205
+ { text: providerDisplayName, color: T.label, bold: true },
206
+ { text: modelShortName, color: T.secondary },
207
+ { text: currentLatency > 0 ? `${currentLatency}ms` : '探测中', color: statusColor, bold: true },
208
+ ]
209
+
204
210
  const node = h(
205
211
  'button',
206
212
  {
@@ -222,44 +228,39 @@ window.__ModuleLoader__.load({
222
228
  }),
223
229
  wide &&
224
230
  h(
225
- 'div',
231
+ 'span',
226
232
  {
227
233
  style: {
228
- display: 'flex',
234
+ display: 'inline-flex',
229
235
  alignItems: 'center',
230
- justifyContent: 'space-between',
231
- flex: 1,
232
- overflow: 'hidden',
236
+ lineHeight: '18px',
233
237
  whiteSpace: 'nowrap',
238
+ minWidth: 0,
239
+ overflow: 'hidden',
240
+ textOverflow: 'ellipsis',
234
241
  },
235
242
  },
236
- h(
237
- 'div',
238
- {
239
- style: {
240
- display: 'flex',
241
- alignItems: 'center',
242
- gap: 3,
243
- overflow: 'hidden',
244
- textOverflow: 'ellipsis',
245
- },
246
- },
247
- h('span', { style: { fontWeight: 500, color: T.label } }, providerDisplayName),
248
- h('span', { style: { color: T.secondary } }, '·'),
249
- h('span', { style: { color: T.secondary, overflow: 'hidden', textOverflow: 'ellipsis' } }, modelShortName),
250
- ),
251
- h(
252
- 'span',
253
- {
254
- style: {
255
- fontSize: 11,
256
- fontWeight: 600,
257
- color: statusColor,
258
- marginLeft: 6,
259
- flexShrink: 0,
260
- },
261
- },
262
- currentLatency > 0 ? `${currentLatency}ms` : '探测中',
243
+ segments.flatMap((s, i) =>
244
+ i === 0
245
+ ? [h('span', { key: `s${i}`, style: { color: s.color, fontWeight: 500, flexShrink: 0 } }, s.text)]
246
+ : [
247
+ h('span', { key: `sep${i}`, style: { color: T.secondary, margin: '0 5px', opacity: 0.7, flexShrink: 0 } }, '·'),
248
+ h(
249
+ 'span',
250
+ {
251
+ key: `s${i}`,
252
+ style: {
253
+ color: s.color,
254
+ fontWeight: s.bold ? 500 : undefined,
255
+ fontVariantNumeric: 'tabular-nums',
256
+ overflow: 'hidden',
257
+ textOverflow: 'ellipsis',
258
+ flexShrink: i === segments.length - 1 ? 0 : 1,
259
+ },
260
+ },
261
+ s.text,
262
+ ),
263
+ ],
263
264
  ),
264
265
  ),
265
266
  )