@linxin666/dsh-client-ui-preset-center 0.3.19
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/LICENSE +202 -0
- package/README.i18n.yaml +6 -0
- package/README.md +58 -0
- package/README.zh.md +58 -0
- package/cordis.patch.yml +7 -0
- package/lib/client.js +707 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +1000 -0
- package/package.json +71 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","names":["css","Button","Modal"],"sources":["../../../packages/dsh-preset-center/src/client/PresetPanel.tsx","../../../packages/dsh-preset-center/src/client/locales.ts","../../../packages/dsh-preset-center/src/client/index.ts"],"sourcesContent":["/**\n * The Workshop's Presets panel: browse the community preset catalog and drive\n * the host library (install into `$DSH_HOME/agent-presets/<id>`, enable into\n * the discovery root, disable back, uninstall), with the composition profile\n * shown before anything executable is enabled.\n *\n * The panel owns no catalog fetch: the Workshop card already fetches\n * `manifest/presets.json` and passes the records down, so one store section\n * makes one catalog request. Preset state comes from the preset-center host\n * routes, which derive it from disk on every read.\n * @module @linxin666/dsh-client-ui-preset-center/client/PresetPanel\n */\n\nimport { useEffect, useState, type ReactNode } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport { NS, type PresetCenterKey } from './locales.ts'\nimport css from './preset-center.module.css'\n\n/** One catalog record the Workshop card fetched from `manifest/presets.json`. */\nexport interface WorkshopPresetRecord {\n /** Preset id (the directory name). */\n id: string\n /** Display name (Chinese, matching the store convention). */\n name?: string\n /** English display name. */\n nameEn?: string\n /** Catalog author. */\n author?: string\n /** Chinese description. */\n description?: string\n /** English description. */\n descriptionEn?: string\n /** Catalog version used for update notifications. */\n version?: string\n /** Catalog tags. */\n tags?: string[]\n /** Source repository the card links to. */\n repo?: string\n /** Catalog ordering rank. */\n rank?: number\n}\n\n/** Marker key props of the Presets panel cell (the owner supplies nothing extra). */\nexport interface WorkshopPanelKeyProps {\n /** Marker field: key props are intentionally empty. */\n children?: never\n}\n\n/** Owner share the Workshop card passes to the Presets panel. */\nexport interface WorkshopPanelOwnerProps {\n /** Catalog records, already fetched by the store card. */\n items?: readonly WorkshopPresetRecord[]\n /** Catalog fetch state. */\n catalogState?: 'loading' | 'ready' | 'error'\n /** Whether the store's loopback asset gateway answered. */\n gateway?: boolean\n /** Install-event counts by preset id. */\n installs?: Record<string, number>\n /** Download one preset into the library through the store gateway. */\n install?: (id: string, force: boolean) => Promise<{ dest: string }>\n /** Record a successful install with the market (returns the fresh count). */\n reportInstall?: (id: string) => Promise<number>\n}\n\n/** Props the renderer binds for the Presets panel. */\nexport type PresetPanelProps =\n PropsLocale<typeof NS>\n & WorkshopPanelOwnerProps\n & WorkshopPanelKeyProps\n\ninterface CompositionProfile {\n plugins: string[]\n relativeNames: string[]\n inlineExpressions: number\n codeFiles: string[]\n codeExecution: 'none' | 'inline' | 'local'\n rows: number\n}\n\ninterface PresetStateRow {\n id: string\n installed: boolean\n enabled: boolean\n managed: boolean\n assetVersion?: string\n installedAt?: string\n integrity: 'valid' | 'modified' | 'missing' | 'none'\n conflict: boolean\n dir: string\n profile: CompositionProfile\n}\n\ninterface StateResponse {\n ok?: boolean\n defaultId?: string | null\n occupied?: string[]\n rosterAvailable?: boolean\n presets?: PresetStateRow[]\n}\n\nconst EMPTY_PROFILE: CompositionProfile = {\n plugins: [], relativeNames: [], inlineExpressions: 0, codeFiles: [], codeExecution: 'none', rows: 0,\n}\n\nfunction messageOf(reason: unknown): string {\n return reason instanceof Error ? reason.message : String(reason)\n}\n\nasync function fetchJson(url: string): Promise<unknown> {\n const res = await fetch(url, { headers: { accept: 'application/json' } })\n if (!res.ok) throw new Error('HTTP ' + res.status)\n return res.json()\n}\n\ninterface PostResult {\n status: number\n data: { ok?: boolean; error?: string; message?: string; profile?: CompositionProfile; state?: PresetStateRow }\n}\n\nasync function postJson(url: string, body: unknown): Promise<PostResult> {\n const res = await fetch(url, {\n method: 'POST',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(body),\n })\n const data = await res.json().catch(() => ({})) as PostResult['data']\n return { status: res.status, data }\n}\n\n/** Whether the catalog advertises a version newer than the installed one. */\nfunction hasUpdate(record: WorkshopPresetRecord, row: PresetStateRow | undefined): boolean {\n if (row === undefined || !row.installed && !row.enabled) return false\n if (record.version === undefined || row.assetVersion === undefined) return false\n return record.version !== row.assetVersion\n}\n\n/** Render the Presets panel. */\nexport function PresetPanel(props: PresetPanelProps): ReactNode {\n const { t } = props\n const [state, setState] = useState<StateResponse | null>(null)\n const [loadError, setLoadError] = useState<string | null>(null)\n const [query, setQuery] = useState('')\n const [busy, setBusy] = useState<string | null>(null)\n const [notes, setNotes] = useState<Record<string, string>>({})\n const [viewer, setViewer] = useState<{ id: string; text: string; truncated: boolean } | null>(null)\n const [confirmEnable, setConfirmEnable] = useState<{ id: string; name: string; profile: CompositionProfile } | null>(null)\n const [confirmUninstall, setConfirmUninstall] = useState<{ id: string; name: string } | null>(null)\n const [reload, setReload] = useState(0)\n\n useEffect(() => {\n let alive = true\n setLoadError(null)\n void fetchJson('/api/preset-center/state').then((raw) => {\n if (!alive) return\n setState(raw as StateResponse)\n }).catch((reason: unknown) => {\n if (!alive) return\n setState(null)\n setLoadError(messageOf(reason))\n })\n return () => { alive = false }\n }, [reload])\n\n const rows = props.items ?? []\n const stateById = new Map<string, PresetStateRow>((state?.presets ?? []).map((row) => [row.id, row]))\n const occupied = new Set(state?.occupied ?? [])\n const gateway = props.gateway === true && state !== null\n const busyNow = busy !== null\n\n const note = (id: string, text: string): void => {\n setNotes((prev) => ({ ...prev, [id]: text }))\n window.setTimeout(() => {\n setNotes((prev) => {\n const next = { ...prev }\n delete next[id]\n return next\n })\n }, 4000)\n }\n\n const refresh = (): void => { setReload((value) => value + 1) }\n\n const run = async (id: string, label: string, work: () => Promise<void>): Promise<void> => {\n if (busyNow) return\n setBusy(id)\n try {\n await work()\n } catch (reason) {\n note(id, t('note.actionFailed', { reason: messageOf(reason) }))\n } finally {\n setBusy(null)\n }\n }\n\n const install = (record: WorkshopPresetRecord, force: boolean): Promise<void> => run(record.id, 'install', async () => {\n if (props.install === undefined) return\n try {\n await props.install(record.id, force)\n } catch (reason) {\n const code = (reason as { code?: string }).code\n if (code === 'conflict') {\n note(record.id, t('note.conflict', {}))\n return\n }\n note(record.id, t('note.installFailed', { reason: messageOf(reason) }))\n return\n }\n void props.reportInstall?.(record.id).catch(() => { /* non-fatal */ })\n note(record.id, force ? t('note.updated', {}) : t('state.installed', {}))\n refresh()\n })\n\n const update = (record: WorkshopPresetRecord, row: PresetStateRow): Promise<void> => run(record.id, 'update', async () => {\n if (props.install === undefined) return\n const wasEnabled = row.enabled\n if (wasEnabled) {\n const off = await postJson('/api/preset-center/disable', { id: record.id })\n if (off.data.ok !== true) {\n note(record.id, t('note.actionFailed', { reason: off.data.message ?? off.data.error ?? 'HTTP ' + off.status }))\n return\n }\n }\n try {\n await props.install(record.id, true)\n } catch (reason) {\n note(record.id, t('note.installFailed', { reason: messageOf(reason) }))\n refresh()\n return\n }\n void props.reportInstall?.(record.id).catch(() => { /* non-fatal */ })\n if (wasEnabled) {\n const on = await postJson('/api/preset-center/enable', { id: record.id, confirm: true })\n if (on.data.ok !== true) {\n note(record.id, t('note.broken', { reason: on.data.message ?? on.data.error ?? 'HTTP ' + on.status }))\n refresh()\n return\n }\n }\n note(record.id, t('note.updated', {}))\n refresh()\n })\n\n const enable = (record: WorkshopPresetRecord, row: PresetStateRow, confirm: boolean): Promise<void> => run(record.id, 'enable', async () => {\n const res = await postJson('/api/preset-center/enable', { id: record.id, confirm })\n if (res.data.ok === true) {\n setConfirmEnable(null)\n note(record.id, t('note.enabled', {}))\n refresh()\n return\n }\n if (res.data.error === 'confirmation-required') {\n setConfirmEnable({ id: record.id, name: displayName(record), profile: res.data.profile ?? row.profile })\n return\n }\n if (res.data.error === 'broken') {\n note(record.id, t('note.broken', { reason: res.data.message ?? '' }))\n refresh()\n return\n }\n if (res.data.error === 'shadowed') {\n note(record.id, t('note.shadowed', {}))\n return\n }\n if (res.data.error === 'roster-unavailable') {\n note(record.id, t('note.rosterUnavailable', {}))\n return\n }\n note(record.id, t('note.actionFailed', { reason: res.data.message ?? res.data.error ?? 'HTTP ' + res.status }))\n })\n\n const disable = (record: WorkshopPresetRecord): Promise<void> => run(record.id, 'disable', async () => {\n const res = await postJson('/api/preset-center/disable', { id: record.id })\n if (res.data.ok === true) {\n note(record.id, t('note.disabled', {}))\n refresh()\n return\n }\n if (res.data.error === 'default-preset') {\n note(record.id, t('note.defaultPreset', {}))\n return\n }\n note(record.id, t('note.actionFailed', { reason: res.data.message ?? res.data.error ?? 'HTTP ' + res.status }))\n })\n\n const uninstall = (record: WorkshopPresetRecord): Promise<void> => run(record.id, 'uninstall', async () => {\n const res = await postJson('/api/preset-center/uninstall', { id: record.id })\n setConfirmUninstall(null)\n if (res.data.ok === true) {\n note(record.id, t('note.uninstalled', {}))\n refresh()\n return\n }\n if (res.data.error === 'default-preset') {\n note(record.id, t('note.defaultPreset', {}))\n return\n }\n note(record.id, t('note.actionFailed', { reason: res.data.message ?? res.data.error ?? 'HTTP ' + res.status }))\n })\n\n const view = (record: WorkshopPresetRecord): Promise<void> => run(record.id, 'view', async () => {\n const raw = await fetchJson('/api/preset-center/composition?id=' + encodeURIComponent(record.id)) as { text?: string; truncated?: boolean }\n setViewer({ id: record.id, text: raw.text ?? '', truncated: raw.truncated === true })\n })\n\n function displayName(record: WorkshopPresetRecord): string {\n return record.name ?? record.nameEn ?? record.id\n }\n\n const matches = (record: WorkshopPresetRecord): boolean => {\n if (query === '') return true\n const q = query.toLowerCase()\n const hay = [record.name, record.nameEn, record.author, record.description, record.descriptionEn, ...(record.tags ?? [])]\n .filter(Boolean).join(' ').toLowerCase()\n return hay.includes(q)\n }\n\n const visible = rows\n .filter(matches)\n .slice()\n .sort((a, b) => (a.rank ?? 999) - (b.rank ?? 999) || displayName(a).localeCompare(displayName(b)))\n\n const codeBadgeKey = (profile: CompositionProfile): PresetCenterKey =>\n profile.codeExecution === 'local' ? 'code.local' : profile.codeExecution === 'inline' ? 'code.inline' : 'code.none'\n\n const statusOf = (record: WorkshopPresetRecord, row: PresetStateRow | undefined): { key: PresetCenterKey; tone: string } => {\n if (occupied.has(record.id)) return { key: 'state.shadowed', tone: css.badgeWarn }\n if (row === undefined) return { key: 'state.notInstalled', tone: css.badgeMuted }\n if (!row.managed) return { key: 'state.local', tone: css.badgeWarn }\n if (row.conflict) return { key: 'state.conflict', tone: css.badgeWarn }\n if (row.integrity === 'modified') return { key: 'state.modified', tone: css.badgeWarn }\n if (row.enabled) return { key: 'state.enabled', tone: css.badgeOn }\n return { key: 'state.installed', tone: css.badgeOff }\n }\n\n return (\n <div className={css.panel} data-dsh-plugin=\"preset-center\" data-dsh-part=\"preset-panel\">\n {props.gateway !== true ? <p className={css.note}>{t('note.remoteInstall', {})}</p> : null}\n {state === null && loadError !== null ? (\n <p className={css.note} role=\"status\">\n {gateway ? t('note.loadFailed', { reason: loadError }) : t('note.gatewayUnavailable', {})}\n <Button className={css.inlineButton} onClick={refresh}>{t('action.refresh')}</Button>\n </p>\n ) : null}\n <input\n className={css.search}\n type=\"search\"\n aria-label={t('search.placeholder')}\n placeholder={t('search.placeholder')}\n value={query}\n onChange={(event) => { setQuery(event.target.value) }}\n />\n {props.catalogState === 'loading' ? (\n <p className={css.empty} role=\"status\">{t('installing', {})}</p>\n ) : visible.length === 0 ? (\n <p className={css.empty} role=\"status\">{rows.length === 0 ? t('note.emptyCatalog', {}) : t('note.noMatch', {})}</p>\n ) : (\n <ul className={css.list}>\n {visible.map((record) => {\n const row = stateById.get(record.id)\n const status = statusOf(record, row)\n const profile = row?.profile ?? EMPTY_PROFILE\n const updateAvailable = hasUpdate(record, row)\n const busyHere = busy === record.id\n // A directory this plugin does not manage (hand-authored, or\n // installed by another tool) blocks the download: installing over\n // it would be a silent overwrite of someone else's files.\n const blockedByLocal = row !== undefined && !row.managed && (row.installed || row.enabled)\n const installable = gateway && props.install !== undefined && !occupied.has(record.id) && !blockedByLocal\n const installs = props.installs?.[record.id] ?? 0\n return (\n <li key={record.id} className={css.card}>\n <div className={css.cardHead}>\n <span className={css.cardName} title={displayName(record)}>\n {record.repo ? (\n <a href={record.repo} target=\"_blank\" rel=\"noreferrer\">{displayName(record)}</a>\n ) : displayName(record)}\n {record.version ? <span className={css.version}>v{record.version}</span> : null}\n </span>\n <span className={css.cardMeta}>\n {record.author ?? ''}\n <span className={status.tone}>{t(status.key, {})}</span>\n {updateAvailable ? <span className={css.badgeWarn}>{t('state.newVersion', { version: record.version ?? '' })}</span> : null}\n {row?.enabled && row.integrity === 'valid' ? null : null}\n {installs > 0 ? <span className={css.badgeMuted}>{t('count.installs', { count: String(installs) })}</span> : null}\n </span>\n </div>\n {record.description || record.descriptionEn ? (\n <p className={css.cardDesc}>{(record.description ?? record.descriptionEn ?? '').slice(0, 200)}</p>\n ) : null}\n {row !== undefined ? (\n <p className={css.profile}>\n <span className={css.badgeCode}>{t(codeBadgeKey(profile), {})}</span>\n <span className={css.profileText}>\n {t('code.detail', {\n files: String(profile.codeFiles.length),\n expressions: String(profile.inlineExpressions),\n plugins: String(profile.plugins.length),\n })}\n </span>\n </p>\n ) : null}\n <div className={css.actions}>\n {row === undefined || !row.managed ? (\n <Button\n className={css.primary}\n disabled={!installable || busyNow}\n onClick={() => { void install(record, false) }}\n >\n {busyHere ? t('installing', {}) : t('action.install', {})}\n </Button>\n ) : null}\n {row !== undefined && row.managed && !row.enabled ? (\n <Button\n className={css.primary}\n disabled={!gateway || busyNow || occupied.has(record.id)}\n onClick={() => { void enable(record, row, false) }}\n >\n {busyHere ? t('installing', {}) : t('action.enable', {})}\n </Button>\n ) : null}\n {row !== undefined && row.managed && row.enabled && !row.conflict ? (\n <Button\n className={css.secondary}\n disabled={!gateway || busyNow}\n onClick={() => { void disable(record) }}\n >\n {t('action.disable', {})}\n </Button>\n ) : null}\n {row !== undefined && row.managed && (updateAvailable || row.integrity === 'modified') ? (\n <Button\n className={css.secondary}\n disabled={!installable || busyNow}\n onClick={() => { void update(record, row) }}\n >\n {t('action.update', {})}\n </Button>\n ) : null}\n {row !== undefined && row.integrity !== 'none' ? (\n <Button className={css.secondary} disabled={busyNow} onClick={() => { void view(record) }}>\n {t('action.view', {})}\n </Button>\n ) : null}\n {row !== undefined && row.managed ? (\n <Button className={css.danger} disabled={busyNow} onClick={() => { setConfirmUninstall({ id: record.id, name: displayName(record) }) }}>\n {t('action.uninstall', {})}\n </Button>\n ) : null}\n </div>\n {notes[record.id] ? <p className={css.note} role=\"status\">{notes[record.id]}</p> : null}\n </li>\n )\n })}\n </ul>\n )}\n <Modal\n title={viewer ? t('viewer.title', { name: viewer.id }) : ''}\n open={viewer !== null}\n onClose={() => { setViewer(null) }}\n closeLabel={t('action.cancel', {})}\n >\n <pre className={css.viewer}>{viewer?.text === '' ? t('viewer.empty', {}) : viewer?.text}</pre>\n {viewer?.truncated ? <p className={css.note}>{t('viewer.empty', {})}</p> : null}\n </Modal>\n <Modal\n title={t('confirm.title', {})}\n open={confirmEnable !== null}\n onClose={() => { setConfirmEnable(null) }}\n closeLabel={t('action.cancel', {})}\n >\n <p>\n {t('confirm.text', {\n name: confirmEnable?.name ?? '',\n detail: t('code.detail', {\n files: String(confirmEnable?.profile.codeFiles.length ?? 0),\n expressions: String(confirmEnable?.profile.inlineExpressions ?? 0),\n plugins: String(confirmEnable?.profile.plugins.length ?? 0),\n }),\n })}\n </p>\n <div className={css.modalActions}>\n <Button className={css.primary} onClick={() => {\n const target = confirmEnable\n setConfirmEnable(null)\n const record = rows.find((entry) => entry.id === target?.id)\n const row = target === null ? undefined : stateById.get(target.id)\n if (record !== undefined && row !== undefined) void enable(record, row, true)\n }}>{t('action.enable', {})}</Button>\n <Button className={css.secondary} onClick={() => { setConfirmEnable(null) }}>{t('action.cancel', {})}</Button>\n </div>\n </Modal>\n <Modal\n title={t('uninstall.title', {})}\n open={confirmUninstall !== null}\n onClose={() => { setConfirmUninstall(null) }}\n closeLabel={t('action.cancel', {})}\n >\n <p>{t('uninstall.text', { name: confirmUninstall?.name ?? '' })}</p>\n <div className={css.modalActions}>\n <Button className={css.danger} onClick={() => {\n const target = confirmUninstall\n const record = rows.find((entry) => entry.id === target?.id)\n if (record !== undefined) void uninstall(record)\n else setConfirmUninstall(null)\n }}>{t('action.uninstall', {})}</Button>\n <Button className={css.secondary} onClick={() => { setConfirmUninstall(null) }}>{t('action.cancel', {})}</Button>\n </div>\n </Modal>\n </div>\n )\n}\n","/**\n * Preset-center copy (zh is the key source; en mirrors it key for key).\n * @module @linxin666/dsh-client-ui-preset-center/client/locales\n */\n\n/** Locale namespace owned by this plugin (single home; the entry and the panel import it). */\nexport const NS = 'dsh-web-ui-preset-center'\n\nexport const zh = {\n 'state.notInstalled': '未安装',\n 'state.installed': '已安装 · 未启用',\n 'state.enabled': '已启用',\n 'state.modified': '本地已修改',\n 'state.conflict': '目录状态异常',\n 'state.local': '本地自建同名预设',\n 'state.shadowed': 'id 已被内置或其它来源占用',\n 'state.newVersion': '有新版本 {version}',\n 'state.broken': '无法加载',\n 'action.install': '安装',\n 'action.update': '更新',\n 'action.enable': '启用',\n 'action.disable': '禁用',\n 'action.uninstall': '卸载',\n 'action.view': '查看组合',\n 'action.cancel': '取消',\n 'action.refresh': '刷新',\n 'code.local': '含本地代码',\n 'code.inline': '含内联表达式',\n 'code.none': '仅组合已安装插件',\n 'code.detail': '{files} 个代码文件 · {expressions} 个 !!js 表达式 · {plugins} 个插件',\n 'confirm.title': '启用可执行预设',\n 'confirm.text': '「{name}」启用后会在 DSH 主进程内加载其组合内容,权限等同 shell 访问。{detail} 确认继续?',\n 'uninstall.title': '卸载预设',\n 'uninstall.text': '将删除「{name}」的本地文件(库与启用目录中的副本)。已使用该预设的会话不受影响。',\n 'viewer.title': '{name} · agent.cordis.yml',\n 'viewer.empty': '(组合文件为空或不可读)',\n 'note.installFailed': '安装失败:{reason}',\n 'note.conflict': '本地已存在同名目录,未覆盖任何文件',\n 'note.actionFailed': '操作失败:{reason}',\n 'note.enabled': '已启用,刷新页面后出现在「设置 → Agent 预设」',\n 'note.disabled': '已禁用,该预设已从「设置 → Agent 预设」移除',\n 'note.uninstalled': '已卸载',\n 'note.updated': '已更新到最新版本',\n 'note.broken': '无法启用:{reason}',\n 'note.shadowed': '该 id 已被内置或其它来源的预设占用,启用不会生效',\n 'note.defaultPreset': '这是当前默认预设,请先在「设置 → Agent 预设」切换默认值',\n 'note.rosterUnavailable': '宿主未提供 agent-presets 服务,无法校验预设 id',\n 'note.gatewayUnavailable': '本机网关不可用:远程浏览器或 host 路由未挂载,无法安装或启用',\n 'note.loadFailed': '读取预设状态失败:{reason}',\n 'note.emptyCatalog': '社区预设目录为空',\n 'note.noMatch': '没有匹配的预设',\n 'note.remoteInstall': '请在运行 DSH 的本机浏览器中操作',\n 'search.placeholder': '搜索预设',\n 'count.installs': '安装 {count}',\n 'installing': '处理中…',\n} as const\n\nexport const en: Record<keyof typeof zh, string> = {\n 'state.notInstalled': 'Not installed',\n 'state.installed': 'Installed - disabled',\n 'state.enabled': 'Enabled',\n 'state.modified': 'Modified locally',\n 'state.conflict': 'Directory state conflict',\n 'state.local': 'Local preset with this id',\n 'state.shadowed': 'Id taken by a built-in or another root',\n 'state.newVersion': 'Update {version} available',\n 'state.broken': 'Cannot load',\n 'action.install': 'Install',\n 'action.update': 'Update',\n 'action.enable': 'Enable',\n 'action.disable': 'Disable',\n 'action.uninstall': 'Uninstall',\n 'action.view': 'View composition',\n 'action.cancel': 'Cancel',\n 'action.refresh': 'Refresh',\n 'code.local': 'Ships local code',\n 'code.inline': 'Has inline expressions',\n 'code.none': 'Composes installed plugins only',\n 'code.detail': '{files} code files - {expressions} !!js expressions - {plugins} plugins',\n 'confirm.title': 'Enable an executable preset',\n 'confirm.text': 'Enabling \"{name}\" loads its composition inside the DSH host process, which carries the same trust as shell access. {detail} Continue?',\n 'uninstall.title': 'Uninstall preset',\n 'uninstall.text': 'Deletes the local files of \"{name}\" (both the library and enabled copies). Sessions already using it keep running.',\n 'viewer.title': '{name} - agent.cordis.yml',\n 'viewer.empty': '(composition file is empty or unreadable)',\n 'note.installFailed': 'Install failed: {reason}',\n 'note.conflict': 'A directory with this id already exists locally; nothing was overwritten',\n 'note.actionFailed': 'Action failed: {reason}',\n 'note.enabled': 'Enabled; refresh the page to see it under Settings - Agent presets',\n 'note.disabled': 'Disabled; the preset is gone from Settings - Agent presets',\n 'note.uninstalled': 'Uninstalled',\n 'note.updated': 'Updated to the newest version',\n 'note.broken': 'Cannot enable: {reason}',\n 'note.shadowed': 'A built-in or another root already supplies this id; enabling would not take effect',\n 'note.defaultPreset': 'This is the current default preset; change the default under Settings - Agent presets first',\n 'note.rosterUnavailable': 'The host exposes no agent-presets service, so preset ids cannot be checked',\n 'note.gatewayUnavailable': 'Local gateway unavailable: remote browser or host routes not mounted; install and enable are disabled',\n 'note.loadFailed': 'Reading preset state failed: {reason}',\n 'note.emptyCatalog': 'The community preset catalog is empty',\n 'note.noMatch': 'No matching preset',\n 'note.remoteInstall': 'Run this in a browser on the machine hosting DSH',\n 'search.placeholder': 'Search presets',\n 'count.installs': '{count} installs',\n 'installing': 'Working...',\n}\n\nexport type PresetCenterKey = keyof typeof zh\n","/**\n * Browser half of the preset center: registers the dictionaries and\n * contributes the Presets panel into the child slot the Workshop card\n * declares. Nothing here fetches the catalog — the store card owns that — and\n * every mutation goes through the host's loopback gateway.\n * @module @linxin666/dsh-client-ui-preset-center/client\n */\n\nimport type { Context as ClientContext } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-slots'\nimport { PresetPanel, type WorkshopPanelKeyProps, type WorkshopPanelOwnerProps } from './PresetPanel.tsx'\nimport { NS, en, zh, type PresetCenterKey } from './locales.ts'\n\nexport type { PresetPanelProps, WorkshopPanelKeyProps, WorkshopPanelOwnerProps, WorkshopPresetRecord } from './PresetPanel.tsx'\nexport { NS } from './locales.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** Preset panel copy. */\n 'dsh-web-ui-preset-center': PresetCenterKey\n }\n\n interface SlotMap {\n /**\n * The child slot the Workshop card declares for asset-kind panels; this\n * plugin contributes the `preset` cell. Shape mirrors the store card's\n * declaration (both sides declare it identically, the same way the family\n * plugin cards share `web-ui.plugin.item`).\n */\n 'dsh-workshop.panel': {\n kind: 'keyed'\n scope: 'root'\n owner: WorkshopPanelOwnerProps\n keyProps: { preset: WorkshopPanelKeyProps }\n }\n }\n}\n\nexport const inject = ['slots', 'locale']\n\n/** Register the dictionaries and the Presets panel cell. */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => {\n try {\n return ctx.locale.register(NS, { zh, en })\n } catch {\n return () => {}\n }\n }, 'dsh-preset-center: dictionaries')\n\n ctx.slots.inject('dsh-workshop.panel', () => {\n try {\n const unregister = ctx.slots.register({\n name: 'dsh-workshop.panel',\n key: 'preset',\n locale: NS,\n }, PresetPanel)\n return () => { unregister() }\n } catch {\n return () => {}\n }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGA,MAAM,gBAAoC;GACxC,SAAS,CAAC;GAAG,eAAe,CAAC;GAAG,mBAAmB;GAAG,WAAW,CAAC;GAAG,eAAe;GAAQ,MAAM;EACpG;EAEA,SAAS,UAAU,QAAyB;GAC1C,OAAO,kBAAkB,QAAQ,OAAO,UAAU,OAAO,MAAM;EACjE;EAEA,eAAe,UAAU,KAA+B;GACtD,MAAM,MAAM,MAAM,MAAM,KAAK,EAAE,SAAS,EAAE,QAAQ,mBAAmB,EAAE,CAAC;GACxE,IAAI,CAAC,IAAI,IAAI,MAAM,IAAI,MAAM,UAAU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