@a9i5k4/dsh-auto-memory 2.1.2 → 2.1.3

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/cordis.patch.yml CHANGED
@@ -1,9 +1,9 @@
1
- # dsh-auto-memory bundle patch: inserts the dual-face plugin row into the web
2
- # profile roster. Applied as a profile bundle layer (the `dsh.bundle.patch`
3
- # manifest field). The node half (exports ".") runs in the host process
4
- # (memory engine, /api/dsh-auto-memory routes, agent tools, prompt injection);
5
- # the `dsh.client` declaration in package.json makes the browser half
6
- # (exports "./client", served at /plugins/<id>/client.js) load in the web GUI.
7
- - insert:
8
- - id: auto-memory
9
- name: '@a9i5k4/dsh-auto-memory'
1
+ # dsh-auto-memory bundle patch: inserts the dual-face plugin row into the web
2
+ # profile roster. Applied as a profile bundle layer (the `dsh.bundle.patch`
3
+ # manifest field). The node half (exports ".") runs in the host process
4
+ # (memory engine, /api/dsh-auto-memory routes, agent tools, prompt injection);
5
+ # the `dsh.client` declaration in package.json makes the browser half
6
+ # (exports "./client", served at /plugins/<id>/client.js) load in the web GUI.
7
+ - insert:
8
+ - id: auto-memory
9
+ name: '@a9i5k4/dsh-auto-memory'
package/lib/client.js CHANGED
@@ -2360,8 +2360,17 @@ window.__ModuleLoader__.load({
2360
2360
  var noncePair = useState(0)
2361
2361
  var nonce = noncePair[0]
2362
2362
  var setNonce = noncePair[1]
2363
+ var verPair = useState(null)
2364
+ var ver = verPair[0]
2365
+ var setVer = verPair[1]
2363
2366
  var g = controller.geom()
2364
2367
  useEffect(function () { return controller.subscribe(tick[1]) }, [])
2368
+ // 真实版本号(#15):面板头徽标不再硬编码,从 update-check 的 current(读包 version)取,失败留空
2369
+ useEffect(function () {
2370
+ var alive = true
2371
+ apiGet(API.updateCheck).then(function (d) { if (alive && d && d.current) setVer(d.current) }).catch(function () {})
2372
+ return function () { alive = false }
2373
+ }, [])
2365
2374
  // 可读性兜底(@ProperSAMA PR#12,适配版):DSH Desktop 增强模式 + 透明/Mica 窗口材质下,
2366
2375
  // 主题令牌 --dsw-alias-bg-overlay 本身就是半透明的,面板文字几乎不可读。判别信号用
2367
2376
  // 「令牌自身的 alpha」(增强模式显著低于普通模式的 0.86-0.9):< 0.65 时把面板背景提升到
@@ -2425,7 +2434,7 @@ window.__ModuleLoader__.load({
2425
2434
  onPointerDown: dragMove,
2426
2435
  },
2427
2436
  h('strong', null, t('autoMemory')),
2428
- h('span', { 'data-dam-hint': '', style: { fontSize: '10px', opacity: .55 } }, 'v0.1.23-ui'),
2437
+ h('span', { 'data-dam-hint': '', style: { fontSize: '10px', opacity: .55 } }, ver ? 'v' + ver + '-ui' : ''),
2429
2438
  h('span', { className: 'dam-spacer' }),
2430
2439
  h('button', { 'data-dam-btn': '', title: t('resetPos'), onClick: function () { controller.resetGeom() } }, '⤾'),
2431
2440
  h('button', { 'data-dam-btn': '', title: t('refresh'), onClick: function () { setNonce(nonce + 1) } }, '⟳'),