@goodandready/dsh-cost-meter 0.8.6 → 0.8.8

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.
Files changed (2) hide show
  1. package/lib/client.js +9 -9
  2. package/package.json +4 -2
package/lib/client.js CHANGED
@@ -341,7 +341,7 @@ window.__ModuleLoader__.load({
341
341
  const ErrorBoundary = createErrorBoundary()
342
342
 
343
343
  function getSettingsScope(ctx) {
344
- return (ctx && typeof ctx.get === 'function' ? ctx.get('settingsScope') : null) || (ctx && ctx.settingsScope) || (ctx && ctx.services && ctx.services.settingsScope) || null
344
+ return (ctx && typeof ctx.get === 'function' ? ctx.get('configForms') : null) || (ctx && ctx.configForms) || (ctx && ctx.services && ctx.services.configForms) || null
345
345
  }
346
346
 
347
347
  function refreshMirrorUntilVisible(ctx) {
@@ -520,10 +520,10 @@ window.__ModuleLoader__.load({
520
520
  }
521
521
  }
522
522
 
523
- const settingsScope = getSettingsScope(ctx)
523
+ const configForms = getSettingsScope(ctx)
524
524
  const scope = React.useMemo(
525
- () => (settingsScope ? settingsScope.bind({ namespace: NS }) : undefined),
526
- [settingsScope],
525
+ () => (configForms ? configForms.get(NS) : undefined),
526
+ [configForms],
527
527
  )
528
528
 
529
529
  const snapshot = React.useSyncExternalStore(
@@ -1013,15 +1013,15 @@ window.__ModuleLoader__.load({
1013
1013
 
1014
1014
  React.useEffect(() => { ensureStyles() }, [])
1015
1015
 
1016
- const settingsScope = getSettingsScope(ctx)
1016
+ const configForms = getSettingsScope(ctx)
1017
1017
  const scope = React.useMemo(
1018
- () => (settingsScope && typeof settingsScope.bind === 'function' ? settingsScope.bind({ namespace: NS }) : undefined),
1019
- [settingsScope],
1018
+ () => (configForms && typeof configForms.get === 'function' ? configForms.get(NS) : undefined),
1019
+ [configForms],
1020
1020
  )
1021
1021
  const settingsSnap = React.useSyncExternalStore
1022
1022
  ? React.useSyncExternalStore(
1023
1023
  React.useMemo(() => (cb) => (scope && typeof scope.subscribe === 'function' ? scope.subscribe(cb) : () => {}), [scope]),
1024
- React.useCallback(() => (scope && typeof scope.getSnapshot === 'function' ? scope.getSnapshot() : (settingsScope && typeof settingsScope.get === 'function' ? settingsScope.get(NS) : null)), [scope, settingsScope]),
1024
+ React.useCallback(() => (scope && typeof scope.getSnapshot === 'function' ? scope.getSnapshot() : (configForms && typeof configForms.get === 'function' ? configForms.get(NS) : null)), [scope, configForms]),
1025
1025
  React.useCallback(() => null, []),
1026
1026
  )
1027
1027
  : null
@@ -1441,7 +1441,7 @@ window.__ModuleLoader__.load({
1441
1441
 
1442
1442
  module.exports = {
1443
1443
  apply,
1444
- inject: ['slots', 'locale', 'settingsScope'],
1444
+ inject: ['slots', 'locale', 'configForms'],
1445
1445
  CostMeterCard,
1446
1446
  CostMeter,
1447
1447
  ErrorBoundary,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-cost-meter",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
4
4
  "description": "DeepSeek Harness plugin: a session cost chip in the conversation header - live token usage by bucket, peak/off-peak tariff, and a countdown to the next tariff switch.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -28,7 +28,9 @@
28
28
  "client": {
29
29
  "platform": "web",
30
30
  "inject": [
31
- "@deepseek-ai/dsh-client-locale"
31
+ "@deepseek-ai/dsh-client-locale",
32
+ "@deepseek-ai/dsh-client-ui-slots",
33
+ "@deepseek-ai/dsh-client-ui-settings"
32
34
  ]
33
35
  }
34
36
  },