@sparkelf/dsh-client-ui-skill-center 0.2.2-alpha.2.5 → 0.2.4-alpha.48
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 +21 -0
- package/lib/client.js +193 -168
- package/lib/types/client/locales.d.ts +0 -1
- package/package.json +42 -42
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/lib/client.js
CHANGED
|
@@ -4,9 +4,9 @@ window.__ModuleLoader__.load({
|
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
//#region \0dsh-css:/root/projects/deepseek-harness-plus/packages/plus/ui-skill-center/src/client/SkillCenterPage.module.css.mjs
|
|
11
11
|
const css = ".DGiSta_page{box-sizing:border-box;width:100%;height:100%;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);padding:0 0 48px;overflow:auto}.DGiSta_pageContent{width:100%;max-width:960px;margin:0 auto;padding:0 clamp(24px,4vw,48px)}.DGiSta_pageHead{justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;padding-top:28px;display:flex}.DGiSta_pageTitle{margin:0;font-size:20px;font-weight:500;line-height:28px}.DGiSta_toolbar{justify-content:flex-end;align-items:center;gap:16px;display:flex}.DGiSta_iconButton{width:28px;height:28px;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;border-radius:28px;justify-content:center;align-items:center;display:inline-flex}.DGiSta_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.DGiSta_iconButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.DGiSta_iconWrap{display:inline-flex}.DGiSta_tabs{flex-wrap:wrap;align-items:center;gap:8px 12px;margin-bottom:14px;display:flex}.DGiSta_tab{height:28px;color:var(--dsw-alias-label-tertiary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:14px;flex:none;align-items:center;gap:6px;padding:0 10px;font-size:14px;line-height:22px;display:inline-flex}@media (hover:hover){.DGiSta_tab:hover{background:var(--dsw-alias-interactive-bg-hover)}}.DGiSta_tab:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.DGiSta_tabActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.DGiSta_tabCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}.DGiSta_tabActive .DGiSta_tabCount{color:var(--dsw-alias-label-secondary)}.DGiSta_searchField{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);width:100%;height:36px;color:var(--dsw-alias-label-tertiary);border-radius:12px;align-items:center;gap:4px;margin:0 0 16px;padding:0 10px;transition:border-color .15s;display:flex}@media (hover:hover){.DGiSta_searchField:hover{border-color:var(--dsw-alias-border-l2)}}.DGiSta_searchField:focus-within{border-color:var(--dsw-alias-state-business-primary)}.DGiSta_searchField>:first-child{background:0 0;border:0;border-radius:0;flex:1;min-width:0;height:100%;padding:0}.DGiSta_searchField>:first-child:focus-within{border-color:#0000}.DGiSta_searchField>:first-child svg{width:14px;height:14px}.DGiSta_searchField input::placeholder{color:var(--dsw-alias-label-caption)}.DGiSta_searchField input:focus-visible{outline:none}.DGiSta_searchField input::-webkit-search-cancel-button{display:none}.DGiSta_searchClear{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);flex:none;margin-right:-6px;padding:0}.DGiSta_tabPanel,.DGiSta_plazaPanel,.DGiSta_group{min-width:0}.DGiSta_groupTitle{align-items:baseline;gap:8px;margin:0 0 8px;font-size:14px;font-weight:500;line-height:20px;display:flex}.DGiSta_groupCount{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400}.DGiSta_cards{grid-template-columns:repeat(auto-fill,minmax(272px,1fr));align-content:start;align-items:stretch;gap:12px;margin:0;padding:0;list-style:none;display:grid}.DGiSta_card{border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:10px;min-width:0;min-height:0;padding:12px;display:flex}.DGiSta_cardHead{align-items:center;gap:10px;min-width:0;display:flex}.DGiSta_cardIcon{corner-shape:round;background:var(--dsw-alias-bg-layer-2);width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:50%;flex:none;place-items:center;display:grid}.DGiSta_cardForeign{opacity:.72}.DGiSta_workspaceBadge{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);vertical-align:middle;border-radius:4px;margin-left:8px;padding:1px 6px;font-size:11px;font-weight:400;line-height:16px}.DGiSta_cardTitle{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;overflow:hidden}.DGiSta_cardTitleRow{flex:1;align-items:center;gap:8px;min-width:0;min-height:26px;display:flex}.DGiSta_cardMarks{flex-wrap:wrap;gap:6px;min-height:18px;margin-top:2px;display:flex}.DGiSta_mark{color:var(--dsw-alias-state-business-primary);white-space:nowrap;background:#ecf1fc;border:0;border-radius:4px;padding:2px 7px;font-size:11px;font-weight:500;line-height:16px}.DGiSta_markOff,.DGiSta_markDanger{background:#ecf1fc}.DGiSta_detail{flex-direction:column;gap:12px;margin:0;display:flex}.DGiSta_cardActions{flex:none;align-items:center;gap:4px;display:inline-flex}.DGiSta_cardActions button{border-radius:6px;justify-content:center;align-items:center;height:28px;min-height:28px;padding:0 10px;font-size:12px;line-height:18px;display:inline-flex}.DGiSta_detailRow{flex-direction:column;gap:2px;display:flex}.DGiSta_detailLabel{color:var(--dsw-alias-label-caption);font-size:11px;line-height:16px}.DGiSta_detailValue{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}.DGiSta_cardEnd{flex:none;justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:2px;display:flex}.DGiSta_cardBody{flex-direction:column;gap:6px;min-width:0;display:flex}.DGiSta_switch{background:var(--dsw-alias-border-l3);cursor:pointer;border:none;border-radius:10px;width:36px;height:20px;transition:background .12s;position:relative}.DGiSta_switch:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.DGiSta_switchOn{background:var(--dsw-alias-state-success-primary)}.DGiSta_switch:after{content:\"\";corner-shape:round;background:var(--dsw-alias-bg-layer-1);border-radius:50%;width:16px;height:16px;transition:transform .12s;position:absolute;top:2px;left:2px}.DGiSta_switchOn:after{transform:translate(16px)}.DGiSta_dialog{color-scheme:light;width:min(560px,100%)}body[data-ds-dark-theme] .DGiSta_dialog{color-scheme:dark}.DGiSta_publishDialog.DGiSta_publishDialog{color-scheme:light;gap:0;width:min(720px,100vw - 32px);max-width:100%;max-height:min(82vh,760px);padding:0 0 20px}body[data-ds-dark-theme] .DGiSta_publishDialog.DGiSta_publishDialog{color-scheme:dark}.DGiSta_dialogHeader{flex:none;justify-content:space-between;align-items:center;gap:8px;padding:22px 24px 12px;display:flex}.DGiSta_dialogTitle{color:var(--dsw-alias-label-primary);margin:0;font-size:16px;font-weight:500;line-height:24px}.DGiSta_dialogClose{width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:8px;flex:none;justify-content:center;align-items:center;display:inline-flex}.DGiSta_dialogClose:hover{background:var(--dsw-alias-interactive-bg-hover)}.DGiSta_dialogClose:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.DGiSta_dialogBody{overscroll-behavior:contain;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);flex:1;min-height:0;padding:0 24px;overflow-y:auto}.DGiSta_dialogFooter{flex:none;justify-content:flex-end;align-items:center;gap:8px;padding:16px 24px 0;display:flex}.DGiSta_dialogBody .DGiSta_textarea{min-height:200px}.DGiSta_form{flex-direction:column;gap:12px;display:flex}.DGiSta_field{flex-direction:column;gap:4px;display:flex}.DGiSta_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.DGiSta_input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);height:32px;color:var(--dsw-alias-label-primary);accent-color:var(--dsw-alias-state-business-primary);background:0 0;border-radius:8px;padding:0 10px;font-size:13px}.DGiSta_input:hover:not(:disabled){border-color:var(--dsw-alias-border-l2)}.DGiSta_input:focus-visible{outline:2px solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px;border-color:var(--dsw-alias-state-business-primary)}.DGiSta_input:disabled{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-secondary);cursor:default}.DGiSta_input option{background-color:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary)}.DGiSta_input option:disabled{color:var(--dsw-alias-label-caption)}.DGiSta_textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);min-height:80px;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-markdown-code-block-small);resize:vertical;background:0 0;border-radius:8px;padding:8px 10px;font-size:12px}.DGiSta_status{text-align:center;color:var(--dsw-alias-label-tertiary);padding:32px 0;font-size:13px}.DGiSta_statusError{color:var(--dsw-alias-state-error-primary)}.DGiSta_cardSummary{color:var(--dsw-alias-label-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:36px;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.DGiSta_body{flex-direction:column;gap:4px;min-width:0;margin-top:16px;display:flex}.DGiSta_bodyLabel{color:var(--dsw-alias-label-caption);margin:0;font-size:11px;font-weight:500;line-height:16px}.DGiSta_bodyPre{background:var(--dsw-alias-markdown-code-block);max-height:46vh;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-markdown-code-block-small-font-family);font-size:var(--dsw-font-markdown-code-block-small-font-size);line-height:var(--dsw-font-markdown-code-block-small-line-height);white-space:pre-wrap;overflow-wrap:anywhere;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:8px;margin:0;padding:12px;overflow:auto}.DGiSta_bodyStatus{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.DGiSta_bodyError{color:var(--dsw-alias-state-error-primary);}.DGiSta_progressRow{align-items:center;gap:8px;margin-bottom:12px;display:flex}.DGiSta_progressLabel{color:var(--dsw-alias-label-secondary);white-space:nowrap;font-size:12px;line-height:18px}.DGiSta_progressTrack{background:var(--dsw-alias-border-l2);border-radius:2px;flex:1;height:4px;overflow:hidden}.DGiSta_progressFill{background:var(--dsw-alias-label-primary);border-radius:2px;height:100%;transition:width .2s;display:block}.DGiSta_progressCount{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px;line-height:18px}.DGiSta_plazaBadge{white-space:nowrap;border:.5px solid var(--dsw-alias-border-l2);border-radius:4px;flex:none;padding:0 6px;font-size:11px;line-height:18px}.DGiSta_plazaBadgeLocal{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-secondary)}.DGiSta_plazaBadgePending,.DGiSta_plazaBadgeApproved{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-secondary)}.DGiSta_plazaBadgeRejected{color:var(--dsw-alias-label-error);background:var(--dsw-alias-bg-secondary)}.DGiSta_plazaSharedTag{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-secondary);border-radius:4px;flex:none;padding:0 6px;font-size:11px;line-height:18px}.DGiSta_plazaReason{color:var(--dsw-alias-label-error);margin-top:4px;font-size:12px;line-height:18px}.DGiSta_plazaScopeHint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.DGiSta_connectorTab{flex-direction:column;gap:12px;min-width:0;display:flex}.DGiSta_connectorDemoNote{background:var(--dsw-specific-sidebar-fill);color:var(--dsw-alias-label-secondary);border-radius:10px;align-items:center;gap:8px;padding:9px 12px;font-size:12px;line-height:18px;display:flex}.DGiSta_connectorDemoTag{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);border-radius:4px;flex:none;padding:0 6px;font-size:11px;line-height:18px}.DGiSta_connectorGrid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));align-items:start;gap:12px;display:grid}.DGiSta_connectorCard{border:.5px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);border-radius:12px;flex-direction:column;gap:10px;min-width:0;padding:14px;display:flex}.DGiSta_connectorHead{align-items:center;gap:10px;min-width:0;display:flex}.DGiSta_connectorIcon{background:var(--dsw-alias-bg-module-platform);width:32px;height:32px;color:var(--dsw-alias-state-business-primary);border-radius:9px;flex:none;place-items:center;display:grid}.DGiSta_connectorIdentity{flex:1;min-width:0}.DGiSta_connectorName{color:var(--dsw-alias-label-primary);text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;overflow:hidden}.DGiSta_connectorVendor{color:var(--dsw-alias-label-tertiary);margin-top:2px;font-size:11px;line-height:16px}.DGiSta_connectorDescription{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}.DGiSta_connectorError{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:18px}.DGiSta_connectorToggleRow{justify-content:space-between;align-items:center;gap:12px;min-height:28px;display:flex}.DGiSta_connectorToggleLabel{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.DGiSta_capabilityList{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:2px;padding-top:10px;display:flex}.DGiSta_capabilityTitle{color:var(--dsw-alias-label-tertiary);margin-bottom:4px;font-size:11px;line-height:16px}.DGiSta_capabilityRow{justify-content:space-between;align-items:center;gap:12px;min-height:44px;padding:6px 0;display:flex}.DGiSta_capabilityRow+.DGiSta_capabilityRow{border-top:.5px solid var(--dsw-alias-border-l1)}.DGiSta_capabilityCopy{flex:1;min-width:0}.DGiSta_capabilityName{color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px}.DGiSta_capabilityDescription{color:var(--dsw-alias-label-tertiary);margin-top:1px;font-size:11px;line-height:16px}.DGiSta_capabilityReason{color:var(--dsw-alias-state-warn-primary);margin-top:3px;font-size:11px;line-height:16px}.DGiSta_connectorFailed{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-state-error-primary);border-radius:10px;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;font-size:12px;line-height:18px;display:flex}";
|
|
12
12
|
const tagId = "@sparkelf/dsh-client-ui-skill-center/SkillCenterPage.module.css";
|
|
@@ -114,13 +114,13 @@ window.__ModuleLoader__.load({
|
|
|
114
114
|
"workspaceBadge": "DGiSta_workspaceBadge"
|
|
115
115
|
};
|
|
116
116
|
//#endregion
|
|
117
|
-
//#region
|
|
117
|
+
//#region lib/types/client/glyphs.js
|
|
118
118
|
/**
|
|
119
119
|
* The chain-link glyph on a connector card.
|
|
120
120
|
* @returns a 16px current-color SVG.
|
|
121
121
|
*/
|
|
122
122
|
function ConnectorGlyph() {
|
|
123
|
-
return
|
|
123
|
+
return (0, react_jsx_runtime.jsxs)("svg", {
|
|
124
124
|
width: "16",
|
|
125
125
|
height: "16",
|
|
126
126
|
viewBox: "0 0 16 16",
|
|
@@ -128,19 +128,19 @@ window.__ModuleLoader__.load({
|
|
|
128
128
|
"aria-hidden": "true",
|
|
129
129
|
"data-connector-glyph": true,
|
|
130
130
|
children: [
|
|
131
|
-
|
|
131
|
+
(0, react_jsx_runtime.jsx)("path", {
|
|
132
132
|
d: "M6.6 9.4 9.4 6.6",
|
|
133
133
|
stroke: "currentColor",
|
|
134
134
|
strokeWidth: "1.4",
|
|
135
135
|
strokeLinecap: "round"
|
|
136
136
|
}),
|
|
137
|
-
|
|
137
|
+
(0, react_jsx_runtime.jsx)("path", {
|
|
138
138
|
d: "m7.4 4.9 1-1a2.7 2.7 0 0 1 3.8 3.8l-1 1",
|
|
139
139
|
stroke: "currentColor",
|
|
140
140
|
strokeWidth: "1.4",
|
|
141
141
|
strokeLinecap: "round"
|
|
142
142
|
}),
|
|
143
|
-
|
|
143
|
+
(0, react_jsx_runtime.jsx)("path", {
|
|
144
144
|
d: "m8.6 11.1-1 1a2.7 2.7 0 0 1-3.8-3.8l1-1",
|
|
145
145
|
stroke: "currentColor",
|
|
146
146
|
strokeWidth: "1.4",
|
|
@@ -155,13 +155,13 @@ window.__ModuleLoader__.load({
|
|
|
155
155
|
* @returns a current-color SVG.
|
|
156
156
|
*/
|
|
157
157
|
function CloseGlyph({ size = 14 }) {
|
|
158
|
-
return
|
|
158
|
+
return (0, react_jsx_runtime.jsx)("svg", {
|
|
159
159
|
width: size,
|
|
160
160
|
height: size,
|
|
161
161
|
viewBox: "0 0 16 16",
|
|
162
162
|
fill: "none",
|
|
163
163
|
"aria-hidden": "true",
|
|
164
|
-
children:
|
|
164
|
+
children: (0, react_jsx_runtime.jsx)("path", {
|
|
165
165
|
d: "m4 4 8 8M12 4l-8 8",
|
|
166
166
|
stroke: "currentColor",
|
|
167
167
|
strokeWidth: "1.4",
|
|
@@ -170,7 +170,7 @@ window.__ModuleLoader__.load({
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
|
-
//#region
|
|
173
|
+
//#region lib/types/client/api.js
|
|
174
174
|
/**
|
|
175
175
|
* Skill center API client. Talks to the host route family over same-origin
|
|
176
176
|
* fetch; the host owns the trust fence.
|
|
@@ -396,7 +396,17 @@ window.__ModuleLoader__.load({
|
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
398
|
//#endregion
|
|
399
|
-
//#region
|
|
399
|
+
//#region lib/types/client/plaza.js
|
|
400
|
+
/**
|
|
401
|
+
* Skill-plaza sharing state shown on a local skill card.
|
|
402
|
+
*
|
|
403
|
+
* Sharing is owned by DataOps: the same-origin `dataops-managed` bridge talks
|
|
404
|
+
* to the backend with the workspace credential, and the backend enforces
|
|
405
|
+
* ownership/review. This module only maps a local skill name to the record the
|
|
406
|
+
* bridge reports, so the card can show 未共享 / 待审核 / 已上架 / 已驳回.
|
|
407
|
+
*
|
|
408
|
+
* @module @sparkelf/dsh-client-ui-skill-center/client/plaza
|
|
409
|
+
*/
|
|
400
410
|
/** Map one local skill name to its share state. */
|
|
401
411
|
function shareOf(name, records) {
|
|
402
412
|
const record = records.get(name);
|
|
@@ -415,7 +425,7 @@ window.__ModuleLoader__.load({
|
|
|
415
425
|
return status === "local" || status === "rejected";
|
|
416
426
|
}
|
|
417
427
|
//#endregion
|
|
418
|
-
//#region
|
|
428
|
+
//#region lib/types/client/connectors.js
|
|
419
429
|
/**
|
|
420
430
|
* Connector catalogue for the skill center's fourth tab.
|
|
421
431
|
*
|
|
@@ -656,7 +666,7 @@ window.__ModuleLoader__.load({
|
|
|
656
666
|
}
|
|
657
667
|
}
|
|
658
668
|
//#endregion
|
|
659
|
-
//#region
|
|
669
|
+
//#region lib/types/client/ConnectorsTab.js
|
|
660
670
|
/** Status label and tone for one connector. */
|
|
661
671
|
function statusOf(connector, t) {
|
|
662
672
|
const state = connectorState(connector);
|
|
@@ -695,49 +705,49 @@ window.__ModuleLoader__.load({
|
|
|
695
705
|
function ConnectorCard({ connector, busy, t, onToggleConnector, onToggleCapability }) {
|
|
696
706
|
const status = statusOf(connector, t);
|
|
697
707
|
const capabilities = visibleCapabilities(connector);
|
|
698
|
-
return
|
|
708
|
+
return (0, react_jsx_runtime.jsxs)("article", {
|
|
699
709
|
className: SkillCenterPage_module_css_default.connectorCard,
|
|
700
710
|
"data-connector-id": connector.id,
|
|
701
711
|
"data-connector-enabled": connector.enabled,
|
|
702
712
|
children: [
|
|
703
|
-
|
|
713
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
704
714
|
className: SkillCenterPage_module_css_default.connectorHead,
|
|
705
715
|
children: [
|
|
706
|
-
|
|
716
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
707
717
|
className: SkillCenterPage_module_css_default.connectorIcon,
|
|
708
|
-
children:
|
|
718
|
+
children: (0, react_jsx_runtime.jsx)(ConnectorGlyph, {})
|
|
709
719
|
}),
|
|
710
|
-
|
|
720
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
711
721
|
className: SkillCenterPage_module_css_default.connectorIdentity,
|
|
712
|
-
children: [
|
|
722
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
713
723
|
className: SkillCenterPage_module_css_default.connectorName,
|
|
714
724
|
children: connector.name
|
|
715
|
-
}), connector.vendor === void 0 ? null :
|
|
725
|
+
}), connector.vendor === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
716
726
|
className: SkillCenterPage_module_css_default.connectorVendor,
|
|
717
727
|
children: connector.vendor
|
|
718
728
|
})]
|
|
719
729
|
}),
|
|
720
|
-
|
|
730
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
721
731
|
tone: status.tone,
|
|
722
732
|
children: status.label
|
|
723
733
|
})
|
|
724
734
|
]
|
|
725
735
|
}),
|
|
726
|
-
connector.description === void 0 ? null :
|
|
736
|
+
connector.description === void 0 ? null : (0, react_jsx_runtime.jsx)("p", {
|
|
727
737
|
className: SkillCenterPage_module_css_default.connectorDescription,
|
|
728
738
|
children: connector.description
|
|
729
739
|
}),
|
|
730
|
-
connector.enabled && connector.error !== void 0 ?
|
|
740
|
+
connector.enabled && connector.error !== void 0 ? (0, react_jsx_runtime.jsx)("p", {
|
|
731
741
|
className: SkillCenterPage_module_css_default.connectorError,
|
|
732
742
|
role: "status",
|
|
733
743
|
children: connector.error
|
|
734
744
|
}) : null,
|
|
735
|
-
|
|
745
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
736
746
|
className: SkillCenterPage_module_css_default.connectorToggleRow,
|
|
737
|
-
children: [
|
|
747
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
738
748
|
className: SkillCenterPage_module_css_default.connectorToggleLabel,
|
|
739
749
|
children: connector.enabled ? t("connector.enabled") : t("connector.disabled")
|
|
740
|
-
}),
|
|
750
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
741
751
|
checked: connector.enabled,
|
|
742
752
|
disabled: busy,
|
|
743
753
|
label: (connector.enabled ? t("connector.disable") : t("connector.enable")) + " " + connector.name,
|
|
@@ -746,30 +756,30 @@ window.__ModuleLoader__.load({
|
|
|
746
756
|
}
|
|
747
757
|
})]
|
|
748
758
|
}),
|
|
749
|
-
connector.enabled && capabilities.length > 0 ?
|
|
759
|
+
connector.enabled && capabilities.length > 0 ? (0, react_jsx_runtime.jsxs)("div", {
|
|
750
760
|
className: SkillCenterPage_module_css_default.capabilityList,
|
|
751
761
|
"data-connector-capabilities": true,
|
|
752
|
-
children: [
|
|
762
|
+
children: [(0, react_jsx_runtime.jsx)("div", {
|
|
753
763
|
className: SkillCenterPage_module_css_default.capabilityTitle,
|
|
754
764
|
children: t("connector.capabilities")
|
|
755
765
|
}), capabilities.map((capability) => {
|
|
756
766
|
const unavailable = capability.unavailableReason !== void 0;
|
|
757
|
-
return
|
|
767
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
758
768
|
className: SkillCenterPage_module_css_default.capabilityRow,
|
|
759
769
|
"data-capability-id": capability.id,
|
|
760
770
|
"data-capability-enabled": capability.enabled,
|
|
761
|
-
children: [
|
|
771
|
+
children: [(0, react_jsx_runtime.jsxs)("div", {
|
|
762
772
|
className: SkillCenterPage_module_css_default.capabilityCopy,
|
|
763
773
|
children: [
|
|
764
|
-
|
|
774
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
765
775
|
className: SkillCenterPage_module_css_default.capabilityName,
|
|
766
776
|
children: capability.name
|
|
767
777
|
}),
|
|
768
|
-
capability.description === void 0 ? null :
|
|
778
|
+
capability.description === void 0 ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
769
779
|
className: SkillCenterPage_module_css_default.capabilityDescription,
|
|
770
780
|
children: capability.description
|
|
771
781
|
}),
|
|
772
|
-
capability.unavailableReason === void 0 ? null :
|
|
782
|
+
capability.unavailableReason === void 0 ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
773
783
|
className: SkillCenterPage_module_css_default.capabilityReason,
|
|
774
784
|
children: [
|
|
775
785
|
t("connector.unavailable"),
|
|
@@ -778,7 +788,7 @@ window.__ModuleLoader__.load({
|
|
|
778
788
|
]
|
|
779
789
|
})
|
|
780
790
|
]
|
|
781
|
-
}),
|
|
791
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
782
792
|
checked: capability.enabled,
|
|
783
793
|
disabled: busy || unavailable,
|
|
784
794
|
label: (capability.enabled ? t("connector.disable") : t("connector.enable")) + " " + capability.name,
|
|
@@ -799,19 +809,19 @@ window.__ModuleLoader__.load({
|
|
|
799
809
|
*/
|
|
800
810
|
function ConnectorsTab(props) {
|
|
801
811
|
const { state, query, busyId, t, onRetry, onToggleConnector, onToggleCapability } = props;
|
|
802
|
-
if (state.kind === "loading") return
|
|
812
|
+
if (state.kind === "loading") return (0, react_jsx_runtime.jsx)("div", {
|
|
803
813
|
className: SkillCenterPage_module_css_default.status,
|
|
804
814
|
children: t("connector.loading")
|
|
805
815
|
});
|
|
806
|
-
if (state.kind === "failed") return
|
|
816
|
+
if (state.kind === "failed") return (0, react_jsx_runtime.jsxs)("div", {
|
|
807
817
|
className: SkillCenterPage_module_css_default.connectorFailed,
|
|
808
818
|
role: "alert",
|
|
809
819
|
"data-connector-failed": true,
|
|
810
|
-
children: [
|
|
820
|
+
children: [(0, react_jsx_runtime.jsxs)("span", { children: [
|
|
811
821
|
t("connector.failed"),
|
|
812
822
|
":",
|
|
813
823
|
state.message
|
|
814
|
-
] }),
|
|
824
|
+
] }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
815
825
|
variant: "outline",
|
|
816
826
|
size: "sm",
|
|
817
827
|
onClick: onRetry,
|
|
@@ -820,24 +830,24 @@ window.__ModuleLoader__.load({
|
|
|
820
830
|
});
|
|
821
831
|
const needle = query.trim().toLowerCase();
|
|
822
832
|
const connectors = state.catalogue.connectors.filter((connector) => matchesQuery(connector, needle));
|
|
823
|
-
return
|
|
833
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
824
834
|
className: SkillCenterPage_module_css_default.connectorTab,
|
|
825
835
|
"data-connector-catalogue": true,
|
|
826
836
|
"data-demo": state.catalogue.demo,
|
|
827
|
-
children: [state.catalogue.demo ?
|
|
837
|
+
children: [state.catalogue.demo ? (0, react_jsx_runtime.jsxs)("div", {
|
|
828
838
|
className: SkillCenterPage_module_css_default.connectorDemoNote,
|
|
829
839
|
role: "status",
|
|
830
|
-
children: [
|
|
840
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
831
841
|
className: SkillCenterPage_module_css_default.connectorDemoTag,
|
|
832
842
|
children: t("connector.demoTag")
|
|
833
843
|
}), t("connector.demo")]
|
|
834
|
-
}) : null, connectors.length === 0 ?
|
|
844
|
+
}) : null, connectors.length === 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
835
845
|
className: SkillCenterPage_module_css_default.status,
|
|
836
846
|
children: state.catalogue.connectors.length === 0 ? t("connector.empty") : t("connector.noMatches")
|
|
837
|
-
}) :
|
|
847
|
+
}) : (0, react_jsx_runtime.jsx)("div", {
|
|
838
848
|
className: SkillCenterPage_module_css_default.connectorGrid,
|
|
839
849
|
children: connectors.map((connector) => {
|
|
840
|
-
return
|
|
850
|
+
return (0, react_jsx_runtime.jsx)(ConnectorCard, {
|
|
841
851
|
connector,
|
|
842
852
|
busy: busyId === connector.id || busyId?.startsWith(connector.id + ":") === true,
|
|
843
853
|
t,
|
|
@@ -849,7 +859,16 @@ window.__ModuleLoader__.load({
|
|
|
849
859
|
});
|
|
850
860
|
}
|
|
851
861
|
//#endregion
|
|
852
|
-
//#region
|
|
862
|
+
//#region lib/types/client/scope.js
|
|
863
|
+
/**
|
|
864
|
+
* Visibility choices for publishing a skill to the plaza.
|
|
865
|
+
*
|
|
866
|
+
* DataOps owns roles and department membership; this module only maps the
|
|
867
|
+
* review-context answer to the options a given account may pick, and remembers
|
|
868
|
+
* the last choice per user. The backend still enforces every rule.
|
|
869
|
+
*
|
|
870
|
+
* @module @sparkelf/dsh-client-ui-skill-center/client/scope
|
|
871
|
+
*/
|
|
853
872
|
/** Read the identity the dataops-account plugin publishes. */
|
|
854
873
|
function readAccountIdentity() {
|
|
855
874
|
if (typeof window === "undefined") return void 0;
|
|
@@ -950,7 +969,7 @@ window.__ModuleLoader__.load({
|
|
|
950
969
|
} catch {}
|
|
951
970
|
}
|
|
952
971
|
//#endregion
|
|
953
|
-
//#region
|
|
972
|
+
//#region lib/types/client/SkillCenterPage.js
|
|
954
973
|
/**
|
|
955
974
|
* Skill center page. Browses the loaded skills grouped by source, toggles model
|
|
956
975
|
* invocation, creates a skill, and deletes one into a recoverable trash.
|
|
@@ -968,9 +987,9 @@ window.__ModuleLoader__.load({
|
|
|
968
987
|
* @returns the labelled field.
|
|
969
988
|
*/
|
|
970
989
|
function DraftField({ label, children }) {
|
|
971
|
-
return
|
|
990
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
972
991
|
className: SkillCenterPage_module_css_default.field,
|
|
973
|
-
children: [
|
|
992
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
974
993
|
className: SkillCenterPage_module_css_default.fieldLabel,
|
|
975
994
|
children: label
|
|
976
995
|
}), children]
|
|
@@ -1029,33 +1048,33 @@ window.__ModuleLoader__.load({
|
|
|
1029
1048
|
key: "detail.path",
|
|
1030
1049
|
value: skill.path
|
|
1031
1050
|
});
|
|
1032
|
-
return
|
|
1051
|
+
return (0, react_jsx_runtime.jsxs)("li", {
|
|
1033
1052
|
className: foreign ? SkillCenterPage_module_css_default.card + " " + SkillCenterPage_module_css_default.cardForeign : SkillCenterPage_module_css_default.card,
|
|
1034
1053
|
"data-skill-name": skill.name,
|
|
1035
1054
|
"data-plaza-status": share.status,
|
|
1036
1055
|
children: [
|
|
1037
|
-
|
|
1056
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1038
1057
|
className: SkillCenterPage_module_css_default.cardHead,
|
|
1039
|
-
children: [
|
|
1058
|
+
children: [(0, react_jsx_runtime.jsx)("span", {
|
|
1040
1059
|
className: SkillCenterPage_module_css_default.cardIcon,
|
|
1041
|
-
children:
|
|
1042
|
-
}),
|
|
1060
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size: 16 })
|
|
1061
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
1043
1062
|
className: SkillCenterPage_module_css_default.cardTitleRow,
|
|
1044
1063
|
children: [
|
|
1045
|
-
|
|
1064
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
1046
1065
|
className: SkillCenterPage_module_css_default.cardTitle,
|
|
1047
1066
|
children: skill.i18n?.title ?? skill.name
|
|
1048
1067
|
}),
|
|
1049
|
-
skill.workspaceName === void 0 ? null :
|
|
1068
|
+
skill.workspaceName === void 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
1050
1069
|
className: SkillCenterPage_module_css_default.workspaceBadge,
|
|
1051
1070
|
children: skill.workspaceName
|
|
1052
1071
|
}),
|
|
1053
|
-
|
|
1072
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1054
1073
|
className: SkillCenterPage_module_css_default.plazaBadge + " " + (share.status === "approved" ? SkillCenterPage_module_css_default.plazaBadgeApproved : share.status === "rejected" ? SkillCenterPage_module_css_default.plazaBadgeRejected : share.status === "pending" ? SkillCenterPage_module_css_default.plazaBadgePending : SkillCenterPage_module_css_default.plazaBadgeLocal),
|
|
1055
1074
|
"data-plaza-status": share.status,
|
|
1056
1075
|
children: shareLabel
|
|
1057
1076
|
}),
|
|
1058
|
-
share.status === "approved" ?
|
|
1077
|
+
share.status === "approved" ? (0, react_jsx_runtime.jsx)("span", {
|
|
1059
1078
|
className: SkillCenterPage_module_css_default.plazaSharedTag,
|
|
1060
1079
|
"data-plaza-shared": true,
|
|
1061
1080
|
children: t("plaza.sharedTag")
|
|
@@ -1063,14 +1082,14 @@ window.__ModuleLoader__.load({
|
|
|
1063
1082
|
]
|
|
1064
1083
|
})]
|
|
1065
1084
|
}),
|
|
1066
|
-
|
|
1085
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1067
1086
|
className: SkillCenterPage_module_css_default.cardBody,
|
|
1068
1087
|
children: [
|
|
1069
|
-
|
|
1088
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
1070
1089
|
className: SkillCenterPage_module_css_default.cardSummary,
|
|
1071
1090
|
children: skill.i18n?.summary ?? skill.description
|
|
1072
1091
|
}),
|
|
1073
|
-
share.status === "rejected" && share.record?.reviewNote !== void 0 ?
|
|
1092
|
+
share.status === "rejected" && share.record?.reviewNote !== void 0 ? (0, react_jsx_runtime.jsxs)("div", {
|
|
1074
1093
|
className: SkillCenterPage_module_css_default.plazaReason,
|
|
1075
1094
|
children: [
|
|
1076
1095
|
t("plaza.reason"),
|
|
@@ -1078,18 +1097,18 @@ window.__ModuleLoader__.load({
|
|
|
1078
1097
|
share.record.reviewNote
|
|
1079
1098
|
]
|
|
1080
1099
|
}) : null,
|
|
1081
|
-
|
|
1100
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1082
1101
|
className: SkillCenterPage_module_css_default.cardMarks,
|
|
1083
1102
|
children: [
|
|
1084
|
-
|
|
1103
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1085
1104
|
className: skill.modelInvocable ? SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOn : SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOff,
|
|
1086
1105
|
children: t("skill.modelInvocable")
|
|
1087
1106
|
}),
|
|
1088
|
-
|
|
1107
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1089
1108
|
className: skill.userInvocable ? SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOn : SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markOff,
|
|
1090
1109
|
children: t("skill.userInvocable")
|
|
1091
1110
|
}),
|
|
1092
|
-
skill.linked === true ?
|
|
1111
|
+
skill.linked === true ? (0, react_jsx_runtime.jsx)("span", {
|
|
1093
1112
|
className: SkillCenterPage_module_css_default.mark + " " + SkillCenterPage_module_css_default.markDanger,
|
|
1094
1113
|
children: t("skill.linked")
|
|
1095
1114
|
}) : null
|
|
@@ -1097,9 +1116,9 @@ window.__ModuleLoader__.load({
|
|
|
1097
1116
|
})
|
|
1098
1117
|
]
|
|
1099
1118
|
}),
|
|
1100
|
-
|
|
1119
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1101
1120
|
className: SkillCenterPage_module_css_default.cardEnd,
|
|
1102
|
-
children: [
|
|
1121
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
1103
1122
|
type: "button",
|
|
1104
1123
|
className: skill.modelInvocable ? SkillCenterPage_module_css_default.switch + " " + SkillCenterPage_module_css_default.switchOn : SkillCenterPage_module_css_default.switch,
|
|
1105
1124
|
"aria-label": skill.modelInvocable ? t("skill.disabled") : t("skill.enabled"),
|
|
@@ -1107,10 +1126,10 @@ window.__ModuleLoader__.load({
|
|
|
1107
1126
|
onClick: () => {
|
|
1108
1127
|
onToggle(skill, !skill.modelInvocable);
|
|
1109
1128
|
}
|
|
1110
|
-
}),
|
|
1129
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
1111
1130
|
className: SkillCenterPage_module_css_default.cardActions,
|
|
1112
1131
|
children: [
|
|
1113
|
-
canSubmit(share.status) ?
|
|
1132
|
+
canSubmit(share.status) ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1114
1133
|
variant: "primary",
|
|
1115
1134
|
size: "sm",
|
|
1116
1135
|
disabled: shareBusy || shareDisabled,
|
|
@@ -1119,7 +1138,7 @@ window.__ModuleLoader__.load({
|
|
|
1119
1138
|
},
|
|
1120
1139
|
children: share.status === "rejected" ? t("plaza.resubmit") : t("plaza.share")
|
|
1121
1140
|
}) : null,
|
|
1122
|
-
share.sharedByMe && share.record !== void 0 ?
|
|
1141
|
+
share.sharedByMe && share.record !== void 0 ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1123
1142
|
variant: "outline",
|
|
1124
1143
|
size: "sm",
|
|
1125
1144
|
disabled: shareBusy,
|
|
@@ -1128,7 +1147,7 @@ window.__ModuleLoader__.load({
|
|
|
1128
1147
|
},
|
|
1129
1148
|
children: t("plaza.unshare")
|
|
1130
1149
|
}) : null,
|
|
1131
|
-
skill.path === void 0 || skill.linked === true ? null :
|
|
1150
|
+
skill.path === void 0 || skill.linked === true ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1132
1151
|
variant: "outline",
|
|
1133
1152
|
size: "sm",
|
|
1134
1153
|
onClick: () => {
|
|
@@ -1136,7 +1155,7 @@ window.__ModuleLoader__.load({
|
|
|
1136
1155
|
},
|
|
1137
1156
|
children: t("action.delete")
|
|
1138
1157
|
}),
|
|
1139
|
-
|
|
1158
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1140
1159
|
variant: "outline",
|
|
1141
1160
|
size: "sm",
|
|
1142
1161
|
onClick: () => {
|
|
@@ -1147,7 +1166,7 @@ window.__ModuleLoader__.load({
|
|
|
1147
1166
|
]
|
|
1148
1167
|
})]
|
|
1149
1168
|
}),
|
|
1150
|
-
|
|
1169
|
+
(0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
1151
1170
|
open,
|
|
1152
1171
|
onClose: () => {
|
|
1153
1172
|
setOpen(false);
|
|
@@ -1155,37 +1174,37 @@ window.__ModuleLoader__.load({
|
|
|
1155
1174
|
title: skill.name,
|
|
1156
1175
|
closeLabel: t("action.close"),
|
|
1157
1176
|
className: SkillCenterPage_module_css_default.dialog,
|
|
1158
|
-
footer:
|
|
1177
|
+
footer: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1159
1178
|
variant: "outline",
|
|
1160
1179
|
onClick: () => {
|
|
1161
1180
|
setOpen(false);
|
|
1162
1181
|
},
|
|
1163
1182
|
children: t("action.close")
|
|
1164
1183
|
}),
|
|
1165
|
-
children: [
|
|
1184
|
+
children: [(0, react_jsx_runtime.jsx)("dl", {
|
|
1166
1185
|
className: SkillCenterPage_module_css_default.detail,
|
|
1167
|
-
children: details.map((item) =>
|
|
1186
|
+
children: details.map((item) => (0, react_jsx_runtime.jsxs)("div", {
|
|
1168
1187
|
className: SkillCenterPage_module_css_default.detailRow,
|
|
1169
|
-
children: [
|
|
1188
|
+
children: [(0, react_jsx_runtime.jsx)("dt", {
|
|
1170
1189
|
className: SkillCenterPage_module_css_default.detailLabel,
|
|
1171
1190
|
children: t(item.key)
|
|
1172
|
-
}),
|
|
1191
|
+
}), (0, react_jsx_runtime.jsx)("dd", {
|
|
1173
1192
|
className: SkillCenterPage_module_css_default.detailValue,
|
|
1174
1193
|
children: item.value
|
|
1175
1194
|
})]
|
|
1176
1195
|
}, item.key))
|
|
1177
|
-
}),
|
|
1196
|
+
}), (0, react_jsx_runtime.jsxs)("section", {
|
|
1178
1197
|
className: SkillCenterPage_module_css_default.body,
|
|
1179
1198
|
children: [
|
|
1180
|
-
|
|
1199
|
+
(0, react_jsx_runtime.jsx)("h3", {
|
|
1181
1200
|
className: SkillCenterPage_module_css_default.bodyLabel,
|
|
1182
1201
|
children: t("detail.content")
|
|
1183
1202
|
}),
|
|
1184
|
-
body.kind === "loading" ?
|
|
1203
|
+
body.kind === "loading" ? (0, react_jsx_runtime.jsx)("p", {
|
|
1185
1204
|
className: SkillCenterPage_module_css_default.bodyStatus,
|
|
1186
1205
|
children: t("content.loading")
|
|
1187
1206
|
}) : null,
|
|
1188
|
-
body.kind === "failed" ?
|
|
1207
|
+
body.kind === "failed" ? (0, react_jsx_runtime.jsxs)("p", {
|
|
1189
1208
|
className: SkillCenterPage_module_css_default.bodyError,
|
|
1190
1209
|
children: [
|
|
1191
1210
|
t("content.failed"),
|
|
@@ -1193,7 +1212,7 @@ window.__ModuleLoader__.load({
|
|
|
1193
1212
|
body.message
|
|
1194
1213
|
]
|
|
1195
1214
|
}) : null,
|
|
1196
|
-
body.kind === "ready" ?
|
|
1215
|
+
body.kind === "ready" ? (0, react_jsx_runtime.jsx)("pre", {
|
|
1197
1216
|
className: SkillCenterPage_module_css_default.bodyPre,
|
|
1198
1217
|
"data-skill-body": skill.name,
|
|
1199
1218
|
children: body.content
|
|
@@ -1592,19 +1611,19 @@ window.__ModuleLoader__.load({
|
|
|
1592
1611
|
]);
|
|
1593
1612
|
const visibleGroups = tab === "builtin" ? builtinGroups : personalGroups;
|
|
1594
1613
|
const visibleTotal = countOf(visibleGroups);
|
|
1595
|
-
return
|
|
1614
|
+
return (0, react_jsx_runtime.jsx)("div", {
|
|
1596
1615
|
className: SkillCenterPage_module_css_default.page,
|
|
1597
|
-
children:
|
|
1616
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
1598
1617
|
className: SkillCenterPage_module_css_default.pageContent,
|
|
1599
1618
|
children: [
|
|
1600
|
-
|
|
1619
|
+
(0, react_jsx_runtime.jsxs)("header", {
|
|
1601
1620
|
className: SkillCenterPage_module_css_default.pageHead,
|
|
1602
|
-
children: [
|
|
1621
|
+
children: [(0, react_jsx_runtime.jsx)("h1", {
|
|
1603
1622
|
className: SkillCenterPage_module_css_default.pageTitle,
|
|
1604
1623
|
children: t("panel")
|
|
1605
|
-
}),
|
|
1624
|
+
}), (0, react_jsx_runtime.jsxs)("div", {
|
|
1606
1625
|
className: SkillCenterPage_module_css_default.toolbar,
|
|
1607
|
-
children: [
|
|
1626
|
+
children: [(0, react_jsx_runtime.jsx)("button", {
|
|
1608
1627
|
type: "button",
|
|
1609
1628
|
className: SkillCenterPage_module_css_default.iconButton,
|
|
1610
1629
|
"aria-label": t("action.refresh"),
|
|
@@ -1612,15 +1631,15 @@ window.__ModuleLoader__.load({
|
|
|
1612
1631
|
onClick: () => {
|
|
1613
1632
|
load();
|
|
1614
1633
|
},
|
|
1615
|
-
children:
|
|
1634
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
1616
1635
|
className: SkillCenterPage_module_css_default.iconWrap,
|
|
1617
1636
|
"aria-hidden": "true",
|
|
1618
|
-
children:
|
|
1637
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, {})
|
|
1619
1638
|
})
|
|
1620
|
-
}),
|
|
1639
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1621
1640
|
variant: "primary",
|
|
1622
1641
|
size: "sm",
|
|
1623
|
-
icon:
|
|
1642
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPlusOutlineRegular, { size: 13 }),
|
|
1624
1643
|
onClick: () => {
|
|
1625
1644
|
setCreating((v) => !v);
|
|
1626
1645
|
},
|
|
@@ -1628,11 +1647,11 @@ window.__ModuleLoader__.load({
|
|
|
1628
1647
|
})]
|
|
1629
1648
|
})]
|
|
1630
1649
|
}),
|
|
1631
|
-
|
|
1650
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
1632
1651
|
className: SkillCenterPage_module_css_default.tabs,
|
|
1633
1652
|
role: "tablist",
|
|
1634
1653
|
"aria-label": t("tab.label"),
|
|
1635
|
-
children: tabRows.map((row) =>
|
|
1654
|
+
children: tabRows.map((row) => (0, react_jsx_runtime.jsxs)("button", {
|
|
1636
1655
|
type: "button",
|
|
1637
1656
|
role: "tab",
|
|
1638
1657
|
id: "skill-center-tab-" + row.value,
|
|
@@ -1644,13 +1663,13 @@ window.__ModuleLoader__.load({
|
|
|
1644
1663
|
setTab(row.value);
|
|
1645
1664
|
if (row.value === "connectors" && connectors.kind === "failed") loadConnectors();
|
|
1646
1665
|
},
|
|
1647
|
-
children: [row.label, row.count === 0 ? null :
|
|
1666
|
+
children: [row.label, row.count === 0 ? null : (0, react_jsx_runtime.jsx)("span", {
|
|
1648
1667
|
className: SkillCenterPage_module_css_default.tabCount,
|
|
1649
1668
|
children: row.count
|
|
1650
1669
|
})]
|
|
1651
1670
|
}, row.value))
|
|
1652
1671
|
}),
|
|
1653
|
-
|
|
1672
|
+
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
1654
1673
|
open: creating,
|
|
1655
1674
|
onClose: () => {
|
|
1656
1675
|
setCreating(false);
|
|
@@ -1658,58 +1677,58 @@ window.__ModuleLoader__.load({
|
|
|
1658
1677
|
title: t("create.title"),
|
|
1659
1678
|
closeLabel: t("action.cancel"),
|
|
1660
1679
|
className: SkillCenterPage_module_css_default.dialog,
|
|
1661
|
-
footer:
|
|
1680
|
+
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1662
1681
|
variant: "outline",
|
|
1663
1682
|
autoFocus: true,
|
|
1664
1683
|
onClick: () => {
|
|
1665
1684
|
setCreating(false);
|
|
1666
1685
|
},
|
|
1667
1686
|
children: t("action.cancel")
|
|
1668
|
-
}),
|
|
1687
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1669
1688
|
variant: "primary",
|
|
1670
1689
|
onClick: () => {
|
|
1671
1690
|
submit();
|
|
1672
1691
|
},
|
|
1673
1692
|
children: t("action.confirm")
|
|
1674
1693
|
})] }),
|
|
1675
|
-
children:
|
|
1694
|
+
children: (0, react_jsx_runtime.jsxs)("div", {
|
|
1676
1695
|
className: SkillCenterPage_module_css_default.form,
|
|
1677
1696
|
children: [
|
|
1678
|
-
|
|
1697
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1679
1698
|
label: t("create.name"),
|
|
1680
|
-
children:
|
|
1699
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
1681
1700
|
className: SkillCenterPage_module_css_default.input,
|
|
1682
1701
|
value: draft.name,
|
|
1683
1702
|
onChange: set("name")
|
|
1684
1703
|
})
|
|
1685
1704
|
}),
|
|
1686
|
-
|
|
1705
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1687
1706
|
label: t("create.description"),
|
|
1688
|
-
children:
|
|
1707
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
1689
1708
|
className: SkillCenterPage_module_css_default.input,
|
|
1690
1709
|
value: draft.description,
|
|
1691
1710
|
onChange: set("description")
|
|
1692
1711
|
})
|
|
1693
1712
|
}),
|
|
1694
|
-
|
|
1713
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1695
1714
|
label: t("create.whenToUse"),
|
|
1696
|
-
children:
|
|
1715
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
1697
1716
|
className: SkillCenterPage_module_css_default.input,
|
|
1698
1717
|
value: draft.whenToUse,
|
|
1699
1718
|
onChange: set("whenToUse")
|
|
1700
1719
|
})
|
|
1701
1720
|
}),
|
|
1702
|
-
|
|
1721
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1703
1722
|
label: t("create.content"),
|
|
1704
|
-
children:
|
|
1723
|
+
children: (0, react_jsx_runtime.jsx)("textarea", {
|
|
1705
1724
|
className: SkillCenterPage_module_css_default.textarea,
|
|
1706
1725
|
value: draft.content,
|
|
1707
1726
|
onChange: set("content")
|
|
1708
1727
|
})
|
|
1709
1728
|
}),
|
|
1710
|
-
|
|
1729
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1711
1730
|
label: t("create.root"),
|
|
1712
|
-
children:
|
|
1731
|
+
children: (0, react_jsx_runtime.jsxs)("select", {
|
|
1713
1732
|
className: SkillCenterPage_module_css_default.input,
|
|
1714
1733
|
value: draft.root,
|
|
1715
1734
|
onChange: (e) => {
|
|
@@ -1718,10 +1737,10 @@ window.__ModuleLoader__.load({
|
|
|
1718
1737
|
root: e.target.value === "project" ? "project" : "user"
|
|
1719
1738
|
}));
|
|
1720
1739
|
},
|
|
1721
|
-
children: [
|
|
1740
|
+
children: [(0, react_jsx_runtime.jsx)("option", {
|
|
1722
1741
|
value: "user",
|
|
1723
1742
|
children: t("create.rootUser")
|
|
1724
|
-
}),
|
|
1743
|
+
}), (0, react_jsx_runtime.jsx)("option", {
|
|
1725
1744
|
value: "project",
|
|
1726
1745
|
children: t("create.rootProject")
|
|
1727
1746
|
})]
|
|
@@ -1730,52 +1749,52 @@ window.__ModuleLoader__.load({
|
|
|
1730
1749
|
]
|
|
1731
1750
|
})
|
|
1732
1751
|
}),
|
|
1733
|
-
|
|
1752
|
+
(0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
1734
1753
|
open: shareTarget !== null,
|
|
1735
1754
|
onClose: closeShare,
|
|
1736
1755
|
title: t("plaza.dialogTitle"),
|
|
1737
1756
|
headless: true,
|
|
1738
1757
|
className: SkillCenterPage_module_css_default.publishDialog,
|
|
1739
1758
|
children: [
|
|
1740
|
-
|
|
1759
|
+
(0, react_jsx_runtime.jsxs)("header", {
|
|
1741
1760
|
className: SkillCenterPage_module_css_default.dialogHeader,
|
|
1742
|
-
children: [
|
|
1761
|
+
children: [(0, react_jsx_runtime.jsx)("h2", {
|
|
1743
1762
|
className: SkillCenterPage_module_css_default.dialogTitle,
|
|
1744
1763
|
children: t("plaza.dialogTitle")
|
|
1745
|
-
}),
|
|
1764
|
+
}), (0, react_jsx_runtime.jsx)("button", {
|
|
1746
1765
|
type: "button",
|
|
1747
1766
|
className: SkillCenterPage_module_css_default.dialogClose,
|
|
1748
1767
|
"aria-label": t("action.close"),
|
|
1749
1768
|
onClick: closeShare,
|
|
1750
|
-
children:
|
|
1769
|
+
children: (0, react_jsx_runtime.jsx)(CloseGlyph, { size: 14 })
|
|
1751
1770
|
})]
|
|
1752
1771
|
}),
|
|
1753
|
-
|
|
1772
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
1754
1773
|
className: SkillCenterPage_module_css_default.dialogBody,
|
|
1755
1774
|
"data-publish-body": true,
|
|
1756
|
-
children: shareTarget === null ? null :
|
|
1775
|
+
children: shareTarget === null ? null : (0, react_jsx_runtime.jsxs)("div", {
|
|
1757
1776
|
className: SkillCenterPage_module_css_default.form,
|
|
1758
1777
|
"data-share-dialog": shareTarget.name,
|
|
1759
1778
|
children: [
|
|
1760
|
-
|
|
1779
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1761
1780
|
label: t("create.name"),
|
|
1762
|
-
children:
|
|
1781
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
1763
1782
|
className: SkillCenterPage_module_css_default.input,
|
|
1764
1783
|
value: shareTarget.name,
|
|
1765
1784
|
readOnly: true
|
|
1766
1785
|
})
|
|
1767
1786
|
}),
|
|
1768
|
-
|
|
1787
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1769
1788
|
label: t("create.description"),
|
|
1770
|
-
children:
|
|
1789
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
1771
1790
|
className: SkillCenterPage_module_css_default.input,
|
|
1772
1791
|
value: shareTarget.description,
|
|
1773
1792
|
readOnly: true
|
|
1774
1793
|
})
|
|
1775
1794
|
}),
|
|
1776
|
-
|
|
1795
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1777
1796
|
label: t("plaza.tags"),
|
|
1778
|
-
children:
|
|
1797
|
+
children: (0, react_jsx_runtime.jsx)("input", {
|
|
1779
1798
|
className: SkillCenterPage_module_css_default.input,
|
|
1780
1799
|
value: shareTags,
|
|
1781
1800
|
placeholder: t("plaza.tagsPlaceholder"),
|
|
@@ -1784,9 +1803,9 @@ window.__ModuleLoader__.load({
|
|
|
1784
1803
|
}
|
|
1785
1804
|
})
|
|
1786
1805
|
}),
|
|
1787
|
-
|
|
1806
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1788
1807
|
label: t("plaza.visibility"),
|
|
1789
|
-
children:
|
|
1808
|
+
children: (0, react_jsx_runtime.jsxs)("select", {
|
|
1790
1809
|
className: SkillCenterPage_module_css_default.input,
|
|
1791
1810
|
value: shareVisibility,
|
|
1792
1811
|
"data-share-visibility": true,
|
|
@@ -1796,24 +1815,24 @@ window.__ModuleLoader__.load({
|
|
|
1796
1815
|
if (visibility === "department") setShareDepartment(shareDepartment ?? ownCode ?? selectableDepartments[0]?.code);
|
|
1797
1816
|
},
|
|
1798
1817
|
children: [
|
|
1799
|
-
visibilityOptions.includes("global") ?
|
|
1818
|
+
visibilityOptions.includes("global") ? (0, react_jsx_runtime.jsx)("option", {
|
|
1800
1819
|
value: "global",
|
|
1801
1820
|
children: t("plaza.visibilityGlobal")
|
|
1802
1821
|
}) : null,
|
|
1803
|
-
visibilityOptions.includes("department") ?
|
|
1822
|
+
visibilityOptions.includes("department") ? (0, react_jsx_runtime.jsx)("option", {
|
|
1804
1823
|
value: "department",
|
|
1805
1824
|
children: t("plaza.visibilityDepartment")
|
|
1806
1825
|
}) : null,
|
|
1807
|
-
|
|
1826
|
+
(0, react_jsx_runtime.jsx)("option", {
|
|
1808
1827
|
value: "private",
|
|
1809
1828
|
children: t("plaza.visibilityPrivate")
|
|
1810
1829
|
})
|
|
1811
1830
|
]
|
|
1812
1831
|
})
|
|
1813
1832
|
}),
|
|
1814
|
-
shareVisibility === "department" ?
|
|
1833
|
+
shareVisibility === "department" ? (0, react_jsx_runtime.jsx)(DraftField, {
|
|
1815
1834
|
label: t("plaza.department"),
|
|
1816
|
-
children:
|
|
1835
|
+
children: (0, react_jsx_runtime.jsx)("select", {
|
|
1817
1836
|
className: SkillCenterPage_module_css_default.input,
|
|
1818
1837
|
value: shareDepartment ?? selectableDepartments[0]?.code ?? "",
|
|
1819
1838
|
"data-share-department": true,
|
|
@@ -1821,19 +1840,19 @@ window.__ModuleLoader__.load({
|
|
|
1821
1840
|
onChange: (event) => {
|
|
1822
1841
|
setShareDepartment(event.target.value);
|
|
1823
1842
|
},
|
|
1824
|
-
children: selectableDepartments.map((department) =>
|
|
1843
|
+
children: selectableDepartments.map((department) => (0, react_jsx_runtime.jsx)("option", {
|
|
1825
1844
|
value: department.code,
|
|
1826
1845
|
children: department.name
|
|
1827
1846
|
}, department.code))
|
|
1828
1847
|
})
|
|
1829
1848
|
}) : null,
|
|
1830
|
-
|
|
1849
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
1831
1850
|
className: SkillCenterPage_module_css_default.plazaScopeHint,
|
|
1832
1851
|
children: role === "admin" ? t("plaza.scopeHintAdmin") : t("plaza.scopeHintUser")
|
|
1833
1852
|
}),
|
|
1834
|
-
|
|
1853
|
+
(0, react_jsx_runtime.jsx)(DraftField, {
|
|
1835
1854
|
label: t("plaza.instruction"),
|
|
1836
|
-
children:
|
|
1855
|
+
children: (0, react_jsx_runtime.jsx)("textarea", {
|
|
1837
1856
|
className: SkillCenterPage_module_css_default.textarea,
|
|
1838
1857
|
value: shareInstruction,
|
|
1839
1858
|
readOnly: shareLoading,
|
|
@@ -1843,7 +1862,7 @@ window.__ModuleLoader__.load({
|
|
|
1843
1862
|
}
|
|
1844
1863
|
})
|
|
1845
1864
|
}),
|
|
1846
|
-
shareError === null ? null :
|
|
1865
|
+
shareError === null ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
1847
1866
|
className: SkillCenterPage_module_css_default.status + " " + SkillCenterPage_module_css_default.statusError,
|
|
1848
1867
|
role: "alert",
|
|
1849
1868
|
children: shareError
|
|
@@ -1851,14 +1870,14 @@ window.__ModuleLoader__.load({
|
|
|
1851
1870
|
]
|
|
1852
1871
|
})
|
|
1853
1872
|
}),
|
|
1854
|
-
|
|
1873
|
+
(0, react_jsx_runtime.jsxs)("footer", {
|
|
1855
1874
|
className: SkillCenterPage_module_css_default.dialogFooter,
|
|
1856
|
-
children: [
|
|
1875
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1857
1876
|
variant: "outline",
|
|
1858
1877
|
disabled: shareBusy,
|
|
1859
1878
|
onClick: closeShare,
|
|
1860
1879
|
children: t("action.cancel")
|
|
1861
|
-
}),
|
|
1880
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1862
1881
|
variant: "primary",
|
|
1863
1882
|
disabled: shareBusy || shareLoading,
|
|
1864
1883
|
onClick: () => {
|
|
@@ -1869,59 +1888,59 @@ window.__ModuleLoader__.load({
|
|
|
1869
1888
|
})
|
|
1870
1889
|
]
|
|
1871
1890
|
}),
|
|
1872
|
-
|
|
1891
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1873
1892
|
className: SkillCenterPage_module_css_default.searchField,
|
|
1874
|
-
children: [
|
|
1893
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, {
|
|
1875
1894
|
type: "search",
|
|
1876
|
-
icon:
|
|
1895
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, {}),
|
|
1877
1896
|
placeholder: tab === "connectors" ? t("search.connectorPlaceholder") : t("search.placeholder"),
|
|
1878
1897
|
"aria-label": tab === "connectors" ? t("search.connectorPlaceholder") : t("search.placeholder"),
|
|
1879
1898
|
value: query,
|
|
1880
1899
|
onChange: (e) => {
|
|
1881
1900
|
setQuery(e.target.value);
|
|
1882
1901
|
}
|
|
1883
|
-
}), query === "" ? null :
|
|
1902
|
+
}), query === "" ? null : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1884
1903
|
size: "sm",
|
|
1885
1904
|
variant: "ghost",
|
|
1886
1905
|
className: SkillCenterPage_module_css_default.searchClear,
|
|
1887
1906
|
"aria-label": t("search.clear"),
|
|
1888
|
-
icon:
|
|
1907
|
+
icon: (0, react_jsx_runtime.jsx)(CloseGlyph, {}),
|
|
1889
1908
|
onClick: () => {
|
|
1890
1909
|
setQuery("");
|
|
1891
1910
|
}
|
|
1892
1911
|
})]
|
|
1893
1912
|
}),
|
|
1894
|
-
tab !== "connectors" && plaza.kind === "unavailable" ?
|
|
1913
|
+
tab !== "connectors" && plaza.kind === "unavailable" ? (0, react_jsx_runtime.jsx)("div", {
|
|
1895
1914
|
className: SkillCenterPage_module_css_default.status,
|
|
1896
1915
|
role: "status",
|
|
1897
1916
|
"data-plaza-unavailable": true,
|
|
1898
1917
|
children: t("plaza.unavailable")
|
|
1899
1918
|
}) : null,
|
|
1900
|
-
shareError !== null && shareTarget === null ?
|
|
1919
|
+
shareError !== null && shareTarget === null ? (0, react_jsx_runtime.jsx)("div", {
|
|
1901
1920
|
className: SkillCenterPage_module_css_default.status + " " + SkillCenterPage_module_css_default.statusError,
|
|
1902
1921
|
role: "alert",
|
|
1903
1922
|
children: shareError
|
|
1904
1923
|
}) : null,
|
|
1905
|
-
connectorNotice === null ? null :
|
|
1924
|
+
connectorNotice === null ? null : (0, react_jsx_runtime.jsx)("div", {
|
|
1906
1925
|
className: SkillCenterPage_module_css_default.status + " " + SkillCenterPage_module_css_default.statusError,
|
|
1907
1926
|
role: "alert",
|
|
1908
1927
|
children: connectorNotice
|
|
1909
1928
|
}),
|
|
1910
|
-
(tab === "builtin" || tab === "personal") && progress !== void 0 && progress.done < progress.total ?
|
|
1929
|
+
(tab === "builtin" || tab === "personal") && progress !== void 0 && progress.done < progress.total ? (0, react_jsx_runtime.jsxs)("div", {
|
|
1911
1930
|
className: SkillCenterPage_module_css_default.progressRow,
|
|
1912
1931
|
children: [
|
|
1913
|
-
|
|
1932
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1914
1933
|
className: SkillCenterPage_module_css_default.progressLabel,
|
|
1915
1934
|
children: t("translate.label")
|
|
1916
1935
|
}),
|
|
1917
|
-
|
|
1936
|
+
(0, react_jsx_runtime.jsx)("span", {
|
|
1918
1937
|
className: SkillCenterPage_module_css_default.progressTrack,
|
|
1919
|
-
children:
|
|
1938
|
+
children: (0, react_jsx_runtime.jsx)("span", {
|
|
1920
1939
|
className: SkillCenterPage_module_css_default.progressFill,
|
|
1921
1940
|
style: { width: String(progress.total === 0 ? 0 : Math.round(progress.done / progress.total * 100)) + "%" }
|
|
1922
1941
|
})
|
|
1923
1942
|
}),
|
|
1924
|
-
|
|
1943
|
+
(0, react_jsx_runtime.jsxs)("span", {
|
|
1925
1944
|
className: SkillCenterPage_module_css_default.progressCount,
|
|
1926
1945
|
children: [
|
|
1927
1946
|
progress.done,
|
|
@@ -1931,19 +1950,19 @@ window.__ModuleLoader__.load({
|
|
|
1931
1950
|
})
|
|
1932
1951
|
]
|
|
1933
1952
|
}) : null,
|
|
1934
|
-
|
|
1953
|
+
(0, react_jsx_runtime.jsxs)("div", {
|
|
1935
1954
|
className: SkillCenterPage_module_css_default.tabPanel,
|
|
1936
1955
|
id: "skill-center-panel-" + tab,
|
|
1937
1956
|
role: "tabpanel",
|
|
1938
1957
|
"aria-labelledby": "skill-center-tab-" + tab,
|
|
1939
1958
|
"data-tab-panel": tab,
|
|
1940
1959
|
children: [
|
|
1941
|
-
tab === "builtin" || tab === "personal" ?
|
|
1942
|
-
state.kind === "loading" ?
|
|
1960
|
+
tab === "builtin" || tab === "personal" ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
1961
|
+
state.kind === "loading" ? (0, react_jsx_runtime.jsx)("div", {
|
|
1943
1962
|
className: SkillCenterPage_module_css_default.status,
|
|
1944
1963
|
children: t("state.loading")
|
|
1945
1964
|
}) : null,
|
|
1946
|
-
state.kind === "failed" ?
|
|
1965
|
+
state.kind === "failed" ? (0, react_jsx_runtime.jsxs)("div", {
|
|
1947
1966
|
className: SkillCenterPage_module_css_default.status + " " + SkillCenterPage_module_css_default.statusError,
|
|
1948
1967
|
children: [
|
|
1949
1968
|
t("state.failed"),
|
|
@@ -1951,21 +1970,21 @@ window.__ModuleLoader__.load({
|
|
|
1951
1970
|
state.message
|
|
1952
1971
|
]
|
|
1953
1972
|
}) : null,
|
|
1954
|
-
state.kind === "ready" && visibleTotal === 0 ?
|
|
1973
|
+
state.kind === "ready" && visibleTotal === 0 ? (0, react_jsx_runtime.jsx)("div", {
|
|
1955
1974
|
className: SkillCenterPage_module_css_default.status,
|
|
1956
1975
|
children: query.trim() === "" ? t("state.empty") : t("search.noMatches")
|
|
1957
1976
|
}) : null,
|
|
1958
|
-
visibleGroups.map((group) =>
|
|
1977
|
+
visibleGroups.map((group) => (0, react_jsx_runtime.jsxs)("div", {
|
|
1959
1978
|
className: SkillCenterPage_module_css_default.group,
|
|
1960
|
-
children: [
|
|
1979
|
+
children: [(0, react_jsx_runtime.jsxs)("h2", {
|
|
1961
1980
|
className: SkillCenterPage_module_css_default.groupTitle,
|
|
1962
|
-
children: [group.title,
|
|
1981
|
+
children: [group.title, (0, react_jsx_runtime.jsx)("span", {
|
|
1963
1982
|
className: SkillCenterPage_module_css_default.groupCount,
|
|
1964
1983
|
children: group.skills.length
|
|
1965
1984
|
})]
|
|
1966
|
-
}),
|
|
1985
|
+
}), (0, react_jsx_runtime.jsx)("ul", {
|
|
1967
1986
|
className: SkillCenterPage_module_css_default.cards,
|
|
1968
|
-
children: group.skills.map((skill) =>
|
|
1987
|
+
children: group.skills.map((skill) => (0, react_jsx_runtime.jsx)(SkillCard, {
|
|
1969
1988
|
skill,
|
|
1970
1989
|
api,
|
|
1971
1990
|
cwd: state.kind === "ready" ? state.payload.cwd : scope,
|
|
@@ -1987,15 +2006,15 @@ window.__ModuleLoader__.load({
|
|
|
1987
2006
|
})]
|
|
1988
2007
|
}, group.key))
|
|
1989
2008
|
] }) : null,
|
|
1990
|
-
tab === "plaza" ?
|
|
2009
|
+
tab === "plaza" ? (0, react_jsx_runtime.jsx)("div", {
|
|
1991
2010
|
className: SkillCenterPage_module_css_default.plazaPanel,
|
|
1992
2011
|
"data-plaza-panel": true,
|
|
1993
|
-
children: renderSlot("skill-center.section", { query }, { fallback:
|
|
2012
|
+
children: renderSlot("skill-center.section", { query }, { fallback: (0, react_jsx_runtime.jsx)("div", {
|
|
1994
2013
|
className: SkillCenterPage_module_css_default.status,
|
|
1995
2014
|
children: t("plaza.sectionFallback")
|
|
1996
2015
|
}) })
|
|
1997
2016
|
}) : null,
|
|
1998
|
-
tab === "connectors" ?
|
|
2017
|
+
tab === "connectors" ? (0, react_jsx_runtime.jsx)(ConnectorsTab, {
|
|
1999
2018
|
state: connectors,
|
|
2000
2019
|
query,
|
|
2001
2020
|
busyId: connectorBusyId,
|
|
@@ -2017,17 +2036,23 @@ window.__ModuleLoader__.load({
|
|
|
2017
2036
|
});
|
|
2018
2037
|
}
|
|
2019
2038
|
//#endregion
|
|
2020
|
-
//#region
|
|
2039
|
+
//#region lib/types/client/SkillCenterPanelIcon.js
|
|
2021
2040
|
/**
|
|
2022
2041
|
* Render the glyph at the size the sidebar asks for.
|
|
2023
2042
|
* @param props - the sidebar's icon share: requested edge and selected state.
|
|
2024
2043
|
* @returns the icon element.
|
|
2025
2044
|
*/
|
|
2026
2045
|
function SkillCenterPanelIcon({ size }) {
|
|
2027
|
-
return
|
|
2046
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size });
|
|
2028
2047
|
}
|
|
2029
2048
|
//#endregion
|
|
2030
|
-
//#region
|
|
2049
|
+
//#region lib/types/client/locales.js
|
|
2050
|
+
/**
|
|
2051
|
+
* Skill center dictionaries. Keys are typed so the panel and the sidebar entry
|
|
2052
|
+
* cannot reference a string that does not exist in both languages.
|
|
2053
|
+
*
|
|
2054
|
+
* @module @sparkelf/dsh-client-ui-skill-center/client/locales
|
|
2055
|
+
*/
|
|
2031
2056
|
/** Simplified Chinese dictionary. */
|
|
2032
2057
|
const zh = {
|
|
2033
2058
|
"panel": "技能中心",
|
|
@@ -2205,7 +2230,7 @@ window.__ModuleLoader__.load({
|
|
|
2205
2230
|
"connector.busy": "Working…"
|
|
2206
2231
|
};
|
|
2207
2232
|
//#endregion
|
|
2208
|
-
//#region
|
|
2233
|
+
//#region lib/types/client/index.js
|
|
2209
2234
|
/** Dictionary namespace owned by this plugin. */
|
|
2210
2235
|
const NS = "skillCenter";
|
|
2211
2236
|
/** The id shared by the sidebar entry and the main panel it opens. */
|
|
@@ -87,7 +87,6 @@ export interface SkillCenterLocale {
|
|
|
87
87
|
'connector.enable': string;
|
|
88
88
|
'connector.disable': string;
|
|
89
89
|
'connector.capabilities': string;
|
|
90
|
-
'connector.noCapabilities': string;
|
|
91
90
|
'connector.empty': string;
|
|
92
91
|
'connector.noMatches': string;
|
|
93
92
|
'connector.unavailable': string;
|
package/package.json
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@sparkelf/dsh-client-ui-skill-center",
|
|
3
|
-
"version": "0.2.2-alpha.2.5",
|
|
4
2
|
"description": "Skill center for the dsh web client: browses loaded skills grouped by source, enables or disables model invocation, creates skills, and deletes them into a recoverable trash",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
"./client": {
|
|
22
|
-
"types": "./lib/types/client/index.d.ts",
|
|
23
|
-
"default": "./lib/client.js"
|
|
24
|
-
},
|
|
25
|
-
"./package.json": "./package.json"
|
|
3
|
+
"devDependencies": {
|
|
4
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
5
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.6-alpha.1",
|
|
6
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.6-alpha.1",
|
|
7
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.6-alpha.1",
|
|
8
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.1",
|
|
9
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.6-alpha.1",
|
|
10
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.1",
|
|
11
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.6-alpha.1",
|
|
12
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
13
|
+
"@deepseek-ai/dsh-skill": "^0.1.6-alpha.1",
|
|
14
|
+
"@types/react": "~18.3.1",
|
|
15
|
+
"@types/react-dom": "~18.3.0",
|
|
16
|
+
"react": "^18.2.0",
|
|
17
|
+
"react-dom": "^18.2.0"
|
|
26
18
|
},
|
|
27
19
|
"dsh": {
|
|
28
20
|
"client": {
|
|
@@ -33,9 +25,16 @@
|
|
|
33
25
|
"platform": "web"
|
|
34
26
|
}
|
|
35
27
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"default": "./lib/index.js",
|
|
31
|
+
"types": "./lib/types/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./client": {
|
|
34
|
+
"default": "./lib/client.js",
|
|
35
|
+
"types": "./lib/types/client/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
39
38
|
},
|
|
40
39
|
"files": [
|
|
41
40
|
"lib/index.js",
|
|
@@ -43,23 +42,24 @@
|
|
|
43
42
|
"lib/types/**/*.d.ts"
|
|
44
43
|
],
|
|
45
44
|
"license": "MIT",
|
|
45
|
+
"main": "lib/index.js",
|
|
46
|
+
"name": "@sparkelf/dsh-client-ui-skill-center",
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"@deepseek-ai/cordis": ">=4.0.1"
|
|
48
49
|
},
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"directory": "packages/plus/ui-skill-center",
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"bundle": "tsdown",
|
|
60
|
+
"watch": "tsdown --watch"
|
|
61
|
+
},
|
|
62
|
+
"type": "module",
|
|
63
|
+
"types": "lib/types/index.d.ts",
|
|
64
|
+
"version": "0.2.4-alpha.48"
|
|
65
65
|
}
|