dsh-plugin-opc 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +620 -90
- package/lib/index.js +435 -123
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -178,7 +178,7 @@ function registerMentions(ctx, api) {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
// src/client/index.tsx
|
|
181
|
-
var
|
|
181
|
+
var import_react12 = __toESM(require("react"), 1);
|
|
182
182
|
|
|
183
183
|
// node_modules/zod/v4/classic/external.js
|
|
184
184
|
var external_exports = {};
|
|
@@ -19901,6 +19901,7 @@ function date4(params) {
|
|
|
19901
19901
|
var contribution = { package: "dsh-plugin-opc", descriptors: [
|
|
19902
19902
|
{ id: "dsh-plugin-opc#opc/appList", service: "opc", namespace: "opc", method: "appList", invocation: { kind: "direct" }, parameters: [{ name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appList:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appList:result", create: () => external_exports.string() } },
|
|
19903
19903
|
{ id: "dsh-plugin-opc#opc/appJob", service: "opc", namespace: "opc", method: "appJob", invocation: { kind: "direct" }, parameters: [{ name: "id", wire: "id", source: "json", codec: { mode: "strict", typeSymbol: "opc/appJob:id", create: () => external_exports.string() } }, { name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appJob:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appJob:result", create: () => external_exports.string() } },
|
|
19904
|
+
{ id: "dsh-plugin-opc#opc/appJobByAnalysisSession", service: "opc", namespace: "opc", method: "appJobByAnalysisSession", invocation: { kind: "direct" }, parameters: [{ name: "sessionId", wire: "sessionId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appJobByAnalysisSession:sessionId", create: () => external_exports.string() } }, { name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appJobByAnalysisSession:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appJobByAnalysisSession:result", create: () => external_exports.string() } },
|
|
19904
19905
|
{ id: "dsh-plugin-opc#opc/appCheckSlug", service: "opc", namespace: "opc", method: "appCheckSlug", invocation: { kind: "direct" }, parameters: [{ name: "slug", wire: "slug", source: "json", codec: { mode: "strict", typeSymbol: "opc/appCheckSlug:slug", create: () => external_exports.string() } }, { name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appCheckSlug:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appCheckSlug:result", create: () => external_exports.string() } },
|
|
19905
19906
|
{ id: "dsh-plugin-opc#opc/appOpcConfig", service: "opc", namespace: "opc", method: "appOpcConfig", invocation: { kind: "direct" }, parameters: [{ name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appOpcConfig:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appOpcConfig:result", create: () => external_exports.string() } },
|
|
19906
19907
|
{ id: "dsh-plugin-opc#opc/appPickSourceFolder", service: "opc", namespace: "opc", method: "appPickSourceFolder", invocation: { kind: "direct" }, parameters: [{ name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appPickSourceFolder:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appPickSourceFolder:result", create: () => external_exports.string() } },
|
|
@@ -19935,6 +19936,10 @@ var contribution = { package: "dsh-plugin-opc", descriptors: [
|
|
|
19935
19936
|
{ id: "dsh-plugin-opc#opc/appUpdateConfig", service: "opc", namespace: "opc", method: "appUpdateConfig", invocation: { kind: "direct" }, parameters: [{ name: "slug", wire: "slug", source: "json", codec: { mode: "strict", typeSymbol: "opc/appUpdateConfig:slug", create: () => external_exports.string() } }, { name: "bodyJson", wire: "bodyJson", source: "json", codec: { mode: "strict", typeSymbol: "opc/appUpdateConfig:bodyJson", create: () => external_exports.string() } }, { name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appUpdateConfig:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appUpdateConfig:result", create: () => external_exports.string() } },
|
|
19936
19937
|
{ id: "dsh-plugin-opc#opc/appDelete", service: "opc", namespace: "opc", method: "appDelete", invocation: { kind: "direct" }, parameters: [{ name: "slug", wire: "slug", source: "json", codec: { mode: "strict", typeSymbol: "opc/appDelete:slug", create: () => external_exports.string() } }, { name: "purgeVolumes", wire: "purgeVolumes", source: "json", codec: { mode: "strict", typeSymbol: "opc/appDelete:purgeVolumes", create: () => external_exports.boolean() } }, { name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appDelete:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appDelete:result", create: () => external_exports.string() } },
|
|
19937
19938
|
{ id: "dsh-plugin-opc#opc/appRollback", service: "opc", namespace: "opc", method: "appRollback", invocation: { kind: "direct" }, parameters: [{ name: "slug", wire: "slug", source: "json", codec: { mode: "strict", typeSymbol: "opc/appRollback:slug", create: () => external_exports.string() } }, { name: "payloadJson", wire: "payloadJson", source: "json", codec: { mode: "strict", typeSymbol: "opc/appRollback:payloadJson", create: () => external_exports.string() } }, { name: "expectedContextId", wire: "expectedContextId", source: "json", codec: { mode: "strict", typeSymbol: "opc/appRollback:expectedContextId", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/appRollback:result", create: () => external_exports.string() } },
|
|
19939
|
+
{ id: "dsh-plugin-opc#opc/opcConfigGet", service: "opc", namespace: "opc", method: "opcConfigGet", invocation: { kind: "direct" }, parameters: [], result: { mode: "strict", typeSymbol: "opc/opcConfigGet:result", create: () => external_exports.string() } },
|
|
19940
|
+
{ id: "dsh-plugin-opc#opc/opcConfigUpdate", service: "opc", namespace: "opc", method: "opcConfigUpdate", invocation: { kind: "direct" }, parameters: [{ name: "payloadJson", wire: "payloadJson", source: "json", codec: { mode: "strict", typeSymbol: "opc/opcConfigUpdate:payloadJson", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/opcConfigUpdate:result", create: () => external_exports.string() } },
|
|
19941
|
+
{ id: "dsh-plugin-opc#opc/opcConfigReset", service: "opc", namespace: "opc", method: "opcConfigReset", invocation: { kind: "direct" }, parameters: [], result: { mode: "strict", typeSymbol: "opc/opcConfigReset:result", create: () => external_exports.string() } },
|
|
19942
|
+
{ id: "dsh-plugin-opc#opc/opcConfigTest", service: "opc", namespace: "opc", method: "opcConfigTest", invocation: { kind: "direct" }, parameters: [{ name: "url", wire: "url", source: "json", codec: { mode: "strict", typeSymbol: "opc/opcConfigTest:url", create: () => external_exports.string() } }], result: { mode: "strict", typeSymbol: "opc/opcConfigTest:result", create: () => external_exports.string() } },
|
|
19938
19943
|
{ id: "dsh-plugin-opc#opc/state", service: "opc", namespace: "opc", method: "state", invocation: { kind: "direct" }, parameters: [], result: { mode: "strict", typeSymbol: "opc/state:result", create: () => external_exports.string() } },
|
|
19939
19944
|
{ id: "dsh-plugin-opc#opc/watchState", service: "opc", namespace: "opc", method: "watchState", invocation: { kind: "direct" }, mode: "stream", cancellation: { parameter: "signal" }, parameters: [], result: { mode: "strict", typeSymbol: "opc/watchState:result", create: () => external_exports.string() } },
|
|
19940
19945
|
{ id: "dsh-plugin-opc#opc/startLogin", service: "opc", namespace: "opc", method: "startLogin", invocation: { kind: "direct" }, parameters: [], result: { mode: "strict", typeSymbol: "opc/startLogin:result", create: () => external_exports.string() } },
|
|
@@ -19958,7 +19963,7 @@ var contribution = { package: "dsh-plugin-opc", descriptors: [
|
|
|
19958
19963
|
var TYPERT = { package: contribution.package, face: "host", schemas: [], invocations: contribution.descriptors, model: { services: [], events: [], objects: [] } };
|
|
19959
19964
|
|
|
19960
19965
|
// src/client/Panel.tsx
|
|
19961
|
-
var
|
|
19966
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
19962
19967
|
|
|
19963
19968
|
// node_modules/devlop/lib/default.js
|
|
19964
19969
|
function ok() {
|
|
@@ -30502,6 +30507,7 @@ function AppDeliveryReview({
|
|
|
30502
30507
|
onReplaceSource,
|
|
30503
30508
|
onNextStep,
|
|
30504
30509
|
onInvalidate,
|
|
30510
|
+
beginAnalysisNavigation,
|
|
30505
30511
|
initialFeedback = "",
|
|
30506
30512
|
repairMode = false,
|
|
30507
30513
|
onlineResources = [],
|
|
@@ -30589,15 +30595,16 @@ function AppDeliveryReview({
|
|
|
30589
30595
|
const sendFeedback = async (customText, resume = false) => {
|
|
30590
30596
|
const content3 = (customText ?? feedback).trim();
|
|
30591
30597
|
if (!content3 && !resume || running || inFlight.current) return;
|
|
30598
|
+
const navigate = beginAnalysisNavigation?.();
|
|
30592
30599
|
inFlight.current = true;
|
|
30593
30600
|
setBusy(true);
|
|
30594
30601
|
setError("");
|
|
30595
30602
|
try {
|
|
30596
30603
|
const mode = resume ? "resume" : repairMode || job?.analysis_mode === "repair" || job?.analysisMode === "repair" ? "repair" : "analysis";
|
|
30597
|
-
|
|
30598
|
-
|
|
30599
|
-
|
|
30600
|
-
|
|
30604
|
+
const raw = api.appAnalyzeWithMode ? await api.appAnalyzeWithMode(jobId, resume ? "" : content3, sessionId, mode, contextId) : await api.appAnalyze(jobId, content3, sessionId, contextId);
|
|
30605
|
+
if (navigate) {
|
|
30606
|
+
const updated = JSON.parse(raw);
|
|
30607
|
+
if (updated?.id === jobId) navigate(updated);
|
|
30601
30608
|
}
|
|
30602
30609
|
onInvalidate?.();
|
|
30603
30610
|
preparing.current = "";
|
|
@@ -56060,7 +56067,7 @@ var SLUG_RE = /^[a-z][a-z0-9-]{2,39}$/;
|
|
|
56060
56067
|
var MAX_ZIP_BYTES = 64 * 1024 * 1024;
|
|
56061
56068
|
var DRAFT_DISMISS_STORAGE_PREFIX = "opc-apps-dismissed-draft:";
|
|
56062
56069
|
var DEFAULT_OPC_CONFIG = {
|
|
56063
|
-
appDomainRoot: "
|
|
56070
|
+
appDomainRoot: "10.101.102.116.nip.io:8080",
|
|
56064
56071
|
defaultPort: 8080,
|
|
56065
56072
|
platformBaseUrl: ""
|
|
56066
56073
|
};
|
|
@@ -56206,6 +56213,7 @@ function inferStepForJob(job) {
|
|
|
56206
56213
|
case "ready":
|
|
56207
56214
|
return 3;
|
|
56208
56215
|
case "building":
|
|
56216
|
+
case "publishing":
|
|
56209
56217
|
case "verifying":
|
|
56210
56218
|
case "awaiting_page_verification":
|
|
56211
56219
|
case "verified":
|
|
@@ -56213,6 +56221,7 @@ function inferStepForJob(job) {
|
|
|
56213
56221
|
return 4;
|
|
56214
56222
|
case "failed":
|
|
56215
56223
|
if (job.failureStage === "import") return 1;
|
|
56224
|
+
if (job.failureStage === "deployment" || job.failureStage === "verification") return 4;
|
|
56216
56225
|
if (job.failureStage === "analysis" || job.failureStage === "preparation" || job.analysis_failure && !job.published) return 2;
|
|
56217
56226
|
if (job.published) return 4;
|
|
56218
56227
|
if (job.proposal) return 2;
|
|
@@ -56299,9 +56308,21 @@ function AppsPanel({
|
|
|
56299
56308
|
api,
|
|
56300
56309
|
sessionId,
|
|
56301
56310
|
contextId,
|
|
56302
|
-
refreshSignal = 0
|
|
56311
|
+
refreshSignal = 0,
|
|
56312
|
+
prepareAnalysisNavigation
|
|
56303
56313
|
}) {
|
|
56304
56314
|
const [viewMode, setViewMode] = (0, import_react8.useState)("list");
|
|
56315
|
+
const [loadingLinkedJob, setLoadingLinkedJob] = (0, import_react8.useState)(Boolean(api.appJobByAnalysisSession));
|
|
56316
|
+
const [linkedJob, setLinkedJob] = (0, import_react8.useState)(null);
|
|
56317
|
+
const restoredLinkedJob = (0, import_react8.useRef)(false);
|
|
56318
|
+
const analysisViewActive = (0, import_react8.useRef)(false);
|
|
56319
|
+
(0, import_react8.useEffect)(() => {
|
|
56320
|
+
analysisViewActive.current = viewMode === "wizard";
|
|
56321
|
+
return () => {
|
|
56322
|
+
analysisViewActive.current = false;
|
|
56323
|
+
};
|
|
56324
|
+
}, [viewMode]);
|
|
56325
|
+
const beginAnalysisNavigation = () => prepareAnalysisNavigation?.(sessionId, contextId, () => analysisViewActive.current);
|
|
56305
56326
|
const [loadingList, setLoadingList] = (0, import_react8.useState)(true);
|
|
56306
56327
|
const [apps, setApps] = (0, import_react8.useState)([]);
|
|
56307
56328
|
const [jobs, setJobs] = (0, import_react8.useState)([]);
|
|
@@ -56430,6 +56451,11 @@ function AppsPanel({
|
|
|
56430
56451
|
(0, import_react8.useEffect)(() => {
|
|
56431
56452
|
void loadWorkspaceData(false);
|
|
56432
56453
|
}, [loadWorkspaceData, refreshSignal]);
|
|
56454
|
+
(0, import_react8.useEffect)(() => {
|
|
56455
|
+
if (viewMode === "wizard" && wizardStep === 1 && !wizardJob && !upgradeTarget) {
|
|
56456
|
+
setContainerPort(String(opcConfig.defaultPort));
|
|
56457
|
+
}
|
|
56458
|
+
}, [opcConfig.defaultPort, upgradeTarget, viewMode, wizardJob, wizardStep]);
|
|
56433
56459
|
(0, import_react8.useEffect)(() => {
|
|
56434
56460
|
if (modelGroups.length === 0) return;
|
|
56435
56461
|
const currentGroup = modelGroups.find((g) => g.id === selectedProvider) ?? modelGroups[0];
|
|
@@ -56689,7 +56715,7 @@ function AppsPanel({
|
|
|
56689
56715
|
[opcConfig.defaultPort]
|
|
56690
56716
|
);
|
|
56691
56717
|
const resumeWizardJob = (0, import_react8.useCallback)(
|
|
56692
|
-
async (job, overrideStep) => {
|
|
56718
|
+
async (job, overrideStep, useSnapshot = false) => {
|
|
56693
56719
|
setWizardError(null);
|
|
56694
56720
|
setWizardNotice(null);
|
|
56695
56721
|
setVerifyCredentials({});
|
|
@@ -56699,7 +56725,7 @@ function AppsPanel({
|
|
|
56699
56725
|
setReviewInitialFeedback("");
|
|
56700
56726
|
setConfigSubTab("configs");
|
|
56701
56727
|
setViewMode("wizard");
|
|
56702
|
-
const fresh = await refreshWizardJob(job.id) ?? job;
|
|
56728
|
+
const fresh = useSnapshot ? job : await refreshWizardJob(job.id) ?? job;
|
|
56703
56729
|
setWizardJob(fresh);
|
|
56704
56730
|
setUpgradeTarget(fresh.published || fresh.upgrade ? apps.find((a) => a.slug === fresh.slug && a.can_manage === true) ?? null : null);
|
|
56705
56731
|
const targetStep = overrideStep ?? inferStepForJob(fresh);
|
|
@@ -56719,6 +56745,35 @@ function AppsPanel({
|
|
|
56719
56745
|
},
|
|
56720
56746
|
[apps, fetchWizardLogs, opcConfig.defaultPort, refreshWizardJob, syncStep3Drafts]
|
|
56721
56747
|
);
|
|
56748
|
+
const openLinkedJob = (0, import_react8.useCallback)(async (job, refresh = true) => {
|
|
56749
|
+
const fresh = refresh ? await refreshWizardJob(job.id) ?? job : job;
|
|
56750
|
+
if (fresh.status === "verified") await openAppDetail(fresh.slug);
|
|
56751
|
+
else await resumeWizardJob(fresh, void 0, true);
|
|
56752
|
+
}, [openAppDetail, refreshWizardJob, resumeWizardJob]);
|
|
56753
|
+
(0, import_react8.useEffect)(() => {
|
|
56754
|
+
if (!api.appJobByAnalysisSession) return;
|
|
56755
|
+
let active = true;
|
|
56756
|
+
void api.appJobByAnalysisSession(sessionId, contextId).then((raw) => {
|
|
56757
|
+
if (active) setLinkedJob(parseJson(raw, null));
|
|
56758
|
+
}).catch((error62) => {
|
|
56759
|
+
if (active) setBannerError(readErrorMessage(error62, "\u65E0\u6CD5\u6062\u590D\u4E0E\u5F53\u524D\u4F1A\u8BDD\u5173\u8054\u7684\u4EFB\u52A1"));
|
|
56760
|
+
}).finally(() => {
|
|
56761
|
+
if (active) setLoadingLinkedJob(false);
|
|
56762
|
+
});
|
|
56763
|
+
return () => {
|
|
56764
|
+
active = false;
|
|
56765
|
+
};
|
|
56766
|
+
}, [api, contextId, sessionId]);
|
|
56767
|
+
(0, import_react8.useEffect)(() => {
|
|
56768
|
+
if (loadingLinkedJob || !linkedJob || restoredLinkedJob.current) return;
|
|
56769
|
+
restoredLinkedJob.current = true;
|
|
56770
|
+
void openLinkedJob(linkedJob, false);
|
|
56771
|
+
}, [linkedJob, loadingLinkedJob, openLinkedJob]);
|
|
56772
|
+
(0, import_react8.useEffect)(() => {
|
|
56773
|
+
if (viewMode !== "wizard" || wizardJob?.id !== linkedJob?.id || upgradeTarget || !(wizardJob?.upgrade || wizardJob?.published)) return;
|
|
56774
|
+
const target = apps.find((app) => app.slug === wizardJob.slug && app.can_manage === true);
|
|
56775
|
+
if (target) setUpgradeTarget(target);
|
|
56776
|
+
}, [apps, linkedJob?.id, upgradeTarget, viewMode, wizardJob]);
|
|
56722
56777
|
const handleStep1Submit = async (e) => {
|
|
56723
56778
|
e.preventDefault();
|
|
56724
56779
|
setWizardError(null);
|
|
@@ -56753,6 +56808,7 @@ function AppsPanel({
|
|
|
56753
56808
|
setWizardError("\u8BF7\u9009\u62E9\u6216\u586B\u5199\u672C\u673A\u6E90\u7801\u76EE\u5F55\u7684\u5B8C\u6574\u8DEF\u5F84");
|
|
56754
56809
|
return;
|
|
56755
56810
|
}
|
|
56811
|
+
const navigate = beginAnalysisNavigation();
|
|
56756
56812
|
setWizardBusy(true);
|
|
56757
56813
|
try {
|
|
56758
56814
|
const payload = {
|
|
@@ -56785,7 +56841,10 @@ function AppsPanel({
|
|
|
56785
56841
|
const analyzePromise = api.appAnalyzeWithMode ? api.appAnalyzeWithMode(created.id, "", sessionId, "analysis", contextId) : api.appAnalyze(created.id, "", sessionId, contextId);
|
|
56786
56842
|
void analyzePromise.then((updatedRaw) => {
|
|
56787
56843
|
const updated = parseJson(updatedRaw, null);
|
|
56788
|
-
if (updated)
|
|
56844
|
+
if (updated) {
|
|
56845
|
+
setWizardJob(updated);
|
|
56846
|
+
navigate?.(updated);
|
|
56847
|
+
}
|
|
56789
56848
|
void loadWorkspaceData(true);
|
|
56790
56849
|
}).catch((err) => {
|
|
56791
56850
|
setWizardError(readErrorMessage(err, "\u542F\u52A8\u6E90\u7801\u5206\u6790\u5931\u8D25"));
|
|
@@ -56986,6 +57045,7 @@ function AppsPanel({
|
|
|
56986
57045
|
};
|
|
56987
57046
|
const handleLaunchRepair = async () => {
|
|
56988
57047
|
if (!wizardJob) return;
|
|
57048
|
+
const navigate = beginAnalysisNavigation();
|
|
56989
57049
|
setWizardBusy(true);
|
|
56990
57050
|
setWizardError(null);
|
|
56991
57051
|
try {
|
|
@@ -56999,7 +57059,10 @@ function AppsPanel({
|
|
|
56999
57059
|
setWizardStep(2);
|
|
57000
57060
|
void analyzePromise.then((raw) => {
|
|
57001
57061
|
const updated = parseJson(raw, null);
|
|
57002
|
-
if (updated)
|
|
57062
|
+
if (updated) {
|
|
57063
|
+
setWizardJob(updated);
|
|
57064
|
+
navigate?.(updated);
|
|
57065
|
+
}
|
|
57003
57066
|
}).catch((err) => {
|
|
57004
57067
|
setWizardError(readErrorMessage(err, "\u542F\u52A8\u4FEE\u590D\u5206\u6790\u5931\u8D25"));
|
|
57005
57068
|
void refreshWizardJob(wizardJob.id);
|
|
@@ -57216,7 +57279,7 @@ function AppsPanel({
|
|
|
57216
57279
|
const currentVersion = (version2) => version2.is_active || detailApp?.status === "running" && detailApp.current_version === version2.version;
|
|
57217
57280
|
const hasRunningVersion = detailApp?.status === "running" || versions.some((v) => v.status === "running" || v.is_active);
|
|
57218
57281
|
const visibleVersions = versions.filter((version2, index3) => currentVersion(version2) || version2.status !== "failed" || !hasRunningVersion && index3 === 0);
|
|
57219
|
-
const renderAppListView = () => /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 16 } }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-topbar" }, /* @__PURE__ */ import_react8.default.createElement("div", null, /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 10, flexWrap: "wrap" } }, /* @__PURE__ */ import_react8.default.createElement("h2", { className: "oa-title" }, "\u4F01\u4E1A\u5E94\u7528"), /* @__PURE__ */ import_react8.default.createElement("span", { className: "oa-pill oa-pill-accent" }, apps.length, " \u4E2A\u5E94\u7528")), /* @__PURE__ */ import_react8.default.createElement("p", { className: "oa-subtitle", style: { marginTop: 4 } }, "\u5C06\u672C\u5730\u9879\u76EE\u63A5\u5165\u5E73\u53F0\u8FD0\u884C\u73AF\u5883\uFF0C\u81EA\u52A8\u5B8C\u6210\u5206\u6790\u6539\u9020\u3001\u914D\u7F6E\u6258\u7BA1\u4E0E\u4E0A\u7EBF\u53D1\u5E03\uFF0C\u540C\u65F6\u751F\u6210\u53EF\u8C03\u7528\u7684\u667A\u80FD\u4F53\u6280\u80FD\u3002")), /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8 } }, /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn", disabled: loadingList, onClick: () => void loadWorkspaceData(false) }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "refresh", size: 14, className: loadingList ? "oa-spin" : "" }), /* @__PURE__ */ import_react8.default.createElement("span", null, "\u5237\u65B0")), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-primary", onClick: () => startWizardNew() }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "plus", size: 14 }), /* @__PURE__ */ import_react8.default.createElement("span", null, "\u65B0\u5EFA\u5E94\u7528")))), bannerError && /* @__PURE__ */ import_react8.default.createElement("div", { role: "alert", className: "oa-alert oa-alert-danger" }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "warning", size: 16 }), /* @__PURE__ */ import_react8.default.createElement("div", { style: { flex: 1 } }, bannerError), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-xs", onClick: () => setBannerError(null) }, "\u5173\u95ED")), bannerNotice && /* @__PURE__ */ import_react8.default.createElement("div", { role: "status", className: "oa-alert oa-alert-ok" }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "check", size: 16 }), /* @__PURE__ */ import_react8.default.createElement("div", { style: { flex: 1 } }, bannerNotice), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-xs", onClick: () => setBannerNotice(null) }, "\u5173\u95ED")), resumableJob && (() => {
|
|
57282
|
+
const renderAppListView = () => /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 16 } }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-topbar" }, /* @__PURE__ */ import_react8.default.createElement("div", null, /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 10, flexWrap: "wrap" } }, /* @__PURE__ */ import_react8.default.createElement("h2", { className: "oa-title" }, "\u4F01\u4E1A\u5E94\u7528"), /* @__PURE__ */ import_react8.default.createElement("span", { className: "oa-pill oa-pill-accent" }, apps.length, " \u4E2A\u5E94\u7528")), /* @__PURE__ */ import_react8.default.createElement("p", { className: "oa-subtitle", style: { marginTop: 4 } }, "\u5C06\u672C\u5730\u9879\u76EE\u63A5\u5165\u5E73\u53F0\u8FD0\u884C\u73AF\u5883\uFF0C\u81EA\u52A8\u5B8C\u6210\u5206\u6790\u6539\u9020\u3001\u914D\u7F6E\u6258\u7BA1\u4E0E\u4E0A\u7EBF\u53D1\u5E03\uFF0C\u540C\u65F6\u751F\u6210\u53EF\u8C03\u7528\u7684\u667A\u80FD\u4F53\u6280\u80FD\u3002")), /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8 } }, /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn", disabled: loadingList, onClick: () => void loadWorkspaceData(false) }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "refresh", size: 14, className: loadingList ? "oa-spin" : "" }), /* @__PURE__ */ import_react8.default.createElement("span", null, "\u5237\u65B0")), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-primary", onClick: () => startWizardNew() }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "plus", size: 14 }), /* @__PURE__ */ import_react8.default.createElement("span", null, "\u65B0\u5EFA\u5E94\u7528")))), bannerError && /* @__PURE__ */ import_react8.default.createElement("div", { role: "alert", className: "oa-alert oa-alert-danger" }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "warning", size: 16 }), /* @__PURE__ */ import_react8.default.createElement("div", { style: { flex: 1 } }, bannerError), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-xs", onClick: () => setBannerError(null) }, "\u5173\u95ED")), bannerNotice && /* @__PURE__ */ import_react8.default.createElement("div", { role: "status", className: "oa-alert oa-alert-ok" }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "check", size: 16 }), /* @__PURE__ */ import_react8.default.createElement("div", { style: { flex: 1 } }, bannerNotice), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-xs", onClick: () => setBannerNotice(null) }, "\u5173\u95ED")), linkedJob && /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-draft-banner" }, /* @__PURE__ */ import_react8.default.createElement("div", null, /* @__PURE__ */ import_react8.default.createElement("strong", null, linkedJob.name)), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-sm oa-btn-primary", onClick: () => void openLinkedJob(linkedJob) }, "\u56DE\u5230\u5F53\u524D\u4EFB\u52A1")), resumableJob && resumableJob.id !== linkedJob?.id && (() => {
|
|
57220
57283
|
const tone = jobStatusTone(resumableJob.status, resumableJob.userDisabled);
|
|
57221
57284
|
return /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-draft-banner" }, /* @__PURE__ */ import_react8.default.createElement("div", { style: { minWidth: 0, flex: 1 } }, /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" } }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "sparkle", size: 15 }), /* @__PURE__ */ import_react8.default.createElement("strong", { style: { fontSize: 13.5, color: "#0f172a" } }, "\u672A\u5B8C\u6210\u7684\u5E94\u7528\u4EA4\u4ED8\u4EFB\u52A1\uFF1A", resumableJob.name), /* @__PURE__ */ import_react8.default.createElement("span", { className: "oa-code" }, resumableJob.slug), /* @__PURE__ */ import_react8.default.createElement("span", { className: `oa-pill ${tone.pillClass}` }, tone.spinning && /* @__PURE__ */ import_react8.default.createElement("span", { className: "oa-dot oa-pulse" }), tone.text)), /* @__PURE__ */ import_react8.default.createElement("p", { className: "oa-hint", style: { marginTop: 4 } }, resumableJob.status === "awaiting_page_verification" ? "\u5BB9\u5668\u4E0E\u63A5\u53E3\u68C0\u67E5\u5DF2\u5C31\u7EEA\uFF0C\u8BF7\u6253\u5F00\u5E94\u7528\u9875\u9762\u786E\u8BA4\u540E\u542F\u7528\u667A\u80FD\u4F53\u6280\u80FD\u3002" : resumableJob.error || resumableJob.analysis_failure || "\u53EF\u4ECE\u4E0A\u6B21\u8FDB\u5EA6\u7EE7\u7EED\u529E\u7406\u6216\u8C03\u6574\u6E90\u7801\u65B9\u6848\u3002")), /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, flexShrink: 0 } }, /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-sm oa-btn-primary", onClick: () => void resumeWizardJob(resumableJob) }, "\u7EE7\u7EED\u529E\u7406"), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-sm", onClick: () => dismissDraftBanner(resumableJob) }, "\u9690\u85CF\u63D0\u793A")));
|
|
57222
57285
|
})(), loadingList && apps.length === 0 ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-form-card", style: { textAlign: "center", padding: "44px 20px", color: "#64748b" } }, "\u6B63\u5728\u52A0\u8F7D\u4F01\u4E1A\u5E94\u7528\u76EE\u5F55\u2026") : apps.length === 0 ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-form-card", style: { textAlign: "center", padding: "48px 24px" } }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-app-icon-box", style: { margin: "0 auto 14px", width: 48, height: 48 } }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "sparkle", size: 22 })), /* @__PURE__ */ import_react8.default.createElement("div", { style: { fontSize: 16, fontWeight: 600, color: "#0f172a" } }, "\u6682\u65E0\u5DF2\u90E8\u7F72\u7684\u4F01\u4E1A\u5E94\u7528"), /* @__PURE__ */ import_react8.default.createElement("p", { className: "oa-subtitle", style: { maxWidth: 460, margin: "8px auto 18px" } }, "\u4E0A\u4F20\u9879\u76EE\u538B\u7F29\u5305\u6216\u9009\u62E9\u672C\u5730\u9879\u76EE\u6587\u4EF6\u5939\uFF0CAI \u5C06\u81EA\u52A8\u5206\u6790\u8FD0\u884C\u73AF\u5883\u3001\u6258\u7BA1\u914D\u7F6E\u5E76\u53D1\u5E03\u5230\u4F01\u4E1A\u8BBF\u95EE\u57DF\u540D\uFF0C\u540C\u65F6\u751F\u6210\u540C\u540D\u5E94\u7528\u6280\u80FD\u3002"), /* @__PURE__ */ import_react8.default.createElement("button", { type: "button", className: "oa-btn oa-btn-primary", onClick: () => startWizardNew() }, /* @__PURE__ */ import_react8.default.createElement(AppIcon, { name: "plus", size: 14 }), /* @__PURE__ */ import_react8.default.createElement("span", null, "\u65B0\u5EFA\u7B2C\u4E00\u4E2A\u5E94\u7528"))) : /* @__PURE__ */ import_react8.default.createElement("div", { className: "oa-apps-grid" }, apps.map((app) => {
|
|
@@ -57462,6 +57525,7 @@ function AppsPanel({
|
|
|
57462
57525
|
sessionId,
|
|
57463
57526
|
contextId,
|
|
57464
57527
|
jobId: wizardJob.id,
|
|
57528
|
+
beginAnalysisNavigation,
|
|
57465
57529
|
footerMode: "external",
|
|
57466
57530
|
onlineResources: resources,
|
|
57467
57531
|
repairMode: wizardJob.analysis_mode === "repair" || wizardJob.analysisMode === "repair",
|
|
@@ -57943,7 +58007,375 @@ function AppsPanel({
|
|
|
57943
58007
|
"\u53D6\u6D88"
|
|
57944
58008
|
))))));
|
|
57945
58009
|
};
|
|
57946
|
-
return /* @__PURE__ */ import_react8.default.createElement("div", { className: "opc-apps-root" }, /* @__PURE__ */ import_react8.default.createElement("style", null, appsCss), viewMode === "list" && renderAppListView(), viewMode === "wizard" && renderWizardView(), viewMode === "detail" && renderDetailView());
|
|
58010
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { className: "opc-apps-root" }, /* @__PURE__ */ import_react8.default.createElement("style", null, appsCss), viewMode === "list" && (loadingLinkedJob || linkedJob && !restoredLinkedJob.current ? /* @__PURE__ */ import_react8.default.createElement("p", { role: "status" }, "\u6B63\u5728\u67E5\u627E\u5F53\u524D\u4F1A\u8BDD\u7684\u5E94\u7528\u4EFB\u52A1\u2026") : renderAppListView()), viewMode === "wizard" && renderWizardView(), viewMode === "detail" && renderDetailView());
|
|
58011
|
+
}
|
|
58012
|
+
|
|
58013
|
+
// src/client/OpcSettingsPanel.tsx
|
|
58014
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
58015
|
+
var settingsCss = `
|
|
58016
|
+
.opc-settings-wrap {
|
|
58017
|
+
max-width: 720px;
|
|
58018
|
+
margin: 0 auto;
|
|
58019
|
+
display: flex;
|
|
58020
|
+
flex-direction: column;
|
|
58021
|
+
gap: 16px;
|
|
58022
|
+
}
|
|
58023
|
+
.opc-settings-head {
|
|
58024
|
+
display: flex;
|
|
58025
|
+
align-items: flex-start;
|
|
58026
|
+
justify-content: space-between;
|
|
58027
|
+
gap: 12px;
|
|
58028
|
+
flex-wrap: wrap;
|
|
58029
|
+
}
|
|
58030
|
+
.opc-settings-title {
|
|
58031
|
+
margin: 0;
|
|
58032
|
+
font-size: 18px;
|
|
58033
|
+
font-weight: 650;
|
|
58034
|
+
color: #0f172a;
|
|
58035
|
+
line-height: 1.3;
|
|
58036
|
+
}
|
|
58037
|
+
.opc-settings-sub {
|
|
58038
|
+
margin: 4px 0 0;
|
|
58039
|
+
font-size: 12.5px;
|
|
58040
|
+
color: #64748b;
|
|
58041
|
+
line-height: 1.5;
|
|
58042
|
+
}
|
|
58043
|
+
.opc-settings-card {
|
|
58044
|
+
background: #ffffff;
|
|
58045
|
+
border: 1px solid #e2e8f0;
|
|
58046
|
+
border-radius: 12px;
|
|
58047
|
+
padding: 18px;
|
|
58048
|
+
display: flex;
|
|
58049
|
+
flex-direction: column;
|
|
58050
|
+
gap: 12px;
|
|
58051
|
+
}
|
|
58052
|
+
.opc-settings-card-head {
|
|
58053
|
+
display: flex;
|
|
58054
|
+
align-items: center;
|
|
58055
|
+
justify-content: space-between;
|
|
58056
|
+
gap: 8px;
|
|
58057
|
+
flex-wrap: wrap;
|
|
58058
|
+
}
|
|
58059
|
+
.opc-settings-card-title {
|
|
58060
|
+
margin: 0;
|
|
58061
|
+
font-size: 15px;
|
|
58062
|
+
font-weight: 650;
|
|
58063
|
+
color: #0f172a;
|
|
58064
|
+
}
|
|
58065
|
+
.opc-settings-pill {
|
|
58066
|
+
font-size: 11px;
|
|
58067
|
+
font-weight: 500;
|
|
58068
|
+
color: #245c9f;
|
|
58069
|
+
background: #edf4fc;
|
|
58070
|
+
border: 1px solid #d0e2f9;
|
|
58071
|
+
padding: 2px 10px;
|
|
58072
|
+
border-radius: 999px;
|
|
58073
|
+
white-space: nowrap;
|
|
58074
|
+
}
|
|
58075
|
+
.opc-settings-desc {
|
|
58076
|
+
margin: 0;
|
|
58077
|
+
font-size: 12px;
|
|
58078
|
+
color: #64748b;
|
|
58079
|
+
line-height: 1.5;
|
|
58080
|
+
}
|
|
58081
|
+
.opc-settings-field {
|
|
58082
|
+
display: flex;
|
|
58083
|
+
flex-direction: column;
|
|
58084
|
+
gap: 6px;
|
|
58085
|
+
}
|
|
58086
|
+
.opc-settings-label {
|
|
58087
|
+
font-size: 12.5px;
|
|
58088
|
+
font-weight: 500;
|
|
58089
|
+
color: #334155;
|
|
58090
|
+
}
|
|
58091
|
+
.opc-settings-input-row {
|
|
58092
|
+
display: flex;
|
|
58093
|
+
align-items: center;
|
|
58094
|
+
gap: 8px;
|
|
58095
|
+
}
|
|
58096
|
+
.opc-panel .opc-settings-input {
|
|
58097
|
+
width: 100%;
|
|
58098
|
+
min-width: 0;
|
|
58099
|
+
height: 36px;
|
|
58100
|
+
min-height: 36px;
|
|
58101
|
+
flex: 0 0 auto;
|
|
58102
|
+
padding: 6px 12px;
|
|
58103
|
+
border: 1px solid #cbd5e1;
|
|
58104
|
+
border-radius: 8px;
|
|
58105
|
+
background: #f8fafc;
|
|
58106
|
+
color: #0f172a;
|
|
58107
|
+
font-size: 13px;
|
|
58108
|
+
transition: border-color 0.15s, background 0.15s;
|
|
58109
|
+
}
|
|
58110
|
+
.opc-panel .opc-settings-input-row .opc-settings-input {
|
|
58111
|
+
flex: 1 1 0%;
|
|
58112
|
+
}
|
|
58113
|
+
.opc-panel .opc-settings-input:focus {
|
|
58114
|
+
outline: none;
|
|
58115
|
+
border-color: #245c9f;
|
|
58116
|
+
background: #ffffff;
|
|
58117
|
+
}
|
|
58118
|
+
.opc-panel .opc-settings-port-input {
|
|
58119
|
+
width: 120px;
|
|
58120
|
+
max-width: 120px;
|
|
58121
|
+
height: 36px;
|
|
58122
|
+
min-height: 36px;
|
|
58123
|
+
flex: 0 0 auto;
|
|
58124
|
+
}
|
|
58125
|
+
.opc-settings-test-btn {
|
|
58126
|
+
height: 36px;
|
|
58127
|
+
padding: 0 14px;
|
|
58128
|
+
border-radius: 8px;
|
|
58129
|
+
border: 1px solid #cbd5e1;
|
|
58130
|
+
background: #ffffff;
|
|
58131
|
+
color: #1e293b;
|
|
58132
|
+
font-size: 12.5px;
|
|
58133
|
+
font-weight: 500;
|
|
58134
|
+
white-space: nowrap;
|
|
58135
|
+
flex-shrink: 0;
|
|
58136
|
+
}
|
|
58137
|
+
.opc-settings-test-btn:hover:not(:disabled) {
|
|
58138
|
+
background: #f1f5f9;
|
|
58139
|
+
border-color: #94a3b8;
|
|
58140
|
+
}
|
|
58141
|
+
.opc-settings-help {
|
|
58142
|
+
margin: 0;
|
|
58143
|
+
font-size: 12px;
|
|
58144
|
+
color: #64748b;
|
|
58145
|
+
line-height: 1.5;
|
|
58146
|
+
overflow-wrap: anywhere;
|
|
58147
|
+
}
|
|
58148
|
+
.opc-settings-test-ok {
|
|
58149
|
+
font-size: 12px;
|
|
58150
|
+
color: #059669;
|
|
58151
|
+
font-weight: 500;
|
|
58152
|
+
}
|
|
58153
|
+
.opc-settings-test-fail {
|
|
58154
|
+
font-size: 12px;
|
|
58155
|
+
color: #dc2626;
|
|
58156
|
+
font-weight: 500;
|
|
58157
|
+
overflow-wrap: anywhere;
|
|
58158
|
+
}
|
|
58159
|
+
.opc-settings-banner-ok {
|
|
58160
|
+
background: #ecfdf5;
|
|
58161
|
+
border: 1px solid #a7f3d0;
|
|
58162
|
+
color: #065f46;
|
|
58163
|
+
border-radius: 8px;
|
|
58164
|
+
padding: 10px 12px;
|
|
58165
|
+
font-size: 12.5px;
|
|
58166
|
+
line-height: 1.5;
|
|
58167
|
+
}
|
|
58168
|
+
.opc-settings-banner-info {
|
|
58169
|
+
background: #edf4fc;
|
|
58170
|
+
border: 1px solid #d0e2f9;
|
|
58171
|
+
color: #1e40af;
|
|
58172
|
+
border-radius: 8px;
|
|
58173
|
+
padding: 10px 12px;
|
|
58174
|
+
font-size: 12.5px;
|
|
58175
|
+
line-height: 1.5;
|
|
58176
|
+
}
|
|
58177
|
+
.opc-settings-footer {
|
|
58178
|
+
display: flex;
|
|
58179
|
+
align-items: center;
|
|
58180
|
+
justify-content: space-between;
|
|
58181
|
+
gap: 12px;
|
|
58182
|
+
padding-top: 4px;
|
|
58183
|
+
flex-wrap: wrap;
|
|
58184
|
+
}
|
|
58185
|
+
.opc-settings-btn-reset {
|
|
58186
|
+
height: 36px;
|
|
58187
|
+
padding: 0 14px;
|
|
58188
|
+
border-radius: 8px;
|
|
58189
|
+
border: 1px solid #cbd5e1;
|
|
58190
|
+
background: #ffffff;
|
|
58191
|
+
color: #334155;
|
|
58192
|
+
font-size: 13px;
|
|
58193
|
+
font-weight: 500;
|
|
58194
|
+
}
|
|
58195
|
+
.opc-settings-btn-save {
|
|
58196
|
+
height: 36px;
|
|
58197
|
+
padding: 0 18px;
|
|
58198
|
+
border-radius: 8px;
|
|
58199
|
+
font-size: 13px;
|
|
58200
|
+
font-weight: 550;
|
|
58201
|
+
}
|
|
58202
|
+
.opc-settings-note {
|
|
58203
|
+
margin: 0;
|
|
58204
|
+
font-size: 12px;
|
|
58205
|
+
color: #64748b;
|
|
58206
|
+
line-height: 1.5;
|
|
58207
|
+
}
|
|
58208
|
+
`;
|
|
58209
|
+
function OpcSettingsPanel({
|
|
58210
|
+
api,
|
|
58211
|
+
onClose,
|
|
58212
|
+
onSaved
|
|
58213
|
+
}) {
|
|
58214
|
+
const formId = (0, import_react9.useId)();
|
|
58215
|
+
const [loading, setLoading] = (0, import_react9.useState)(true);
|
|
58216
|
+
const [saving, setSaving] = (0, import_react9.useState)(false);
|
|
58217
|
+
const [testing, setTesting] = (0, import_react9.useState)(false);
|
|
58218
|
+
const [platformBase, setPlatformBase] = (0, import_react9.useState)("https://shtokendance.benlai.com");
|
|
58219
|
+
const [appDomainRoot, setAppDomainRoot] = (0, import_react9.useState)("");
|
|
58220
|
+
const [appDefaultPort, setAppDefaultPort] = (0, import_react9.useState)("8080");
|
|
58221
|
+
const [defaultPlatformBase, setDefaultPlatformBase] = (0, import_react9.useState)("https://shtokendance.benlai.com");
|
|
58222
|
+
const [defaultAppDomainRoot, setDefaultAppDomainRoot] = (0, import_react9.useState)("10.101.102.116.nip.io:8080");
|
|
58223
|
+
const [testResult, setTestResult] = (0, import_react9.useState)(null);
|
|
58224
|
+
const [error62, setError] = (0, import_react9.useState)("");
|
|
58225
|
+
const [notice, setNotice] = (0, import_react9.useState)(null);
|
|
58226
|
+
const loadConfig = (0, import_react9.useCallback)(async () => {
|
|
58227
|
+
if (!api.opcConfigGet) {
|
|
58228
|
+
setLoading(false);
|
|
58229
|
+
return;
|
|
58230
|
+
}
|
|
58231
|
+
setLoading(true);
|
|
58232
|
+
setError("");
|
|
58233
|
+
try {
|
|
58234
|
+
const cfg = JSON.parse(await api.opcConfigGet());
|
|
58235
|
+
setDefaultPlatformBase(cfg.default_platform_base || "https://shtokendance.benlai.com");
|
|
58236
|
+
setDefaultAppDomainRoot(cfg.default_app_domain_root || "10.101.102.116.nip.io:8080");
|
|
58237
|
+
setPlatformBase(cfg.platform_base || cfg.default_platform_base || "https://shtokendance.benlai.com");
|
|
58238
|
+
setAppDomainRoot(cfg.app_domain_root ?? "");
|
|
58239
|
+
setAppDefaultPort(String(cfg.app_default_port ?? 8080));
|
|
58240
|
+
} catch (e) {
|
|
58241
|
+
setError(e instanceof Error ? e.message : "\u52A0\u8F7D OPC \u5E73\u53F0\u914D\u7F6E\u5931\u8D25");
|
|
58242
|
+
} finally {
|
|
58243
|
+
setLoading(false);
|
|
58244
|
+
}
|
|
58245
|
+
}, [api]);
|
|
58246
|
+
(0, import_react9.useEffect)(() => {
|
|
58247
|
+
void loadConfig();
|
|
58248
|
+
}, [loadConfig]);
|
|
58249
|
+
const handleTest = async () => {
|
|
58250
|
+
if (!api.opcConfigTest || !platformBase.trim()) return;
|
|
58251
|
+
setTesting(true);
|
|
58252
|
+
setTestResult(null);
|
|
58253
|
+
setError("");
|
|
58254
|
+
try {
|
|
58255
|
+
const result = JSON.parse(await api.opcConfigTest(platformBase.trim()));
|
|
58256
|
+
setTestResult(result);
|
|
58257
|
+
} catch (e) {
|
|
58258
|
+
setTestResult({
|
|
58259
|
+
ok: false,
|
|
58260
|
+
error: e instanceof Error ? e.message : "\u6D4B\u8BD5\u8FDE\u63A5\u5931\u8D25"
|
|
58261
|
+
});
|
|
58262
|
+
} finally {
|
|
58263
|
+
setTesting(false);
|
|
58264
|
+
}
|
|
58265
|
+
};
|
|
58266
|
+
const handleReset = () => {
|
|
58267
|
+
setPlatformBase(defaultPlatformBase);
|
|
58268
|
+
setAppDomainRoot("");
|
|
58269
|
+
setAppDefaultPort("8080");
|
|
58270
|
+
setTestResult(null);
|
|
58271
|
+
setError("");
|
|
58272
|
+
setNotice({ kind: "info", text: "\u5DF2\u6062\u590D\u9ED8\u8BA4\u503C\uFF0C\u70B9\u51FB\u300C\u4FDD\u5B58\u5E76\u7ACB\u5373\u751F\u6548\u300D\u5373\u53EF\u5E94\u7528\u3002" });
|
|
58273
|
+
};
|
|
58274
|
+
const handleSave = async () => {
|
|
58275
|
+
if (!api.opcConfigUpdate) return;
|
|
58276
|
+
const trimmedBase = platformBase.trim();
|
|
58277
|
+
if (!trimmedBase) {
|
|
58278
|
+
setError("\u7F51\u5173\u670D\u52A1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A");
|
|
58279
|
+
return;
|
|
58280
|
+
}
|
|
58281
|
+
const parsedPort = Number(appDefaultPort.trim());
|
|
58282
|
+
if (!Number.isInteger(parsedPort) || parsedPort < 1 || parsedPort > 65535) {
|
|
58283
|
+
setError("\u5E94\u7528\u9ED8\u8BA4\u5BB9\u5668\u7AEF\u53E3\u5FC5\u987B\u4E3A 1 \u81F3 65535 \u7684\u6574\u6570");
|
|
58284
|
+
return;
|
|
58285
|
+
}
|
|
58286
|
+
setSaving(true);
|
|
58287
|
+
setError("");
|
|
58288
|
+
setNotice(null);
|
|
58289
|
+
try {
|
|
58290
|
+
const updated = JSON.parse(
|
|
58291
|
+
await api.opcConfigUpdate(
|
|
58292
|
+
JSON.stringify({
|
|
58293
|
+
platform_base: trimmedBase,
|
|
58294
|
+
app_domain_root: appDomainRoot.trim(),
|
|
58295
|
+
app_default_port: parsedPort
|
|
58296
|
+
})
|
|
58297
|
+
)
|
|
58298
|
+
);
|
|
58299
|
+
setPlatformBase(updated.platform_base);
|
|
58300
|
+
setAppDomainRoot(updated.app_domain_root);
|
|
58301
|
+
setAppDefaultPort(String(updated.app_default_port));
|
|
58302
|
+
setNotice({
|
|
58303
|
+
kind: "ok",
|
|
58304
|
+
text: updated.platform_base_changed ? "\u5E73\u53F0\u914D\u7F6E\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\u3002\u7531\u4E8E\u5207\u6362\u4E86\u7EDF\u4E00\u5E73\u53F0\u7F51\u5173\uFF0C\u8BF7\u8FD4\u56DE\u4E3B\u754C\u9762\u91CD\u65B0\u767B\u5F55\u4F01\u4E1A\u5FAE\u4FE1 / SSO \u8D26\u53F7\u3002" : "\u5E73\u53F0\u914D\u7F6E\u5DF2\u4FDD\u5B58\u5E76\u7ACB\u5373\u751F\u6548\u3002"
|
|
58305
|
+
});
|
|
58306
|
+
onSaved?.(updated);
|
|
58307
|
+
} catch (e) {
|
|
58308
|
+
setError(e instanceof Error ? e.message : "\u4FDD\u5B58 OPC \u5E73\u53F0\u914D\u7F6E\u5931\u8D25");
|
|
58309
|
+
} finally {
|
|
58310
|
+
setSaving(false);
|
|
58311
|
+
}
|
|
58312
|
+
};
|
|
58313
|
+
const effectivePreviewRoot = appDomainRoot.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "") || defaultAppDomainRoot;
|
|
58314
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-wrap" }, /* @__PURE__ */ import_react9.default.createElement("style", null, settingsCss), /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-head" }, /* @__PURE__ */ import_react9.default.createElement("div", null, /* @__PURE__ */ import_react9.default.createElement("h3", { className: "opc-settings-title" }, "OPC \u5E73\u53F0\u914D\u7F6E"), /* @__PURE__ */ import_react9.default.createElement("p", { className: "opc-settings-sub" }, "\u914D\u7F6E OPC \u7EDF\u4E00\u670D\u52A1\u7AEF\u7F51\u5173\u4E0E\u670D\u52A1\u5730\u5740\uFF0C\u652F\u6301\u5207\u6362\u4F01\u4E1A\u6B63\u5F0F\u3001\u9884\u53D1\u4E0E\u79C1\u6709\u5316\u73AF\u5883\u3002")), /* @__PURE__ */ import_react9.default.createElement("button", { type: "button", className: "btn-header", onClick: onClose }, "\u2190 \u8FD4\u56DE")), error62 && /* @__PURE__ */ import_react9.default.createElement("div", { role: "alert", className: "error", style: { margin: 0 } }, error62), notice && /* @__PURE__ */ import_react9.default.createElement("div", { className: notice.kind === "ok" ? "opc-settings-banner-ok" : "opc-settings-banner-info" }, notice.text), /* @__PURE__ */ import_react9.default.createElement("section", { className: "opc-settings-card" }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-card-head" }, /* @__PURE__ */ import_react9.default.createElement("h4", { className: "opc-settings-card-title" }, "\u7EDF\u4E00\u5E73\u53F0\u7F51\u5173"), /* @__PURE__ */ import_react9.default.createElement("span", { className: "opc-settings-pill" }, "\u4E3B\u670D\u52A1\u5165\u53E3")), /* @__PURE__ */ import_react9.default.createElement("p", { className: "opc-settings-desc" }, "\u7528\u4E8E\u4F01\u4E1A\u5FAE\u4FE1\u626B\u7801\u6388\u6743\u767B\u5F55\u3001\u4F01\u4E1A\u77E5\u8BC6\u5E93\u68C0\u7D22\u3001\u79DF\u6237\u5171\u4EAB\u6280\u80FD\u4E2D\u5FC3\u53CA MCP \u7F51\u5173\u3002"), /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-field" }, /* @__PURE__ */ import_react9.default.createElement("label", { className: "opc-settings-label", htmlFor: `${formId}-platform-base` }, "\u7F51\u5173\u670D\u52A1\u5730\u5740 (Platform Base)"), /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-input-row" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
58315
|
+
"input",
|
|
58316
|
+
{
|
|
58317
|
+
id: `${formId}-platform-base`,
|
|
58318
|
+
type: "url",
|
|
58319
|
+
className: "opc-settings-input",
|
|
58320
|
+
placeholder: "https://...",
|
|
58321
|
+
value: platformBase,
|
|
58322
|
+
disabled: loading || saving,
|
|
58323
|
+
onChange: (e) => {
|
|
58324
|
+
setPlatformBase(e.target.value);
|
|
58325
|
+
setTestResult(null);
|
|
58326
|
+
}
|
|
58327
|
+
}
|
|
58328
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
58329
|
+
"button",
|
|
58330
|
+
{
|
|
58331
|
+
type: "button",
|
|
58332
|
+
className: "opc-settings-test-btn",
|
|
58333
|
+
disabled: loading || saving || testing || !platformBase.trim(),
|
|
58334
|
+
onClick: () => void handleTest()
|
|
58335
|
+
},
|
|
58336
|
+
testing ? "\u6D4B\u8BD5\u4E2D..." : "\u6D4B\u8BD5\u8FDE\u63A5"
|
|
58337
|
+
)), testResult && /* @__PURE__ */ import_react9.default.createElement("div", { className: testResult.ok ? "opc-settings-test-ok" : "opc-settings-test-fail" }, testResult.ok ? `\u8FDE\u63A5\u6210\u529F (${testResult.latency_ms ?? 0}ms, HTTP ${testResult.status_code ?? 200})` : `\u8FDE\u63A5\u5931\u8D25: ${testResult.error || "\u65E0\u6CD5\u8FDE\u63A5"}`))), /* @__PURE__ */ import_react9.default.createElement("section", { className: "opc-settings-card" }, /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-card-head" }, /* @__PURE__ */ import_react9.default.createElement("h4", { className: "opc-settings-card-title" }, "\u5E94\u7528\u90E8\u7F72\u4E0E\u8BBF\u95EE\u914D\u7F6E"), /* @__PURE__ */ import_react9.default.createElement("span", { className: "opc-settings-pill" }, "\u5E94\u7528\u6CBB\u7406\u4E0E\u90E8\u7F72")), /* @__PURE__ */ import_react9.default.createElement("p", { className: "opc-settings-desc" }, "\u914D\u7F6E\u65B0\u5EFA\u5E94\u7528\u7684\u8BBF\u95EE\u57DF\u540D\u540E\u7F00\u4E0E\u5BB9\u5668\u9ED8\u8BA4\u7AEF\u53E3\uFF0C\u666E\u901A\u7528\u6237\u65B0\u5EFA\u5E94\u7528\u65F6\u65E0\u9700\u586B\u5199\u7E41\u7410\u53C2\u6570\u3002"), /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-field" }, /* @__PURE__ */ import_react9.default.createElement("label", { className: "opc-settings-label", htmlFor: `${formId}-domain-root` }, "\u5E94\u7528\u5185\u7F51\u6839\u57DF\u540D\u540E\u7F00 (App Domain Root)"), /* @__PURE__ */ import_react9.default.createElement(
|
|
58338
|
+
"input",
|
|
58339
|
+
{
|
|
58340
|
+
id: `${formId}-domain-root`,
|
|
58341
|
+
type: "text",
|
|
58342
|
+
className: "opc-settings-input",
|
|
58343
|
+
placeholder: `\u9ED8\u8BA4: ${defaultAppDomainRoot}`,
|
|
58344
|
+
value: appDomainRoot,
|
|
58345
|
+
disabled: loading || saving,
|
|
58346
|
+
onChange: (e) => setAppDomainRoot(e.target.value)
|
|
58347
|
+
}
|
|
58348
|
+
), /* @__PURE__ */ import_react9.default.createElement("p", { className: "opc-settings-help" }, "\u65B0\u5EFA\u5E94\u7528\u65F6\u4E3A\u5B50\u57DF\u540D\u524D\u7F00\u81EA\u52A8\u8FFD\u52A0\u7684\u8BBF\u95EE\u5730\u5740\u540E\u7F00\u3002\u751F\u6210\u7684\u5E94\u7528\u5730\u5740\u5F62\u5982\uFF1Ahttp://", "{\u5B50\u57DF\u540D}", ".", effectivePreviewRoot)), /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-field" }, /* @__PURE__ */ import_react9.default.createElement("label", { className: "opc-settings-label", htmlFor: `${formId}-default-port` }, "\u5E94\u7528\u9ED8\u8BA4\u5BB9\u5668\u7AEF\u53E3 (Default Port)"), /* @__PURE__ */ import_react9.default.createElement(
|
|
58349
|
+
"input",
|
|
58350
|
+
{
|
|
58351
|
+
id: `${formId}-default-port`,
|
|
58352
|
+
type: "number",
|
|
58353
|
+
min: 1,
|
|
58354
|
+
max: 65535,
|
|
58355
|
+
className: "opc-settings-input opc-settings-port-input",
|
|
58356
|
+
value: appDefaultPort,
|
|
58357
|
+
disabled: loading || saving,
|
|
58358
|
+
onChange: (e) => setAppDefaultPort(e.target.value)
|
|
58359
|
+
}
|
|
58360
|
+
), /* @__PURE__ */ import_react9.default.createElement("p", { className: "opc-settings-help" }, "\u65B0\u5EFA\u5E94\u7528\u65F6\u7684\u9ED8\u8BA4\u5BB9\u5668\u5185\u76D1\u542C\u7AEF\u53E3\uFF08\u9ED8\u8BA4 8080\uFF09\uFF0C\u666E\u901A\u7528\u6237\u65E0\u9700\u624B\u52A8\u586B\u5199\u7AEF\u53E3\uFF0C\u5E73\u53F0\u5C06\u81EA\u52A8\u7EDF\u4E00\u9002\u914D\u3002"))), /* @__PURE__ */ import_react9.default.createElement("div", { className: "opc-settings-footer" }, /* @__PURE__ */ import_react9.default.createElement(
|
|
58361
|
+
"button",
|
|
58362
|
+
{
|
|
58363
|
+
type: "button",
|
|
58364
|
+
className: "opc-settings-btn-reset",
|
|
58365
|
+
disabled: loading || saving,
|
|
58366
|
+
onClick: handleReset
|
|
58367
|
+
},
|
|
58368
|
+
"\u6062\u590D\u9ED8\u8BA4"
|
|
58369
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
58370
|
+
"button",
|
|
58371
|
+
{
|
|
58372
|
+
type: "button",
|
|
58373
|
+
className: "primary opc-settings-btn-save",
|
|
58374
|
+
disabled: loading || saving || !platformBase.trim(),
|
|
58375
|
+
onClick: () => void handleSave()
|
|
58376
|
+
},
|
|
58377
|
+
saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u5E76\u7ACB\u5373\u751F\u6548"
|
|
58378
|
+
)), /* @__PURE__ */ import_react9.default.createElement("p", { className: "opc-settings-note" }, "* \u63D0\u793A\uFF1A\u82E5\u4FEE\u6539\u4E86\u5E73\u53F0\u4E3B\u7F51\u5173\uFF0C\u8BF7\u524D\u5F80\u4E3B\u754C\u9762\u91CD\u65B0\u4F7F\u7528\u65B0\u5E73\u53F0\u7684\u4F01\u5FAE / SSO \u8D26\u53F7\u767B\u5F55\u3002"));
|
|
57947
58379
|
}
|
|
57948
58380
|
|
|
57949
58381
|
// src/client/Panel.tsx
|
|
@@ -58745,23 +59177,24 @@ var css = `
|
|
|
58745
59177
|
margin: 0 0 10px;
|
|
58746
59178
|
}
|
|
58747
59179
|
`;
|
|
58748
|
-
function Panel({ api, sessionId, kind }) {
|
|
58749
|
-
const [state, setState] = (0,
|
|
58750
|
-
const [error62, setError] = (0,
|
|
58751
|
-
const [items, setItems] = (0,
|
|
58752
|
-
const [kb, setKb] = (0,
|
|
58753
|
-
const [services, setServices] = (0,
|
|
58754
|
-
const [appsRefreshTrigger, setAppsRefreshTrigger] = (0,
|
|
58755
|
-
const [
|
|
58756
|
-
const [
|
|
58757
|
-
const [
|
|
58758
|
-
const [
|
|
58759
|
-
const [
|
|
58760
|
-
const
|
|
58761
|
-
const
|
|
59180
|
+
function Panel({ api, sessionId, kind, prepareAnalysisNavigation }) {
|
|
59181
|
+
const [state, setState] = (0, import_react10.useState)({ signedIn: false, loginInProgress: false, context: null });
|
|
59182
|
+
const [error62, setError] = (0, import_react10.useState)(""), [busy, setBusy] = (0, import_react10.useState)(false), [q, setQ] = (0, import_react10.useState)("");
|
|
59183
|
+
const [items, setItems] = (0, import_react10.useState)([]), [hits, setHits] = (0, import_react10.useState)([]);
|
|
59184
|
+
const [kb, setKb] = (0, import_react10.useState)(""), [doc, setDoc] = (0, import_react10.useState)(""), [filter, setFilter] = (0, import_react10.useState)("all");
|
|
59185
|
+
const [services, setServices] = (0, import_react10.useState)([]);
|
|
59186
|
+
const [appsRefreshTrigger, setAppsRefreshTrigger] = (0, import_react10.useState)(0);
|
|
59187
|
+
const [showSettings, setShowSettings] = (0, import_react10.useState)(false);
|
|
59188
|
+
const [kbSearchMode, setKbSearchMode] = (0, import_react10.useState)("doc");
|
|
59189
|
+
const [docQuery, setDocQuery] = (0, import_react10.useState)("");
|
|
59190
|
+
const [hasSearchedDoc, setHasSearchedDoc] = (0, import_react10.useState)(false);
|
|
59191
|
+
const [mcpSearch, setMcpSearch] = (0, import_react10.useState)("");
|
|
59192
|
+
const [mcpFilter, setMcpFilter] = (0, import_react10.useState)("all");
|
|
59193
|
+
const docInputRef = (0, import_react10.useRef)(null);
|
|
59194
|
+
const topSearchCardRef = (0, import_react10.useRef)(null);
|
|
58762
59195
|
const pin = state.pinnedScopes?.[sessionId] ?? "";
|
|
58763
|
-
const epoch = (0,
|
|
58764
|
-
const run = (0,
|
|
59196
|
+
const epoch = (0, import_react10.useRef)(0);
|
|
59197
|
+
const run = (0, import_react10.useCallback)(async (action2) => {
|
|
58765
59198
|
const version2 = epoch.current;
|
|
58766
59199
|
setBusy(true);
|
|
58767
59200
|
setError("");
|
|
@@ -58773,7 +59206,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58773
59206
|
if (version2 === epoch.current) setBusy(false);
|
|
58774
59207
|
}
|
|
58775
59208
|
}, []);
|
|
58776
|
-
(0,
|
|
59209
|
+
(0, import_react10.useEffect)(() => {
|
|
58777
59210
|
const controller = new AbortController();
|
|
58778
59211
|
void (async () => {
|
|
58779
59212
|
try {
|
|
@@ -58786,7 +59219,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58786
59219
|
})();
|
|
58787
59220
|
return () => controller.abort();
|
|
58788
59221
|
}, [api]);
|
|
58789
|
-
const load = (0,
|
|
59222
|
+
const load = (0, import_react10.useCallback)(async () => {
|
|
58790
59223
|
const version2 = epoch.current;
|
|
58791
59224
|
if (kind === "apps") {
|
|
58792
59225
|
setAppsRefreshTrigger((prev) => prev + 1);
|
|
@@ -58800,7 +59233,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58800
59233
|
if (version2 === epoch.current) setItems(rows);
|
|
58801
59234
|
}
|
|
58802
59235
|
}, [api, kind, q]);
|
|
58803
|
-
(0,
|
|
59236
|
+
(0, import_react10.useEffect)(() => {
|
|
58804
59237
|
epoch.current++;
|
|
58805
59238
|
setItems([]);
|
|
58806
59239
|
setHits([]);
|
|
@@ -58815,9 +59248,14 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58815
59248
|
setError("");
|
|
58816
59249
|
if (state.signedIn) void run(load);
|
|
58817
59250
|
}, [state.context?.contextId, sessionId, kind]);
|
|
59251
|
+
(0, import_react10.useEffect)(() => {
|
|
59252
|
+
if (state.signedIn && kind === "apps") {
|
|
59253
|
+
setAppsRefreshTrigger((prev) => prev + 1);
|
|
59254
|
+
}
|
|
59255
|
+
}, [state.signedIn, kind, state.opcConfig?.appDomainRoot, state.opcConfig?.defaultPort, state.opcConfig?.platformBaseUrl]);
|
|
58818
59256
|
const context = state.context;
|
|
58819
59257
|
const action = (fn) => () => void run(fn);
|
|
58820
|
-
return /* @__PURE__ */
|
|
59258
|
+
return /* @__PURE__ */ import_react10.default.createElement("section", { className: "opc-panel" }, /* @__PURE__ */ import_react10.default.createElement("style", null, css), /* @__PURE__ */ import_react10.default.createElement("header", { className: "opc-header-bar" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "header-brand" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "brand-icon-wrap" }, /* @__PURE__ */ import_react10.default.createElement(OpcIcon, { size: 18 })), /* @__PURE__ */ import_react10.default.createElement("div", { className: "brand-text" }, /* @__PURE__ */ import_react10.default.createElement("h2", { className: "brand-title" }, labels[kind]), /* @__PURE__ */ import_react10.default.createElement("span", { className: "brand-sub", title: state.opcConfig?.platformBaseUrl || "OPC \u5DE5\u4F5C\u7A7A\u95F4" }, "OPC \u5DE5\u4F5C\u7A7A\u95F4"))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "header-actions" }, state.signedIn && context && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "user-pill", title: context.email ? `${context.displayName || context.subject} (${context.email})` : context.displayName || context.subject }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "user-avatar" }, ((context.displayName || context.subject)[0] || "U").toUpperCase()), /* @__PURE__ */ import_react10.default.createElement("span", { className: "user-name" }, context.displayName || context.subject)), /* @__PURE__ */ import_react10.default.createElement(
|
|
58821
59259
|
"select",
|
|
58822
59260
|
{
|
|
58823
59261
|
"aria-label": "\u4F01\u4E1A\u7A7A\u95F4",
|
|
@@ -58826,8 +59264,8 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58826
59264
|
disabled: busy,
|
|
58827
59265
|
onChange: (e) => void run(() => api.switchTenant(e.target.value))
|
|
58828
59266
|
},
|
|
58829
|
-
(context.spacesDetail ?? context.spaces.map((id) => ({ id, name: id }))).map((space2) => /* @__PURE__ */
|
|
58830
|
-
), /* @__PURE__ */
|
|
59267
|
+
(context.spacesDetail ?? context.spaces.map((id) => ({ id, name: id }))).map((space2) => /* @__PURE__ */ import_react10.default.createElement("option", { key: space2.id, value: space2.id }, space2.name))
|
|
59268
|
+
), !showSettings && /* @__PURE__ */ import_react10.default.createElement(
|
|
58831
59269
|
"button",
|
|
58832
59270
|
{
|
|
58833
59271
|
className: "btn-header",
|
|
@@ -58836,7 +59274,16 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58836
59274
|
title: "\u5237\u65B0"
|
|
58837
59275
|
},
|
|
58838
59276
|
"\u5237\u65B0"
|
|
58839
|
-
), /* @__PURE__ */
|
|
59277
|
+
)), /* @__PURE__ */ import_react10.default.createElement(
|
|
59278
|
+
"button",
|
|
59279
|
+
{
|
|
59280
|
+
type: "button",
|
|
59281
|
+
className: "btn-header",
|
|
59282
|
+
onClick: () => setShowSettings((prev) => !prev),
|
|
59283
|
+
title: showSettings ? "\u8FD4\u56DE\u5DE5\u4F5C\u53F0" : "OPC \u5E73\u53F0\u914D\u7F6E"
|
|
59284
|
+
},
|
|
59285
|
+
showSettings ? "\u8FD4\u56DE" : "\u2699 \u8BBE\u7F6E"
|
|
59286
|
+
), state.signedIn && context && /* @__PURE__ */ import_react10.default.createElement(
|
|
58840
59287
|
"button",
|
|
58841
59288
|
{
|
|
58842
59289
|
className: "btn-header btn-logout",
|
|
@@ -58845,18 +59292,26 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58845
59292
|
title: "\u9000\u51FA\u767B\u5F55"
|
|
58846
59293
|
},
|
|
58847
59294
|
"\u9000\u51FA"
|
|
58848
|
-
))),
|
|
59295
|
+
))), showSettings ? /* @__PURE__ */ import_react10.default.createElement("main", { className: "opc-panel-main" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
59296
|
+
OpcSettingsPanel,
|
|
59297
|
+
{
|
|
59298
|
+
api,
|
|
59299
|
+
onClose: () => setShowSettings(false),
|
|
59300
|
+
onSaved: () => setAppsRefreshTrigger((prev) => prev + 1)
|
|
59301
|
+
}
|
|
59302
|
+
)) : !state.signedIn || !context ? /* @__PURE__ */ import_react10.default.createElement("div", { className: "gate" }, /* @__PURE__ */ import_react10.default.createElement("h3", null, "\u8FDE\u63A5 OPC \u5DE5\u4F5C\u7A7A\u95F4"), /* @__PURE__ */ import_react10.default.createElement("p", null, "\u767B\u5F55\u540E\u4F7F\u7528 OPC \u77E5\u8BC6\u5E93\u3001\u6280\u80FD\u4E0E\u4F01\u4E1A\u5E94\u7528\u3002\u4F01\u4E1A\u8EAB\u4EFD\u4E0E DSH \u4E2A\u4EBA\u8D26\u53F7\u72EC\u7ACB\u3002"), state.opcConfig?.platformBaseUrl && /* @__PURE__ */ import_react10.default.createElement("p", { style: { fontSize: 12, color: "#64748b", marginTop: -8, marginBottom: 16, wordBreak: "break-all" } }, "\u5F53\u524D\u5E73\u53F0\u7F51\u5173\uFF1A", /* @__PURE__ */ import_react10.default.createElement("code", { style: { background: "#f1f5f9", padding: "2px 6px", borderRadius: 4 } }, state.opcConfig.platformBaseUrl)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "row", style: { justifyContent: "center" } }, /* @__PURE__ */ import_react10.default.createElement("button", { className: "primary", style: { padding: "8px 18px", fontSize: 13 }, disabled: busy || state.loginInProgress, onClick: action(async () => {
|
|
58849
59303
|
await api.startLogin();
|
|
58850
|
-
}) }, "\u4F01\u4E1A\u5FAE\u4FE1 / SSO \u767B\u5F55")), state.loginInProgress && /* @__PURE__ */
|
|
59304
|
+
}) }, "\u4F01\u4E1A\u5FAE\u4FE1 / SSO \u767B\u5F55"), /* @__PURE__ */ import_react10.default.createElement("button", { type: "button", onClick: () => setShowSettings(true) }, "\u5E73\u53F0\u8BBE\u7F6E")), state.loginInProgress && /* @__PURE__ */ import_react10.default.createElement("div", { className: "notice", style: { textAlign: "left", marginTop: 16 } }, "\u8BF7\u5728\u6D4F\u89C8\u5668\u5B8C\u6210\u6388\u6743\u3002", state.loginAuthorizeUrl && /* @__PURE__ */ import_react10.default.createElement("p", { style: { margin: "4px 0" } }, /* @__PURE__ */ import_react10.default.createElement("a", { href: state.loginAuthorizeUrl, target: "_blank", rel: "noreferrer" }, "\u91CD\u65B0\u6253\u5F00\u6388\u6743\u9875")), /* @__PURE__ */ import_react10.default.createElement("button", { onClick: action(() => api.cancelLogin()), style: { marginTop: 6 } }, "\u53D6\u6D88\u767B\u5F55")), state.loginError && /* @__PURE__ */ import_react10.default.createElement("p", { role: "alert", className: "error" }, state.loginError.message)) : /* @__PURE__ */ import_react10.default.createElement("main", { className: "opc-panel-main" }, kind === "apps" && context.applicationContextId && /* @__PURE__ */ import_react10.default.createElement(
|
|
58851
59305
|
AppsPanel,
|
|
58852
59306
|
{
|
|
58853
59307
|
key: context.applicationContextId + sessionId,
|
|
58854
59308
|
api,
|
|
58855
59309
|
sessionId,
|
|
58856
59310
|
contextId: context.applicationContextId,
|
|
59311
|
+
prepareAnalysisNavigation,
|
|
58857
59312
|
refreshSignal: appsRefreshTrigger
|
|
58858
59313
|
}
|
|
58859
|
-
), kind === "knowledge" && /* @__PURE__ */
|
|
59314
|
+
), kind === "knowledge" && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "s2-kb-tabs" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
58860
59315
|
"button",
|
|
58861
59316
|
{
|
|
58862
59317
|
type: "button",
|
|
@@ -58866,19 +59321,19 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58866
59321
|
setTimeout(() => docInputRef.current?.focus(), 50);
|
|
58867
59322
|
}
|
|
58868
59323
|
},
|
|
58869
|
-
/* @__PURE__ */
|
|
58870
|
-
/* @__PURE__ */
|
|
58871
|
-
hits.length > 0 && /* @__PURE__ */
|
|
58872
|
-
), /* @__PURE__ */
|
|
59324
|
+
/* @__PURE__ */ import_react10.default.createElement("span", null, "\u{1F4C4} \u6587\u6863\u5168\u6587\u68C0\u7D22\u6A21\u5F0F"),
|
|
59325
|
+
/* @__PURE__ */ import_react10.default.createElement("span", { className: "s2-badge-rec" }, "\u63A8\u8350"),
|
|
59326
|
+
hits.length > 0 && /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge badge-ok", style: { fontSize: 10, padding: "1px 5px" } }, hits.length)
|
|
59327
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
58873
59328
|
"button",
|
|
58874
59329
|
{
|
|
58875
59330
|
type: "button",
|
|
58876
59331
|
className: `s2-kb-tab ${kbSearchMode === "kb" ? "active" : ""}`,
|
|
58877
59332
|
onClick: () => setKbSearchMode("kb")
|
|
58878
59333
|
},
|
|
58879
|
-
/* @__PURE__ */
|
|
58880
|
-
q && /* @__PURE__ */
|
|
58881
|
-
)), kbSearchMode === "doc" && /* @__PURE__ */
|
|
59334
|
+
/* @__PURE__ */ import_react10.default.createElement("span", null, "\u{1F4C2} \u77E5\u8BC6\u5E93\u76EE\u5F55\u7B5B\u9009\u6A21\u5F0F"),
|
|
59335
|
+
q && /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge badge-warn", style: { fontSize: 10, padding: "1px 5px" } }, "\u5DF2\u7B5B\u9009")
|
|
59336
|
+
)), kbSearchMode === "doc" && /* @__PURE__ */ import_react10.default.createElement(
|
|
58882
59337
|
"form",
|
|
58883
59338
|
{
|
|
58884
59339
|
className: "s2-panel-full",
|
|
@@ -58895,7 +59350,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58895
59350
|
});
|
|
58896
59351
|
}
|
|
58897
59352
|
},
|
|
58898
|
-
/* @__PURE__ */
|
|
59353
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
58899
59354
|
"select",
|
|
58900
59355
|
{
|
|
58901
59356
|
"aria-label": "\u68C0\u7D22\u77E5\u8BC6\u5E93\u8303\u56F4",
|
|
@@ -58903,10 +59358,10 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58903
59358
|
value: kb,
|
|
58904
59359
|
onChange: (e) => setKb(e.target.value)
|
|
58905
59360
|
},
|
|
58906
|
-
/* @__PURE__ */
|
|
58907
|
-
items.map((item) => /* @__PURE__ */
|
|
59361
|
+
/* @__PURE__ */ import_react10.default.createElement("option", { value: "" }, "\u5F53\u524D\u7A7A\u95F4\u5168\u90E8\u77E5\u8BC6\u5E93"),
|
|
59362
|
+
items.map((item) => /* @__PURE__ */ import_react10.default.createElement("option", { key: item.knowledge_base_id, value: item.knowledge_base_id }, item.name))
|
|
58908
59363
|
),
|
|
58909
|
-
/* @__PURE__ */
|
|
59364
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
58910
59365
|
"input",
|
|
58911
59366
|
{
|
|
58912
59367
|
ref: docInputRef,
|
|
@@ -58918,8 +59373,8 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58918
59373
|
onChange: (e) => setDocQuery(e.target.value)
|
|
58919
59374
|
}
|
|
58920
59375
|
),
|
|
58921
|
-
/* @__PURE__ */
|
|
58922
|
-
(docQuery || hits.length > 0 || hasSearchedDoc) && /* @__PURE__ */
|
|
59376
|
+
/* @__PURE__ */ import_react10.default.createElement("button", { className: "s2-btn-blue", disabled: busy }, "\u5F00\u59CB\u68C0\u7D22"),
|
|
59377
|
+
(docQuery || hits.length > 0 || hasSearchedDoc) && /* @__PURE__ */ import_react10.default.createElement(
|
|
58923
59378
|
"button",
|
|
58924
59379
|
{
|
|
58925
59380
|
type: "button",
|
|
@@ -58933,7 +59388,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58933
59388
|
},
|
|
58934
59389
|
"\u6E05\u7A7A"
|
|
58935
59390
|
)
|
|
58936
|
-
), kbSearchMode === "kb" && /* @__PURE__ */
|
|
59391
|
+
), kbSearchMode === "kb" && /* @__PURE__ */ import_react10.default.createElement(
|
|
58937
59392
|
"form",
|
|
58938
59393
|
{
|
|
58939
59394
|
className: "s2-panel-catalog",
|
|
@@ -58942,7 +59397,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58942
59397
|
void run(load);
|
|
58943
59398
|
}
|
|
58944
59399
|
},
|
|
58945
|
-
/* @__PURE__ */
|
|
59400
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
58946
59401
|
"input",
|
|
58947
59402
|
{
|
|
58948
59403
|
"aria-label": "\u7B5B\u9009\u77E5\u8BC6\u5E93",
|
|
@@ -58952,8 +59407,8 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58952
59407
|
onChange: (e) => setQ(e.target.value)
|
|
58953
59408
|
}
|
|
58954
59409
|
),
|
|
58955
|
-
/* @__PURE__ */
|
|
58956
|
-
q && /* @__PURE__ */
|
|
59410
|
+
/* @__PURE__ */ import_react10.default.createElement("button", { className: "s2-btn-amber", disabled: busy }, "\u5E94\u7528\u7B5B\u9009"),
|
|
59411
|
+
q && /* @__PURE__ */ import_react10.default.createElement(
|
|
58957
59412
|
"button",
|
|
58958
59413
|
{
|
|
58959
59414
|
type: "button",
|
|
@@ -58965,7 +59420,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58965
59420
|
},
|
|
58966
59421
|
"\u6E05\u9664"
|
|
58967
59422
|
)
|
|
58968
|
-
), hasSearchedDoc && hits.length === 0 && !busy && /* @__PURE__ */
|
|
59423
|
+
), hasSearchedDoc && hits.length === 0 && !busy && /* @__PURE__ */ import_react10.default.createElement("div", { className: "notice", style: { background: "#f8fafc", borderColor: "#94a3b8", color: "#64748b", fontSize: 12, margin: "8px 0" } }, "\u672A\u627E\u5230\u4E0E\u201C", docQuery, "\u201D\u76F8\u5173\u7684\u6587\u6863\u7247\u6BB5\u3002\u53EF\u5C1D\u8BD5\u66F4\u6362\u68C0\u7D22\u8BCD\uFF0C\u6216\u5728\u4E0A\u65B9\u9009\u62E9\u300C\u5F53\u524D\u7A7A\u95F4\u5168\u90E8\u77E5\u8BC6\u5E93\u300D\u3002"), hits.length > 0 && /* @__PURE__ */ import_react10.default.createElement("div", { className: "kb-results-card" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kb-results-header" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kb-results-title" }, /* @__PURE__ */ import_react10.default.createElement("span", null, "\u{1F4C4} \u6587\u6863\u68C0\u7D22\u7ED3\u679C"), /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge badge-ok" }, hits.length, " \u6761\u76F8\u5173\u7247\u6BB5")), /* @__PURE__ */ import_react10.default.createElement(
|
|
58969
59424
|
"button",
|
|
58970
59425
|
{
|
|
58971
59426
|
type: "button",
|
|
@@ -58977,7 +59432,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58977
59432
|
}
|
|
58978
59433
|
},
|
|
58979
59434
|
"\u6536\u8D77\u7ED3\u679C"
|
|
58980
|
-
)), hits.map((hit, i) => /* @__PURE__ */
|
|
59435
|
+
)), hits.map((hit, i) => /* @__PURE__ */ import_react10.default.createElement("div", { key: String(hit.knowledge_id) + i, className: "resource-card", style: { marginBottom: 8, padding: 12 } }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8 } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
58981
59436
|
"button",
|
|
58982
59437
|
{
|
|
58983
59438
|
style: { background: "none", border: "none", padding: 0, textAlign: "left", fontWeight: 600, color: "#2563eb", cursor: "pointer" },
|
|
@@ -58989,12 +59444,12 @@ function Panel({ api, sessionId, kind }) {
|
|
|
58989
59444
|
},
|
|
58990
59445
|
"\u{1F4D6} ",
|
|
58991
59446
|
String(hit.title ?? hit.knowledge_id)
|
|
58992
|
-
), typeof hit.score === "number" && /* @__PURE__ */
|
|
59447
|
+
), typeof hit.score === "number" && /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge" }, "\u76F8\u5173\u5EA6: ", hit.score.toFixed(2))), /* @__PURE__ */ import_react10.default.createElement("p", { style: { margin: "6px 0 0", fontSize: 12, color: "#64748b", lineHeight: 1.5 } }, String(hit.snippet ?? hit.content ?? ""))))), doc && /* @__PURE__ */ import_react10.default.createElement("div", { className: "doc-box", style: { marginTop: 0, marginBottom: 14 } }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 10 } }, /* @__PURE__ */ import_react10.default.createElement("strong", null, "\u{1F4C4} \u6587\u6863\u8BE6\u60C5\u6B63\u6587"), /* @__PURE__ */ import_react10.default.createElement("button", { onClick: () => setDoc("") }, "\u5173\u95ED\u6B63\u6587")), /* @__PURE__ */ import_react10.default.createElement(Markdown, null, doc)), pin && /* @__PURE__ */ import_react10.default.createElement("div", { className: "notice" }, /* @__PURE__ */ import_react10.default.createElement("strong", null, "\u5F53\u524D\u5BF9\u8BDD\u95EE\u7B54\u5DF2\u9650\u5B9A\u8303\u56F4\uFF1A"), items.find((item) => item.knowledge_base_id === pin)?.name ?? pin, /* @__PURE__ */ import_react10.default.createElement("button", { style: { marginLeft: 8 }, onClick: action(async () => {
|
|
58993
59448
|
await api.setPinnedKnowledgeScope(sessionId, null, context.contextId);
|
|
58994
|
-
}) }, "\u53D6\u6D88\u9650\u5B9A")), /* @__PURE__ */
|
|
59449
|
+
}) }, "\u53D6\u6D88\u9650\u5B9A")), /* @__PURE__ */ import_react10.default.createElement("div", { className: "kb-section-header" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "kb-section-title" }, /* @__PURE__ */ import_react10.default.createElement("span", null, "\u{1F4DA} \u77E5\u8BC6\u5E93\u5217\u8868"), /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge" }, items.length)), q ? /* @__PURE__ */ import_react10.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 6 } }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge badge-warn" }, "\u5DF2\u6309\u201C", q, "\u201D\u8FC7\u6EE4"), /* @__PURE__ */ import_react10.default.createElement("button", { className: "btn-sm", onClick: () => {
|
|
58995
59450
|
setQ("");
|
|
58996
59451
|
void run(load);
|
|
58997
|
-
} }, "\u6E05\u9664\u8FC7\u6EE4")) : /* @__PURE__ */
|
|
59452
|
+
} }, "\u6E05\u9664\u8FC7\u6EE4")) : /* @__PURE__ */ import_react10.default.createElement("span", { style: { fontSize: 11, color: "#94a3b8" } }, "\u70B9\u51FB\u5361\u7247\u300C\u68C0\u7D22\u6B64\u5E93\u300D\u53EF\u76F4\u63A5\u5B9A\u4F4D\u641C\u7D22")), /* @__PURE__ */ import_react10.default.createElement("div", { className: "cards-grid" }, items.map((item) => /* @__PURE__ */ import_react10.default.createElement("div", { key: item.knowledge_base_id, className: "resource-card" }, /* @__PURE__ */ import_react10.default.createElement("div", null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-header" }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 } }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-icon", style: { background: "#f8fafc", color: "#334155" } }, "\u{1F4D6}"), /* @__PURE__ */ import_react10.default.createElement("h3", { className: "card-title" }, item.name)), /* @__PURE__ */ import_react10.default.createElement("span", { className: `badge ${item.availability === "available" ? "badge-ok" : ""}` }, item.availability === "available" ? "\u5DF2\u5C31\u7EEA" : "\u672A\u5C31\u7EEA")), /* @__PURE__ */ import_react10.default.createElement("p", { className: "card-desc" }, item.description || "\u6682\u65E0\u77E5\u8BC6\u5E93\u63CF\u8FF0")), /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-actions" }, /* @__PURE__ */ import_react10.default.createElement(
|
|
58998
59453
|
"button",
|
|
58999
59454
|
{
|
|
59000
59455
|
className: "primary",
|
|
@@ -59004,7 +59459,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59004
59459
|
})
|
|
59005
59460
|
},
|
|
59006
59461
|
"\u9650\u5B9A\u95EE\u7B54\u8303\u56F4"
|
|
59007
|
-
), /* @__PURE__ */
|
|
59462
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59008
59463
|
"button",
|
|
59009
59464
|
{
|
|
59010
59465
|
style: { background: "#f1f5f9", color: "#334155", border: "1px solid #e2e8f0" },
|
|
@@ -59026,7 +59481,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59026
59481
|
if (filter === "new") return !item.installed;
|
|
59027
59482
|
return true;
|
|
59028
59483
|
});
|
|
59029
|
-
return /* @__PURE__ */
|
|
59484
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement(
|
|
59030
59485
|
"form",
|
|
59031
59486
|
{
|
|
59032
59487
|
className: "s2-command-bar",
|
|
@@ -59035,8 +59490,8 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59035
59490
|
void run(load);
|
|
59036
59491
|
}
|
|
59037
59492
|
},
|
|
59038
|
-
/* @__PURE__ */
|
|
59039
|
-
/* @__PURE__ */
|
|
59493
|
+
/* @__PURE__ */ import_react10.default.createElement("span", { className: "s2-command-icon" }, "\u26A1"),
|
|
59494
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
59040
59495
|
"input",
|
|
59041
59496
|
{
|
|
59042
59497
|
"aria-label": "\u641C\u7D22\u6280\u80FD",
|
|
@@ -59046,7 +59501,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59046
59501
|
onChange: (e) => setQ(e.target.value)
|
|
59047
59502
|
}
|
|
59048
59503
|
),
|
|
59049
|
-
q && /* @__PURE__ */
|
|
59504
|
+
q && /* @__PURE__ */ import_react10.default.createElement(
|
|
59050
59505
|
"button",
|
|
59051
59506
|
{
|
|
59052
59507
|
type: "button",
|
|
@@ -59059,8 +59514,8 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59059
59514
|
},
|
|
59060
59515
|
"\u2715"
|
|
59061
59516
|
),
|
|
59062
|
-
/* @__PURE__ */
|
|
59063
|
-
), /* @__PURE__ */
|
|
59517
|
+
/* @__PURE__ */ import_react10.default.createElement("button", { className: "s2-command-btn", disabled: busy }, "\u7ACB\u5373\u68C0\u7D22")
|
|
59518
|
+
), /* @__PURE__ */ import_react10.default.createElement("div", { className: "s2-pills-row" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "s2-pills-label" }, "\u{1F3F7}\uFE0F \u5FEB\u6377\u6807\u7B7E\uFF1A"), /* @__PURE__ */ import_react10.default.createElement(
|
|
59064
59519
|
"button",
|
|
59065
59520
|
{
|
|
59066
59521
|
type: "button",
|
|
@@ -59070,7 +59525,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59070
59525
|
"\u5168\u90E8 (",
|
|
59071
59526
|
items.length,
|
|
59072
59527
|
")"
|
|
59073
|
-
), /* @__PURE__ */
|
|
59528
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59074
59529
|
"button",
|
|
59075
59530
|
{
|
|
59076
59531
|
type: "button",
|
|
@@ -59080,7 +59535,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59080
59535
|
"\u5DF2\u5B89\u88C5 (",
|
|
59081
59536
|
installedCount,
|
|
59082
59537
|
")"
|
|
59083
|
-
), /* @__PURE__ */
|
|
59538
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59084
59539
|
"button",
|
|
59085
59540
|
{
|
|
59086
59541
|
type: "button",
|
|
@@ -59090,7 +59545,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59090
59545
|
"\u672A\u5B89\u88C5 (",
|
|
59091
59546
|
uninstalledCount,
|
|
59092
59547
|
")"
|
|
59093
|
-
)), /* @__PURE__ */
|
|
59548
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "cards-grid" }, filteredItems.map((item) => /* @__PURE__ */ import_react10.default.createElement("div", { key: item.catalog_id, className: "resource-card" }, /* @__PURE__ */ import_react10.default.createElement("div", null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-header" }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 } }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-icon", style: { background: "#f0fdf4", borderColor: "#bbf7d0", color: "#16a34a" } }, "\u26A1"), /* @__PURE__ */ import_react10.default.createElement("div", null, /* @__PURE__ */ import_react10.default.createElement("h3", { className: "card-title" }, "/", item.name), /* @__PURE__ */ import_react10.default.createElement("span", { style: { fontSize: 11, color: "#94a3b8", fontFamily: "monospace" } }, "v", item.version))), /* @__PURE__ */ import_react10.default.createElement("span", { className: `badge ${item.installed ? item.installed.enabled ? "badge-ok" : "" : ""}` }, item.installed ? item.installed.enabled ? "\u5DF2\u542F\u7528" : "\u5DF2\u505C\u7528" : "\u672A\u5B89\u88C5")), /* @__PURE__ */ import_react10.default.createElement("p", { className: "card-desc" }, item.description || "\u6682\u65E0\u6280\u80FD\u8BF4\u660E")), /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-actions" }, (!item.installed || item.installed.active_sha256 !== item.bundle_sha256) && /* @__PURE__ */ import_react10.default.createElement(
|
|
59094
59549
|
"button",
|
|
59095
59550
|
{
|
|
59096
59551
|
className: "primary",
|
|
@@ -59101,7 +59556,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59101
59556
|
})
|
|
59102
59557
|
},
|
|
59103
59558
|
item.installed ? "\u66F4\u65B0\u7248\u672C" : "\u4E0B\u8F7D\u5B89\u88C5"
|
|
59104
|
-
), item.installed && /* @__PURE__ */
|
|
59559
|
+
), item.installed && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement(
|
|
59105
59560
|
"button",
|
|
59106
59561
|
{
|
|
59107
59562
|
disabled: busy,
|
|
@@ -59111,7 +59566,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59111
59566
|
})
|
|
59112
59567
|
},
|
|
59113
59568
|
item.installed.enabled ? "\u505C\u7528" : "\u542F\u7528"
|
|
59114
|
-
), /* @__PURE__ */
|
|
59569
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59115
59570
|
"button",
|
|
59116
59571
|
{
|
|
59117
59572
|
disabled: busy,
|
|
@@ -59142,7 +59597,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59142
59597
|
});
|
|
59143
59598
|
return name2.includes(term) || desc.includes(term) || toolMatches;
|
|
59144
59599
|
});
|
|
59145
|
-
return /* @__PURE__ */
|
|
59600
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("p", { className: "notice" }, "AI \u53EF\u6309\u6743\u9650\u8C03\u7528\u4EE5\u4E0B\u4F01\u4E1A\u670D\u52A1\uFF08\u5DF2\u4E3A\u60A8\u81EA\u52A8\u6302\u8F7D\u5E76\u4FDD\u6301\u8FDE\u63A5\uFF09\u3002\u4F01\u5FAE\u767B\u5F55\u540E\u76F4\u63A5\u53EF\u7528\uFF0C\u65E0\u9700\u6BCF\u6B21\u624B\u52A8\u786E\u8BA4\u5BA1\u6279\u3002"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "s2-command-bar" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "s2-command-icon" }, "\u{1F50C}"), /* @__PURE__ */ import_react10.default.createElement(
|
|
59146
59601
|
"input",
|
|
59147
59602
|
{
|
|
59148
59603
|
"aria-label": "\u641C\u7D22 MCP \u670D\u52A1",
|
|
@@ -59151,7 +59606,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59151
59606
|
value: mcpSearch,
|
|
59152
59607
|
onChange: (e) => setMcpSearch(e.target.value)
|
|
59153
59608
|
}
|
|
59154
|
-
), mcpSearch && /* @__PURE__ */
|
|
59609
|
+
), mcpSearch && /* @__PURE__ */ import_react10.default.createElement(
|
|
59155
59610
|
"button",
|
|
59156
59611
|
{
|
|
59157
59612
|
type: "button",
|
|
@@ -59160,7 +59615,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59160
59615
|
title: "\u6E05\u9664"
|
|
59161
59616
|
},
|
|
59162
59617
|
"\u2715"
|
|
59163
|
-
), /* @__PURE__ */
|
|
59618
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59164
59619
|
"button",
|
|
59165
59620
|
{
|
|
59166
59621
|
type: "button",
|
|
@@ -59169,7 +59624,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59169
59624
|
}
|
|
59170
59625
|
},
|
|
59171
59626
|
"\u7ACB\u5373\u68C0\u7D22"
|
|
59172
|
-
)), /* @__PURE__ */
|
|
59627
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "s2-pills-row" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "s2-pills-label" }, "\u{1F3F7}\uFE0F \u5FEB\u6377\u6807\u7B7E\uFF1A"), /* @__PURE__ */ import_react10.default.createElement(
|
|
59173
59628
|
"button",
|
|
59174
59629
|
{
|
|
59175
59630
|
type: "button",
|
|
@@ -59179,7 +59634,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59179
59634
|
"\u5168\u90E8 (",
|
|
59180
59635
|
services.length,
|
|
59181
59636
|
")"
|
|
59182
|
-
), /* @__PURE__ */
|
|
59637
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59183
59638
|
"button",
|
|
59184
59639
|
{
|
|
59185
59640
|
type: "button",
|
|
@@ -59189,7 +59644,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59189
59644
|
"\u5DF2\u8FDE\u63A5 (",
|
|
59190
59645
|
connectedCount,
|
|
59191
59646
|
")"
|
|
59192
|
-
), /* @__PURE__ */
|
|
59647
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
59193
59648
|
"button",
|
|
59194
59649
|
{
|
|
59195
59650
|
type: "button",
|
|
@@ -59199,7 +59654,7 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59199
59654
|
"\u672A\u6302\u8F7D (",
|
|
59200
59655
|
unmountedCount,
|
|
59201
59656
|
")"
|
|
59202
|
-
)), /* @__PURE__ */
|
|
59657
|
+
)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "cards-grid" }, filteredServices.map((service) => /* @__PURE__ */ import_react10.default.createElement("div", { key: String(service.service_id), className: "resource-card" }, /* @__PURE__ */ import_react10.default.createElement("div", null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-header" }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8 } }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-icon", style: { background: "#faf5ff", borderColor: "#e9d5ff", color: "#9333ea" } }, "\u{1F50C}"), /* @__PURE__ */ import_react10.default.createElement("h3", { className: "card-title" }, String(service.name ?? service.service_id))), state.mcpConnections?.[String(service.service_id)] && /* @__PURE__ */ import_react10.default.createElement("span", { className: `badge ${state.mcpConnections[String(service.service_id)].state === "connected" ? "badge-ok" : ""}` }, state.mcpConnections[String(service.service_id)].state === "connected" ? `\u5DF2\u8FDE\u63A5 (${state.mcpConnections[String(service.service_id)].toolCount})` : state.mcpConnections[String(service.service_id)].state)), /* @__PURE__ */ import_react10.default.createElement("p", { className: "card-desc" }, String(service.description ?? ""))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-actions" }, state.mountAvailable && /* @__PURE__ */ import_react10.default.createElement(
|
|
59203
59658
|
"button",
|
|
59204
59659
|
{
|
|
59205
59660
|
disabled: busy,
|
|
@@ -59209,13 +59664,13 @@ function Panel({ api, sessionId, kind }) {
|
|
|
59209
59664
|
)
|
|
59210
59665
|
},
|
|
59211
59666
|
state.mountedServices?.includes(String(service.service_id)) ? "\u53D6\u6D88\u6302\u8F7D" : "\u6302\u8F7D\u5230 DSH"
|
|
59212
|
-
)), /* @__PURE__ */
|
|
59213
|
-
})(), kind !== "apps" && !busy && (kind === "mcp" ? services.length === 0 : items.length === 0) && /* @__PURE__ */
|
|
59667
|
+
)), /* @__PURE__ */ import_react10.default.createElement("details", { style: { marginTop: 10 } }, /* @__PURE__ */ import_react10.default.createElement("summary", { style: { fontSize: 12, color: "#2563eb", cursor: "pointer" } }, "\u67E5\u770B\u53EF\u7528\u5DE5\u5177\u4E0E\u8C03\u8BD5 (", (Array.isArray(service.tools) ? service.tools : []).length, ")"), /* @__PURE__ */ import_react10.default.createElement("div", { style: { marginTop: 8 } }, (Array.isArray(service.tools) ? service.tools : []).map((tool, i) => /* @__PURE__ */ import_react10.default.createElement("div", { key: i, style: { borderTop: "1px solid #f1f5f9", paddingTop: 8, marginTop: 8 } }, /* @__PURE__ */ import_react10.default.createElement("strong", null, typeof tool === "string" ? tool : tool.name), typeof tool !== "string" && /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("p", { style: { margin: "2px 0 6px", fontSize: 12, color: "#64748b" } }, tool.description), tool.risk && /* @__PURE__ */ import_react10.default.createElement("span", { className: "badge", style: { marginBottom: 6 } }, tool.risk === "read" ? "\u53EA\u8BFB" : tool.risk, tool.require_approval ? " \xB7 \u9700\u5BA1\u6279" : "")), /* @__PURE__ */ import_react10.default.createElement(McpDebug, { api, serviceId: String(service.service_id), toolName: typeof tool === "string" ? tool : tool.name, contextId: context.contextId })))))))));
|
|
59668
|
+
})(), kind !== "apps" && !busy && (kind === "mcp" ? services.length === 0 : items.length === 0) && /* @__PURE__ */ import_react10.default.createElement("div", { style: { textAlign: "center", padding: "40px 16px", color: "#94a3b8" } }, /* @__PURE__ */ import_react10.default.createElement("p", { style: { fontSize: 14, margin: "0 0 6px" } }, "\u5F53\u524D\u6CA1\u6709\u53EF\u89C1\u8D44\u6E90"), /* @__PURE__ */ import_react10.default.createElement("p", { style: { fontSize: 12 } }, "\u53EF\u5207\u6362\u4F01\u4E1A\u7A7A\u95F4\u6216\u70B9\u51FB\u53F3\u4E0A\u89D2\u5237\u65B0\u76EE\u5F55"))), busy && /* @__PURE__ */ import_react10.default.createElement("div", { style: { padding: "6px 16px", background: "#eff6ff", fontSize: 12, color: "#1d4ed8", borderTop: "1px solid #dbeafe" } }, "\u6B63\u5728\u540C\u6B65\u6700\u65B0\u72B6\u6001\u2026"), error62 && /* @__PURE__ */ import_react10.default.createElement("div", { role: "alert", className: "error", style: { margin: 0, borderRadius: 0 } }, error62));
|
|
59214
59669
|
}
|
|
59215
59670
|
function McpDebug({ api, serviceId, toolName, contextId }) {
|
|
59216
|
-
const [args, setArgs] = (0,
|
|
59217
|
-
const generation = (0,
|
|
59218
|
-
(0,
|
|
59671
|
+
const [args, setArgs] = (0, import_react10.useState)("{}"), [result, setResult] = (0, import_react10.useState)(""), [pending, setPending] = (0, import_react10.useState)(false);
|
|
59672
|
+
const generation = (0, import_react10.useRef)(0);
|
|
59673
|
+
(0, import_react10.useEffect)(() => {
|
|
59219
59674
|
generation.current++;
|
|
59220
59675
|
setResult("");
|
|
59221
59676
|
setPending(false);
|
|
@@ -59223,7 +59678,7 @@ function McpDebug({ api, serviceId, toolName, contextId }) {
|
|
|
59223
59678
|
generation.current++;
|
|
59224
59679
|
};
|
|
59225
59680
|
}, [contextId]);
|
|
59226
|
-
return /* @__PURE__ */
|
|
59681
|
+
return /* @__PURE__ */ import_react10.default.createElement("details", { style: { marginTop: 6 } }, /* @__PURE__ */ import_react10.default.createElement("summary", { style: { fontSize: 12, color: "#245c9f", cursor: "pointer" } }, "\u5728\u7EBF\u8C03\u8BD5\u8C03\u7528"), /* @__PURE__ */ import_react10.default.createElement("textarea", { style: { width: "100%", minHeight: 60, marginTop: 6, fontSize: 12 }, "aria-label": `${toolName} JSON \u53C2\u6570`, value: args, onChange: (e) => setArgs(e.target.value) }), /* @__PURE__ */ import_react10.default.createElement("button", { style: { marginTop: 6 }, disabled: pending, onClick: () => {
|
|
59227
59682
|
const current = generation.current;
|
|
59228
59683
|
setPending(true);
|
|
59229
59684
|
setResult("");
|
|
@@ -59234,7 +59689,76 @@ function McpDebug({ api, serviceId, toolName, contextId }) {
|
|
|
59234
59689
|
}).finally(() => {
|
|
59235
59690
|
if (current === generation.current) setPending(false);
|
|
59236
59691
|
});
|
|
59237
|
-
} }, pending ? "\u6267\u884C\u4E2D\u2026" : "\u8C03\u7528"), result && /* @__PURE__ */
|
|
59692
|
+
} }, pending ? "\u6267\u884C\u4E2D\u2026" : "\u8C03\u7528"), result && /* @__PURE__ */ import_react10.default.createElement("pre", { style: { marginTop: 6, fontSize: 11, background: "#f1f5f9", padding: 8, borderRadius: 4, overflowX: "auto" } }, result));
|
|
59693
|
+
}
|
|
59694
|
+
|
|
59695
|
+
// src/client/app-analysis-navigation.tsx
|
|
59696
|
+
var import_react11 = require("react");
|
|
59697
|
+
function OpenAnalysisSidebar({ open: open2 }) {
|
|
59698
|
+
(0, import_react11.useEffect)(() => {
|
|
59699
|
+
open2();
|
|
59700
|
+
}, [open2]);
|
|
59701
|
+
return null;
|
|
59702
|
+
}
|
|
59703
|
+
function registerAnalysisNavigation(ctx, api) {
|
|
59704
|
+
let attempt = 0;
|
|
59705
|
+
let pending;
|
|
59706
|
+
const sidebar = ctx.get("sidebarRight");
|
|
59707
|
+
const currentSession = () => sidebar?.mounted?.getSnapshot();
|
|
59708
|
+
if (sidebar?.mounted) {
|
|
59709
|
+
ctx.effect(() => sidebar.mounted.subscribe(() => {
|
|
59710
|
+
attempt++;
|
|
59711
|
+
if (pending && currentSession() !== pending) pending = void 0;
|
|
59712
|
+
}));
|
|
59713
|
+
}
|
|
59714
|
+
ctx.effect(() => () => {
|
|
59715
|
+
attempt++;
|
|
59716
|
+
pending = void 0;
|
|
59717
|
+
});
|
|
59718
|
+
ctx.effect(() => ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
|
|
59719
|
+
name: "conversation.session.header.utilities",
|
|
59720
|
+
id: "opc-app-analysis-sidebar",
|
|
59721
|
+
inject: (sessionId) => ({
|
|
59722
|
+
open: () => {
|
|
59723
|
+
if (pending !== sessionId || currentSession() !== sessionId) return;
|
|
59724
|
+
pending = void 0;
|
|
59725
|
+
try {
|
|
59726
|
+
sidebar?.openTab("opc-apps");
|
|
59727
|
+
} catch {
|
|
59728
|
+
}
|
|
59729
|
+
}
|
|
59730
|
+
})
|
|
59731
|
+
}, OpenAnalysisSidebar)));
|
|
59732
|
+
return (origin, contextId, isActive) => {
|
|
59733
|
+
const started = ++attempt;
|
|
59734
|
+
const canNavigate = () => attempt === started && isActive() && currentSession() === origin;
|
|
59735
|
+
return (job) => {
|
|
59736
|
+
const workspace = ctx.get("uiWorkspace");
|
|
59737
|
+
if (!workspace || !sidebar || !canNavigate()) return;
|
|
59738
|
+
void (async () => {
|
|
59739
|
+
let current = job;
|
|
59740
|
+
while (canNavigate()) {
|
|
59741
|
+
const target = current.analysisSessionId;
|
|
59742
|
+
if (target) {
|
|
59743
|
+
if (target !== origin) {
|
|
59744
|
+
pending = target;
|
|
59745
|
+
try {
|
|
59746
|
+
workspace.openSession(target);
|
|
59747
|
+
} catch {
|
|
59748
|
+
pending = void 0;
|
|
59749
|
+
}
|
|
59750
|
+
}
|
|
59751
|
+
return;
|
|
59752
|
+
}
|
|
59753
|
+
if (current.status !== "analyzing" || !api.appJob) return;
|
|
59754
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
59755
|
+
if (!canNavigate()) return;
|
|
59756
|
+
current = JSON.parse(await api.appJob(job.id, contextId));
|
|
59757
|
+
}
|
|
59758
|
+
})().catch(() => {
|
|
59759
|
+
});
|
|
59760
|
+
};
|
|
59761
|
+
};
|
|
59238
59762
|
}
|
|
59239
59763
|
|
|
59240
59764
|
// src/client/index.tsx
|
|
@@ -59255,7 +59779,12 @@ function registerPanels(ctx) {
|
|
|
59255
59779
|
appCatalog: (...args) => unwrap(wire.appCatalog(...args)),
|
|
59256
59780
|
appList: (...args) => unwrap(wire.appList(...args)),
|
|
59257
59781
|
appJob: (...args) => unwrap(wire.appJob(...args)),
|
|
59782
|
+
appJobByAnalysisSession: (...args) => unwrap(wire.appJobByAnalysisSession(...args)),
|
|
59258
59783
|
appCheckSlug: (...args) => unwrap(wire.appCheckSlug(...args)),
|
|
59784
|
+
opcConfigGet: () => unwrap(wire.opcConfigGet()),
|
|
59785
|
+
opcConfigUpdate: (payloadJson) => unwrap(wire.opcConfigUpdate(payloadJson)),
|
|
59786
|
+
opcConfigReset: () => unwrap(wire.opcConfigReset()),
|
|
59787
|
+
opcConfigTest: (url2) => unwrap(wire.opcConfigTest(url2)),
|
|
59259
59788
|
appOpcConfig: (...args) => unwrap(wire.appOpcConfig(...args)),
|
|
59260
59789
|
appPickSourceFolder: (...args) => unwrap(wire.appPickSourceFolder(...args)),
|
|
59261
59790
|
appModels: (...args) => unwrap(wire.appModels(...args)),
|
|
@@ -59309,11 +59838,12 @@ function registerPanels(ctx) {
|
|
|
59309
59838
|
decideDebugInvocation: (...args) => unwrap(wire.decideDebugInvocation(...args))
|
|
59310
59839
|
};
|
|
59311
59840
|
ctx.inject(["inputTriggers"], (child) => registerMentions(child, api));
|
|
59841
|
+
const prepareAnalysisNavigation = registerAnalysisNavigation(ctx, api);
|
|
59312
59842
|
for (const [index3, kind] of ["knowledge", "skills", "mcp", "apps"].entries()) {
|
|
59313
59843
|
const id = `dsh-plugin-opc/${kind}`;
|
|
59314
59844
|
ctx.effect(() => ctx.sidebarRightTabs.register({ id, kind: `opc-${kind}`, priority: "extension", title: () => labels[kind], guide: [{ id: `opc-${kind}`, order: 10 + index3, icon: OpcIcon, title: () => labels[kind], description: () => "OPC \u5DE5\u4F5C\u7A7A\u95F4" }] }));
|
|
59315
|
-
ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab.title", () => ctx.slots.register({ name: "sidebar.right.pane.tab.title", key: id }, () => /* @__PURE__ */
|
|
59316
|
-
ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab", () => ctx.slots.register({ name: "sidebar.right.pane.tab", key: id, inject: (sessionId) => ({ api, sessionId: String(sessionId), kind }) }, Panel)));
|
|
59845
|
+
ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab.title", () => ctx.slots.register({ name: "sidebar.right.pane.tab.title", key: id }, () => /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement(OpcIcon, null), " ", labels[kind]))));
|
|
59846
|
+
ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab", () => ctx.slots.register({ name: "sidebar.right.pane.tab", key: id, inject: (sessionId) => ({ api, sessionId: String(sessionId), kind, prepareAnalysisNavigation }) }, Panel)));
|
|
59317
59847
|
}
|
|
59318
59848
|
}
|
|
59319
59849
|
|