dsh-command-palette 0.1.2 → 0.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.
Files changed (2) hide show
  1. package/client.js +6 -5
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -6,6 +6,7 @@ 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')
9
10
 
10
11
  const GROUP_ORDER = ['features', 'settings', 'browser', 'workspaces', 'sessions']
11
12
  const GROUP_LABELS = { features: '功能', settings: '设置', browser: '浏览器', workspaces: '工作区', sessions: '会话', recent: '最近会话' }
@@ -248,9 +249,9 @@ window.__ModuleLoader__.load({
248
249
  }
249
250
 
250
251
  function Palette({ useSessions, useWorkspaces, useCommandSettings, saveCustomCommands, openSession, startSession, runCustomCommand, paletteService }) {
251
- const sessions = useSessions((value) => value)
252
- const workspaces = useWorkspaces((value) => value)
253
- const commandSettings = useCommandSettings((value) => value)
252
+ const sessions = useStore(useSessions)
253
+ const workspaces = useStore(useWorkspaces)
254
+ const commandSettings = useStore(useCommandSettings)
254
255
  const customCommands = normalizeCustomCommands(commandSettings.value?.commands)
255
256
  const [open, setOpen] = React.useState(paletteService.isOpen())
256
257
  const [query, setQuery] = React.useState('')
@@ -368,9 +369,9 @@ window.__ModuleLoader__.load({
368
369
  }
369
370
 
370
371
  function ShortcutSettings({ useWorkspaces, useCommandSettings, saveCustomCommands }) {
371
- const commandSettings = useCommandSettings((value) => value)
372
+ const commandSettings = useStore(useCommandSettings)
372
373
  const commands = normalizeCustomCommands(commandSettings.value?.commands)
373
- const workspaceState = typeof useWorkspaces === 'function' ? useWorkspaces((value) => value) : { items: [] }
374
+ const workspaceState = useStore(useWorkspaces)
374
375
  const workspaces = workspaceState?.items || []
375
376
  const emptyDraft = { name: '', prompt: '', sticky: true, workspaceId: '' }
376
377
  const [draft, setDraft] = React.useState(emptyDraft)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-command-palette",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
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",