dsh-skill-hub 0.2.1 → 0.2.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/lib/client.js +17 -3
- package/lib/client.js.map +1 -1
- package/lib/types/client/locales.d.ts +1 -0
- package/package.json +1 -1
- package/src/client/locales.ts +2 -0
- package/src/client/panel/SkillRow.tsx +17 -2
- package/src/client/panel/SourcesView.tsx +2 -2
- package/src/client/panel/panel.module.css +5 -2
|
@@ -132,6 +132,7 @@ export declare const zh: {
|
|
|
132
132
|
readonly 'row.disable': "禁用";
|
|
133
133
|
readonly 'row.enable': "启用";
|
|
134
134
|
readonly 'row.delete': "移入回收站";
|
|
135
|
+
readonly 'row.open': "查看 {name} 详情(回车)";
|
|
135
136
|
readonly 'delete.confirmTitle': "移入回收站?";
|
|
136
137
|
readonly 'delete.confirmText': "确定把「{name}」移入回收站吗?可随时恢复。";
|
|
137
138
|
readonly 'delete.confirm': "移入回收站";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-skill-hub",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "In-GUI skill hub for DeepSeek Harness (dsh): browse the full local skill catalog from the official ctx.skills registry (every root + third-party providers), toggle skills on/off, inspect bodies, surface frontmatter diagnostics, and scaffold new skills — plus a codex-style skill market (built-in catalog, upstream update checks, one-click update-all) with tracked source sync. The full manager beyond the read-only dsh-skill-manager browser.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
package/src/client/locales.ts
CHANGED
|
@@ -133,6 +133,7 @@ export const zh = {
|
|
|
133
133
|
'row.disable': '禁用',
|
|
134
134
|
'row.enable': '启用',
|
|
135
135
|
'row.delete': '移入回收站',
|
|
136
|
+
'row.open': '查看 {name} 详情(回车)',
|
|
136
137
|
'delete.confirmTitle': '移入回收站?',
|
|
137
138
|
'delete.confirmText': '确定把「{name}」移入回收站吗?可随时恢复。',
|
|
138
139
|
'delete.confirm': '移入回收站',
|
|
@@ -341,6 +342,7 @@ export const en: Record<HubKey, string> = {
|
|
|
341
342
|
'row.disable': 'Disable',
|
|
342
343
|
'row.enable': 'Enable',
|
|
343
344
|
'row.delete': 'Move to trash',
|
|
345
|
+
'row.open': 'View {name} details (Enter)',
|
|
344
346
|
'delete.confirmTitle': 'Move to trash?',
|
|
345
347
|
'delete.confirmText': 'Move "{name}" to trash? It can be restored anytime.',
|
|
346
348
|
'delete.confirm': 'Move to trash',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* disable actions. Shared by the flat list and both grouped views.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { JSX } from 'react'
|
|
6
|
+
import type { JSX, KeyboardEvent } from 'react'
|
|
7
7
|
import type { CatalogSkill } from '../../protocol.ts'
|
|
8
8
|
import { IconTrashOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'
|
|
9
9
|
import { tt } from '../helpers.ts'
|
|
@@ -16,8 +16,23 @@ export function SkillRow(props: { skill: CatalogSkill; hub: SkillHubState }): JS
|
|
|
16
16
|
const stat = hub.uses.get(skill.name)
|
|
17
17
|
const count = stat?.count ?? 0
|
|
18
18
|
const lastUsed = stat?.lastUsed
|
|
19
|
+
/** 键盘打开详情:Enter 或空格。仅当焦点在行本身(而非行内按钮)时生效。 */
|
|
20
|
+
const onKeyDown = (event: KeyboardEvent<HTMLDivElement>): void => {
|
|
21
|
+
if (event.target !== event.currentTarget) return
|
|
22
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
23
|
+
event.preventDefault()
|
|
24
|
+
void hub.openDetail(skill.name)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
19
27
|
return (
|
|
20
|
-
<div
|
|
28
|
+
<div
|
|
29
|
+
className={css.row}
|
|
30
|
+
role='button'
|
|
31
|
+
tabIndex={0}
|
|
32
|
+
aria-label={tt('row.open', { name: skill.name })}
|
|
33
|
+
onClick={() => { void hub.openDetail(skill.name) }}
|
|
34
|
+
onKeyDown={onKeyDown}
|
|
35
|
+
>
|
|
21
36
|
<div className={css.rowMain}>
|
|
22
37
|
<div className={css.rowName}>
|
|
23
38
|
<span className={css.rowNameText}>{skill.name}</span>
|
|
@@ -52,7 +52,7 @@ function ProjectTree(props: { hub: SkillHubState }): JSX.Element | null {
|
|
|
52
52
|
const projCollapsed = collapsedGroups.has(projKey)
|
|
53
53
|
const subdivided = subdividedProjects.has(key)
|
|
54
54
|
return (
|
|
55
|
-
<div key={projKey} className={css.
|
|
55
|
+
<div key={projKey} className={css.projectNest}>
|
|
56
56
|
<div className={css.groupHead}>
|
|
57
57
|
<button type='button' className={css.disclosure} aria-expanded={!projCollapsed} onClick={() => { toggleGroupCollapse(projKey) }}>
|
|
58
58
|
<span className={css.chevron + (projCollapsed ? ' ' + css.chevronCollapsed : '')} />
|
|
@@ -76,7 +76,7 @@ function ProjectTree(props: { hub: SkillHubState }): JSX.Element | null {
|
|
|
76
76
|
const srcKey = projKey + ':' + source
|
|
77
77
|
const srcCollapsed = collapsedGroups.has(srcKey)
|
|
78
78
|
return (
|
|
79
|
-
<div key={srcKey} className={css.
|
|
79
|
+
<div key={srcKey} className={css.projectNest}>
|
|
80
80
|
<div className={css.groupHead}>
|
|
81
81
|
<button type='button' className={css.disclosure} aria-expanded={!srcCollapsed} onClick={() => { toggleGroupCollapse(srcKey) }}>
|
|
82
82
|
<span className={css.chevron + (srcCollapsed ? ' ' + css.chevronCollapsed : '')} />
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
/* Rows: hairline separators inside a card, no outer borders. */
|
|
35
35
|
.row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: transparent; cursor: pointer; transition: background .12s ease; }
|
|
36
36
|
.row:hover { background: rgba(128,128,128,.08); }
|
|
37
|
+
/* Keyboard focus ring for the div-as-button skill row (theme-agnostic). */
|
|
38
|
+
.row:focus-visible { outline: 2px solid var(--hub-model); outline-offset: -2px; }
|
|
37
39
|
.rowStatic { cursor: default; }
|
|
38
40
|
.rowStatic:hover { background: transparent; }
|
|
39
41
|
.row + .row { border-top: 0.5px solid rgba(128,128,128,.13); }
|
|
@@ -220,5 +222,6 @@
|
|
|
220
222
|
/* Workspace (project path) picker in the subbar. */
|
|
221
223
|
.workspaceBox { display: inline-flex; align-items: center; gap: 6px; }
|
|
222
224
|
.workspaceInput { width: 200px; padding: 6px 10px; font-size: 12px; }
|
|
223
|
-
/* Project-level three-tier tree:
|
|
224
|
-
|
|
225
|
+
/* Project-level three-tier tree: outer card (the .section), inner levels are
|
|
226
|
+
flat — indent + a hairline guide only, no nested card surfaces. */
|
|
227
|
+
.projectNest { display: flex; flex-direction: column; margin: 2px 0 0 14px; border-left: 1px solid rgba(128,128,128,.14); }
|