dsh-command-palette 0.1.3 → 0.1.4

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/client.js +7 -1
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -6,12 +6,18 @@ window.__ModuleLoader__.load({
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
7
7
  const React = require('react')
8
8
  const ReactDOM = require('react-dom')
9
- const { useStore } = require('@deepseek-ai/dsh-client-runtime')
10
9
 
11
10
  const GROUP_ORDER = ['features', 'settings', 'browser', 'workspaces', 'sessions']
12
11
  const GROUP_LABELS = { features: '功能', settings: '设置', browser: '浏览器', workspaces: '工作区', sessions: '会话', recent: '最近会话' }
13
12
  const SUPPORTED_GROUPS = new Set(GROUP_ORDER)
14
13
 
14
+ function useStore(store) {
15
+ return React.useSyncExternalStore(
16
+ React.useCallback((listener) => store.subscribe(listener), [store]),
17
+ React.useCallback(() => store.getSnapshot(), [store])
18
+ )
19
+ }
20
+
15
21
  function normalizeCustomCommand(value) {
16
22
  if (!value || typeof value !== 'object') return null
17
23
  const name = typeof value.name === 'string' ? value.name.trim() : ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-command-palette",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "A keyboard-first command palette for DeepSeek Harness sessions, workspaces, settings, features, and reusable custom commands.",
5
5
  "license": "MIT",
6
6
  "author": "chenyangcun",