@dsh-mixxed/dsh-client-ui-settings-skills 0.1.2

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 ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # ui-settings-skills
2
+
3
+ A dsh plugin that adds a **Skill management** page to Web Settings, organized by workspace.
4
+
5
+ Built as a fully out-of-tree plugin — the deepseek-harness source stays untouched. It registers a `settings.section` slot (the page appears in Settings → **技能 / Skills**) and serves its skill catalog over its own HTTP route (`ctx.webServer`).
6
+
7
+ ## Install
8
+
9
+ 1. Install the plugin from npm (published as `@dsh-mixxed/dsh-client-ui-settings-skills`):
10
+
11
+ ```sh
12
+ dsh plugin --profile web add @dsh-mixxed/dsh-client-ui-settings-skills
13
+ ```
14
+
15
+ The package declares `dsh.bundle` (its bundled `cordis.patch.yml`), so `dsh plugin add` automatically appends it to the profile's `dsh.profile.bundles` layer stack and the plugin mounts on the next boot — **no manual `cordis.patch.yml` editing**.
16
+
17
+ Upgrading an install that predates the bundle declaration: remove the legacy `ui-settings-skills` row from `$DSH_HOME/profiles/<name>/cordis.patch.yml` — the bundle layer now supplies it, and leaving both would mount the id twice.
18
+
19
+ 2. Restart the profile (new plugins are discovered at boot), then open Settings → **技能 / Skills**.
20
+
21
+ ### Building from source (development / offline)
22
+
23
+ ```sh
24
+ pnpm install
25
+ pnpm run typecheck
26
+ pnpm test
27
+ pnpm run build
28
+ npm pack # produces dsh-mixxed-dsh-client-ui-settings-skills-<version>.tgz
29
+ dsh plugin --profile web add ./dsh-mixxed-dsh-client-ui-settings-skills-<version>.tgz
30
+ ```
31
+
32
+ ## Features
33
+
34
+ - One tab per workspace, with global and user-level skills folded into every workspace view
35
+ - **Manages only user-level skills (`~/.agents/skills`) and project skills** — preset-loaded (`custom`) and built-in skills are never shown or toggled
36
+ - Search box that filters skills by name or description
37
+ - Localized scope badges on every row (用户 / User, 工作区 / Workspace)
38
+ - Skill descriptions clamp to two lines, with the full text shown on hover
39
+ - **Enable/disable toggles** on every managed row — see [Skill toggles](#skill-toggles)
40
+
41
+ ## Skill toggles
42
+
43
+ Every managed skill row carries a switch. Turning a skill **off**:
44
+
45
+ - removes it from the model catalog (`tool-skill`) and the `/name` injection boundary,
46
+ - removes it from the `/` command menu in the conversation composer,
47
+ - takes effect immediately — the next `/` open reflects the change.
48
+
49
+ Scope semantics:
50
+
51
+ - **User-level skills** (`~/.agents/skills`) toggle globally across every workspace.
52
+ - **Project skills** toggle per workspace: the same skill can stay enabled in one workspace and disabled in another.
53
+
54
+ State persists in the settings document (`ui-settings-skills.policy` namespace), so it survives profile restarts, and turning a skill back **on** restores it everywhere.
55
+
56
+ > Preset-loaded (`custom`) and built-in skills are never managed and never shown on the page.
57
+
58
+ ## Verify
59
+
60
+ ```sh
61
+ dsh --profile <name> --dump-config | Select-String ui-settings-skills
62
+ ```
63
+
64
+ The composed config shows the `ui-settings-skills` row, and `$DSH_HOME/profiles/<name>/package.json` lists `@dsh-mixxed/dsh-client-ui-settings-skills` under `dsh.profile.bundles` (auto-appended by `dsh plugin add`).
65
+
66
+ After the restart, the Skills page shows one tab per workspace, a search box, and localized skill rows.
67
+
68
+ ## Config (optional)
69
+
70
+ The plugin runs in the `host` role by default (routes + settings namespace + shadowing provider). A `policy` role registers only the shadowing provider — no namespace, no routes. Override it from your profile's own `cordis.patch.yml` — the user layer is applied after the bundle layer, so an id-targeted patch overrides the bundled mount row:
71
+
72
+ ```yaml
73
+ - id: ui-settings-skills
74
+ name: "@dsh-mixxed/dsh-client-ui-settings-skills"
75
+ config:
76
+ role: policy # default 'host'
77
+ ```
78
+
79
+ ## License
80
+
81
+ [MIT](LICENSE)
@@ -0,0 +1,11 @@
1
+ # The ui-settings-skills bundle patch: mounts the Skill management settings
2
+ # page plugin row. Declared through `dsh.bundle.patch` in package.json, so
3
+ # `dsh plugin --profile <name> add @dsh-mixxed/dsh-client-ui-settings-skills`
4
+ # automatically appends this package to the profile's `dsh.profile.bundles`
5
+ # layer stack and the row mounts on the next boot — no manual
6
+ # cordis.patch.yml edit needed. `id` is the cordis plugin id
7
+ # (ui-settings-skills); `name` is the package specifier the loader resolves
8
+ # (the npm package name, quoted because '@' is a reserved YAML indicator).
9
+ - insert:
10
+ - id: ui-settings-skills
11
+ name: "@dsh-mixxed/dsh-client-ui-settings-skills"
package/lib/client.js ADDED
Binary file
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/client/index.ts", "../src/client/SkillManagementSection.tsx", "../src/client/locales.ts", "dsh-css:\u0000dsh-css:./SkillManagementSection.module.css.mjs"],
4
+ "sourcesContent": ["/**\n * ui-settings-skills browser half: the Skill management page in Web Settings.\n * Registers one `settings.section` (\"skill-management\"), loads the catalog\n * from the host half's HTTP route, and writes policy toggles back to it.\n */\n\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\n// Type-only: pulls the settings shell's SlotMap merge (the 'settings.section' entry).\nimport type {} from '@deepseek-ai/dsh-client-ui-settings/client'\n// Type-only: pulls the client Context merge and the LocaleNamespaceMap face.\nimport type {} from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\nimport { SkillManagementSection } from './SkillManagementSection.tsx'\nimport type { SkillManagementSectionInjected } from './SkillManagementSection.tsx'\nimport { en, NS, zh, type SkillManagementKey } from './locales.ts'\nimport type { CatalogResponse, ErrorResponse, PutPolicyRequest } from '../wire.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap {\n /** Skill-management settings page copy. */\n 'settings.skillManagement': SkillManagementKey\n }\n}\n\nexport { NS }\n\n/** Services required by the settings-section registration. */\nexport const inject = ['slots', 'locale']\n\n/** Load the catalog from the host half's route, rejecting on transport or HTTP errors. */\nasync function loadCatalog(): Promise<CatalogResponse> {\n const response = await fetch('/plugin/settings-skills/catalog', { headers: { accept: 'application/json' } })\n const body = await response.json() as CatalogResponse | ErrorResponse\n if (!response.ok || !('dimensions' in body)) {\n const message = 'error' in body\n ? `${body.error.code}: ${body.error.message}`\n : `catalog request failed with status ${response.status}`\n throw new Error(message)\n }\n return body\n}\n\n/** Write one policy toggle to the host half's route, rejecting on transport or HTTP errors. */\nasync function setSkillDisabled(request: PutPolicyRequest): Promise<void> {\n const response = await fetch('/plugin/settings-skills/policy', {\n method: 'PUT',\n headers: { 'content-type': 'application/json', accept: 'application/json' },\n body: JSON.stringify(request),\n })\n if (!response.ok) {\n const body = await response.json().catch(() => null) as ErrorResponse | null\n const message = body?.error !== undefined\n ? `${body.error.code}: ${body.error.message}`\n : `policy update failed with status ${response.status}`\n throw new Error(message)\n }\n}\n\n/** Contribute the Skill management page to the settings shell. */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'ui-settings-skills: dictionaries')\n\n const injected = (): SkillManagementSectionInjected => ({ load: loadCatalog, setSkillDisabled })\n\n ctx.slots.inject('settings.section', () => ctx.slots.register({\n name: 'settings.section',\n id: 'skill-management',\n order: 19,\n label: () => ctx.locale.bind(NS)('nav'),\n locale: NS,\n inject: injected,\n }, SkillManagementSection))\n}\n", "/**\n * Skill management settings page: one tab per workspace (global and user-level\n * skills are already folded in by the host), a name search over the active\n * workspace's rows, and per-skill localized scope badges. Descriptions clamp\n * to two lines and answer a hover with the full text when actually cut off.\n */\n\nimport { useEffect, useId, useLayoutEffect, useRef, useState } from 'react'\nimport type { ReactNode } from 'react'\nimport type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport {\n IconChevronLeftOutline14, IconChevronRightOutline14, IconSearchOutline16, Tooltip,\n} from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { CatalogResponse, DimensionView, PutPolicyRequest, SkillRow } from '../wire.ts'\nimport { sourceLabelKey, type SkillManagementKey } from './locales.ts'\nimport css from './SkillManagementSection.module.css'\n\n/** Registration-side business face for the management page. */\nexport interface SkillManagementSectionInjected {\n /** Read the full catalog; called when the section first renders. */\n load: () => Promise<CatalogResponse>\n /** Write one policy toggle (disable or re-enable a skill). */\n setSkillDisabled: (request: PutPolicyRequest) => Promise<void>\n}\n\n/** Full component props. */\nexport type SkillManagementSectionProps =\n PropsRuntime<'settings.section'>\n & PropsLocale<'settings.skillManagement'>\n & InjectFace<SkillManagementSectionInjected>\n\ntype PageState =\n | { readonly phase: 'loading' }\n | { readonly phase: 'ready'; readonly catalog: CatalogResponse }\n | { readonly phase: 'error'; readonly message: string }\n\n/**\n * The description, clamped by CSS to two lines and offered in full on hover.\n * The tooltip is attached only while the text is actually cut off, so a short\n * description does not answer a hover with a bubble repeating the row.\n * @param description - the skill description.\n * @returns the description element, tooltip-anchored while it overflows.\n */\nfunction ClampedDescription({ description }: { description: string }): ReactNode {\n const ref = useRef<HTMLSpanElement | null>(null)\n const [truncated, setTruncated] = useState(false)\n useLayoutEffect(() => {\n const el = ref.current\n if (el === null) return\n const measure = () => { setTruncated(el.scrollHeight > el.clientHeight) }\n measure()\n if (typeof ResizeObserver === 'undefined') return\n const observer = new ResizeObserver(measure)\n observer.observe(el)\n return () => { observer.disconnect() }\n }, [description])\n return (\n <Tooltip label={description} side=\"bottom\" delayMs={400} disabled={!truncated} maxWidth={360}>\n {/* The empty title stops the native tooltip from climbing to this span. */}\n <span ref={ref} className={css.rowDesc} title=\"\">{description}</span>\n </Tooltip>\n )\n}\n\n/**\n * The localized scope label for one skill source; unknown sources show\n * verbatim.\n * @param source - the wire source value.\n * @param t - the bound locale translator.\n * @returns the display label.\n */\nfunction sourceLabel(source: string, t: (key: SkillManagementKey) => string): string {\n const key = sourceLabelKey(source)\n return key === undefined ? source : t(key)\n}\n\n/** The policy scope a row toggles: its disabled scope when disabled, else its source. */\nfunction policyKindOf(row: SkillRow): 'user' | 'workspace' {\n if (row.disabledScope !== undefined) return row.disabledScope\n return row.source === 'user-agents' || row.source === 'user-dsh' ? 'user' : 'workspace'\n}\n\n/**\n * Render one skill row: name, right-aligned scope badge, and the enable\n * switch (house track/thumb style).\n * @param row - the skill row.\n * @param t - the bound locale translator.\n * @param workspaceId - the owning workspace (for workspace-kind toggles).\n * @param setSkillDisabled - the policy write face.\n * @param onToggled - called after a successful write with the target state so\n * the page updates the row locally instead of reloading the catalog.\n * @returns the row.\n */\nfunction SkillRowView({\n row, t, workspaceId, setSkillDisabled, onToggled,\n}: {\n row: SkillRow\n t: (key: SkillManagementKey) => string\n workspaceId: string\n setSkillDisabled: (request: PutPolicyRequest) => Promise<void>\n onToggled: (name: string, kind: 'user' | 'workspace', enabled: boolean) => void\n}): ReactNode {\n const [saving, setSaving] = useState(false)\n const enabled = row.disabled !== true\n const toggle = async (): Promise<void> => {\n if (saving) return\n setSaving(true)\n try {\n const kind = policyKindOf(row)\n // The write carries the TARGET state: clicking an enabled switch\n // disables the skill, clicking a disabled one re-enables it.\n const target = !enabled\n await setSkillDisabled({\n kind,\n ...(kind === 'workspace' ? { workspaceId } : {}),\n name: row.name,\n description: row.description,\n source: row.source,\n enabled: target,\n })\n onToggled(row.name, kind, target)\n } finally {\n setSaving(false)\n }\n }\n return (\n <li className={css.row}>\n <div className={css.rowHead}>\n <span className={css.rowName}>{row.name}</span>\n <span className={css.badge}>{sourceLabel(row.source, t)}</span>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={enabled}\n aria-label={`${row.name}: ${enabled ? t('enabled') : t('disabled')}`}\n className={css.switch}\n disabled={saving}\n onClick={() => { void toggle() }}\n >\n <span className={css.track} data-on={enabled ? 'true' : undefined} aria-hidden=\"true\">\n <span className={css.thumb} />\n </span>\n </button>\n </div>\n <ClampedDescription description={row.description} />\n </li>\n )\n}\n\n/** Filter one workspace's rows by the current search query (name or description). */\nfunction filterRows(dimension: DimensionView, query: string): readonly SkillRow[] {\n const needle = query.trim().toLowerCase()\n if (needle === '') return dimension.skills\n return dimension.skills.filter(row =>\n row.name.toLowerCase().includes(needle) || row.description.toLowerCase().includes(needle),\n )\n}\n\n/**\n * Render the Skill management section content column: workspace tabs, a name\n * search, and the active workspace's skill rows.\n * @param props - composed slot props.\n * @returns the section with loading/error/ready states.\n */\nexport function SkillManagementSection(props: SkillManagementSectionProps): ReactNode {\n const { t, load, setSkillDisabled } = props\n const [state, setState] = useState<PageState>({ phase: 'loading' })\n const [attempt, setAttempt] = useState(0)\n const [activeId, setActiveId] = useState<string>()\n const [visitedIds, setVisitedIds] = useState<ReadonlySet<string>>(() => new Set())\n const [query, setQuery] = useState('')\n const tabsId = useId()\n const tabRefs = useRef<Array<HTMLButtonElement | null>>([])\n const tabScrollRef = useRef<HTMLDivElement | null>(null)\n const tabsRef = useRef<HTMLDivElement | null>(null)\n const [scrollState, setScrollState] = useState({ left: 0, max: 0 })\n\n useEffect(() => {\n let cancelled = false\n setState({ phase: 'loading' })\n void load().then(\n (catalog) => { if (!cancelled) setState({ phase: 'ready', catalog }) },\n (error: unknown) => {\n if (!cancelled) setState({ phase: 'error', message: error instanceof Error ? error.message : String(error) })\n },\n )\n return () => { cancelled = true }\n }, [load, attempt])\n\n // Measure the tab strip's overflow after layout and whenever the tab set\n // or the strip's size changes, so the arrows enable exactly when content\n // is cut off and disable again once everything is visible.\n useLayoutEffect(() => {\n const el = tabScrollRef.current\n if (el === null) return\n const max = Math.max(0, el.scrollWidth - el.clientWidth)\n setScrollState(prev => {\n const left = Math.min(prev.left, max)\n return left === prev.left && max === prev.max ? prev : { left, max }\n })\n if (typeof ResizeObserver === 'undefined') return\n const observer = new ResizeObserver(() => {\n const current = tabScrollRef.current\n if (current === null) return\n const fresh = Math.max(0, current.scrollWidth - current.clientWidth)\n setScrollState(prev => {\n const left = Math.min(prev.left, fresh)\n return left === prev.left && fresh === prev.max ? prev : { left, max: fresh }\n })\n })\n observer.observe(el)\n if (tabsRef.current !== null) observer.observe(tabsRef.current)\n return () => { observer.disconnect() }\n }, [state])\n\n const scrollBy = (delta: number): void => {\n tabScrollRef.current?.scrollBy({ left: delta, behavior: 'smooth' })\n }\n\n /**\n * Apply one successful toggle locally: a user-level toggle flips the skill\n * in every workspace, a workspace toggle only in the active one. The page\n * keeps its loaded catalog; the next reload reconciles with the server.\n * @param name - the toggled skill name.\n * @param kind - the policy scope the write used.\n * @param enabled - the target state just written.\n */\n const applyToggle = (name: string, kind: 'user' | 'workspace', enabled: boolean): void => {\n setState(prev => {\n if (prev.phase !== 'ready') return prev\n return {\n ...prev,\n catalog: {\n ...prev.catalog,\n dimensions: prev.catalog.dimensions.map(dimension => ({\n ...dimension,\n skills: dimension.skills.map(row => {\n if (row.name !== name) return row\n if (kind === 'workspace' && dimension.id !== active) return row\n if (enabled) {\n const { disabled: _disabled, disabledScope: _scope, ...rest } = row\n return rest\n }\n return { ...row, disabled: true, disabledScope: kind }\n }),\n })),\n },\n }\n })\n }\n\n if (state.phase === 'loading') return <p className={css.status}>{t('loading')}</p>\n if (state.phase === 'error') {\n return (\n <div className={css.section} role=\"alert\">\n <h2 className={css.heading}>{t('title')}</h2>\n <p className={css.error}>{t('loadError')}</p>\n <p className={css.errorDetail}>{state.message}</p>\n <button type=\"button\" className={css.secondaryButton} onClick={() => { setAttempt(value => value + 1) }}>{t('retry')}</button>\n </div>\n )\n }\n\n const dimensions = state.catalog.dimensions\n const active = dimensions.find(dimension => dimension.id === activeId)?.id ?? dimensions[0]?.id\n const visible = dimensions.filter(dimension => dimension.id === active || visitedIds.has(dimension.id))\n\n return (\n <div className={css.section}>\n <h2 className={css.heading}>{t('title')}</h2>\n <p className={css.intro}>{t('intro')}</p>\n {dimensions.length === 0 ? <p className={css.empty}>{t('noWorkspaces')}</p> : (\n <>\n <label className={css.search}>\n <IconSearchOutline16 aria-hidden=\"true\" />\n <span className={css.visuallyHidden}>{t('searchPlaceholder')}</span>\n <input\n type=\"search\"\n value={query}\n placeholder={t('searchPlaceholder')}\n aria-label={t('searchPlaceholder')}\n spellCheck={false}\n onChange={(event) => { setQuery(event.currentTarget.value) }}\n />\n </label>\n <div className={css.tabArea}>\n <div className={css.tabRow}>\n <button\n type=\"button\"\n className={css.scrollArrow}\n aria-label={t('scrollLeft')}\n disabled={scrollState.left <= 0}\n onClick={() => { scrollBy(-220) }}\n >\n <IconChevronLeftOutline14 aria-hidden=\"true\" />\n </button>\n <div\n ref={tabScrollRef}\n className={css.tabScroll}\n onScroll={() => {\n const el = tabScrollRef.current\n if (el !== null) setScrollState(prev => ({ ...prev, left: Math.min(el.scrollLeft, prev.max) }))\n }}\n >\n <div ref={tabsRef} className={css.tabs} role=\"tablist\" aria-label={t('tabs')}>\n {dimensions.map((dimension, index) => {\n const selected = dimension.id === active\n return (\n <button\n key={dimension.id}\n ref={(element) => { tabRefs.current[index] = element }}\n id={`${tabsId}-tab-${dimension.id}`}\n type=\"button\"\n role=\"tab\"\n className={css.tab}\n aria-selected={selected}\n aria-controls={`${tabsId}-panel-${dimension.id}`}\n data-active={selected ? 'true' : undefined}\n tabIndex={selected ? 0 : -1}\n onClick={() => { setActiveId(dimension.id) }}\n onKeyDown={(event) => {\n let nextIndex: number\n switch (event.key) {\n case 'ArrowRight': nextIndex = (index + 1) % dimensions.length; break\n case 'ArrowLeft': nextIndex = (index - 1 + dimensions.length) % dimensions.length; break\n case 'Home': nextIndex = 0; break\n case 'End': nextIndex = dimensions.length - 1; break\n default: return\n }\n event.preventDefault()\n const next = dimensions[nextIndex] as DimensionView\n const nextTab = tabRefs.current[nextIndex] as HTMLButtonElement\n setActiveId(next.id)\n nextTab.focus()\n }}\n >\n {dimension.title}\n </button>\n )\n })}\n </div>\n </div>\n <button\n type=\"button\"\n className={css.scrollArrow}\n aria-label={t('scrollRight')}\n disabled={scrollState.left >= scrollState.max}\n onClick={() => { scrollBy(220) }}\n >\n <IconChevronRightOutline14 aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n {visible.map((dimension) => {\n const selected = dimension.id === active\n return (\n <div\n key={dimension.id}\n id={`${tabsId}-panel-${dimension.id}`}\n className={css.panel}\n role=\"tabpanel\"\n aria-labelledby={`${tabsId}-tab-${dimension.id}`}\n hidden={!selected}\n >\n {dimension.error !== undefined\n ? <p className={css.error} role=\"alert\">{t('dimensionError')}</p>\n : (() => {\n const rows = filterRows(dimension, query)\n if (rows.length === 0) {\n return <p className={css.empty}>{query.trim() === '' ? t('empty') : t('noMatches')}</p>\n }\n return (\n <ul className={css.list}>\n {rows.map(row => (\n <SkillRowView\n key={row.name}\n row={row}\n t={t}\n workspaceId={dimension.id}\n setSkillDisabled={setSkillDisabled}\n onToggled={applyToggle}\n />\n ))}\n </ul>\n )\n })()}\n </div>\n )\n })}\n </>\n )}\n </div>\n )\n}\n", "/** Locale namespace for the Skill management settings page. */\nexport const NS = 'settings.skillManagement'\n\nconst keys = [\n 'nav', 'title', 'intro', 'tabs', 'searchPlaceholder', 'loading', 'loadError', 'retry',\n 'empty', 'noWorkspaces', 'noMatches', 'dimensionError', 'enabled', 'disabled',\n 'scrollLeft', 'scrollRight',\n 'sourceProjectDsh', 'sourceProjectAgents', 'sourceRuntime', 'sourceUserDsh', 'sourceUserAgents', 'sourceCustom', 'sourceBundled',\n] as const\n\nexport type SkillManagementKey = typeof keys[number]\n\nexport const en: Record<SkillManagementKey, string> = {\n nav: 'Skills',\n title: 'Skills',\n intro: 'Skills grouped by workspace, with global and user-level skills folded in.',\n tabs: 'Workspaces',\n searchPlaceholder: 'Search skills',\n loading: 'Loading skills\u2026',\n loadError: 'Failed to load the skill catalog.',\n retry: 'Retry',\n empty: 'No skills in this workspace.',\n noWorkspaces: 'No workspaces yet.',\n noMatches: 'No skills match the search.',\n dimensionError: 'This workspace catalog could not be loaded.',\n enabled: 'Enabled',\n disabled: 'Disabled',\n scrollLeft: 'Scroll workspaces left',\n scrollRight: 'Scroll workspaces right',\n sourceProjectDsh: 'Workspace',\n sourceProjectAgents: 'Workspace',\n sourceRuntime: 'Runtime',\n sourceUserDsh: 'User',\n sourceUserAgents: 'User',\n sourceCustom: 'Custom',\n sourceBundled: 'Bundled',\n}\n\nexport const zh: Record<SkillManagementKey, string> = {\n nav: '\u6280\u80FD',\n title: '\u6280\u80FD',\n intro: '\u6280\u80FD\u6309\u5DE5\u4F5C\u533A\u7EC4\u7EC7\uFF0C\u5168\u5C40\u4E0E\u7528\u6237\u7EA7\u6280\u80FD\u5DF2\u53E0\u52A0\u5230\u6BCF\u4E2A\u5DE5\u4F5C\u533A\u3002',\n tabs: '\u5DE5\u4F5C\u533A',\n searchPlaceholder: '\u641C\u7D22\u6280\u80FD\u2026',\n loading: '\u6B63\u5728\u52A0\u8F7D\u6280\u80FD\u2026',\n loadError: '\u6280\u80FD\u76EE\u5F55\u52A0\u8F7D\u5931\u8D25\u3002',\n retry: '\u91CD\u8BD5',\n empty: '\u8BE5\u5DE5\u4F5C\u533A\u6CA1\u6709\u6280\u80FD\u3002',\n noWorkspaces: '\u8FD8\u6CA1\u6709\u5DE5\u4F5C\u533A\u3002',\n noMatches: '\u6CA1\u6709\u5339\u914D\u641C\u7D22\u7684\u6280\u80FD\u3002',\n dimensionError: '\u8BE5\u5DE5\u4F5C\u533A\u7684\u6280\u80FD\u76EE\u5F55\u52A0\u8F7D\u5931\u8D25\u3002',\n enabled: '\u5DF2\u542F\u7528',\n disabled: '\u5DF2\u7981\u7528',\n scrollLeft: '\u5411\u5DE6\u6EDA\u52A8\u5DE5\u4F5C\u533A',\n scrollRight: '\u5411\u53F3\u6EDA\u52A8\u5DE5\u4F5C\u533A',\n sourceProjectDsh: '\u5DE5\u4F5C\u533A',\n sourceProjectAgents: '\u5DE5\u4F5C\u533A',\n sourceRuntime: '\u8FD0\u884C\u65F6',\n sourceUserDsh: '\u7528\u6237',\n sourceUserAgents: '\u7528\u6237',\n sourceCustom: '\u81EA\u5B9A\u4E49',\n sourceBundled: '\u5185\u7F6E',\n}\n\n/** The localized key for one skill source; undefined for unknown sources (shown verbatim). */\nexport function sourceLabelKey(source: string): SkillManagementKey | undefined {\n switch (source) {\n case 'project-dsh': return 'sourceProjectDsh'\n case 'project-agents': return 'sourceProjectAgents'\n case 'runtime': return 'sourceRuntime'\n case 'user-dsh': return 'sourceUserDsh'\n case 'user-agents': return 'sourceUserAgents'\n case 'custom': return 'sourceCustom'\n case 'bundled': return 'sourceBundled'\n default: return undefined\n }\n}\n", "const css = \".eq8mga_section{max-width:760px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}.eq8mga_heading{margin:0;font-size:18px;font-weight:600}.eq8mga_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px}.eq8mga_search{width:100%;color:var(--dsw-alias-label-tertiary);align-items:center;display:flex;position:relative}.eq8mga_search>svg{pointer-events:none;position:absolute;left:12px}.eq8mga_search input{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);width:100%;height:36px;color:var(--dsw-alias-label-primary);font:inherit;border-radius:8px;outline:none;padding:0 34px 0 36px;font-size:13px}.eq8mga_search input::placeholder{color:var(--dsw-alias-label-tertiary)}.eq8mga_search input:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, transparent)}.eq8mga_visuallyHidden{clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.eq8mga_tabArea{flex-direction:column;gap:6px;margin-top:2px;display:flex}.eq8mga_tabRow{align-items:center;gap:6px;display:flex}.eq8mga_scrollArrow{appearance:none;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:7px;flex:none;align-items:center;padding:5px;display:inline-flex}.eq8mga_scrollArrow:disabled{opacity:.35;cursor:default}.eq8mga_scrollArrow:hover:not(:disabled){background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary)}.eq8mga_scrollArrow:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:1px}.eq8mga_tabScroll{scrollbar-width:none;border-bottom:1px solid var(--dsw-alias-border-l2);flex:1;min-width:0;overflow-x:auto}.eq8mga_tabScroll::-webkit-scrollbar{display:none}.eq8mga_tabs{align-items:flex-end;gap:22px;width:max-content;display:flex}.eq8mga_tab{color:var(--dsw-alias-label-tertiary);font:inherit;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;max-width:240px;padding:7px 1px 9px;font-size:13px;line-height:20px;position:relative;overflow:hidden}.eq8mga_tab:hover,.eq8mga_tab[data-active=true]{color:var(--dsw-alias-label-primary)}.eq8mga_tab[data-active=true]:after,.eq8mga_tab:focus-visible:after{background:var(--dsw-alias-label-primary);content:\\\"\\\";border-radius:2px 2px 0 0;height:2px;position:absolute;bottom:-1px;left:0;right:0}.eq8mga_tab:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px;color:var(--dsw-alias-label-primary);border-radius:2px}.eq8mga_panel{min-width:0;padding-top:2px}.eq8mga_list{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:12px;margin:0;padding:0;list-style:none;overflow:hidden}.eq8mga_row{flex-direction:column;gap:6px;padding:12px 16px;display:flex}.eq8mga_row+.eq8mga_row{border-top:1px solid var(--dsw-alias-border-l2)}.eq8mga_rowHead{align-items:center;gap:8px;min-width:0;display:flex}.eq8mga_rowName{font-size:14px;font-weight:600;line-height:1.4;font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);overflow-wrap:anywhere}.eq8mga_badge{white-space:nowrap;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);border-radius:999px;margin-left:auto;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.eq8mga_switch{appearance:none;cursor:pointer;background:0 0;border:0;flex:none;padding:0;display:inline-flex}.eq8mga_switch:disabled{opacity:.5;cursor:default}.eq8mga_switch:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px;border-radius:8px}.eq8mga_track{background:var(--dsw-alias-border-l2);width:28px;height:16px;transition:background-color .12s var(--ds-ease-in-out);border-radius:8px;flex:none;display:inline-block;position:relative}.eq8mga_thumb{background:var(--dsw-alias-bg-layer-1);width:12px;height:12px;transition:transform .12s var(--ds-ease-in-out);border-radius:50%;position:absolute;top:2px;left:2px}.eq8mga_track[data-on=true]{background:var(--dsw-alias-state-business-primary)}.eq8mga_track[data-on=true] .eq8mga_thumb{transform:translate(12px)}.eq8mga_rowDesc{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;overflow-wrap:anywhere;-webkit-box-orient:vertical;font-size:13px;line-height:1.55;display:-webkit-box;overflow:hidden}.eq8mga_status{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.eq8mga_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px}.eq8mga_errorDetail{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.eq8mga_empty{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px}.eq8mga_secondaryButton{color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:none;border-radius:7px;align-self:flex-start;padding:5px 8px;font-size:12.5px}.eq8mga_secondaryButton:hover:not(:disabled){background:var(--dsw-alias-bg-layer-1)}\";\nconst tagId = \"@dsh-mixxed/dsh-client-ui-settings-skills/SkillManagementSection.module.css\";\nif (typeof document !== 'undefined' && document.querySelector('style[data-plugin-css=\"' + tagId + '\"]') === null) {\n const tag = document.createElement('style');\n tag.dataset.plugin = \"@dsh-mixxed/dsh-client-ui-settings-skills\";\n tag.dataset.pluginCss = tagId;\n tag.textContent = css;\n document.head.appendChild(tag);\n}\nexport default {\"thumb\":\"eq8mga_thumb\",\"row\":\"eq8mga_row\",\"error\":\"eq8mga_error\",\"heading\":\"eq8mga_heading\",\"errorDetail\":\"eq8mga_errorDetail\",\"empty\":\"eq8mga_empty\",\"tabRow\":\"eq8mga_tabRow\",\"list\":\"eq8mga_list\",\"track\":\"eq8mga_track\",\"tab\":\"eq8mga_tab\",\"rowName\":\"eq8mga_rowName\",\"status\":\"eq8mga_status\",\"badge\":\"eq8mga_badge\",\"search\":\"eq8mga_search\",\"secondaryButton\":\"eq8mga_secondaryButton\",\"intro\":\"eq8mga_intro\",\"tabArea\":\"eq8mga_tabArea\",\"scrollArrow\":\"eq8mga_scrollArrow\",\"switch\":\"eq8mga_switch\",\"tabScroll\":\"eq8mga_tabScroll\",\"panel\":\"eq8mga_panel\",\"rowDesc\":\"eq8mga_rowDesc\",\"section\":\"eq8mga_section\",\"visuallyHidden\":\"eq8mga_visuallyHidden\",\"tabs\":\"eq8mga_tabs\",\"rowHead\":\"eq8mga_rowHead\"};"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,mBAAoE;AAGpE,sCAEO;;;ACXA,IAAM,KAAK;AAWX,IAAM,KAAyC;AAAA,EACpD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AAAA,EACP,cAAc;AAAA,EACd,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,eAAe;AACjB;AAEO,IAAM,KAAyC;AAAA,EACpD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AAAA,EACP,cAAc;AAAA,EACd,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EAC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