dsh-mcp-ops 0.2.0 → 0.2.1
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/README.md +5 -5
- package/lib/client.js +195 -158
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,10 +25,10 @@ DeepSeek Harness(dsh)插件:在设置页管理 MCP 服务。
|
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
27
|
# 已发布到 npm 仓库(固定版本;不写 @<版本> 则装 latest)
|
|
28
|
-
dsh plugin --profile web add dsh-mcp-ops@0.2.
|
|
28
|
+
dsh plugin --profile web add dsh-mcp-ops@0.2.1
|
|
29
29
|
|
|
30
30
|
# 或本地 tarball(pnpm pack 的产物)
|
|
31
|
-
dsh plugin --profile web add /path/to/dsh-mcp-ops-0.2.
|
|
31
|
+
dsh plugin --profile web add /path/to/dsh-mcp-ops-0.2.1.tgz
|
|
32
32
|
|
|
33
33
|
# 卸载
|
|
34
34
|
dsh plugin --profile web remove dsh-mcp-ops
|
|
@@ -70,7 +70,7 @@ docs/ 详细设计与官方依赖落点
|
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
72
|
pnpm run --config.verify-deps-before-run=false build && pnpm pack --pack-destination docker &&
|
|
73
|
-
docker build --progress=plain -t founder/dsh-mcp-ops:0.2.
|
|
73
|
+
docker build --progress=plain -t founder/dsh-mcp-ops:0.2.1 -f docker/Dockerfile docker/ &&
|
|
74
74
|
HOME=/home/ubuntu docker compose -f docker/docker-compose.yaml --project-directory docker up -d --force-recreate
|
|
75
75
|
|
|
76
76
|
node docker/verify.mjs # 容器端到端(装配终态 / 启动日志 / 服务侧 sync / locale 元数据 / 客户端产物)
|
|
@@ -99,8 +99,8 @@ npm publish --dry-run --registry=https://registry.npmjs.org/
|
|
|
99
99
|
npm publish --registry=https://registry.npmjs.org/ --access public
|
|
100
100
|
|
|
101
101
|
# 4) 发布后核对并打 tag
|
|
102
|
-
npm view dsh-mcp-ops@0.2.
|
|
103
|
-
git tag -a v0.2.
|
|
102
|
+
npm view dsh-mcp-ops@0.2.1 --registry=https://registry.npmjs.org/
|
|
103
|
+
git tag -a v0.2.1 -m "dsh-mcp-ops 0.2.1" && git push origin v0.2.1
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
72 小时内可 `npm unpublish dsh-mcp-ops@<版本>` 撤回;超时只能 `npm deprecate`。
|
package/lib/client.js
CHANGED
|
@@ -27,6 +27,38 @@ __export(index_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(index_exports);
|
|
29
29
|
|
|
30
|
+
// src/client/sections/McpMark.tsx
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var MCP_MARK_16_VIEW_BOX = "-0.075 -0.075 24.15 24.15";
|
|
33
|
+
var MCP_MARK_16_PATH = "M13.85 0 a4.16 4.16 0 0 0 -2.95 1.217 L1.456 10.66 a0.835 0.835 0 0 0 0 1.18 a0.835 0.835 0 0 0 1.18 0 l9.442 -9.442 a2.49 2.49 0 0 1 3.541 0 a2.49 2.49 0 0 1 0 3.541 L8.59 12.97 l-0.1 0.1 a0.835 0.835 0 0 0 0 1.18 a0.835 0.835 0 0 0 1.18 0 l0.1 -0.098 l7.03 -7.034 a2.49 2.49 0 0 1 3.542 0 l0.049 0.05 a2.49 2.49 0 0 1 0 3.54 l-8.54 8.54 a1.96 1.96 0 0 0 0 2.755 l1.753 1.753 a0.835 0.835 0 0 0 1.18 0 a0.835 0.835 0 0 0 0 -1.18 l-1.753 -1.753 a0.266 0.266 0 0 1 0 -0.394 l8.54 -8.54 a4.185 4.185 0 0 0 0 -5.9 l-0.05 -0.05 a4.16 4.16 0 0 0 -2.95 -1.218 c-0.2 0 -0.401 0.02 -0.6 0.048 a4.17 4.17 0 0 0 -1.17 -3.552 A4.16 4.16 0 0 0 13.85 0 m0 3.333 a0.84 0.84 0 0 0 -0.59 0.245 L6.275 10.56 a4.186 4.186 0 0 0 0 5.902 a4.186 4.186 0 0 0 5.902 0 L19.16 9.48 a0.835 0.835 0 0 0 0 -1.18 a0.835 0.835 0 0 0 -1.18 0 l-6.985 6.984 a2.49 2.49 0 0 1 -3.54 0 a2.49 2.49 0 0 1 0 -3.54 l6.983 -6.985 a0.835 0.835 0 0 0 0 -1.18 a0.84 0.84 0 0 0 -0.59 -0.245";
|
|
34
|
+
function McpMark({ size = 16, className, decorative = false }) {
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
36
|
+
"svg",
|
|
37
|
+
{
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
viewBox: MCP_MARK_16_VIEW_BOX,
|
|
40
|
+
width: size,
|
|
41
|
+
height: size,
|
|
42
|
+
fill: "currentColor",
|
|
43
|
+
role: decorative ? void 0 : "img",
|
|
44
|
+
"aria-hidden": decorative ? true : void 0,
|
|
45
|
+
"aria-label": decorative ? void 0 : "Model Context Protocol",
|
|
46
|
+
className,
|
|
47
|
+
"data-role": "mcp-mark",
|
|
48
|
+
children: [
|
|
49
|
+
decorative ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Model Context Protocol" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: MCP_MARK_16_PATH, stroke: "currentColor", strokeWidth: 0.15, strokeLinejoin: "round" })
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/client/NavIcon.tsx
|
|
57
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
58
|
+
function McpNavIcon({ size }) {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(McpMark, { size, decorative: true });
|
|
60
|
+
}
|
|
61
|
+
|
|
30
62
|
// src/client/remote-contribution.js
|
|
31
63
|
var import_zod = require("zod");
|
|
32
64
|
var diagnostic$schema = import_zod.z.object({
|
|
@@ -666,13 +698,13 @@ var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primit
|
|
|
666
698
|
var ConfirmDialog_default = { "dialog": "dsh-mcp-ops-ConfirmDialog-dialog", "modal": "dsh-mcp-ops-ConfirmDialog-modal", "title": "dsh-mcp-ops-ConfirmDialog-title", "body": "dsh-mcp-ops-ConfirmDialog-body", "actions": "dsh-mcp-ops-ConfirmDialog-actions", "danger": "dsh-mcp-ops-ConfirmDialog-danger" };
|
|
667
699
|
|
|
668
700
|
// src/client/sections/ConfirmDialog.tsx
|
|
669
|
-
var
|
|
701
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
670
702
|
function ConfirmDialog(props) {
|
|
671
|
-
return /* @__PURE__ */ (0,
|
|
672
|
-
/* @__PURE__ */ (0,
|
|
673
|
-
/* @__PURE__ */ (0,
|
|
674
|
-
/* @__PURE__ */ (0,
|
|
675
|
-
/* @__PURE__ */ (0,
|
|
703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives.Modal, { open: true, headless: true, title: props.title, onClose: props.onCancel, className: ConfirmDialog_default.dialog, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: ConfirmDialog_default.modal, "data-plugin": "dsh-mcp-ops", "data-role": "confirm-modal", children: [
|
|
704
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: ConfirmDialog_default.title, "data-role": "confirm-title", children: props.title }),
|
|
705
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: ConfirmDialog_default.body, children: props.body }),
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: ConfirmDialog_default.actions, children: [
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
676
708
|
import_dsh_client_ui_primitives.Button,
|
|
677
709
|
{
|
|
678
710
|
variant: props.danger ? "outline" : "primary",
|
|
@@ -683,7 +715,7 @@ function ConfirmDialog(props) {
|
|
|
683
715
|
children: props.yes
|
|
684
716
|
}
|
|
685
717
|
),
|
|
686
|
-
/* @__PURE__ */ (0,
|
|
718
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
687
719
|
import_dsh_client_ui_primitives.Button,
|
|
688
720
|
{
|
|
689
721
|
variant: "outline",
|
|
@@ -718,7 +750,7 @@ var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primi
|
|
|
718
750
|
var EnvPanel_default = { "panel": "dsh-mcp-ops-EnvPanel-panel", "toggle": "dsh-mcp-ops-EnvPanel-toggle", "switchWrap": "dsh-mcp-ops-EnvPanel-switchWrap", "hint": "dsh-mcp-ops-EnvPanel-hint", "intro": "dsh-mcp-ops-EnvPanel-intro", "rows": "dsh-mcp-ops-EnvPanel-rows", "rowLine": "dsh-mcp-ops-EnvPanel-rowLine", "field": "dsh-mcp-ops-EnvPanel-field", "fieldName": "dsh-mcp-ops-EnvPanel-fieldName", "fieldValue": "dsh-mcp-ops-EnvPanel-fieldValue", "input": "dsh-mcp-ops-EnvPanel-input", "checkbox": "dsh-mcp-ops-EnvPanel-checkbox", "remove": "dsh-mcp-ops-EnvPanel-remove", "dialog": "dsh-mcp-ops-EnvPanel-dialog", "modal": "dsh-mcp-ops-EnvPanel-modal", "modalTitle": "dsh-mcp-ops-EnvPanel-modalTitle", "batchHint": "dsh-mcp-ops-EnvPanel-batchHint", "textarea": "dsh-mcp-ops-EnvPanel-textarea", "batchActions": "dsh-mcp-ops-EnvPanel-batchActions", "batchButtons": "dsh-mcp-ops-EnvPanel-batchButtons", "actions": "dsh-mcp-ops-EnvPanel-actions", "note": "dsh-mcp-ops-EnvPanel-note", "error": "dsh-mcp-ops-EnvPanel-error", "saved": "dsh-mcp-ops-EnvPanel-saved" };
|
|
719
751
|
|
|
720
752
|
// src/client/sections/EnvPanel.tsx
|
|
721
|
-
var
|
|
753
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
722
754
|
function EnvPanel(props) {
|
|
723
755
|
const { t } = props;
|
|
724
756
|
const propsRef = (0, import_react.useRef)(props);
|
|
@@ -774,9 +806,9 @@ function EnvPanel(props) {
|
|
|
774
806
|
setBatchOpen(false);
|
|
775
807
|
setSaved(false);
|
|
776
808
|
};
|
|
777
|
-
return /* @__PURE__ */ (0,
|
|
778
|
-
/* @__PURE__ */ (0,
|
|
779
|
-
/* @__PURE__ */ (0,
|
|
809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: EnvPanel_default.panel, "data-plugin": "dsh-mcp-ops", "data-section": "env-panel", children: [
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: EnvPanel_default.toggle, children: [
|
|
811
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: EnvPanel_default.switchWrap, "data-role": "env-inject", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
780
812
|
import_dsh_client_ui_primitives2.Switch,
|
|
781
813
|
{
|
|
782
814
|
checked: pendingInject ?? props.injectGlobalEnv,
|
|
@@ -788,18 +820,18 @@ function EnvPanel(props) {
|
|
|
788
820
|
}
|
|
789
821
|
}
|
|
790
822
|
) }),
|
|
791
|
-
/* @__PURE__ */ (0,
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: t("envInject") })
|
|
792
824
|
] }),
|
|
793
|
-
/* @__PURE__ */ (0,
|
|
794
|
-
/* @__PURE__ */ (0,
|
|
795
|
-
error === null ? null : /* @__PURE__ */ (0,
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: EnvPanel_default.hint, children: t("envInjectHint") }),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: EnvPanel_default.intro, children: t("envIntro") }),
|
|
827
|
+
error === null ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: EnvPanel_default.error, role: "alert", children: [
|
|
796
828
|
t("errorTitle"),
|
|
797
829
|
"\uFF1A",
|
|
798
830
|
error
|
|
799
831
|
] }),
|
|
800
|
-
rows.length === 0 ? /* @__PURE__ */ (0,
|
|
801
|
-
/* @__PURE__ */ (0,
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
832
|
+
rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: EnvPanel_default.note, children: t("envEmpty") }) : null,
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: EnvPanel_default.rows, children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: EnvPanel_default.rowLine, "data-env": row.name, children: [
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `${EnvPanel_default.field} ${EnvPanel_default.fieldName}`, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
803
835
|
import_dsh_client_ui_primitives2.Input,
|
|
804
836
|
{
|
|
805
837
|
className: EnvPanel_default.input,
|
|
@@ -810,7 +842,7 @@ function EnvPanel(props) {
|
|
|
810
842
|
onChange: (event) => update(index, { name: event.target.value })
|
|
811
843
|
}
|
|
812
844
|
) }),
|
|
813
|
-
/* @__PURE__ */ (0,
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: `${EnvPanel_default.field} ${EnvPanel_default.fieldValue}`, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
814
846
|
import_dsh_client_ui_primitives2.Input,
|
|
815
847
|
{
|
|
816
848
|
className: EnvPanel_default.input,
|
|
@@ -822,7 +854,7 @@ function EnvPanel(props) {
|
|
|
822
854
|
onChange: (event) => update(index, { value: event.target.value })
|
|
823
855
|
}
|
|
824
856
|
) }),
|
|
825
|
-
/* @__PURE__ */ (0,
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
826
858
|
import_dsh_client_ui_primitives2.Checkbox,
|
|
827
859
|
{
|
|
828
860
|
checked: row.secret,
|
|
@@ -832,7 +864,7 @@ function EnvPanel(props) {
|
|
|
832
864
|
onChange: (next) => update(index, { secret: next })
|
|
833
865
|
}
|
|
834
866
|
),
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
836
868
|
import_dsh_client_ui_primitives2.Button,
|
|
837
869
|
{
|
|
838
870
|
variant: "ghost",
|
|
@@ -848,7 +880,7 @@ function EnvPanel(props) {
|
|
|
848
880
|
}
|
|
849
881
|
)
|
|
850
882
|
] }, `env-${index}`)) }),
|
|
851
|
-
batchOpen ? /* @__PURE__ */ (0,
|
|
883
|
+
batchOpen ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
852
884
|
import_dsh_client_ui_primitives2.Modal,
|
|
853
885
|
{
|
|
854
886
|
open: true,
|
|
@@ -859,10 +891,10 @@ function EnvPanel(props) {
|
|
|
859
891
|
setBatchText("");
|
|
860
892
|
},
|
|
861
893
|
className: EnvPanel_default.dialog,
|
|
862
|
-
children: /* @__PURE__ */ (0,
|
|
863
|
-
/* @__PURE__ */ (0,
|
|
864
|
-
/* @__PURE__ */ (0,
|
|
865
|
-
/* @__PURE__ */ (0,
|
|
894
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: EnvPanel_default.modal, "data-plugin": "dsh-mcp-ops", "data-role": "env-batch-modal", children: [
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: EnvPanel_default.modalTitle, children: t("envBatchTitle") }),
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: EnvPanel_default.batchHint, children: t("envBatchHint") }),
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
866
898
|
"textarea",
|
|
867
899
|
{
|
|
868
900
|
className: EnvPanel_default.textarea,
|
|
@@ -874,8 +906,8 @@ function EnvPanel(props) {
|
|
|
874
906
|
onChange: (event) => setBatchText(event.target.value)
|
|
875
907
|
}
|
|
876
908
|
),
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: EnvPanel_default.batchActions, children: [
|
|
910
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
879
911
|
import_dsh_client_ui_primitives2.Checkbox,
|
|
880
912
|
{
|
|
881
913
|
checked: batchSecret,
|
|
@@ -885,9 +917,9 @@ function EnvPanel(props) {
|
|
|
885
917
|
onChange: setBatchSecret
|
|
886
918
|
}
|
|
887
919
|
),
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: EnvPanel_default.batchButtons, children: [
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "primary", disabled: busy, "data-role": "env-batch-import", onClick: importBatch, children: t("envBatchImport") }),
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", disabled: busy, "data-role": "env-batch-cancel", onClick: () => {
|
|
891
923
|
setBatchOpen(false);
|
|
892
924
|
setBatchText("");
|
|
893
925
|
}, children: t("envBatchCancel") })
|
|
@@ -896,8 +928,8 @@ function EnvPanel(props) {
|
|
|
896
928
|
] })
|
|
897
929
|
}
|
|
898
930
|
) : null,
|
|
899
|
-
/* @__PURE__ */ (0,
|
|
900
|
-
/* @__PURE__ */ (0,
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: EnvPanel_default.actions, children: [
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
901
933
|
import_dsh_client_ui_primitives2.Button,
|
|
902
934
|
{
|
|
903
935
|
variant: "outline",
|
|
@@ -910,9 +942,9 @@ function EnvPanel(props) {
|
|
|
910
942
|
children: t("envAdd")
|
|
911
943
|
}
|
|
912
944
|
),
|
|
913
|
-
/* @__PURE__ */ (0,
|
|
914
|
-
/* @__PURE__ */ (0,
|
|
915
|
-
saved ? /* @__PURE__ */ (0,
|
|
945
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", disabled: busy, "data-role": "env-batch", onClick: () => setBatchOpen(true), children: t("envBatch") }),
|
|
946
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "primary", disabled: busy, "data-role": "env-save", onClick: () => void save(), children: busy ? t("refreshing") : t("formSave") }),
|
|
947
|
+
saved ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: EnvPanel_default.saved, children: t("saved") }) : null
|
|
916
948
|
] })
|
|
917
949
|
] });
|
|
918
950
|
}
|
|
@@ -933,13 +965,13 @@ function EnvPanel(props) {
|
|
|
933
965
|
var InjectionMode_default = { "panel": "dsh-mcp-ops-InjectionMode-panel", "option": "dsh-mcp-ops-InjectionMode-option", "hint": "dsh-mcp-ops-InjectionMode-hint" };
|
|
934
966
|
|
|
935
967
|
// src/client/sections/InjectionMode.tsx
|
|
936
|
-
var
|
|
968
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
937
969
|
var MODE_INPUT_NAME = "mcp-ops-injection-mode";
|
|
938
970
|
function InjectionMode(props) {
|
|
939
971
|
const { t, mode, busy } = props;
|
|
940
|
-
return /* @__PURE__ */ (0,
|
|
941
|
-
["search", "full"].map((value) => /* @__PURE__ */ (0,
|
|
942
|
-
/* @__PURE__ */ (0,
|
|
972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: InjectionMode_default.panel, "data-plugin": "dsh-mcp-ops", "data-section": "injection-mode", "data-mode": mode, children: [
|
|
973
|
+
["search", "full"].map((value) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: InjectionMode_default.option, "data-mode": value, children: [
|
|
974
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
943
975
|
"input",
|
|
944
976
|
{
|
|
945
977
|
type: "radio",
|
|
@@ -951,9 +983,9 @@ function InjectionMode(props) {
|
|
|
951
983
|
}
|
|
952
984
|
}
|
|
953
985
|
),
|
|
954
|
-
/* @__PURE__ */ (0,
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: value === "search" ? t("modeSearch") : t("modeFull") })
|
|
955
987
|
] }, value)),
|
|
956
|
-
/* @__PURE__ */ (0,
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: InjectionMode_default.hint, children: mode === "search" ? t("modeHintSearch") : t("modeHintFull") })
|
|
957
989
|
] });
|
|
958
990
|
}
|
|
959
991
|
|
|
@@ -1107,7 +1139,7 @@ function formValueOf(server) {
|
|
|
1107
1139
|
|
|
1108
1140
|
// src/client/sections/ServerForm.tsx
|
|
1109
1141
|
var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
1110
|
-
var
|
|
1142
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1111
1143
|
function ServerForm(props) {
|
|
1112
1144
|
const { t, busy } = props;
|
|
1113
1145
|
const [value, setValue] = (0, import_react2.useState)(props.initial ?? emptyFormValue());
|
|
@@ -1151,7 +1183,7 @@ function ServerForm(props) {
|
|
|
1151
1183
|
rows[index] = { ...previous, ...part, ...cleared ? { value: "" } : {} };
|
|
1152
1184
|
patch({ env: rows });
|
|
1153
1185
|
};
|
|
1154
|
-
return /* @__PURE__ */ (0,
|
|
1186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1155
1187
|
"form",
|
|
1156
1188
|
{
|
|
1157
1189
|
ref: formRef,
|
|
@@ -1161,17 +1193,17 @@ function ServerForm(props) {
|
|
|
1161
1193
|
"data-mode": editing ? "edit" : "create",
|
|
1162
1194
|
onSubmit: submit,
|
|
1163
1195
|
children: [
|
|
1164
|
-
/* @__PURE__ */ (0,
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1166
|
-
/* @__PURE__ */ (0,
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1168
|
-
editing && props.onDelete !== void 0 ? /* @__PURE__ */ (0,
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: ServerForm_default.head, children: [
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: ServerForm_default.title, children: editing ? t("formEdit") : t("formNew") }),
|
|
1198
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.headActions, children: [
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", size: "sm", disabled: busy, "data-role": "back", onClick: props.onCancel, children: t("backToList") }),
|
|
1200
|
+
editing && props.onDelete !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", size: "sm", className: ServerForm_default.danger, disabled: busy, "data-role": "delete", onClick: props.onDelete, children: t("delete") }) : null
|
|
1169
1201
|
] })
|
|
1170
1202
|
] }),
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1173
|
-
/* @__PURE__ */ (0,
|
|
1174
|
-
/* @__PURE__ */ (0,
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.gridName, children: [
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: ServerForm_default.field, children: [
|
|
1205
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formName") }),
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1175
1207
|
import_dsh_client_ui_primitives3.Input,
|
|
1176
1208
|
{
|
|
1177
1209
|
className: ServerForm_default.fieldInput,
|
|
@@ -1183,7 +1215,7 @@ function ServerForm(props) {
|
|
|
1183
1215
|
}
|
|
1184
1216
|
)
|
|
1185
1217
|
] }),
|
|
1186
|
-
/* @__PURE__ */ (0,
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.checkWrap, "data-role": "form-enabled", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1187
1219
|
import_dsh_client_ui_primitives3.Checkbox,
|
|
1188
1220
|
{
|
|
1189
1221
|
checked: value.enabled,
|
|
@@ -1194,11 +1226,11 @@ function ServerForm(props) {
|
|
|
1194
1226
|
}
|
|
1195
1227
|
) })
|
|
1196
1228
|
] }),
|
|
1197
|
-
/* @__PURE__ */ (0,
|
|
1198
|
-
/* @__PURE__ */ (0,
|
|
1199
|
-
/* @__PURE__ */ (0,
|
|
1200
|
-
/* @__PURE__ */ (0,
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { className: ServerForm_default.hint, children: t("formNameHint") }),
|
|
1230
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.gridTransport, children: [
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.field, children: [
|
|
1232
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formTransport") }),
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.transportWrap, "data-role": "form-transport", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1202
1234
|
import_dsh_client_ui_primitives3.Menu,
|
|
1203
1235
|
{
|
|
1204
1236
|
className: ServerForm_default.transportMenu,
|
|
@@ -1214,7 +1246,7 @@ function ServerForm(props) {
|
|
|
1214
1246
|
setTransportOpen(false);
|
|
1215
1247
|
},
|
|
1216
1248
|
onClose: () => setTransportOpen(false),
|
|
1217
|
-
anchor: /* @__PURE__ */ (0,
|
|
1249
|
+
anchor: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1218
1250
|
import_dsh_client_ui_primitives3.Button,
|
|
1219
1251
|
{
|
|
1220
1252
|
variant: "outline",
|
|
@@ -1225,22 +1257,22 @@ function ServerForm(props) {
|
|
|
1225
1257
|
"aria-expanded": transportOpen,
|
|
1226
1258
|
onClick: () => setTransportOpen((open) => !open),
|
|
1227
1259
|
children: [
|
|
1228
|
-
/* @__PURE__ */ (0,
|
|
1229
|
-
/* @__PURE__ */ (0,
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.transportLabel, title: value.transport === "stdio" ? t("transportStdio") : t("transportHttp"), children: value.transport === "stdio" ? t("transportStdio") : t("transportHttp") }),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.transportChevron, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.IconChevronDownOutlineRegular, {}) })
|
|
1230
1262
|
]
|
|
1231
1263
|
}
|
|
1232
1264
|
)
|
|
1233
1265
|
}
|
|
1234
1266
|
) })
|
|
1235
1267
|
] }),
|
|
1236
|
-
/* @__PURE__ */ (0,
|
|
1237
|
-
/* @__PURE__ */ (0,
|
|
1238
|
-
value.transport === "stdio" ? /* @__PURE__ */ (0,
|
|
1268
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: ServerForm_default.field, children: [
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: value.transport === "stdio" ? t("formCommand") : t("formUrl") }),
|
|
1270
|
+
value.transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Input, { className: ServerForm_default.fieldInput, value: value.command, disabled: busy, placeholder: t("phCommand"), "data-role": "form-command", onChange: (event) => patch({ command: event.target.value }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Input, { className: ServerForm_default.fieldInput, value: value.url, disabled: busy, placeholder: t("phUrl"), "data-role": "form-url", onChange: (event) => patch({ url: event.target.value }) }) })
|
|
1239
1271
|
] })
|
|
1240
1272
|
] }),
|
|
1241
|
-
value.transport === "stdio" ? /* @__PURE__ */ (0,
|
|
1242
|
-
/* @__PURE__ */ (0,
|
|
1243
|
-
/* @__PURE__ */ (0,
|
|
1273
|
+
value.transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: ServerForm_default.field, children: [
|
|
1274
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formArgs") }),
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1244
1276
|
"textarea",
|
|
1245
1277
|
{
|
|
1246
1278
|
rows: 3,
|
|
@@ -1251,10 +1283,10 @@ function ServerForm(props) {
|
|
|
1251
1283
|
onChange: (event) => patch({ argsText: event.target.value })
|
|
1252
1284
|
}
|
|
1253
1285
|
),
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1255
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1257
|
-
/* @__PURE__ */ (0,
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { className: ServerForm_default.preview, "data-role": "args-preview", children: args.length === 0 ? t("argsPreviewEmpty") : t("argsPreview", { preview: `${args.length} \xB7 ${args.join(" | ")}` }) })
|
|
1287
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.field, children: [
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formHeaders") }),
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1258
1290
|
RowEditor,
|
|
1259
1291
|
{
|
|
1260
1292
|
t,
|
|
@@ -1264,11 +1296,11 @@ function ServerForm(props) {
|
|
|
1264
1296
|
}
|
|
1265
1297
|
)
|
|
1266
1298
|
] }),
|
|
1267
|
-
/* @__PURE__ */ (0,
|
|
1268
|
-
/* @__PURE__ */ (0,
|
|
1269
|
-
/* @__PURE__ */ (0,
|
|
1270
|
-
value.env.map((row, index) => /* @__PURE__ */ (0,
|
|
1271
|
-
/* @__PURE__ */ (0,
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.field, "data-role": "form-env", children: [
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formEnv") }),
|
|
1301
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.rows, children: [
|
|
1302
|
+
value.env.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.rowLine, "data-env-row": row.name, children: [
|
|
1303
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1272
1304
|
import_dsh_client_ui_primitives3.Input,
|
|
1273
1305
|
{
|
|
1274
1306
|
className: ServerForm_default.keyInput,
|
|
@@ -1279,7 +1311,7 @@ function ServerForm(props) {
|
|
|
1279
1311
|
onChange: (event) => updateEnv(index, { name: event.target.value })
|
|
1280
1312
|
}
|
|
1281
1313
|
),
|
|
1282
|
-
/* @__PURE__ */ (0,
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1283
1315
|
import_dsh_client_ui_primitives3.Input,
|
|
1284
1316
|
{
|
|
1285
1317
|
className: ServerForm_default.valueInput,
|
|
@@ -1291,7 +1323,7 @@ function ServerForm(props) {
|
|
|
1291
1323
|
onChange: (event) => updateEnv(index, { value: event.target.value })
|
|
1292
1324
|
}
|
|
1293
1325
|
),
|
|
1294
|
-
/* @__PURE__ */ (0,
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.checkWrap, title: t("formEnvSecret"), "data-role": "env-secret", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1295
1327
|
import_dsh_client_ui_primitives3.Checkbox,
|
|
1296
1328
|
{
|
|
1297
1329
|
checked: row.secret,
|
|
@@ -1302,7 +1334,7 @@ function ServerForm(props) {
|
|
|
1302
1334
|
onChange: (next) => updateEnv(index, { secret: next })
|
|
1303
1335
|
}
|
|
1304
1336
|
) }),
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1306
1338
|
import_dsh_client_ui_primitives3.Button,
|
|
1307
1339
|
{
|
|
1308
1340
|
variant: "ghost",
|
|
@@ -1315,7 +1347,7 @@ function ServerForm(props) {
|
|
|
1315
1347
|
}
|
|
1316
1348
|
)
|
|
1317
1349
|
] }, `env-${index}`)),
|
|
1318
|
-
/* @__PURE__ */ (0,
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1319
1351
|
import_dsh_client_ui_primitives3.Button,
|
|
1320
1352
|
{
|
|
1321
1353
|
variant: "outline",
|
|
@@ -1327,11 +1359,11 @@ function ServerForm(props) {
|
|
|
1327
1359
|
}
|
|
1328
1360
|
)
|
|
1329
1361
|
] }),
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { className: ServerForm_default.hint, children: t("formEnvHint") })
|
|
1331
1363
|
] }),
|
|
1332
|
-
value.transport === "stdio" ? /* @__PURE__ */ (0,
|
|
1333
|
-
/* @__PURE__ */ (0,
|
|
1334
|
-
/* @__PURE__ */ (0,
|
|
1364
|
+
value.transport === "stdio" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: ServerForm_default.field, children: [
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formCwd") }),
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1335
1367
|
import_dsh_client_ui_primitives3.Input,
|
|
1336
1368
|
{
|
|
1337
1369
|
className: ServerForm_default.fieldInput,
|
|
@@ -1342,15 +1374,15 @@ function ServerForm(props) {
|
|
|
1342
1374
|
onChange: (event) => patch({ cwd: event.target.value })
|
|
1343
1375
|
}
|
|
1344
1376
|
),
|
|
1345
|
-
/* @__PURE__ */ (0,
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { className: ServerForm_default.hint, children: t("formCwdHint") })
|
|
1346
1378
|
] }) : null,
|
|
1347
|
-
/* @__PURE__ */ (0,
|
|
1348
|
-
/* @__PURE__ */ (0,
|
|
1349
|
-
/* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
1379
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: ServerForm_default.field, children: [
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.label, children: t("formTimeout") }),
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Input, { className: ServerForm_default.fieldInput, value: value.timeoutMs, disabled: busy, placeholder: t("phTimeout"), "data-role": "form-timeout", onChange: (event) => patch({ timeoutMs: event.target.value }) }),
|
|
1382
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { className: ServerForm_default.hint, children: t("formTimeoutHint") })
|
|
1351
1383
|
] }),
|
|
1352
|
-
value.transport === "streamable-http" ? /* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1384
|
+
value.transport === "streamable-http" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.field, children: [
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: ServerForm_default.checkWrap, "data-role": "form-oauth", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1354
1386
|
import_dsh_client_ui_primitives3.Checkbox,
|
|
1355
1387
|
{
|
|
1356
1388
|
checked: value.oauth,
|
|
@@ -1360,17 +1392,17 @@ function ServerForm(props) {
|
|
|
1360
1392
|
onChange: (next) => patch({ oauth: next })
|
|
1361
1393
|
}
|
|
1362
1394
|
) }),
|
|
1363
|
-
/* @__PURE__ */ (0,
|
|
1364
|
-
value.oauth && props.onOAuth !== void 0 ? /* @__PURE__ */ (0,
|
|
1365
|
-
props.oauthUrl === void 0 || props.oauthUrl === null ? null : /* @__PURE__ */ (0,
|
|
1395
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("small", { className: ServerForm_default.hint, children: t("formOAuthHint") }),
|
|
1396
|
+
value.oauth && props.onOAuth !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", className: ServerForm_default.secondary, disabled: busy, "data-role": "form-authorize", onClick: () => props.onOAuth?.(value), children: t("formAuthorize") }) }) : null,
|
|
1397
|
+
props.oauthUrl === void 0 || props.oauthUrl === null ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("small", { className: ServerForm_default.hint, children: [
|
|
1366
1398
|
t("formAuthorizeHint"),
|
|
1367
1399
|
" ",
|
|
1368
|
-
/* @__PURE__ */ (0,
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href: props.oauthUrl, target: "_blank", rel: "noreferrer", children: props.oauthUrl })
|
|
1369
1401
|
] })
|
|
1370
1402
|
] }) : null,
|
|
1371
|
-
props.testResult === void 0 || props.testResult === null ? null : /* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1403
|
+
props.testResult === void 0 || props.testResult === null ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: ServerForm_default.testResult, "data-ok": String(props.testResult.ok), "data-role": "test-result", children: props.testResult.ok ? t("formTestOk", { count: String(props.testResult.tools.length) }) : t("formTestFail", { message: props.testResult.message ?? "" }) }),
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.actions, "data-role": "form-actions", children: [
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1374
1406
|
"span",
|
|
1375
1407
|
{
|
|
1376
1408
|
className: ServerForm_default.problem,
|
|
@@ -1382,10 +1414,10 @@ function ServerForm(props) {
|
|
|
1382
1414
|
children: problemText
|
|
1383
1415
|
}
|
|
1384
1416
|
),
|
|
1385
|
-
/* @__PURE__ */ (0,
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1417
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: ServerForm_default.actionButtons, children: [
|
|
1418
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "outline", disabled: busy, "data-role": "test", onClick: () => props.onTest(value), children: busy ? t("formTesting") : t("formTest") }),
|
|
1419
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { type: "submit", variant: "primary", disabled: busy, "data-role": "save", children: t("formSave") }),
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "ghost", disabled: busy, "data-role": "cancel", onClick: props.onCancel, children: t("formCancel") })
|
|
1389
1421
|
] })
|
|
1390
1422
|
] })
|
|
1391
1423
|
]
|
|
@@ -1398,9 +1430,9 @@ function RowEditor(props) {
|
|
|
1398
1430
|
rows[index] = { ...rows[index], ...part };
|
|
1399
1431
|
props.onChange(rows);
|
|
1400
1432
|
};
|
|
1401
|
-
return /* @__PURE__ */ (0,
|
|
1402
|
-
rows.map((row, index) => /* @__PURE__ */ (0,
|
|
1403
|
-
/* @__PURE__ */ (0,
|
|
1433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.rows, "data-role": "header-rows", children: [
|
|
1434
|
+
rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: ServerForm_default.rowLine, "data-role": "header-row", children: [
|
|
1435
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1404
1436
|
import_dsh_client_ui_primitives3.Input,
|
|
1405
1437
|
{
|
|
1406
1438
|
className: ServerForm_default.keyInput,
|
|
@@ -1411,7 +1443,7 @@ function RowEditor(props) {
|
|
|
1411
1443
|
onChange: (event) => update(index, { name: event.target.value })
|
|
1412
1444
|
}
|
|
1413
1445
|
),
|
|
1414
|
-
/* @__PURE__ */ (0,
|
|
1446
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1415
1447
|
import_dsh_client_ui_primitives3.Input,
|
|
1416
1448
|
{
|
|
1417
1449
|
className: ServerForm_default.valueInput,
|
|
@@ -1422,9 +1454,9 @@ function RowEditor(props) {
|
|
|
1422
1454
|
onChange: (event) => update(index, { value: event.target.value })
|
|
1423
1455
|
}
|
|
1424
1456
|
),
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1457
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "ghost", size: "sm", className: ServerForm_default.remove, disabled: props.busy, "data-role": "header-remove", onClick: () => props.onChange(rows.filter((_, i) => i !== index)), children: "\xD7" })
|
|
1426
1458
|
] }, `header-${index}`)),
|
|
1427
|
-
/* @__PURE__ */ (0,
|
|
1459
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1428
1460
|
import_dsh_client_ui_primitives3.Button,
|
|
1429
1461
|
{
|
|
1430
1462
|
variant: "outline",
|
|
@@ -1487,12 +1519,12 @@ var ServerCard_default = { "card": "dsh-mcp-ops-ServerCard-card", "row": "dsh-mc
|
|
|
1487
1519
|
var ToolSelector_default = { "list": "dsh-mcp-ops-ToolSelector-list", "item": "dsh-mcp-ops-ToolSelector-item", "label": "dsh-mcp-ops-ToolSelector-label", "text": "dsh-mcp-ops-ToolSelector-text", "name": "dsh-mcp-ops-ToolSelector-name", "description": "dsh-mcp-ops-ToolSelector-description", "note": "dsh-mcp-ops-ToolSelector-note" };
|
|
1488
1520
|
|
|
1489
1521
|
// src/client/sections/ToolSelector.tsx
|
|
1490
|
-
var
|
|
1522
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1491
1523
|
function ToolSelector(props) {
|
|
1492
1524
|
const { t, tools, busy, pending } = props;
|
|
1493
|
-
if (tools.length === 0) return /* @__PURE__ */ (0,
|
|
1494
|
-
return /* @__PURE__ */ (0,
|
|
1495
|
-
/* @__PURE__ */ (0,
|
|
1525
|
+
if (tools.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: ToolSelector_default.note, children: t("toolsNone") });
|
|
1526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: ToolSelector_default.list, "data-role": "tool-selector", children: tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: ToolSelector_default.item, "data-tool": tool.name, "data-enabled": String(tool.enabled), "data-hot": String(tool.hot), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: ToolSelector_default.label, children: [
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1496
1528
|
"input",
|
|
1497
1529
|
{
|
|
1498
1530
|
type: "checkbox",
|
|
@@ -1502,16 +1534,16 @@ function ToolSelector(props) {
|
|
|
1502
1534
|
onChange: () => props.onToggle(tool.name, !tool.enabled)
|
|
1503
1535
|
}
|
|
1504
1536
|
),
|
|
1505
|
-
/* @__PURE__ */ (0,
|
|
1506
|
-
/* @__PURE__ */ (0,
|
|
1507
|
-
tool.description.trim() === "" ? null : /* @__PURE__ */ (0,
|
|
1537
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: ToolSelector_default.text, children: [
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { className: ToolSelector_default.name, "data-role": "tool-name", "data-tool-name": tool.name, title: tool.name, children: tool.tool }),
|
|
1539
|
+
tool.description.trim() === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: ToolSelector_default.description, "data-role": "tool-description", title: tool.description, children: tool.description })
|
|
1508
1540
|
] })
|
|
1509
1541
|
] }) }, tool.name)) });
|
|
1510
1542
|
}
|
|
1511
1543
|
|
|
1512
1544
|
// src/client/sections/ServerCard.tsx
|
|
1513
1545
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
1514
|
-
var
|
|
1546
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1515
1547
|
function badgeTone(server) {
|
|
1516
1548
|
if (!server.enabled) return "neutral";
|
|
1517
1549
|
switch (server.status.phase) {
|
|
@@ -1555,7 +1587,7 @@ function ServerCard(props) {
|
|
|
1555
1587
|
detail: problems.map((entry) => entry.detail === void 0 ? entry.code : `${entry.code}(${entry.detail})`).join(", ")
|
|
1556
1588
|
})]
|
|
1557
1589
|
].join(" \xB7 ");
|
|
1558
|
-
return /* @__PURE__ */ (0,
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1559
1591
|
"section",
|
|
1560
1592
|
{
|
|
1561
1593
|
className: ServerCard_default.card,
|
|
@@ -1566,34 +1598,34 @@ function ServerCard(props) {
|
|
|
1566
1598
|
"data-phase": server.status.phase,
|
|
1567
1599
|
"data-enabled": String(server.enabled),
|
|
1568
1600
|
children: [
|
|
1569
|
-
/* @__PURE__ */ (0,
|
|
1570
|
-
/* @__PURE__ */ (0,
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
1572
|
-
/* @__PURE__ */ (0,
|
|
1573
|
-
server.capabilities.adopted ? /* @__PURE__ */ (0,
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: ServerCard_default.row, children: [
|
|
1602
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: ServerCard_default.identity, children: [
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: ServerCard_default.name, children: server.serverName }),
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Tag, { tone: badgeTone(server), className: ServerCard_default.badge, children: t(badge) }),
|
|
1605
|
+
server.capabilities.adopted ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Tag, { tone: "info", className: ServerCard_default.badge, children: t("adoptedBadge") }) : null,
|
|
1574
1606
|
server.occupiedByComposition && !composition ? (
|
|
1575
1607
|
// `Tag` 只接受 tone/className/children,`title` 得由外层承载(否则属性不会落到 DOM 上)。
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { title: t("occupied"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Tag, { tone: "warning", className: ServerCard_default.badge, children: t("occupied") }) })
|
|
1577
1609
|
) : null,
|
|
1578
|
-
marker === void 0 ? null : /* @__PURE__ */ (0,
|
|
1610
|
+
marker === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: ServerCard_default.errorMark, "data-role": "card-diagnostics", title: marker, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.StateDot, { state: "warning", size: 10 }) })
|
|
1579
1611
|
] }),
|
|
1580
|
-
/* @__PURE__ */ (0,
|
|
1581
|
-
server.capabilities.adoptable ? /* @__PURE__ */ (0,
|
|
1582
|
-
server.capabilities.adopted ? /* @__PURE__ */ (0,
|
|
1583
|
-
!composition ? /* @__PURE__ */ (0,
|
|
1584
|
-
/* @__PURE__ */ (0,
|
|
1585
|
-
server.status.tools.length > 0 ? /* @__PURE__ */ (0,
|
|
1586
|
-
server.writable ? /* @__PURE__ */ (0,
|
|
1612
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: ServerCard_default.actions, children: [
|
|
1613
|
+
server.capabilities.adoptable ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Button, { variant: "outline", size: "sm", disabled: busy, "data-action": "adopt", onClick: () => props.actions.onAdopt(server), children: t("adopt") }) : null,
|
|
1614
|
+
server.capabilities.adopted ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Button, { variant: "outline", size: "sm", disabled: busy, "data-action": "release", onClick: () => props.actions.onRelease(server), children: t("release") }) : null,
|
|
1615
|
+
!composition ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Button, { variant: "outline", size: "sm", disabled: busy, "data-action": "toggle", onClick: () => props.actions.onToggleEnabled(server), children: server.enabled ? t("disable") : t("enable") }) : null,
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Button, { variant: "outline", size: "sm", disabled: busy, title: t("refreshHint"), "data-action": "refresh", onClick: () => props.actions.onRefresh(server), children: busy ? t("refreshing") : t("refresh") }),
|
|
1617
|
+
server.status.tools.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Button, { variant: "outline", size: "sm", disabled: busy, "data-action": "expand", onClick: () => props.actions.onToggleExpand(server.serverName), children: props.expanded ? t("collapseTools") : t("expandTools") }) : null,
|
|
1618
|
+
server.writable ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_dsh_client_ui_primitives4.Button, { variant: "outline", size: "sm", disabled: busy, "data-action": "edit", onClick: () => props.actions.onEdit(server), children: t("edit") }) : null
|
|
1587
1619
|
] })
|
|
1588
1620
|
] }),
|
|
1589
|
-
/* @__PURE__ */ (0,
|
|
1590
|
-
/* @__PURE__ */ (0,
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1592
|
-
/* @__PURE__ */ (0,
|
|
1593
|
-
/* @__PURE__ */ (0,
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: ServerCard_default.meta, children: [
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: server.transport }),
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-role": "card-tools", children: t("cardTools", { count: String(server.status.tools.length) }) }),
|
|
1625
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
1626
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-role": "card-env", children: t("cardEnv", { count: String(server.env.length) }) })
|
|
1595
1627
|
] }),
|
|
1596
|
-
props.expanded ? /* @__PURE__ */ (0,
|
|
1628
|
+
props.expanded ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1597
1629
|
ToolSelector,
|
|
1598
1630
|
{
|
|
1599
1631
|
t,
|
|
@@ -1609,7 +1641,7 @@ function ServerCard(props) {
|
|
|
1609
1641
|
}
|
|
1610
1642
|
|
|
1611
1643
|
// src/client/sections/ServerList.tsx
|
|
1612
|
-
var
|
|
1644
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1613
1645
|
function ServerList(props) {
|
|
1614
1646
|
const { t, servers, busy } = props;
|
|
1615
1647
|
const file = props.sources.find((source) => source.kind === "dsh-home");
|
|
@@ -1617,14 +1649,14 @@ function ServerList(props) {
|
|
|
1617
1649
|
path: file.path,
|
|
1618
1650
|
reason: t(file.parseError !== void 0 ? "readonlyParseError" : "readonlyNotWritable")
|
|
1619
1651
|
});
|
|
1620
|
-
return /* @__PURE__ */ (0,
|
|
1621
|
-
/* @__PURE__ */ (0,
|
|
1622
|
-
/* @__PURE__ */ (0,
|
|
1623
|
-
/* @__PURE__ */ (0,
|
|
1652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("header", { className: ServerList_default.head, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: ServerList_default.headActions, children: [
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dsh_client_ui_primitives5.Button, { variant: "ghost", disabled: busy, title: t("refreshListHint"), "data-role": "refresh-list", onClick: props.onRefreshList, children: busy ? t("refreshing") : t("refreshList") }),
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_dsh_client_ui_primitives5.Button, { variant: "primary", disabled: busy, "data-role": "new", onClick: props.onAdd, children: t("addServer") })
|
|
1624
1656
|
] }) }),
|
|
1625
|
-
fileNotice === null ? null : /* @__PURE__ */ (0,
|
|
1657
|
+
fileNotice === null ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: ServerList_default.fileNotice, "data-role": "file-notice", children: fileNotice }),
|
|
1626
1658
|
props.notice,
|
|
1627
|
-
props.loading ? /* @__PURE__ */ (0,
|
|
1659
|
+
props.loading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: ServerList_default.note, children: t("loading") }) : servers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: ServerList_default.note, children: t("empty") }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: ServerList_default.cards, children: servers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1628
1660
|
ServerCard,
|
|
1629
1661
|
{
|
|
1630
1662
|
t,
|
|
@@ -1641,7 +1673,7 @@ function ServerList(props) {
|
|
|
1641
1673
|
}
|
|
1642
1674
|
|
|
1643
1675
|
// src/client/McpOpsSection.tsx
|
|
1644
|
-
var
|
|
1676
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1645
1677
|
var TABS = [
|
|
1646
1678
|
{ id: "servers", label: "tabServers" },
|
|
1647
1679
|
{ id: "env", label: "tabEnv" },
|
|
@@ -1850,8 +1882,8 @@ function McpOpsSection(props) {
|
|
|
1850
1882
|
onRelease: (server) => askRelease(server),
|
|
1851
1883
|
onToggleTool: toggleTool
|
|
1852
1884
|
};
|
|
1853
|
-
return /* @__PURE__ */ (0,
|
|
1854
|
-
/* @__PURE__ */ (0,
|
|
1885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("section", { className: McpOpsSection_default.panel, "data-plugin": "dsh-mcp-ops", "data-tab": tab, children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1855
1887
|
import_dsh_client_ui_primitives6.SegmentedTabs,
|
|
1856
1888
|
{
|
|
1857
1889
|
items: TABS.map(({ id, label }) => ({
|
|
@@ -1866,7 +1898,7 @@ function McpOpsSection(props) {
|
|
|
1866
1898
|
className: McpOpsSection_default.tabs
|
|
1867
1899
|
}
|
|
1868
1900
|
),
|
|
1869
|
-
tab === "servers" ? /* @__PURE__ */ (0,
|
|
1901
|
+
tab === "servers" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: McpOpsSection_default.tabPanel, role: "tabpanel", id: panelId("servers"), "data-panel": "servers", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1870
1902
|
ServerList,
|
|
1871
1903
|
{
|
|
1872
1904
|
t,
|
|
@@ -1886,16 +1918,16 @@ function McpOpsSection(props) {
|
|
|
1886
1918
|
setFormError(null);
|
|
1887
1919
|
},
|
|
1888
1920
|
onRefreshList: () => void load(true),
|
|
1889
|
-
notice: /* @__PURE__ */ (0,
|
|
1890
|
-
error !== null ? /* @__PURE__ */ (0,
|
|
1921
|
+
notice: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
1922
|
+
error !== null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: McpOpsSection_default.error, role: "alert", children: [
|
|
1891
1923
|
t("errorTitle"),
|
|
1892
1924
|
"\uFF1A",
|
|
1893
1925
|
error
|
|
1894
1926
|
] }) : null,
|
|
1895
|
-
note === null ? null : /* @__PURE__ */ (0,
|
|
1927
|
+
note === null ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: McpOpsSection_default.saved, children: note })
|
|
1896
1928
|
] })
|
|
1897
1929
|
}
|
|
1898
|
-
) }) : tab === "env" ? /* @__PURE__ */ (0,
|
|
1930
|
+
) }) : tab === "env" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: McpOpsSection_default.tabPanel, role: "tabpanel", id: panelId("env"), "data-panel": "env", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1899
1931
|
EnvPanel,
|
|
1900
1932
|
{
|
|
1901
1933
|
t,
|
|
@@ -1906,8 +1938,8 @@ function McpOpsSection(props) {
|
|
|
1906
1938
|
await run(async () => await propsRef.current.envInject(enabled), t("saved"));
|
|
1907
1939
|
}
|
|
1908
1940
|
}
|
|
1909
|
-
) }) : /* @__PURE__ */ (0,
|
|
1910
|
-
editing === null ? null : /* @__PURE__ */ (0,
|
|
1941
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: McpOpsSection_default.tabPanel, role: "tabpanel", id: panelId("mode"), "data-panel": "mode", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InjectionMode, { t, mode: tools?.mode ?? "search", busy, onChange: changeMode }) }),
|
|
1942
|
+
editing === null ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1911
1943
|
import_dsh_client_ui_primitives6.Modal,
|
|
1912
1944
|
{
|
|
1913
1945
|
open: true,
|
|
@@ -1915,7 +1947,7 @@ function McpOpsSection(props) {
|
|
|
1915
1947
|
title: editing.serverName === "" ? t("formNew") : t("formEdit"),
|
|
1916
1948
|
onClose: closeForm,
|
|
1917
1949
|
className: McpOpsSection_default.dialog,
|
|
1918
|
-
children: /* @__PURE__ */ (0,
|
|
1950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: McpOpsSection_default.modal, "data-plugin": "dsh-mcp-ops", "data-role": "form-modal", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1919
1951
|
ServerForm,
|
|
1920
1952
|
{
|
|
1921
1953
|
t,
|
|
@@ -1934,7 +1966,7 @@ function McpOpsSection(props) {
|
|
|
1934
1966
|
) })
|
|
1935
1967
|
}
|
|
1936
1968
|
),
|
|
1937
|
-
confirm === null ? null : /* @__PURE__ */ (0,
|
|
1969
|
+
confirm === null ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1938
1970
|
ConfirmDialog,
|
|
1939
1971
|
{
|
|
1940
1972
|
t,
|
|
@@ -1990,6 +2022,11 @@ async function activate(ctx) {
|
|
|
1990
2022
|
await ctx.remote.$mount(remote_contribution_default);
|
|
1991
2023
|
ctx.effect(() => ctx.locale.register(NS, { zh, en }), "dsh-mcp-ops: dictionaries");
|
|
1992
2024
|
const t = ctx.locale.bind(NS);
|
|
2025
|
+
ctx.slots.inject("settings.section.icon", () => ctx.slots.register({
|
|
2026
|
+
name: "settings.section.icon",
|
|
2027
|
+
id: "mcp-ops",
|
|
2028
|
+
order: 26
|
|
2029
|
+
}, McpNavIcon));
|
|
1993
2030
|
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
1994
2031
|
name: "settings.section",
|
|
1995
2032
|
id: "mcp-ops",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mcp-ops",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MCP 服务管理:增删改查与启停、连接测试、工具按需检索与全量注入、进程级与服务级环境变量(含密钥);MCP service management: CRUD, connection tests, tool injection, environment variables and secrets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|