@genexus/genexus-ide-ui 3.2.8 → 3.2.9
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/dist/cjs/gx-ide-mcp-server.cjs.entry.js +6 -20
- package/dist/cjs/gx-ide-mcp-server.cjs.entry.js.map +1 -1
- package/dist/collection/components/mcp-server/mcp-server.js +6 -20
- package/dist/collection/components/mcp-server/mcp-server.js.map +1 -1
- package/dist/collection/components/mcp-server/types.js.map +1 -1
- package/dist/components/gx-ide-mcp-server.js +6 -20
- package/dist/components/gx-ide-mcp-server.js.map +1 -1
- package/dist/esm/gx-ide-mcp-server.entry.js +6 -20
- package/dist/esm/gx-ide-mcp-server.entry.js.map +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/{p-45b6dc45.entry.js → p-a456237f.entry.js} +7 -19
- package/dist/genexus-ide-ui/p-a456237f.entry.js.map +1 -0
- package/dist/types/components/mcp-server/types.d.ts +0 -2
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-45b6dc45.entry.js.map +0 -1
|
@@ -56,22 +56,14 @@ const GxIdeMcpServer = class {
|
|
|
56
56
|
var _a;
|
|
57
57
|
this.errorMessage = undefined;
|
|
58
58
|
this.actionInProgress = true;
|
|
59
|
-
this.status = "starting";
|
|
60
59
|
try {
|
|
61
60
|
const result = await this.startCallback();
|
|
62
|
-
if (result.success) {
|
|
63
|
-
this.status = "running";
|
|
64
|
-
this.serverPort = result.port;
|
|
65
|
-
this.serverEndpoint = result.endpoint;
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
this.status = "error";
|
|
61
|
+
if (!result.success) {
|
|
69
62
|
this.errorMessage =
|
|
70
63
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
71
64
|
}
|
|
72
65
|
}
|
|
73
66
|
catch (_b) {
|
|
74
|
-
this.status = "error";
|
|
75
67
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
76
68
|
}
|
|
77
69
|
finally {
|
|
@@ -82,22 +74,14 @@ const GxIdeMcpServer = class {
|
|
|
82
74
|
var _a;
|
|
83
75
|
this.errorMessage = undefined;
|
|
84
76
|
this.actionInProgress = true;
|
|
85
|
-
this.status = "stopping";
|
|
86
77
|
try {
|
|
87
78
|
const result = await this.stopCallback();
|
|
88
|
-
if (result.success) {
|
|
89
|
-
this.status = "stopped";
|
|
90
|
-
this.serverPort = undefined;
|
|
91
|
-
this.serverEndpoint = undefined;
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
this.status = "error";
|
|
79
|
+
if (!result.success) {
|
|
95
80
|
this.errorMessage =
|
|
96
81
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
97
82
|
}
|
|
98
83
|
}
|
|
99
84
|
catch (_b) {
|
|
100
|
-
this.status = "error";
|
|
101
85
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
102
86
|
}
|
|
103
87
|
finally {
|
|
@@ -169,10 +153,12 @@ _GxIdeMcpServer_componentLocale = new WeakMap(), _GxIdeMcpServer_chShortcutsEl =
|
|
|
169
153
|
return index.h("div", { class: "error-message body-regular-s" }, this.errorMessage);
|
|
170
154
|
}, _GxIdeMcpServer_renderPrimaryButton = function _GxIdeMcpServer_renderPrimaryButton() {
|
|
171
155
|
const isRunning = this.status === "running" || this.status === "stopping";
|
|
156
|
+
const isTransitioning = this.status === "starting" || this.status === "stopping";
|
|
157
|
+
const isDisabled = this.actionInProgress || isTransitioning;
|
|
172
158
|
if (isRunning) {
|
|
173
|
-
return (index.h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled:
|
|
159
|
+
return (index.h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.stop));
|
|
174
160
|
}
|
|
175
|
-
return (index.h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled:
|
|
161
|
+
return (index.h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.start));
|
|
176
162
|
};
|
|
177
163
|
GxIdeMcpServer.style = mcpServerCss;
|
|
178
164
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-mcp-server.entry.cjs.js","mappings":";;;;;;;;;;;;AAAA,MAAM,YAAY,GAAG,2mEAA2mE;;;;;;;;;;;;;;;;;;;ACoBhoE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,SAAS,GAAGA,yBAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;MASU,cAAc;;;;;QAEzB,kDAAsB;QACtB,gDAAuC;QACvC,uCAAgBC,kBAAY,CAC1B,2CAA2C,CAC5C,EAAC;QAiEF,uCAAgB;;YACd,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;YAEzB,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI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ow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"starting\";\n\n try {\n const result = await this.startCallback();\n\n if (result.success) {\n this.status = \"running\";\n this.serverPort = result.port;\n this.serverEndpoint = result.endpoint;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"stopping\";\n\n try {\n const result = await this.stopCallback();\n\n if (result.success) {\n this.status = \"stopped\";\n this.serverPort = undefined;\n this.serverEndpoint = undefined;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-mcp-server.entry.cjs.js","mappings":";;;;;;;;;;;;AAAA,MAAM,YAAY,GAAG,2mEAA2mE;;;;;;;;;;;;;;;;;;;ACoBhoE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,SAAS,GAAGA,yBAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;MASU,cAAc;;;;;QAEzB,kDAAsB;QACtB,gDAAuC;QACvC,uCAAgBC,kBAAY,CAC1B,2CAA2C,CAC5C,EAAC;QAiEF,uCAAgB;;YACd,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAE7B,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;gBAE1C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;oBACnB,IAAI,CAAC,YAAY;wBACf,MAAA,MAAM,CAAC,YAAY,mCACnB,uBAAA,IAAI,uCAAiB,CAAC,MAAM,CAAC,WAAW,CAAC;iBAC5C;aACF;YAAC,WAAM;gBACN,IAAI,CAAC,YAAY,GAAG,uBAAA,IAAI,uCAAiB,CAAC,MAAM,CAAC,WAAW,CAAC;aAC9D;oBAAS;gBACR,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;aAC/B;SACF,EAAC;QAEF,sCAAe;;YACb,IAAI,CAAC,YAAY,GAAG,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EAAE,UAAU,EACpB,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,IAAI,CAC5B,EACT;KACH;IAED,QACEA,oBACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,oCAAc,EAC3B,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,KAAK,CAC7B,EACT;AACJ,CAAC;;;;;","names":["getIconPath","getAssetPath","Locale","h","Host"],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.startCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.stopCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n const isTransitioning =\n this.status === \"starting\" || this.status === \"stopping\";\n const isDisabled = this.actionInProgress || isTransitioning;\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"version":3}
|
|
@@ -44,22 +44,14 @@ export class GxIdeMcpServer {
|
|
|
44
44
|
var _a;
|
|
45
45
|
this.errorMessage = undefined;
|
|
46
46
|
this.actionInProgress = true;
|
|
47
|
-
this.status = "starting";
|
|
48
47
|
try {
|
|
49
48
|
const result = await this.startCallback();
|
|
50
|
-
if (result.success) {
|
|
51
|
-
this.status = "running";
|
|
52
|
-
this.serverPort = result.port;
|
|
53
|
-
this.serverEndpoint = result.endpoint;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
this.status = "error";
|
|
49
|
+
if (!result.success) {
|
|
57
50
|
this.errorMessage =
|
|
58
51
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
59
52
|
}
|
|
60
53
|
}
|
|
61
54
|
catch (_b) {
|
|
62
|
-
this.status = "error";
|
|
63
55
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
64
56
|
}
|
|
65
57
|
finally {
|
|
@@ -70,22 +62,14 @@ export class GxIdeMcpServer {
|
|
|
70
62
|
var _a;
|
|
71
63
|
this.errorMessage = undefined;
|
|
72
64
|
this.actionInProgress = true;
|
|
73
|
-
this.status = "stopping";
|
|
74
65
|
try {
|
|
75
66
|
const result = await this.stopCallback();
|
|
76
|
-
if (result.success) {
|
|
77
|
-
this.status = "stopped";
|
|
78
|
-
this.serverPort = undefined;
|
|
79
|
-
this.serverEndpoint = undefined;
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
this.status = "error";
|
|
67
|
+
if (!result.success) {
|
|
83
68
|
this.errorMessage =
|
|
84
69
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
85
70
|
}
|
|
86
71
|
}
|
|
87
72
|
catch (_b) {
|
|
88
|
-
this.status = "error";
|
|
89
73
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
90
74
|
}
|
|
91
75
|
finally {
|
|
@@ -364,9 +348,11 @@ _GxIdeMcpServer_componentLocale = new WeakMap(), _GxIdeMcpServer_chShortcutsEl =
|
|
|
364
348
|
return h("div", { class: "error-message body-regular-s" }, this.errorMessage);
|
|
365
349
|
}, _GxIdeMcpServer_renderPrimaryButton = function _GxIdeMcpServer_renderPrimaryButton() {
|
|
366
350
|
const isRunning = this.status === "running" || this.status === "stopping";
|
|
351
|
+
const isTransitioning = this.status === "starting" || this.status === "stopping";
|
|
352
|
+
const isDisabled = this.actionInProgress || isTransitioning;
|
|
367
353
|
if (isRunning) {
|
|
368
|
-
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled:
|
|
354
|
+
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.stop));
|
|
369
355
|
}
|
|
370
|
-
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled:
|
|
356
|
+
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.start));
|
|
371
357
|
};
|
|
372
358
|
//# sourceMappingURL=mcp-server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../../src/components/mcp-server/mcp-server.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO7C,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AASH,MAAM,OAAO,cAAc;;;QACzB,wEAAwE;QACxE,kDAAsB;QACtB,gDAAuC;QACvC,uCAAgB,YAAY,CAC1B,2CAA2C,CAC5C,EAAC;QAiEF,uCAAgB,KAAK,IAAI,EAAE;;YACzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;YAEzB,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI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AO,EAAE,uBAAA,IAAI,mCAAa,EAC1B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,IAAI,CAC5B,CACV,CAAC;KACH;IAED,OAAO,CACL,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,oCAAc,EAC3B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,KAAK,CAC7B,CACV,CAAC;AACJ,CAAC","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"starting\";\n\n try {\n const result = await this.startCallback();\n\n if (result.success) {\n this.status = \"running\";\n this.serverPort = result.port;\n this.serverEndpoint = result.endpoint;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"stopping\";\n\n try {\n const result = await this.stopCallback();\n\n if (result.success) {\n this.status = \"stopped\";\n this.serverPort = undefined;\n this.serverEndpoint = undefined;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"]}
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../../src/components/mcp-server/mcp-server.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAO7C,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AASH,MAAM,OAAO,cAAc;;;QACzB,wEAAwE;QACxE,kDAAsB;QACtB,gDAAuC;QACvC,uCAAgB,YAAY,CAC1B,2CAA2C,CAC5C,EAAC;QAiEF,uCAAgB,KAAK,IAAI,EAAE;;YACzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAE7B,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,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C7B,CACV,CAAC;AACJ,CAAC","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.startCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.stopCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n const isTransitioning =\n this.status === \"starting\" || this.status === \"stopping\";\n const isDisabled = this.actionInProgress || isTransitioning;\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/mcp-server/types.ts"],"names":[],"mappings":"","sourcesContent":["export type McpServerStatus =\n | \"running\"\n | \"stopped\"\n | \"starting\"\n | \"stopping\"\n | \"error\";\n\nexport type McpStartResult = {\n success: boolean;\n
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/mcp-server/types.ts"],"names":[],"mappings":"","sourcesContent":["export type McpServerStatus =\n | \"running\"\n | \"stopped\"\n | \"starting\"\n | \"stopping\"\n | \"error\";\n\nexport type McpStartResult = {\n success: boolean;\n errorMessage?: string;\n};\n\nexport type McpStopResult = {\n success: boolean;\n errorMessage?: string;\n};\n"]}
|
|
@@ -54,22 +54,14 @@ const GxIdeMcpServer$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeMcpServer e
|
|
|
54
54
|
var _a;
|
|
55
55
|
this.errorMessage = undefined;
|
|
56
56
|
this.actionInProgress = true;
|
|
57
|
-
this.status = "starting";
|
|
58
57
|
try {
|
|
59
58
|
const result = await this.startCallback();
|
|
60
|
-
if (result.success) {
|
|
61
|
-
this.status = "running";
|
|
62
|
-
this.serverPort = result.port;
|
|
63
|
-
this.serverEndpoint = result.endpoint;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
this.status = "error";
|
|
59
|
+
if (!result.success) {
|
|
67
60
|
this.errorMessage =
|
|
68
61
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
69
62
|
}
|
|
70
63
|
}
|
|
71
64
|
catch (_b) {
|
|
72
|
-
this.status = "error";
|
|
73
65
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
74
66
|
}
|
|
75
67
|
finally {
|
|
@@ -80,22 +72,14 @@ const GxIdeMcpServer$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeMcpServer e
|
|
|
80
72
|
var _a;
|
|
81
73
|
this.errorMessage = undefined;
|
|
82
74
|
this.actionInProgress = true;
|
|
83
|
-
this.status = "stopping";
|
|
84
75
|
try {
|
|
85
76
|
const result = await this.stopCallback();
|
|
86
|
-
if (result.success) {
|
|
87
|
-
this.status = "stopped";
|
|
88
|
-
this.serverPort = undefined;
|
|
89
|
-
this.serverEndpoint = undefined;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
this.status = "error";
|
|
77
|
+
if (!result.success) {
|
|
93
78
|
this.errorMessage =
|
|
94
79
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
95
80
|
}
|
|
96
81
|
}
|
|
97
82
|
catch (_b) {
|
|
98
|
-
this.status = "error";
|
|
99
83
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
100
84
|
}
|
|
101
85
|
finally {
|
|
@@ -181,10 +165,12 @@ _GxIdeMcpServer_componentLocale = new WeakMap(), _GxIdeMcpServer_chShortcutsEl =
|
|
|
181
165
|
return h("div", { class: "error-message body-regular-s" }, this.errorMessage);
|
|
182
166
|
}, _GxIdeMcpServer_renderPrimaryButton = function _GxIdeMcpServer_renderPrimaryButton() {
|
|
183
167
|
const isRunning = this.status === "running" || this.status === "stopping";
|
|
168
|
+
const isTransitioning = this.status === "starting" || this.status === "stopping";
|
|
169
|
+
const isDisabled = this.actionInProgress || isTransitioning;
|
|
184
170
|
if (isRunning) {
|
|
185
|
-
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled:
|
|
171
|
+
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.stop));
|
|
186
172
|
}
|
|
187
|
-
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled:
|
|
173
|
+
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.start));
|
|
188
174
|
};
|
|
189
175
|
function defineCustomElement$1() {
|
|
190
176
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-mcp-server.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,2mEAA2mE;;;;;;;;;;;;;;;;;;;ACoBhoE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;MASUA,gBAAc;;;;;;;QAEzB,kDAAsB;QACtB,gDAAuC;QACvC,uCAAgB,YAAY,CAC1B,2CAA2C,CAC5C,EAAC;QAiEF,uCAAgB;;YACd,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;YAEzB,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;gBAE1C,IAAI,MAAM,CAAC,OAAO,EAAE;oBAClB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;oBACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;oBAC9B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC;iBACvC;qBAAM;oBACL,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;oBACtB,IAAI,CAAC,YAAY;wBACf,MAAA,MAAM,CAAC,YAAY,mCACnB,uBAAA,IAAI,uCAAiB,CAAC,MAAM,CAAC,WA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,IAAI,CAAC;KACb;IAED,OAAO,WAAK,KAAK,EAAC,8BAA8B,IAAE,IAAI,CAAC,YAAY,CAAO,CAAC;AAC7E,CAAC;IAGC,MAAM,SAAS,GACb,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC;IAE1D,IAAI,SAAS,EAAE;QACb,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,mCAAa,EAC1B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,IAAI,CAC5B,EACT;KACH;IAED,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,oCAAc,EAC3B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,KAAK,CAC7B,EACT;AACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeMcpServer"],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"starting\";\n\n try {\n const result = await this.startCallback();\n\n if (result.success) {\n this.status = \"running\";\n this.serverPort = result.port;\n this.serverEndpoint = result.endpoint;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"stopping\";\n\n try {\n const result = await this.stopCallback();\n\n if (result.success) {\n this.status = \"stopped\";\n this.serverPort = undefined;\n this.serverEndpoint = undefined;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-mcp-server.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,2mEAA2mE;;;;;;;;;;;;;;;;;;;ACoBhoE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAA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uCAAiB,CAAC,UAAU,CAAC,cAAc;cAC/C,uBAAA,IAAI,uCAAiB,CAAC,UAAU,CAAC,YAAY,IAGnD,gBAAU,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAE,SAAS,GAAa,CAC7C,CACJ,CACH,CACP,CACG,EACN;AACJ,CAAC;IAGC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,WAAK,KAAK,EAAC,8BAA8B,IAAE,IAAI,CAAC,YAAY,CAAO,CAAC;AAC7E,CAAC;IAGC,MAAM,SAAS,GACb,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC;IAC1D,MAAM,eAAe,GACnB,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC;IAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,IAAI,eAAe,CAAC;IAE5D,IAAI,SAAS,EAAE;QACb,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,mCAAa,EAC1B,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,IAAI,CAC5B,EACT;KACH;IAED,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,oCAAc,EAC3B,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,KAAK,CAC7B,EACT;AACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeMcpServer"],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.startCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.stopCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n const isTransitioning =\n this.status === \"starting\" || this.status === \"stopping\";\n const isDisabled = this.actionInProgress || isTransitioning;\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"version":3}
|
|
@@ -52,22 +52,14 @@ const GxIdeMcpServer = class {
|
|
|
52
52
|
var _a;
|
|
53
53
|
this.errorMessage = undefined;
|
|
54
54
|
this.actionInProgress = true;
|
|
55
|
-
this.status = "starting";
|
|
56
55
|
try {
|
|
57
56
|
const result = await this.startCallback();
|
|
58
|
-
if (result.success) {
|
|
59
|
-
this.status = "running";
|
|
60
|
-
this.serverPort = result.port;
|
|
61
|
-
this.serverEndpoint = result.endpoint;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.status = "error";
|
|
57
|
+
if (!result.success) {
|
|
65
58
|
this.errorMessage =
|
|
66
59
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
67
60
|
}
|
|
68
61
|
}
|
|
69
62
|
catch (_b) {
|
|
70
|
-
this.status = "error";
|
|
71
63
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.startFailed;
|
|
72
64
|
}
|
|
73
65
|
finally {
|
|
@@ -78,22 +70,14 @@ const GxIdeMcpServer = class {
|
|
|
78
70
|
var _a;
|
|
79
71
|
this.errorMessage = undefined;
|
|
80
72
|
this.actionInProgress = true;
|
|
81
|
-
this.status = "stopping";
|
|
82
73
|
try {
|
|
83
74
|
const result = await this.stopCallback();
|
|
84
|
-
if (result.success) {
|
|
85
|
-
this.status = "stopped";
|
|
86
|
-
this.serverPort = undefined;
|
|
87
|
-
this.serverEndpoint = undefined;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.status = "error";
|
|
75
|
+
if (!result.success) {
|
|
91
76
|
this.errorMessage =
|
|
92
77
|
(_a = result.errorMessage) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
93
78
|
}
|
|
94
79
|
}
|
|
95
80
|
catch (_b) {
|
|
96
|
-
this.status = "error";
|
|
97
81
|
this.errorMessage = __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").errors.stopFailed;
|
|
98
82
|
}
|
|
99
83
|
finally {
|
|
@@ -165,10 +149,12 @@ _GxIdeMcpServer_componentLocale = new WeakMap(), _GxIdeMcpServer_chShortcutsEl =
|
|
|
165
149
|
return h("div", { class: "error-message body-regular-s" }, this.errorMessage);
|
|
166
150
|
}, _GxIdeMcpServer_renderPrimaryButton = function _GxIdeMcpServer_renderPrimaryButton() {
|
|
167
151
|
const isRunning = this.status === "running" || this.status === "stopping";
|
|
152
|
+
const isTransitioning = this.status === "starting" || this.status === "stopping";
|
|
153
|
+
const isDisabled = this.actionInProgress || isTransitioning;
|
|
168
154
|
if (isRunning) {
|
|
169
|
-
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled:
|
|
155
|
+
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_stopHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.stop));
|
|
170
156
|
}
|
|
171
|
-
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled:
|
|
157
|
+
return (h("button", { class: "button-primary primary-action", type: "button", onClick: __classPrivateFieldGet(this, _GxIdeMcpServer_startHandler, "f"), disabled: isDisabled, part: "button-confirm" }, __classPrivateFieldGet(this, _GxIdeMcpServer_componentLocale, "f").buttons.start));
|
|
172
158
|
};
|
|
173
159
|
GxIdeMcpServer.style = mcpServerCss;
|
|
174
160
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-mcp-server.entry.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,2mEAA2mE;;;;;;;;;;;;;;;;;;;ACoBhoE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,i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EAC/B,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,IAAI,CAC5B,EACT;KACH;IAED,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,oCAAc,EAC3B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,KAAK,CAC7B,EACT;AACJ,CAAC;;;;;","names":[],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"starting\";\n\n try {\n const result = await this.startCallback();\n\n if (result.success) {\n this.status = \"running\";\n this.serverPort = result.port;\n this.serverEndpoint = result.endpoint;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"stopping\";\n\n try {\n const result = await this.stopCallback();\n\n if (result.success) {\n this.status = \"stopped\";\n this.serverPort = undefined;\n this.serverEndpoint = undefined;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-mcp-server.entry.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,2mEAA2mE;;;;;;;;;;;;;;;;;;;ACoBhoE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;MASU,cAAc;;;;;QAEzB,kDAAsB;QACtB,gDAAuC;QACvC,uCAAgB,YAAY,CAC1B,2CAA2C,CAC5C,EAAC;QAiEF,uCAAgB;;YACd,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAE7B,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE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AC,MAAM,KAAK,UAAU,CAAC;IAC1D,MAAM,eAAe,GACnB,IAAI,CAAC,MAAM,KAAK,UAAU,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC;IAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,IAAI,eAAe,CAAC;IAE5D,IAAI,SAAS,EAAE;QACb,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,mCAAa,EAC1B,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,IAAI,CAC5B,EACT;KACH;IAED,QACE,cACE,KAAK,EAAC,+BAA+B,EACrC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,oCAAc,EAC3B,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAC,gBAAgB,IAEpB,uBAAA,IAAI,uCAAiB,CAAC,OAAO,CAAC,KAAK,CAC7B,EACT;AACJ,CAAC;;;;;","names":[],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.startCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.stopCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n const isTransitioning =\n this.status === \"starting\" || this.status === \"stopping\";\n const isDisabled = this.actionInProgress || isTransitioning;\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"version":3}
|
|
@@ -13,5 +13,5 @@ export { s as setNonce } from "./p-9b9ccd0c.js";
|
|
|
13
13
|
return e(t);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
patchBrowser().then((e => a(JSON.parse('[["p-e3ff125f",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-7cd24b82",[[1,"gx-ide-kb-manager-import",{"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"objectContextMenuCallback":[16],"optionsCallback":[16],"selectedFile":[1040],"statusMinimal":[4,"status-minimal"],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"hasSelection":[32],"importStatusMessage":[32],"importTreeState":[32],"importedTreeFilterRegExp":[32],"importingIsInProcess":[32],"importTreeFilterList":[32],"noImport":[32],"noObjects":[32],"objectsTreeModel":[32],"showHiddenImportsMessage":[32],"someStatusVisible":[32],"statusInfo":[32],"addResultItem":[64]},null,{"importTreeState":["importTreeStateChanged","watchImportTreeStateHandler"],"objectsTreeModel":["watchObjectsTreeModelHandler"],"selectedFile":["selectedFileChanged"]}]]],["p-25e749c7",[[1,"gx-ide-launchpad",{"data":[1],"isStandalone":[4,"is-standalone"],"sections":[32],"tabModel":[32]},null,{"data":["watchDataHandler"]}]]],["p-d68412ac",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-e0fb6257",[[17,"gx-ide-data-selector",{"cancelCallback":[16],"confirmCallback":[16],"defaultModule":[16],"displayTitle":[4,"display-title"],"editCallback":[16],"loadItemsCallback":[16],"loader":[4],"newVariableCallback":[16],"selectObjectCallback":[16],"selectionType":[1,"selection-type"],"loading":[32],"objects":[32],"selectedObjectsIds":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-21775439",[[1,"gx-ide-manage-module-references",{"autoCloseProgressBar":[4,"auto-close-progress-bar"],"executeActionCallback":[16],"serverContextMenuCallback":[16],"serverSelectedCallback":[16],"servers":[16],"showServerCommands":[4,"show-server-commands"],"actionInProgress":[32],"executeActionCallbackInProgress":[32],"filteredModules":[32],"loadingServer":[32],"modulesAll":[32],"progressState":[32],"progressValue":[32],"reRenderCounter":[32],"selectedModuleAction":[32],"selectedModuleId":[32],"selectedModuleType":[32],"selectedServerId":[32],"selectedServerValue":[32],"serversComboBoxModel":[32],"selectedModuleVersions":[32]},[[0,"progressBarClosed","progressBarClosedHandler"]],{"modulesAll":["modulesAllChanged"],"servers":["serversChanged"]}]]],["p-37812762",[[1,"gx-ide-navigation-report",{"headerData":[16],"confirmCallback":[16],"cancelCallback":[16],"closeCallback":[16],"itemSelectedCallback":[16],"reportTreeItems":[32],"navigationItemsStatusRegExpString":[32],"navigationItemsCaptionRegExpString":[32],"navigationItemsRegExp":[32],"confirmed":[32],"headerState":[32],"statusInfo":[32],"someStatusVisible":[32],"addItem":[64],"clearItems":[64]},null,{"navigationItemsStatusRegExpString":["navigationItemsStatusRegExpStringChanged"],"navigationItemsCaptionRegExpString":["navigationItemsCaptionRegExpStringChanged"]}]]],["p-00705e1c",[[17,"gx-ide-object-selector",{"cancelCallback":[16],"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"loader":[4],"loadCallback":[16],"multiSelection":[4,"multi-selection"],"newObjectCallback":[16],"openSelectionCallback":[16],"patternValue":[1,"pattern-value"],"selectModuleCallback":[16],"types":[16],"filterModified":[32],"loading":[32],"modifiedAfterValue":[32],"objects":[32],"selectedObjectsIdsArray":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-c2f2d79f",[[1,"gx-ide-team-dev-history",{"types":[16],"itemContextMenuCallback":[16],"gridContextMenuCallback":[16],"loadVersionsCallback":[16],"loadCallback":[16],"loadDetailCallback":[16],"selectedVersionChangeCallback":[16],"historyDetail":[32],"objects":[32],"sidebarExpanded":[32],"filtersHidden":[32],"loading":[32],"selectedRevisionId":[32],"hasActiveVersion":[32],"reload":[64]}]]],["p-308ad50f",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-7bdeae77",[[1,"gx-ide-ww-files",{"categories":[16],"contextMenuCallback":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"deleteSelectionCallback":[16],"gridColumnsVisibility":[16],"loadCallback":[16],"newFileCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionChangeCallback":[16],"showSearchContents":[4,"show-search-contents"],"afterValue":[32],"categoriesComboBoxModel":[32],"dateTimeValue":[32],"isLoading":[32],"filterAfterComboBoxModel":[32],"showModified":[32],"objects":[32],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"dateTimeValue":["dateTimeValueChanged"],"categories":["categoriesChanged"]}]]],["p-cf61384e",[[1,"gx-ide-create-kb-from-server",{"kbLocation":[1025,"kb-location"],"canSetLocation":[4,"can-set-location"],"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"createKBCallback":[16],"getGXserverKBsCallback":[16],"selectLocationCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"localKbNameInputValue":[32],"loading":[32],"filterValue":[32],"kbsFilteredActionListModel":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32],"locationMode":[32],"suspendShortcuts":[64]}]]],["p-69e7d46b",[[1,"gx-ide-design-import",{"reactiveSettings":[16],"extensions":[16],"defaultModule":[16],"path":[1025],"accessToken":[1025,"access-token"],"importAsWebPanels":[4,"import-as-web-panels"],"selectModuleCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"loadCallback":[16],"loadDesignSystemCallback":[16],"loadFontCallback":[16],"loadImageCallback":[16],"loadPanelDataCallback":[16],"requiresAccessTokenCallback":[16],"styles":[16],"textEditorFactoryCallback":[16],"reRenderCounter":[32],"stylesAsComboBoxModel":[32],"styleValue":[32],"accessTokenHasError":[32],"pathIsValid":[32],"tabsModel":[32],"activeTabs":[32],"renderedTabs":[32],"designData":[32],"detailTreeModel":[32],"isLoading":[32],"isLoaded":[32],"messages":[32],"selectedFile":[32],"selectedDesignType":[32],"selectedDesignItem":[32],"requiresAccessToken":[32],"designDataTreeDataModel":[32],"updateTabsActiveTab":[32],"fitImages":[32],"lastLoadCallbackSettingValues":[32]},null,{"pathIsValid":["pathIsValidChanged"],"designData":["designDataChanged"],"path":["pathChanged"],"accessToken":["accessTokenChanged"],"styles":["stylesChanged"],"messages":["watchMessagesHandler"]}]]],["p-9ca0c042",[[1,"gx-ide-kb-manager-export",{"addKBPropertiesCallback":[16],"addObjectsCallback":[16],"addReferencesCallback":[16],"cancelCallback":[16],"exportCallback":[16],"exportFileDirectoryCallback":[16],"fileName":[1,"file-name"],"kbPropertiesTypes":[16],"loader":[4],"objectTypes":[16],"optionsCallback":[16],"addKbPropertiesIsChecked":[32],"atLeastOnePropertyItemIsChecked":[32],"atLeastOneObjectItemIsChecked":[32],"checkedObjectsIds":[32],"checkedPropertiesIds":[32],"exportAllIsChecked":[32],"exportingIsInProcess":[32],"hasObjects":[32],"objectsTreeViewModel":[32]},null,{"objectsTreeViewModel":["objectsTreeViewModelChanged"],"objectTypes":["objectTypesChanged"]}]]],["p-fc0bc991",[[1,"gx-ide-plugin-explorer",{"plugins":[1040],"filterCallback":[16],"showDetailsCallback":[16],"executeActionCallback":[16],"loading":[32],"pluginsActionListModel":[32]},null,{"plugins":["pluginsChangedHandler"]}]]],["p-1043534b",[[1,"gx-ide-sc-chat-container",{"mode":[1],"generatingResponse":[32],"loadingState":[32],"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32],"chatItems":[32],"exitWelcome":[64]}]]],["p-8b5c826b",[[1,"gx-ide-search",{"isKbOpen":[4,"is-kb-open"],"searchCallback":[16],"itemDoubleClickCallback":[16],"searchResultModel":[32],"hasSearched":[32],"isSearching":[32],"showSettings":[64]},null,{"isKbOpen":["valueChangeHandler"]}]]],["p-0680b762",[[1,"gx-ide-start-page",{"createKBCallback":[16],"hideOpenExistingProject":[4,"hide-open-existing-project"],"kbs":[16],"kbsFilterThreshold":[2,"kbs-filter-threshold"],"openKbCallback":[16],"openSampleCallback":[16],"samples":[16],"secondarySection":[16],"filteredKbs":[32],"kbFilterValue":[32],"loading":[32]},null,{"kbFilterValue":["kbFilterValueChanged"],"kbs":["kbsChanged"]}]]],["p-7b76b0e4",[[1,"gx-ide-team-dev-bring-changes",{"commitDetail":[16],"commitInformation":[16],"commitObjects":[16],"hideFilters":[4,"hide-filters"],"operationType":[1,"operation-type"],"mergeObjectsCallback":[16],"revertPillAsButton":[4,"revert-pill-as-button"],"contextMenuCallback":[8,"context-menu-callback"],"viewAllCommentsCallback":[16],"editRangeCallback":[16],"alreadyMergedObjectsIdsArray":[32],"atLeastOneObjectIsChecked":[32],"loading":[32],"objectsFiltered":[32],"searchValue":[32],"stateFilterValue":[32],"markedObjectsSet":[32],"objectsStatesMap":[32],"commitObjectsMessagesMap":[32],"merging":[32],"updateObjectState":[64]},null,{"objectsStatesMap":["objectsStatesMapChanged"],"commitObjects":["commitObjectsChanged"]}]]],["p-cd9e9e2b",[[1,"gx-ide-team-dev-commit",{"commitCallback":[16],"objectsContextMenuCallback":[16],"loadCallback":[16],"openServerCallback":[16],"pendingItemsCheckedCallback":[16],"selectCallback":[16],"types":[16],"changeset":[16],"folders":[16],"updatePillAsButton":[4,"update-pill-as-button"],"serverDetails":[16],"allPendingAreCommitted":[32],"alreadyCommittedObjectsIdsSet":[32],"ignoredIdsSet":[32],"pendingIdsSet":[32],"markedObjectsSet":[32],"objectsStatusMap":[32],"objectsMessagesDataMap":[32],"atLeastOneObjectIsChecked":[32],"commentInputHasError":[32],"committing":[32],"filterSecondaryIsHidden":[32],"filterSecondaryHasConditions":[32],"loading":[32],"changesetsComboBoxModel":[32],"pendingObjectsAfterFilter":[32],"ignoredObjectsAfterFilter":[32],"typesComboBoxModel":[32],"pendingAndIgnored":[32],"commentsValue":[32],"searchValue":[32],"selectedType":[32],"selectedState":[32],"selectedChangeset":[32],"selectedFolder":[32],"selectedCategory":[32],"foldersComboBoxModel":[32],"isCommitDisabled":[32],"reload":[64],"disableCommit":[64]},null,{"alreadyCommittedObjectsIdsSet":["alreadyCommittedObjectsIdsSetChanged"],"markedObjectsSet":["markedObjectsSetChanged"],"objectsStatusMap":["objectsStatusMapChanged"],"pendingAndIgnored":["pendingAndIgnoredChanged"],"types":["typesChanged"],"changeset":["changesetChanged"],"folders":["folderChanged"]}]]],["p-f1b452fb",[[1,"gx-ide-team-dev-update",{"contextMenuCallback":[16],"loadCallback":[16],"pendingItemsCheckedCallback":[16],"types":[16],"updatePillAsButton":[4,"update-pill-as-button"],"updateCallback":[16],"openServerCallback":[16],"updateFrom":[16],"atLeastOneObjectIsChecked":[32],"loading":[32],"menuContextAction":[32],"searchValue":[32],"selectedAction":[32],"markedObjectsSet":[32],"alreadyUpdatedObjectsIdsSet":[32],"pendingIdsSet":[32],"ignoredIdsSet":[32],"objectsMessagesDataMap":[32],"updating":[32],"allPendingAreUpdated":[32],"kbPropertiesChecked":[32],"typesComboBoxModel":[32],"selectedType":[32],"isUpdateDisabled":[32],"objectsStatusMap":[32],"pendingAndIgnored":[32],"pendingObjectsAfterActionFilter":[32],"ignoredObjectsAfterActionFilter":[32],"reload":[64],"disableUpdate":[64]},null,{"markedObjectsSet":["markedObjectsSetChanged"],"alreadyUpdatedObjectsIdsSet":["alreadyUpdatedObjectsIdsSetChanged"],"objectsStatusMap":["objectsStatusMapChanged"],"pendingAndIgnored":["pendingAndIgnoredChanged"]}]]],["p-572fdc25",[[1,"gx-ide-ww-images",{"categories":[16],"contextMenuCallback":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"deleteSelectionCallback":[16],"densities":[16],"languages":[16],"layers":[16],"loadCallback":[16],"loadImageItemsCallback":[16],"newObjectCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionObjectChangedCallback":[16],"styles":[16],"categoriesComboBoxModel":[32],"densitiesComboBoxModel":[32],"languagesComboBoxModel":[32],"layersComboBoxModel":[32],"stylesComboBoxModel":[32],"afterCurrentValue":[32],"filterAfterOptions":[32],"tabularGridData":[32],"images":[32],"imagesSelectedItems":[32],"selectedObjectsIds":[32],"enabledModifiedControls":[32],"order":[32],"filterNameValue":[32],"filterSearchContentsValue":[32],"filterCategoryValue":[32],"filterAllDescendantsValue":[32],"filterAfterTypeValue":[32],"filterUserValue":[32],"filterModifiedDateValue":[32],"filterStyleValue":[32],"filterLanguageValue":[32],"filterDensityValue":[32],"filterLayerValue":[32],"filterModuleValue":[32],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"categories":["categoriesChanged"],"defaultCategory":["defaultCategoryChanged"],"densities":["densitiesChanged"],"languages":["languagesChanged"],"layers":["layersChanged"],"styles":["stylesChanged"],"filterNameValue":["filterNameValueChanged"],"filterSearchContentsValue":["filterSearchContentsValueChanged"],"filterCategoryValue":["filterCategoryValueChanged"],"filterAllDescendantsValue":["filterAllDescendantsValueChanged"],"filterAfterTypeValue":["filterAfterTypeValueChanged"],"filterUserValue":["filterUserValueChanged"],"filterModifiedDateValue":["filterModifiedDateValueChanged"],"filterStyleValue":["filterStyleValueChanged"],"filterLanguageValue":["filterLanguageValueChanged"],"filterDensityValue":["filterDensityValueChanged"],"filterLayerValue":["filterLayerValueChanged"],"filterModuleValue":["filterModuleValueChanged"]}]]],["p-4d7433e0",[[1,"gx-ide-bpm-app-declaration",{"application":[1040],"cancelCallback":[16],"confirmCallback":[16],"getDataMappingCallback":[16],"selectApplicationCallback":[16],"selectMappingCallback":[16],"suggestApplicationsCallback":[16],"applicationComboBoxModel":[32]}]]],["p-886dc9c1",[[1,"gx-ide-bpm-assign-roles",{"displayTitle":[4,"display-title"],"roles":[16],"assignedRoles":[16],"confirmCallback":[16],"cancelCallback":[16],"unassignedRolesState":[32],"assignedRolesState":[32],"filterUnassignedInput":[32],"filterAssignedInput":[32],"unassignedSelected":[32],"assignedSelected":[32]}]]],["p-dbf9a97d",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-4f58397f",[[1,"gx-ide-bpm-task-documents",{"documents":[1040],"cancelCallback":[16],"confirmCallback":[16],"selectDocumentCallback":[16],"suggestDocumentsCallback":[16],"documentsActionListState":[32],"documentName":[32],"selectedDocument":[32],"suggestedDocuments":[32],"suspendShortcuts":[64]}]]],["p-4431f46f",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-7452f3e9",[[1,"gx-ide-breadcrumb",{"model":[16],"accessibleName":[1,"accessible-name"],"disabled":[516],"separator":[1],"selectedLink":[16],"selectedLinkIndicator":[4,"selected-link-indicator"],"getImagePathCallback":[16]}]]],["p-5864a82d",[[1,"gx-ide-curl-inspector",{"cancelCallback":[16],"confirmCallback":[16],"defaultParent":[16],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"showTooltipError":[32],"isFormValid":[32],"curlContent":[32],"validatableControls":[32],"suspendShortcuts":[64]}]]],["p-ebb56b65",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"arrowUpOnFirstElement":[16],"focusType":[1,"focus-type"],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"recentlyUsedActionListModel":[32],"loading":[32],"categoriesJustChanged":[32],"actionListDidRender":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-508c4bee",[[1,"gx-ide-deployment-tool",{"deploymentUnits":[16],"targetTypes":[16],"defaultTargetTypeId":[1,"default-target-type-id"],"newDeploymentUnitId":[1,"new-deployment-unit-id"],"objectTypes":[16],"getDeploymentUnitObjectsCallback":[16],"optionsCallback":[16],"deployCallback":[16],"addObjectsCallback":[16],"createDeploymentUnitCallback":[16],"checkedObjectsIds":[32],"noObjects":[32],"selectedDeployTargetData":[32],"addedObjects":[32],"allObjectTypes":[32],"treeModel":[32],"allowDeploy":[32]},null,{"treeModel":["watchTreeModelHandler"],"objectTypes":["watchObjectTypesHandler"]}]]],["p-e2b88bea",[[1,"gx-ide-file-uploader",{"types":[16],"multiple":[4],"canEditName":[4,"can-edit-name"],"label":[1],"uploadFunction":[16],"cancelUploadFunction":[16],"fileUploadedCallback":[16],"dialogCanceledCallback":[16],"dialogConfirmedCallback":[16],"uploadCancelledCallback":[16],"fileRenamedCallback":[16],"fileValidationErrorCallback":[16],"fileDeletionErrorCallback":[16],"fileDeletedCallback":[16],"onBeforeDelete":[16],"fileStates":[32],"isDragging":[32],"clear":[64]}]]],["p-0e4daeb7",[[1,"gx-ide-json-import",{"cancelCallback":[16],"confirmCallback":[16],"defaultParent":[16],"defaultRadioValue":[1,"default-radio-value"],"parent":[16],"selectModuleCallback":[16],"modeChangeCallback":[16],"fileChangeCallback":[16],"validateNameCallback":[16],"validateJSONCallback":[16],"onJsonContentChange":[16],"fileName":[32],"radioGroupValue":[32],"isFormValid":[32],"jsonContent":[32],"validatableControls":[32],"suspendShortcuts":[64]}]]],["p-45b6dc45",[[1,"gx-ide-mcp-server",{"initialLoading":[1028,"initial-loading"],"status":[1025],"serverPort":[1026,"server-port"],"serverEndpoint":[1025,"server-endpoint"],"startCallback":[16],"stopCallback":[16],"copyCallback":[16],"closeCallback":[16],"actionInProgress":[32],"errorMessage":[32],"copying":[32],"suspendShortcuts":[64]}]]],["p-73d848a6",[[17,"gx-ide-new-object",{"defaultTypeId":[1,"default-type-id"],"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"createCallback":[16],"shadow":[4],"typeCategories":[1040],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"suggestCallback":[16],"description":[32],"name":[32],"nameValidationErrorMessage":[32],"selectedCategory":[32],"selectedType":[32],"typeCategoriesActionListModel":[32],"typesActionListModel":[32],"selectedTypeMap":[32],"suspendShortcuts":[64]},null,{"typeCategories":["typeCategoriesChanged"]}]]],["p-af267991",[[1,"gx-ide-open-api-import",{"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"selectParentCallback":[16],"actionListItems":[32],"importingIsInProcess":[32],"operations":[32],"selectedFile":[32],"selectedOperationForDescription":[32],"selectedOperations":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"suspendShortcuts":[64]}]]],["p-9a10fa97",[[1,"gx-ide-references",{"loadReferencesCallback":[16],"openObjectCallback":[16],"openSelectorDialogCallback":[16],"selectReferenceCallback":[16],"selectorSourceCallback":[16],"selectedObject":[1040],"barHidden":[32],"objectsSuggestions":[32],"referencedByTreeData":[32],"referencesToTreeData":[32]},null,{"selectedObject":["selectedObjectChanged"]}]]],["p-2317ffcb",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-944a589f",[[1,"gx-ide-server-selector",{"serversData":[1040],"recentlyUsedServersData":[16],"cancelCallback":[16],"selectServerCallback":[16],"deleteServerCallback":[16],"updateServerCallback":[16],"enableConfirmButton":[32],"serverUrlInputValue":[32],"serverNameInputValue":[32],"selectedServerUri":[32],"selectedServerName":[32],"userName":[32],"filterValue":[32],"filteredServersData":[32],"validatableControls":[32],"selectedConnectionType":[32],"selectedRecentlyUsedId":[32]},null,{"serversData":["serversDataChanged"]}]]],["p-1d44dd0a",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-c05dc058",[[1,"gx-ide-team-dev-preview",{"teamDevPreviewData":[16],"loadRemoteChangesCallback":[16],"loadLocalChangesCallback":[16],"commitCallback":[16],"updateCallback":[16],"openFullDialogCallback":[16],"shareKBToServerCallback":[16],"createKBFromServerCallback":[16],"openTeamDevInfoCallback":[16],"reconnectCallback":[16],"loadingRemoteChanges":[32],"loadingLocalChanges":[32],"tabModel":[32],"selectedTabId":[32],"pendingCommitChangesCount":[32],"pendingRemoteChangesCount":[32],"remoteChangesTreeViewModel":[32],"localChangesTreeViewModel":[32],"remoteChangesCheckedNodesIds":[32],"localChangesCheckedNodesIds":[32],"commitMessage":[32],"committingChanges":[32],"updatingChanges":[32],"serverOperationsDisabled":[32],"reloadChanges":[64],"disableServerOperations":[64]},null,{"teamDevPreviewData":["onTeamDevPreviewDataChanged"]}]]],["p-123ef674",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-55cb0614",[[1,"gx-ide-about",{"appVersion":[1,"app-version"],"versions":[16],"detailsCallback":[16],"privacyPolicyCallback":[16],"termsAndConditionsCallback":[16],"copying":[32]}]]],["p-b5f2603f",[[1,"gx-ide-bpm-sync-gam-roles",{"cancelCallback":[16],"saveCallback":[16],"suspendShortcuts":[64]}]]],["p-056955be",[[1,"gx-ide-comments-viewer",{"commentsData":[16],"closeCallback":[16]}]]],["p-fb5dd0a2",[[1,"gx-ide-connect-gx-server",{"authenticationTypes":[16],"cancelCallback":[16],"connectCallback":[16],"defaultConnectionData":[16],"enableCustomServer":[4,"enable-custom-server"],"authenticationTypesComboBoxModel":[32],"gxServerConnectionData":[32],"validatableControls":[32]},null,{"authenticationTypes":["authenticationTypesChanged"]}]]],["p-86e95bc7",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-63abf7e8",[[1,"gx-ide-details-acknowledgements",{"dateGenerated":[16],"release":[1],"packages":[16],"openPackageUrlCallback":[16],"expandedLicenseId":[32]}]]],["p-0be24413",[[1,"gx-ide-edit-module-server",{"cancelCallback":[16],"confirmCallback":[16],"name":[1],"selectSourceCallback":[16],"source":[1],"type":[1],"types":[16],"selectedType":[32],"suspendShortcuts":[64]}]]],["p-95ee765c",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-0745a565",[[1,"gx-ide-multi-select",{"model":[16],"value":[16],"placeholder":[1],"disabled":[4],"showPopover":[32]}]]],["p-2b3f161f",[[1,"gx-ide-name-picker",{"cancelCallback":[16],"confirmCallback":[16],"defaultInputValue":[1,"default-input-value"],"inputValue":[32],"validatableControls":[32]},null,{"defaultInputValue":["defaultInputValueChanged"]}]]],["p-5727fce7",[[1,"gx-ide-new-environment",{"cancelCallback":[16],"createCallback":[16],"dataStores":[1040],"environmentName":[1025,"environment-name"],"getDataSourcesCallback":[16],"getEnvironmentNameCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"languages":[1040],"getLanguagesCallback":[16],"runtimes":[16],"setAsTarget":[4,"set-as-target"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"dataStoresComboBoxModel":[32],"languageComboBoxModel":[32],"runtimesRadioGroupModel":[32],"suspendShortcuts":[64]},null,{"dataStores":["dataStoresChanged"],"languages":["languagesChanged"],"runtimes":["runtimesChanged"]}]]],["p-76e1c357",[[1,"gx-ide-new-kb",{"authenticationTypes":[16],"cancelCallback":[16],"canSetLocation":[4,"can-set-location"],"collations":[16],"createCallback":[16],"createDataFilesInKBFolder":[4,"create-data-files-in-k-b-folder"],"databaseName":[1,"database-name"],"defaultDataSources":[1040],"getDataSourcesCallback":[16],"getFrontEndsCallback":[16],"getPrototypingEnvironmentsCallback":[16],"isAdvanced":[4,"is-advanced"],"kbLocation":[1025,"kb-location"],"kbName":[1,"kb-name"],"password":[1],"defaultPrototypingEnvironments":[1040],"prototypingTargets":[16],"savePassword":[4,"save-password"],"selectLocationCallback":[16],"serverNames":[16],"userInterfaceLanguages":[16],"userName":[1,"user-name"],"advancedTabIsVisible":[32],"locationMode":[32],"frontEnds":[32],"validatableControls":[32],"createDataInKbDisabled":[32],"userNameVisible":[32],"passwordVisible":[32],"savePasswordVisible":[32],"authenticationTypesComboBoxModel":[32],"authenticationTypesInitialValue":[32],"collationsComboBoxModel":[32],"collationsInitialValue":[32],"defaultDataSourcesComboBoxModel":[32],"prototypingTargetsComboBoxModel":[32],"prototypingTargetsInitialValue":[32],"prototypingEnvironmentsComboBoxModel":[32],"prototypingEnvironmentsInitialValue":[32],"serverNamesComboBoxModel":[32],"serverNamesInitialValue":[32],"userInterfaceLanguagesComboBoxModel":[32],"userInterfaceLanguagesInitialValue":[32],"suspendShortcuts":[64]},null,{"authenticationTypes":["watchAuthenticationTypes"],"collations":["watchCollations"],"defaultDataSources":["watchDefaultDataSources"],"defaultPrototypingEnvironments":["watchDefaultPrototypingEnvironments"],"prototypingTargets":["watchPrototypingTargets"],"serverNames":["watchServerNames"],"userInterfaceLanguages":["watchUserInterfaceLanguages"]}]]],["p-c3a355c6",[[1,"gx-ide-new-version",{"isRemoteOperation":[4,"is-remote-operation"],"isFreezeOperation":[4,"is-freeze-operation"],"showLinkedLocalVersionCheckbox":[4,"show-linked-local-version-checkbox"],"cancelCallback":[16],"createCallback":[16],"defaultInputValues":[16],"versionName":[32],"versionDescription":[32],"versionDescriptionEdited":[32],"setNewVersionAsActive":[32],"createLinkedLocalVersion":[32],"createAsProtectedVersion":[32],"validatableControls":[32]},null,{"defaultInputValues":["defaultInputValuesChanged"]}]]],["p-514445ac",[[1,"gx-ide-plugin-details",{"data":[16],"installCallback":[16],"openLinkCallback":[16],"uninstallCallback":[16],"docsTabModel":[32],"selectedTabId":[32]}]]],["p-fb64e0b1",[[1,"gx-ide-restore-version",{"selectSourceVersionCallback":[16],"confirmCallback":[16],"cancelCallback":[16],"toVersionInfo":[16],"versions":[16],"syncEnvironments":[32],"selectedSourceVersionName":[32],"selectedSourceVersion":[32],"versionsComboBoxModel":[32],"suspendShortcuts":[64]},null,{"versions":["versionsChanged"]}]]],["p-35c2a2f9",[[1,"gx-ide-share-kb",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"kbName":[1025,"kb-name"],"shareKBCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32],"suspendShortcuts":[64]}]]],["p-f339e8a0",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-ca1b9b8a",[[1,"gx-ide-sign-in-result"]]],["p-98dbb43d",[[1,"gx-ide-splash",{"appVersion":[1,"app-version"],"downloadDockerCallback":[16],"quitCallback":[16],"messages":[16],"openLogCallback":[16],"showQuitButton":[4,"show-quit-button"],"showOpenLogLink":[4,"show-open-log-link"],"showDockerMissingError":[4,"show-docker-missing-error"],"ariaBusy":[32]}]]],["p-b6d59827",[[1,"gx-ide-starting-template",{"firstName":[1,"first-name"],"cancelCallback":[16],"saveCallback":[16],"myStateVariable":[32],"suspendShortcuts":[64]},null,{"firstName":["firstNameChanged"]}]]],["p-e883cd82",[[1,"gx-ide-team-dev-bring-all-changes-selector",{"cancelCallback":[16],"confirmCallback":[16],"sinceCommitDate":[32],"sinceCommitNumber":[32],"selectedOption":[32],"radioGroupModel":[32],"validatableControls":[32]}]]],["p-90b2307f",[[1,"gx-ide-team-dev-select-recent-comment",{"comments":[16],"confirmCallback":[16],"cancelCallback":[16],"commentsActionList":[32]}]]],["p-34577955",[[1,"gx-ide-team-dev-update-partial-selection",{"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-4bafe061",[[1,"gx-ide-team-dev-update-to-revision",{"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"isValid":[32],"validate":[64],"suspendShortcuts":[64]}]]],["p-e32f5b19",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-3ebc82f4",[[1,"gx-ide-welcome-page",{"transitionType":[1,"transition-type"],"wordsPerMinute":[2,"words-per-minute"],"closeCallback":[16],"slides":[16],"activeSlideIndex":[32],"displaySlider":[32],"copyrightsVisible":[32],"lastSlideReached":[32],"sliderVisible":[32],"slideTransitioning":[32],"userHasChangedSlide":[32]}]]],["p-b6f061d1",[[1,"gx-ide-container",{"inactiveTitle":[4,"inactive-title"],"displayBorder":[4,"display-border"],"displayBorderTop":[4,"display-border-top"],"displayBorderEnd":[4,"display-border-end"],"displayBorderBottom":[4,"display-border-bottom"],"displayBorderStart":[4,"display-border-start"],"sectionsPadding":[1,"sections-padding"],"noHeadingBorder":[4,"no-heading-border"],"noHeadingGap":[4,"no-heading-gap"],"noHeadingPadding":[4,"no-heading-padding"],"noHeadingPaddingBlockEnd":[4,"no-heading-padding-block-end"],"headingPaddingTop":[4,"heading-padding-top"],"headingJustify":[1,"heading-justify"],"titleHeightAsInput":[4,"title-height-as-input"],"flexRow":[4,"flex-row"],"flexContent":[4,"flex-content"],"noContentBorderTop":[4,"no-content-border-top"],"noContentPadding":[4,"no-content-padding"],"noContentGap":[4,"no-content-gap"],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"contentBorderEnd":[4,"content-border-end"],"slimmerAboveFooter":[4,"slimmer-above-footer"],"noAboveFooterPadding":[4,"no-above-footer-padding"],"noBorderAboveFooter":[4,"no-border-above-footer"],"slimmerFooter":[4,"slimmer-footer"],"noFooterPadding":[4,"no-footer-padding"],"footerJustify":[1,"footer-justify"],"noBorderFooter":[4,"no-border-footer"],"hasHeaderSlot":[32],"hasSlottedContent":[32],"hasFooterSlot":[32],"hasAboveFooterSlot":[32],"hasOnlyHeading":[32],"hasOnlyContent":[32],"hasOnlyFooter":[32]}]]],["p-fdaeb19a",[[1,"gx-ide-list-selector",{"ordered":[4],"readonly":[4],"type":[1],"required":[4],"ellipsis":[4],"value":[1025],"listName":[1,"list-name"],"noItemsBorder":[4,"no-items-border"],"noListBorder":[516,"no-list-border"]},[[2,"itemSelectionChanged","itemSelectionChangedHandler"]]],[4,"gx-ide-list-selector-item",{"itemId":[513,"item-id"],"itemValue":[1,"item-value"],"itemChecked":[1028,"item-checked"],"readonly":[1540],"ellipsis":[1540],"icon":[1],"noBorder":[1540,"no-border"],"universalSlotEnd":[516,"universal-slot-end"]}]]],["p-cdd2e79d",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-3bbdad29",[[1,"gx-ide-select-kb-items",{"activeItemCallback":[16],"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"expandOnClick":[4,"expand-on-click"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"loadItemsCallback":[16],"showToggleCheckboxes":[4,"show-toggle-checkboxes"],"multiSelection":[4,"multi-selection"],"singleChecks":[4,"single-checks"],"showActiveItemLink":[4,"show-active-item-link"],"useLoader":[4,"use-loader"],"selectionChanged":[16],"activeItemNode":[32],"checkedNodesIds":[32],"renderFooter":[32],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"itemsList":[32],"reloadItems":[64],"suspendShortcuts":[64],"updateSelection":[64],"updateCheckedItems":[64]}]]],["p-be7a6b7f",[[1,"gx-ide-breadcrumb-item",{"model":[16],"caption":[1],"accessibleName":[1,"accessible-name"],"disabled":[4],"link":[16],"selected":[4],"selectedLinkIndicator":[4,"selected-link-indicator"],"startImgSrc":[1,"start-img-src"],"startImgType":[1,"start-img-type"],"getImagePathCallback":[16],"itemId":[1,"item-id"]}]]],["p-c460c9e7",[[1,"gx-ide-file-item",{"file":[16],"editable":[4],"componentLocale":[8,"component-locale"],"fileDeletedCallback":[16],"fileDeletionErrorCallback":[16],"isEditing":[32],"currentName":[32]},null,{"file":["handleFileChange"]}]]],["p-b3c5c315",[[1,"gx-ide-progress-bar",{"caption":[1],"minimal":[516],"active":[1028],"stateType":[1025,"state-type"],"progress":[1026],"closeType":[1,"close-type"],"closedCallback":[16],"topStateBarVisible":[32],"disableTransition":[32],"visible":[32],"reset":[64]},null,{"active":["watchActiveHandler"],"progress":["watchProgressHandler"]}]]],["p-6941599f",[[1,"gx-ide-status-buttons",{"active":[4],"errors":[2],"hideError":[4,"hide-error"],"warnings":[2],"hideWarning":[4,"hide-warning"],"successes":[2],"hideSuccess":[4,"hide-success"],"messages":[2],"hideMessage":[4,"hide-message"],"minimal":[4],"compact":[516],"noInnerBorders":[516,"no-inner-borders"],"iconsSize":[32]}]]],["p-189ff3d7",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayWelcomeScreen":[4,"display-welcome-screen"],"displayConversationCopiedMessage":[32],"menuIsExpanded":[32],"showCopyConversationMessage":[64]}],[1,"gx-ide-chat-welcome",{"welcomeTitle":[1025,"welcome-title"],"welcomeGreeting":[1025,"welcome-greeting"],"suggestedPrompts":[1040],"suggestedPrompRequestedCallback":[16],"showHeader":[32],"showSuggestedPrompts":[32],"hideWelcome":[32],"exitWelcome":[64]}]]],["p-95e3b06c",[[0,"gx-ide-launchpad-api",{"data":[16],"onObjectSelected":[16]},null,{"data":["onDataChanged"]}]]],["p-42860e7e",[[1,"gx-ide-launchpad-apis",{"apis":[16],"onObjectSelected":[16]}],[1,"gx-ide-launchpad-native-apps",{"objects":[16],"onObjectSelected":[16],"filterValue":[32],"order":[32],"page":[32],"perPage":[32],"showCopiedMessage":[32],"showQRDialog":[32],"selectedObjectForQR":[32]}],[1,"gx-ide-launchpad-web-apps",{"objects":[16],"onObjectSelected":[16],"filterValue":[32],"recentObjectsExpanded":[32],"order":[32]},[[0,"expandedChange","handleAccordionExpandedChange"]]]]],["p-80259b9e",[[1,"gx-ide-entity-selector",{"defaultValue":[16],"disabled":[516],"labelCaption":[1,"label-caption"],"labelPosition":[513,"label-position"],"name":[513],"selectEntityCallback":[16],"value":[1040],"buttonHasFocus":[32],"iconSrc":[32]},null,{"value":["valueChangedHandler"]}]]],["p-24247ec3",[[1,"gx-ide-loader",{"abortTime":[2,"abort-time"],"cancelCallback":[16],"cancelLabel":[1,"cancel-label"],"description":[1],"loaderTitle":[1,"loader-title"],"show":[1028],"showWrapper":[32]}]]],["p-d7964c12",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]]]'), e)));
|
|
16
|
+
patchBrowser().then((e => a(JSON.parse('[["p-e3ff125f",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-7cd24b82",[[1,"gx-ide-kb-manager-import",{"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"objectContextMenuCallback":[16],"optionsCallback":[16],"selectedFile":[1040],"statusMinimal":[4,"status-minimal"],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"hasSelection":[32],"importStatusMessage":[32],"importTreeState":[32],"importedTreeFilterRegExp":[32],"importingIsInProcess":[32],"importTreeFilterList":[32],"noImport":[32],"noObjects":[32],"objectsTreeModel":[32],"showHiddenImportsMessage":[32],"someStatusVisible":[32],"statusInfo":[32],"addResultItem":[64]},null,{"importTreeState":["importTreeStateChanged","watchImportTreeStateHandler"],"objectsTreeModel":["watchObjectsTreeModelHandler"],"selectedFile":["selectedFileChanged"]}]]],["p-25e749c7",[[1,"gx-ide-launchpad",{"data":[1],"isStandalone":[4,"is-standalone"],"sections":[32],"tabModel":[32]},null,{"data":["watchDataHandler"]}]]],["p-d68412ac",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-e0fb6257",[[17,"gx-ide-data-selector",{"cancelCallback":[16],"confirmCallback":[16],"defaultModule":[16],"displayTitle":[4,"display-title"],"editCallback":[16],"loadItemsCallback":[16],"loader":[4],"newVariableCallback":[16],"selectObjectCallback":[16],"selectionType":[1,"selection-type"],"loading":[32],"objects":[32],"selectedObjectsIds":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-21775439",[[1,"gx-ide-manage-module-references",{"autoCloseProgressBar":[4,"auto-close-progress-bar"],"executeActionCallback":[16],"serverContextMenuCallback":[16],"serverSelectedCallback":[16],"servers":[16],"showServerCommands":[4,"show-server-commands"],"actionInProgress":[32],"executeActionCallbackInProgress":[32],"filteredModules":[32],"loadingServer":[32],"modulesAll":[32],"progressState":[32],"progressValue":[32],"reRenderCounter":[32],"selectedModuleAction":[32],"selectedModuleId":[32],"selectedModuleType":[32],"selectedServerId":[32],"selectedServerValue":[32],"serversComboBoxModel":[32],"selectedModuleVersions":[32]},[[0,"progressBarClosed","progressBarClosedHandler"]],{"modulesAll":["modulesAllChanged"],"servers":["serversChanged"]}]]],["p-37812762",[[1,"gx-ide-navigation-report",{"headerData":[16],"confirmCallback":[16],"cancelCallback":[16],"closeCallback":[16],"itemSelectedCallback":[16],"reportTreeItems":[32],"navigationItemsStatusRegExpString":[32],"navigationItemsCaptionRegExpString":[32],"navigationItemsRegExp":[32],"confirmed":[32],"headerState":[32],"statusInfo":[32],"someStatusVisible":[32],"addItem":[64],"clearItems":[64]},null,{"navigationItemsStatusRegExpString":["navigationItemsStatusRegExpStringChanged"],"navigationItemsCaptionRegExpString":["navigationItemsCaptionRegExpStringChanged"]}]]],["p-00705e1c",[[17,"gx-ide-object-selector",{"cancelCallback":[16],"categories":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"defaultType":[1,"default-type"],"loader":[4],"loadCallback":[16],"multiSelection":[4,"multi-selection"],"newObjectCallback":[16],"openSelectionCallback":[16],"patternValue":[1,"pattern-value"],"selectModuleCallback":[16],"types":[16],"filterModified":[32],"loading":[32],"modifiedAfterValue":[32],"objects":[32],"selectedObjectsIdsArray":[32],"suspendShortcuts":[64],"validate":[64]}]]],["p-c2f2d79f",[[1,"gx-ide-team-dev-history",{"types":[16],"itemContextMenuCallback":[16],"gridContextMenuCallback":[16],"loadVersionsCallback":[16],"loadCallback":[16],"loadDetailCallback":[16],"selectedVersionChangeCallback":[16],"historyDetail":[32],"objects":[32],"sidebarExpanded":[32],"filtersHidden":[32],"loading":[32],"selectedRevisionId":[32],"hasActiveVersion":[32],"reload":[64]}]]],["p-308ad50f",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-7bdeae77",[[1,"gx-ide-ww-files",{"categories":[16],"contextMenuCallback":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"deleteSelectionCallback":[16],"gridColumnsVisibility":[16],"loadCallback":[16],"newFileCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionChangeCallback":[16],"showSearchContents":[4,"show-search-contents"],"afterValue":[32],"categoriesComboBoxModel":[32],"dateTimeValue":[32],"isLoading":[32],"filterAfterComboBoxModel":[32],"showModified":[32],"objects":[32],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"dateTimeValue":["dateTimeValueChanged"],"categories":["categoriesChanged"]}]]],["p-cf61384e",[[1,"gx-ide-create-kb-from-server",{"kbLocation":[1025,"kb-location"],"canSetLocation":[4,"can-set-location"],"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"createKBCallback":[16],"getGXserverKBsCallback":[16],"selectLocationCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"localKbNameInputValue":[32],"loading":[32],"filterValue":[32],"kbsFilteredActionListModel":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32],"locationMode":[32],"suspendShortcuts":[64]}]]],["p-69e7d46b",[[1,"gx-ide-design-import",{"reactiveSettings":[16],"extensions":[16],"defaultModule":[16],"path":[1025],"accessToken":[1025,"access-token"],"importAsWebPanels":[4,"import-as-web-panels"],"selectModuleCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"loadCallback":[16],"loadDesignSystemCallback":[16],"loadFontCallback":[16],"loadImageCallback":[16],"loadPanelDataCallback":[16],"requiresAccessTokenCallback":[16],"styles":[16],"textEditorFactoryCallback":[16],"reRenderCounter":[32],"stylesAsComboBoxModel":[32],"styleValue":[32],"accessTokenHasError":[32],"pathIsValid":[32],"tabsModel":[32],"activeTabs":[32],"renderedTabs":[32],"designData":[32],"detailTreeModel":[32],"isLoading":[32],"isLoaded":[32],"messages":[32],"selectedFile":[32],"selectedDesignType":[32],"selectedDesignItem":[32],"requiresAccessToken":[32],"designDataTreeDataModel":[32],"updateTabsActiveTab":[32],"fitImages":[32],"lastLoadCallbackSettingValues":[32]},null,{"pathIsValid":["pathIsValidChanged"],"designData":["designDataChanged"],"path":["pathChanged"],"accessToken":["accessTokenChanged"],"styles":["stylesChanged"],"messages":["watchMessagesHandler"]}]]],["p-9ca0c042",[[1,"gx-ide-kb-manager-export",{"addKBPropertiesCallback":[16],"addObjectsCallback":[16],"addReferencesCallback":[16],"cancelCallback":[16],"exportCallback":[16],"exportFileDirectoryCallback":[16],"fileName":[1,"file-name"],"kbPropertiesTypes":[16],"loader":[4],"objectTypes":[16],"optionsCallback":[16],"addKbPropertiesIsChecked":[32],"atLeastOnePropertyItemIsChecked":[32],"atLeastOneObjectItemIsChecked":[32],"checkedObjectsIds":[32],"checkedPropertiesIds":[32],"exportAllIsChecked":[32],"exportingIsInProcess":[32],"hasObjects":[32],"objectsTreeViewModel":[32]},null,{"objectsTreeViewModel":["objectsTreeViewModelChanged"],"objectTypes":["objectTypesChanged"]}]]],["p-fc0bc991",[[1,"gx-ide-plugin-explorer",{"plugins":[1040],"filterCallback":[16],"showDetailsCallback":[16],"executeActionCallback":[16],"loading":[32],"pluginsActionListModel":[32]},null,{"plugins":["pluginsChangedHandler"]}]]],["p-1043534b",[[1,"gx-ide-sc-chat-container",{"mode":[1],"generatingResponse":[32],"loadingState":[32],"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32],"chatItems":[32],"exitWelcome":[64]}]]],["p-8b5c826b",[[1,"gx-ide-search",{"isKbOpen":[4,"is-kb-open"],"searchCallback":[16],"itemDoubleClickCallback":[16],"searchResultModel":[32],"hasSearched":[32],"isSearching":[32],"showSettings":[64]},null,{"isKbOpen":["valueChangeHandler"]}]]],["p-0680b762",[[1,"gx-ide-start-page",{"createKBCallback":[16],"hideOpenExistingProject":[4,"hide-open-existing-project"],"kbs":[16],"kbsFilterThreshold":[2,"kbs-filter-threshold"],"openKbCallback":[16],"openSampleCallback":[16],"samples":[16],"secondarySection":[16],"filteredKbs":[32],"kbFilterValue":[32],"loading":[32]},null,{"kbFilterValue":["kbFilterValueChanged"],"kbs":["kbsChanged"]}]]],["p-7b76b0e4",[[1,"gx-ide-team-dev-bring-changes",{"commitDetail":[16],"commitInformation":[16],"commitObjects":[16],"hideFilters":[4,"hide-filters"],"operationType":[1,"operation-type"],"mergeObjectsCallback":[16],"revertPillAsButton":[4,"revert-pill-as-button"],"contextMenuCallback":[8,"context-menu-callback"],"viewAllCommentsCallback":[16],"editRangeCallback":[16],"alreadyMergedObjectsIdsArray":[32],"atLeastOneObjectIsChecked":[32],"loading":[32],"objectsFiltered":[32],"searchValue":[32],"stateFilterValue":[32],"markedObjectsSet":[32],"objectsStatesMap":[32],"commitObjectsMessagesMap":[32],"merging":[32],"updateObjectState":[64]},null,{"objectsStatesMap":["objectsStatesMapChanged"],"commitObjects":["commitObjectsChanged"]}]]],["p-cd9e9e2b",[[1,"gx-ide-team-dev-commit",{"commitCallback":[16],"objectsContextMenuCallback":[16],"loadCallback":[16],"openServerCallback":[16],"pendingItemsCheckedCallback":[16],"selectCallback":[16],"types":[16],"changeset":[16],"folders":[16],"updatePillAsButton":[4,"update-pill-as-button"],"serverDetails":[16],"allPendingAreCommitted":[32],"alreadyCommittedObjectsIdsSet":[32],"ignoredIdsSet":[32],"pendingIdsSet":[32],"markedObjectsSet":[32],"objectsStatusMap":[32],"objectsMessagesDataMap":[32],"atLeastOneObjectIsChecked":[32],"commentInputHasError":[32],"committing":[32],"filterSecondaryIsHidden":[32],"filterSecondaryHasConditions":[32],"loading":[32],"changesetsComboBoxModel":[32],"pendingObjectsAfterFilter":[32],"ignoredObjectsAfterFilter":[32],"typesComboBoxModel":[32],"pendingAndIgnored":[32],"commentsValue":[32],"searchValue":[32],"selectedType":[32],"selectedState":[32],"selectedChangeset":[32],"selectedFolder":[32],"selectedCategory":[32],"foldersComboBoxModel":[32],"isCommitDisabled":[32],"reload":[64],"disableCommit":[64]},null,{"alreadyCommittedObjectsIdsSet":["alreadyCommittedObjectsIdsSetChanged"],"markedObjectsSet":["markedObjectsSetChanged"],"objectsStatusMap":["objectsStatusMapChanged"],"pendingAndIgnored":["pendingAndIgnoredChanged"],"types":["typesChanged"],"changeset":["changesetChanged"],"folders":["folderChanged"]}]]],["p-f1b452fb",[[1,"gx-ide-team-dev-update",{"contextMenuCallback":[16],"loadCallback":[16],"pendingItemsCheckedCallback":[16],"types":[16],"updatePillAsButton":[4,"update-pill-as-button"],"updateCallback":[16],"openServerCallback":[16],"updateFrom":[16],"atLeastOneObjectIsChecked":[32],"loading":[32],"menuContextAction":[32],"searchValue":[32],"selectedAction":[32],"markedObjectsSet":[32],"alreadyUpdatedObjectsIdsSet":[32],"pendingIdsSet":[32],"ignoredIdsSet":[32],"objectsMessagesDataMap":[32],"updating":[32],"allPendingAreUpdated":[32],"kbPropertiesChecked":[32],"typesComboBoxModel":[32],"selectedType":[32],"isUpdateDisabled":[32],"objectsStatusMap":[32],"pendingAndIgnored":[32],"pendingObjectsAfterActionFilter":[32],"ignoredObjectsAfterActionFilter":[32],"reload":[64],"disableUpdate":[64]},null,{"markedObjectsSet":["markedObjectsSetChanged"],"alreadyUpdatedObjectsIdsSet":["alreadyUpdatedObjectsIdsSetChanged"],"objectsStatusMap":["objectsStatusMapChanged"],"pendingAndIgnored":["pendingAndIgnoredChanged"]}]]],["p-572fdc25",[[1,"gx-ide-ww-images",{"categories":[16],"contextMenuCallback":[16],"defaultCategory":[1,"default-category"],"defaultModule":[16],"deleteSelectionCallback":[16],"densities":[16],"languages":[16],"layers":[16],"loadCallback":[16],"loadImageItemsCallback":[16],"newObjectCallback":[16],"openSelectionCallback":[16],"selectModuleCallback":[16],"selectionObjectChangedCallback":[16],"styles":[16],"categoriesComboBoxModel":[32],"densitiesComboBoxModel":[32],"languagesComboBoxModel":[32],"layersComboBoxModel":[32],"stylesComboBoxModel":[32],"afterCurrentValue":[32],"filterAfterOptions":[32],"tabularGridData":[32],"images":[32],"imagesSelectedItems":[32],"selectedObjectsIds":[32],"enabledModifiedControls":[32],"order":[32],"filterNameValue":[32],"filterSearchContentsValue":[32],"filterCategoryValue":[32],"filterAllDescendantsValue":[32],"filterAfterTypeValue":[32],"filterUserValue":[32],"filterModifiedDateValue":[32],"filterStyleValue":[32],"filterLanguageValue":[32],"filterDensityValue":[32],"filterLayerValue":[32],"filterModuleValue":[32],"reload":[64]},[[1,"keydown","keyDownHandler"]],{"categories":["categoriesChanged"],"defaultCategory":["defaultCategoryChanged"],"densities":["densitiesChanged"],"languages":["languagesChanged"],"layers":["layersChanged"],"styles":["stylesChanged"],"filterNameValue":["filterNameValueChanged"],"filterSearchContentsValue":["filterSearchContentsValueChanged"],"filterCategoryValue":["filterCategoryValueChanged"],"filterAllDescendantsValue":["filterAllDescendantsValueChanged"],"filterAfterTypeValue":["filterAfterTypeValueChanged"],"filterUserValue":["filterUserValueChanged"],"filterModifiedDateValue":["filterModifiedDateValueChanged"],"filterStyleValue":["filterStyleValueChanged"],"filterLanguageValue":["filterLanguageValueChanged"],"filterDensityValue":["filterDensityValueChanged"],"filterLayerValue":["filterLayerValueChanged"],"filterModuleValue":["filterModuleValueChanged"]}]]],["p-4d7433e0",[[1,"gx-ide-bpm-app-declaration",{"application":[1040],"cancelCallback":[16],"confirmCallback":[16],"getDataMappingCallback":[16],"selectApplicationCallback":[16],"selectMappingCallback":[16],"suggestApplicationsCallback":[16],"applicationComboBoxModel":[32]}]]],["p-886dc9c1",[[1,"gx-ide-bpm-assign-roles",{"displayTitle":[4,"display-title"],"roles":[16],"assignedRoles":[16],"confirmCallback":[16],"cancelCallback":[16],"unassignedRolesState":[32],"assignedRolesState":[32],"filterUnassignedInput":[32],"filterAssignedInput":[32],"unassignedSelected":[32],"assignedSelected":[32]}]]],["p-dbf9a97d",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-4f58397f",[[1,"gx-ide-bpm-task-documents",{"documents":[1040],"cancelCallback":[16],"confirmCallback":[16],"selectDocumentCallback":[16],"suggestDocumentsCallback":[16],"documentsActionListState":[32],"documentName":[32],"selectedDocument":[32],"suggestedDocuments":[32],"suspendShortcuts":[64]}]]],["p-4431f46f",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-7452f3e9",[[1,"gx-ide-breadcrumb",{"model":[16],"accessibleName":[1,"accessible-name"],"disabled":[516],"separator":[1],"selectedLink":[16],"selectedLinkIndicator":[4,"selected-link-indicator"],"getImagePathCallback":[16]}]]],["p-5864a82d",[[1,"gx-ide-curl-inspector",{"cancelCallback":[16],"confirmCallback":[16],"defaultParent":[16],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"showTooltipError":[32],"isFormValid":[32],"curlContent":[32],"validatableControls":[32],"suspendShortcuts":[64]}]]],["p-ebb56b65",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"arrowUpOnFirstElement":[16],"focusType":[1,"focus-type"],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"recentlyUsedActionListModel":[32],"loading":[32],"categoriesJustChanged":[32],"actionListDidRender":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-508c4bee",[[1,"gx-ide-deployment-tool",{"deploymentUnits":[16],"targetTypes":[16],"defaultTargetTypeId":[1,"default-target-type-id"],"newDeploymentUnitId":[1,"new-deployment-unit-id"],"objectTypes":[16],"getDeploymentUnitObjectsCallback":[16],"optionsCallback":[16],"deployCallback":[16],"addObjectsCallback":[16],"createDeploymentUnitCallback":[16],"checkedObjectsIds":[32],"noObjects":[32],"selectedDeployTargetData":[32],"addedObjects":[32],"allObjectTypes":[32],"treeModel":[32],"allowDeploy":[32]},null,{"treeModel":["watchTreeModelHandler"],"objectTypes":["watchObjectTypesHandler"]}]]],["p-e2b88bea",[[1,"gx-ide-file-uploader",{"types":[16],"multiple":[4],"canEditName":[4,"can-edit-name"],"label":[1],"uploadFunction":[16],"cancelUploadFunction":[16],"fileUploadedCallback":[16],"dialogCanceledCallback":[16],"dialogConfirmedCallback":[16],"uploadCancelledCallback":[16],"fileRenamedCallback":[16],"fileValidationErrorCallback":[16],"fileDeletionErrorCallback":[16],"fileDeletedCallback":[16],"onBeforeDelete":[16],"fileStates":[32],"isDragging":[32],"clear":[64]}]]],["p-0e4daeb7",[[1,"gx-ide-json-import",{"cancelCallback":[16],"confirmCallback":[16],"defaultParent":[16],"defaultRadioValue":[1,"default-radio-value"],"parent":[16],"selectModuleCallback":[16],"modeChangeCallback":[16],"fileChangeCallback":[16],"validateNameCallback":[16],"validateJSONCallback":[16],"onJsonContentChange":[16],"fileName":[32],"radioGroupValue":[32],"isFormValid":[32],"jsonContent":[32],"validatableControls":[32],"suspendShortcuts":[64]}]]],["p-a456237f",[[1,"gx-ide-mcp-server",{"initialLoading":[1028,"initial-loading"],"status":[1025],"serverPort":[1026,"server-port"],"serverEndpoint":[1025,"server-endpoint"],"startCallback":[16],"stopCallback":[16],"copyCallback":[16],"closeCallback":[16],"actionInProgress":[32],"errorMessage":[32],"copying":[32],"suspendShortcuts":[64]}]]],["p-73d848a6",[[17,"gx-ide-new-object",{"defaultTypeId":[1,"default-type-id"],"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"createCallback":[16],"shadow":[4],"typeCategories":[1040],"parent":[16],"selectModuleCallback":[16],"validateNameCallback":[16],"suggestCallback":[16],"description":[32],"name":[32],"nameValidationErrorMessage":[32],"selectedCategory":[32],"selectedType":[32],"typeCategoriesActionListModel":[32],"typesActionListModel":[32],"selectedTypeMap":[32],"suspendShortcuts":[64]},null,{"typeCategories":["typeCategoriesChanged"]}]]],["p-af267991",[[1,"gx-ide-open-api-import",{"defaultParent":[16],"displayTitle":[4,"display-title"],"cancelCallback":[16],"importCallback":[16],"loadCallback":[16],"selectParentCallback":[16],"actionListItems":[32],"importingIsInProcess":[32],"operations":[32],"selectedFile":[32],"selectedOperationForDescription":[32],"selectedOperations":[32],"selectAllCheckboxValue":[32],"selectAllCheckboxIndeterminate":[32],"suspendShortcuts":[64]}]]],["p-9a10fa97",[[1,"gx-ide-references",{"loadReferencesCallback":[16],"openObjectCallback":[16],"openSelectorDialogCallback":[16],"selectReferenceCallback":[16],"selectorSourceCallback":[16],"selectedObject":[1040],"barHidden":[32],"objectsSuggestions":[32],"referencedByTreeData":[32],"referencesToTreeData":[32]},null,{"selectedObject":["selectedObjectChanged"]}]]],["p-2317ffcb",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-944a589f",[[1,"gx-ide-server-selector",{"serversData":[1040],"recentlyUsedServersData":[16],"cancelCallback":[16],"selectServerCallback":[16],"deleteServerCallback":[16],"updateServerCallback":[16],"enableConfirmButton":[32],"serverUrlInputValue":[32],"serverNameInputValue":[32],"selectedServerUri":[32],"selectedServerName":[32],"userName":[32],"filterValue":[32],"filteredServersData":[32],"validatableControls":[32],"selectedConnectionType":[32],"selectedRecentlyUsedId":[32]},null,{"serversData":["serversDataChanged"]}]]],["p-1d44dd0a",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-c05dc058",[[1,"gx-ide-team-dev-preview",{"teamDevPreviewData":[16],"loadRemoteChangesCallback":[16],"loadLocalChangesCallback":[16],"commitCallback":[16],"updateCallback":[16],"openFullDialogCallback":[16],"shareKBToServerCallback":[16],"createKBFromServerCallback":[16],"openTeamDevInfoCallback":[16],"reconnectCallback":[16],"loadingRemoteChanges":[32],"loadingLocalChanges":[32],"tabModel":[32],"selectedTabId":[32],"pendingCommitChangesCount":[32],"pendingRemoteChangesCount":[32],"remoteChangesTreeViewModel":[32],"localChangesTreeViewModel":[32],"remoteChangesCheckedNodesIds":[32],"localChangesCheckedNodesIds":[32],"commitMessage":[32],"committingChanges":[32],"updatingChanges":[32],"serverOperationsDisabled":[32],"reloadChanges":[64],"disableServerOperations":[64]},null,{"teamDevPreviewData":["onTeamDevPreviewDataChanged"]}]]],["p-123ef674",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-55cb0614",[[1,"gx-ide-about",{"appVersion":[1,"app-version"],"versions":[16],"detailsCallback":[16],"privacyPolicyCallback":[16],"termsAndConditionsCallback":[16],"copying":[32]}]]],["p-b5f2603f",[[1,"gx-ide-bpm-sync-gam-roles",{"cancelCallback":[16],"saveCallback":[16],"suspendShortcuts":[64]}]]],["p-056955be",[[1,"gx-ide-comments-viewer",{"commentsData":[16],"closeCallback":[16]}]]],["p-fb5dd0a2",[[1,"gx-ide-connect-gx-server",{"authenticationTypes":[16],"cancelCallback":[16],"connectCallback":[16],"defaultConnectionData":[16],"enableCustomServer":[4,"enable-custom-server"],"authenticationTypesComboBoxModel":[32],"gxServerConnectionData":[32],"validatableControls":[32]},null,{"authenticationTypes":["authenticationTypesChanged"]}]]],["p-86e95bc7",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-63abf7e8",[[1,"gx-ide-details-acknowledgements",{"dateGenerated":[16],"release":[1],"packages":[16],"openPackageUrlCallback":[16],"expandedLicenseId":[32]}]]],["p-0be24413",[[1,"gx-ide-edit-module-server",{"cancelCallback":[16],"confirmCallback":[16],"name":[1],"selectSourceCallback":[16],"source":[1],"type":[1],"types":[16],"selectedType":[32],"suspendShortcuts":[64]}]]],["p-95ee765c",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-0745a565",[[1,"gx-ide-multi-select",{"model":[16],"value":[16],"placeholder":[1],"disabled":[4],"showPopover":[32]}]]],["p-2b3f161f",[[1,"gx-ide-name-picker",{"cancelCallback":[16],"confirmCallback":[16],"defaultInputValue":[1,"default-input-value"],"inputValue":[32],"validatableControls":[32]},null,{"defaultInputValue":["defaultInputValueChanged"]}]]],["p-5727fce7",[[1,"gx-ide-new-environment",{"cancelCallback":[16],"createCallback":[16],"dataStores":[1040],"environmentName":[1025,"environment-name"],"getDataSourcesCallback":[16],"getEnvironmentNameCallback":[16],"getFrontEndsCallback":[16],"isAdvanced":[4,"is-advanced"],"languages":[1040],"getLanguagesCallback":[16],"runtimes":[16],"setAsTarget":[4,"set-as-target"],"advancedTabIsVisible":[32],"frontEnds":[32],"validatableControls":[32],"dataStoresComboBoxModel":[32],"languageComboBoxModel":[32],"runtimesRadioGroupModel":[32],"suspendShortcuts":[64]},null,{"dataStores":["dataStoresChanged"],"languages":["languagesChanged"],"runtimes":["runtimesChanged"]}]]],["p-76e1c357",[[1,"gx-ide-new-kb",{"authenticationTypes":[16],"cancelCallback":[16],"canSetLocation":[4,"can-set-location"],"collations":[16],"createCallback":[16],"createDataFilesInKBFolder":[4,"create-data-files-in-k-b-folder"],"databaseName":[1,"database-name"],"defaultDataSources":[1040],"getDataSourcesCallback":[16],"getFrontEndsCallback":[16],"getPrototypingEnvironmentsCallback":[16],"isAdvanced":[4,"is-advanced"],"kbLocation":[1025,"kb-location"],"kbName":[1,"kb-name"],"password":[1],"defaultPrototypingEnvironments":[1040],"prototypingTargets":[16],"savePassword":[4,"save-password"],"selectLocationCallback":[16],"serverNames":[16],"userInterfaceLanguages":[16],"userName":[1,"user-name"],"advancedTabIsVisible":[32],"locationMode":[32],"frontEnds":[32],"validatableControls":[32],"createDataInKbDisabled":[32],"userNameVisible":[32],"passwordVisible":[32],"savePasswordVisible":[32],"authenticationTypesComboBoxModel":[32],"authenticationTypesInitialValue":[32],"collationsComboBoxModel":[32],"collationsInitialValue":[32],"defaultDataSourcesComboBoxModel":[32],"prototypingTargetsComboBoxModel":[32],"prototypingTargetsInitialValue":[32],"prototypingEnvironmentsComboBoxModel":[32],"prototypingEnvironmentsInitialValue":[32],"serverNamesComboBoxModel":[32],"serverNamesInitialValue":[32],"userInterfaceLanguagesComboBoxModel":[32],"userInterfaceLanguagesInitialValue":[32],"suspendShortcuts":[64]},null,{"authenticationTypes":["watchAuthenticationTypes"],"collations":["watchCollations"],"defaultDataSources":["watchDefaultDataSources"],"defaultPrototypingEnvironments":["watchDefaultPrototypingEnvironments"],"prototypingTargets":["watchPrototypingTargets"],"serverNames":["watchServerNames"],"userInterfaceLanguages":["watchUserInterfaceLanguages"]}]]],["p-c3a355c6",[[1,"gx-ide-new-version",{"isRemoteOperation":[4,"is-remote-operation"],"isFreezeOperation":[4,"is-freeze-operation"],"showLinkedLocalVersionCheckbox":[4,"show-linked-local-version-checkbox"],"cancelCallback":[16],"createCallback":[16],"defaultInputValues":[16],"versionName":[32],"versionDescription":[32],"versionDescriptionEdited":[32],"setNewVersionAsActive":[32],"createLinkedLocalVersion":[32],"createAsProtectedVersion":[32],"validatableControls":[32]},null,{"defaultInputValues":["defaultInputValuesChanged"]}]]],["p-514445ac",[[1,"gx-ide-plugin-details",{"data":[16],"installCallback":[16],"openLinkCallback":[16],"uninstallCallback":[16],"docsTabModel":[32],"selectedTabId":[32]}]]],["p-fb64e0b1",[[1,"gx-ide-restore-version",{"selectSourceVersionCallback":[16],"confirmCallback":[16],"cancelCallback":[16],"toVersionInfo":[16],"versions":[16],"syncEnvironments":[32],"selectedSourceVersionName":[32],"selectedSourceVersion":[32],"versionsComboBoxModel":[32],"suspendShortcuts":[64]},null,{"versions":["versionsChanged"]}]]],["p-35c2a2f9",[[1,"gx-ide-share-kb",{"connectionData":[16],"cancelCallback":[16],"changeConnectionCallback":[16],"kbName":[1025,"kb-name"],"shareKBCallback":[16],"selectKBVersionsCallback":[16],"enableSelectVersionsButton":[32],"validatableControls":[32],"versionSelectedType":[32],"versionsValueInput":[32],"suspendShortcuts":[64]}]]],["p-f339e8a0",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-ca1b9b8a",[[1,"gx-ide-sign-in-result"]]],["p-98dbb43d",[[1,"gx-ide-splash",{"appVersion":[1,"app-version"],"downloadDockerCallback":[16],"quitCallback":[16],"messages":[16],"openLogCallback":[16],"showQuitButton":[4,"show-quit-button"],"showOpenLogLink":[4,"show-open-log-link"],"showDockerMissingError":[4,"show-docker-missing-error"],"ariaBusy":[32]}]]],["p-b6d59827",[[1,"gx-ide-starting-template",{"firstName":[1,"first-name"],"cancelCallback":[16],"saveCallback":[16],"myStateVariable":[32],"suspendShortcuts":[64]},null,{"firstName":["firstNameChanged"]}]]],["p-e883cd82",[[1,"gx-ide-team-dev-bring-all-changes-selector",{"cancelCallback":[16],"confirmCallback":[16],"sinceCommitDate":[32],"sinceCommitNumber":[32],"selectedOption":[32],"radioGroupModel":[32],"validatableControls":[32]}]]],["p-90b2307f",[[1,"gx-ide-team-dev-select-recent-comment",{"comments":[16],"confirmCallback":[16],"cancelCallback":[16],"commentsActionList":[32]}]]],["p-34577955",[[1,"gx-ide-team-dev-update-partial-selection",{"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-4bafe061",[[1,"gx-ide-team-dev-update-to-revision",{"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"isValid":[32],"validate":[64],"suspendShortcuts":[64]}]]],["p-e32f5b19",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-3ebc82f4",[[1,"gx-ide-welcome-page",{"transitionType":[1,"transition-type"],"wordsPerMinute":[2,"words-per-minute"],"closeCallback":[16],"slides":[16],"activeSlideIndex":[32],"displaySlider":[32],"copyrightsVisible":[32],"lastSlideReached":[32],"sliderVisible":[32],"slideTransitioning":[32],"userHasChangedSlide":[32]}]]],["p-b6f061d1",[[1,"gx-ide-container",{"inactiveTitle":[4,"inactive-title"],"displayBorder":[4,"display-border"],"displayBorderTop":[4,"display-border-top"],"displayBorderEnd":[4,"display-border-end"],"displayBorderBottom":[4,"display-border-bottom"],"displayBorderStart":[4,"display-border-start"],"sectionsPadding":[1,"sections-padding"],"noHeadingBorder":[4,"no-heading-border"],"noHeadingGap":[4,"no-heading-gap"],"noHeadingPadding":[4,"no-heading-padding"],"noHeadingPaddingBlockEnd":[4,"no-heading-padding-block-end"],"headingPaddingTop":[4,"heading-padding-top"],"headingJustify":[1,"heading-justify"],"titleHeightAsInput":[4,"title-height-as-input"],"flexRow":[4,"flex-row"],"flexContent":[4,"flex-content"],"noContentBorderTop":[4,"no-content-border-top"],"noContentPadding":[4,"no-content-padding"],"noContentGap":[4,"no-content-gap"],"alignItems":[1,"align-items"],"justifyContent":[1,"justify-content"],"contentBorderEnd":[4,"content-border-end"],"slimmerAboveFooter":[4,"slimmer-above-footer"],"noAboveFooterPadding":[4,"no-above-footer-padding"],"noBorderAboveFooter":[4,"no-border-above-footer"],"slimmerFooter":[4,"slimmer-footer"],"noFooterPadding":[4,"no-footer-padding"],"footerJustify":[1,"footer-justify"],"noBorderFooter":[4,"no-border-footer"],"hasHeaderSlot":[32],"hasSlottedContent":[32],"hasFooterSlot":[32],"hasAboveFooterSlot":[32],"hasOnlyHeading":[32],"hasOnlyContent":[32],"hasOnlyFooter":[32]}]]],["p-fdaeb19a",[[1,"gx-ide-list-selector",{"ordered":[4],"readonly":[4],"type":[1],"required":[4],"ellipsis":[4],"value":[1025],"listName":[1,"list-name"],"noItemsBorder":[4,"no-items-border"],"noListBorder":[516,"no-list-border"]},[[2,"itemSelectionChanged","itemSelectionChangedHandler"]]],[4,"gx-ide-list-selector-item",{"itemId":[513,"item-id"],"itemValue":[1,"item-value"],"itemChecked":[1028,"item-checked"],"readonly":[1540],"ellipsis":[1540],"icon":[1],"noBorder":[1540,"no-border"],"universalSlotEnd":[516,"universal-slot-end"]}]]],["p-cdd2e79d",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-3bbdad29",[[1,"gx-ide-select-kb-items",{"activeItemCallback":[16],"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"expandOnClick":[4,"expand-on-click"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"loadItemsCallback":[16],"showToggleCheckboxes":[4,"show-toggle-checkboxes"],"multiSelection":[4,"multi-selection"],"singleChecks":[4,"single-checks"],"showActiveItemLink":[4,"show-active-item-link"],"useLoader":[4,"use-loader"],"selectionChanged":[16],"activeItemNode":[32],"checkedNodesIds":[32],"renderFooter":[32],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"itemsList":[32],"reloadItems":[64],"suspendShortcuts":[64],"updateSelection":[64],"updateCheckedItems":[64]}]]],["p-be7a6b7f",[[1,"gx-ide-breadcrumb-item",{"model":[16],"caption":[1],"accessibleName":[1,"accessible-name"],"disabled":[4],"link":[16],"selected":[4],"selectedLinkIndicator":[4,"selected-link-indicator"],"startImgSrc":[1,"start-img-src"],"startImgType":[1,"start-img-type"],"getImagePathCallback":[16],"itemId":[1,"item-id"]}]]],["p-c460c9e7",[[1,"gx-ide-file-item",{"file":[16],"editable":[4],"componentLocale":[8,"component-locale"],"fileDeletedCallback":[16],"fileDeletionErrorCallback":[16],"isEditing":[32],"currentName":[32]},null,{"file":["handleFileChange"]}]]],["p-b3c5c315",[[1,"gx-ide-progress-bar",{"caption":[1],"minimal":[516],"active":[1028],"stateType":[1025,"state-type"],"progress":[1026],"closeType":[1,"close-type"],"closedCallback":[16],"topStateBarVisible":[32],"disableTransition":[32],"visible":[32],"reset":[64]},null,{"active":["watchActiveHandler"],"progress":["watchProgressHandler"]}]]],["p-6941599f",[[1,"gx-ide-status-buttons",{"active":[4],"errors":[2],"hideError":[4,"hide-error"],"warnings":[2],"hideWarning":[4,"hide-warning"],"successes":[2],"hideSuccess":[4,"hide-success"],"messages":[2],"hideMessage":[4,"hide-message"],"minimal":[4],"compact":[516],"noInnerBorders":[516,"no-inner-borders"],"iconsSize":[32]}]]],["p-189ff3d7",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayWelcomeScreen":[4,"display-welcome-screen"],"displayConversationCopiedMessage":[32],"menuIsExpanded":[32],"showCopyConversationMessage":[64]}],[1,"gx-ide-chat-welcome",{"welcomeTitle":[1025,"welcome-title"],"welcomeGreeting":[1025,"welcome-greeting"],"suggestedPrompts":[1040],"suggestedPrompRequestedCallback":[16],"showHeader":[32],"showSuggestedPrompts":[32],"hideWelcome":[32],"exitWelcome":[64]}]]],["p-95e3b06c",[[0,"gx-ide-launchpad-api",{"data":[16],"onObjectSelected":[16]},null,{"data":["onDataChanged"]}]]],["p-42860e7e",[[1,"gx-ide-launchpad-apis",{"apis":[16],"onObjectSelected":[16]}],[1,"gx-ide-launchpad-native-apps",{"objects":[16],"onObjectSelected":[16],"filterValue":[32],"order":[32],"page":[32],"perPage":[32],"showCopiedMessage":[32],"showQRDialog":[32],"selectedObjectForQR":[32]}],[1,"gx-ide-launchpad-web-apps",{"objects":[16],"onObjectSelected":[16],"filterValue":[32],"recentObjectsExpanded":[32],"order":[32]},[[0,"expandedChange","handleAccordionExpandedChange"]]]]],["p-80259b9e",[[1,"gx-ide-entity-selector",{"defaultValue":[16],"disabled":[516],"labelCaption":[1,"label-caption"],"labelPosition":[513,"label-position"],"name":[513],"selectEntityCallback":[16],"value":[1040],"buttonHasFocus":[32],"iconSrc":[32]},null,{"value":["valueChangedHandler"]}]]],["p-24247ec3",[[1,"gx-ide-loader",{"abortTime":[2,"abort-time"],"cancelCallback":[16],"cancelLabel":[1,"cancel-label"],"description":[1],"loaderTitle":[1,"loader-title"],"show":[1028],"showWrapper":[32]}]]],["p-d7964c12",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]]]'), e)));
|
|
17
17
|
//# sourceMappingURL=genexus-ide-ui.esm.js.map
|
|
@@ -49,19 +49,12 @@ const j = class {
|
|
|
49
49
|
var t;
|
|
50
50
|
this.errorMessage = undefined;
|
|
51
51
|
this.actionInProgress = true;
|
|
52
|
-
this.status = "starting";
|
|
53
52
|
try {
|
|
54
53
|
const s = await this.startCallback();
|
|
55
|
-
if (s.success) {
|
|
56
|
-
this.status = "running";
|
|
57
|
-
this.serverPort = s.port;
|
|
58
|
-
this.serverEndpoint = s.endpoint;
|
|
59
|
-
} else {
|
|
60
|
-
this.status = "error";
|
|
54
|
+
if (!s.success) {
|
|
61
55
|
this.errorMessage = (t = s.errorMessage) !== null && t !== void 0 ? t : d(this, u, "f").errors.startFailed;
|
|
62
56
|
}
|
|
63
57
|
} catch (t) {
|
|
64
|
-
this.status = "error";
|
|
65
58
|
this.errorMessage = d(this, u, "f").errors.startFailed;
|
|
66
59
|
} finally {
|
|
67
60
|
this.actionInProgress = false;
|
|
@@ -71,19 +64,12 @@ const j = class {
|
|
|
71
64
|
var t;
|
|
72
65
|
this.errorMessage = undefined;
|
|
73
66
|
this.actionInProgress = true;
|
|
74
|
-
this.status = "stopping";
|
|
75
67
|
try {
|
|
76
68
|
const s = await this.stopCallback();
|
|
77
|
-
if (s.success) {
|
|
78
|
-
this.status = "stopped";
|
|
79
|
-
this.serverPort = undefined;
|
|
80
|
-
this.serverEndpoint = undefined;
|
|
81
|
-
} else {
|
|
82
|
-
this.status = "error";
|
|
69
|
+
if (!s.success) {
|
|
83
70
|
this.errorMessage = (t = s.errorMessage) !== null && t !== void 0 ? t : d(this, u, "f").errors.stopFailed;
|
|
84
71
|
}
|
|
85
72
|
} catch (t) {
|
|
86
|
-
this.status = "error";
|
|
87
73
|
this.errorMessage = d(this, u, "f").errors.stopFailed;
|
|
88
74
|
} finally {
|
|
89
75
|
this.actionInProgress = false;
|
|
@@ -227,12 +213,14 @@ b = new WeakMap, m = new WeakMap, c = new WeakSet, y = function _GxIdeMcpServer_
|
|
|
227
213
|
}, this.errorMessage);
|
|
228
214
|
}, x = function _GxIdeMcpServer_renderPrimaryButton() {
|
|
229
215
|
const t = this.status === "running" || this.status === "stopping";
|
|
216
|
+
const s = this.status === "starting" || this.status === "stopping";
|
|
217
|
+
const i = this.actionInProgress || s;
|
|
230
218
|
if (t) {
|
|
231
219
|
return e("button", {
|
|
232
220
|
class: "button-primary primary-action",
|
|
233
221
|
type: "button",
|
|
234
222
|
onClick: d(this, g, "f"),
|
|
235
|
-
disabled:
|
|
223
|
+
disabled: i,
|
|
236
224
|
part: "button-confirm"
|
|
237
225
|
}, d(this, u, "f").buttons.stop);
|
|
238
226
|
}
|
|
@@ -240,7 +228,7 @@ b = new WeakMap, m = new WeakMap, c = new WeakSet, y = function _GxIdeMcpServer_
|
|
|
240
228
|
class: "button-primary primary-action",
|
|
241
229
|
type: "button",
|
|
242
230
|
onClick: d(this, f, "f"),
|
|
243
|
-
disabled:
|
|
231
|
+
disabled: i,
|
|
244
232
|
part: "button-confirm"
|
|
245
233
|
}, d(this, u, "f").buttons.start);
|
|
246
234
|
};
|
|
@@ -248,4 +236,4 @@ b = new WeakMap, m = new WeakMap, c = new WeakSet, y = function _GxIdeMcpServer_
|
|
|
248
236
|
j.style = o;
|
|
249
237
|
|
|
250
238
|
export { j as gx_ide_mcp_server };
|
|
251
|
-
//# sourceMappingURL=p-
|
|
239
|
+
//# sourceMappingURL=p-a456237f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mcpServerCss","CSS_BUNDLES","COPY_ICON","getIconPath","category","name","colorType","GxIdeMcpServer","_GxIdeMcpServer_componentLocale","set","this","_GxIdeMcpServer_chShortcutsEl","_GxIdeMcpServer_shortcutsSrc","getAssetPath","_GxIdeMcpServer_startHandler","async","errorMessage","undefined","actionInProgress","result","startCallback","success","_a","__classPrivateFieldGet","errors","startFailed","_b","_GxIdeMcpServer_stopHandler","stopCallback","stopFailed","_GxIdeMcpServer_closeHandler","closeCallback","call","_GxIdeMcpServer_copyEndpointHandler","serverEndpoint","copyCallback","copying","setTimeout","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","suspendShortcuts","suspend","render","h","Host","class","model","src","ref","header","title","initialLoading","_GxIdeMcpServer_instances","_GxIdeMcpServer_renderStatusBadge","loaderTitle","loader","show","info","description","details","_GxIdeMcpServer_renderStatusCard","_GxIdeMcpServer_renderError","type","onClick","part","buttons","close","_GxIdeMcpServer_renderPrimaryButton","statusText","status","badgeClass","isAnimated","isDimmed","statusCard","statusLabel","serverPort","portLabel","endpointLabel","disabled","copyEndpoint","copiedEndpoint","isRunning","isTransitioning","isDisabled","stop","start"],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.startCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n\n try {\n const result = await this.stopCallback();\n\n if (!result.success) {\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n const isTransitioning =\n this.status === \"starting\" || this.status === \"stopping\";\n const isDisabled = this.actionInProgress || isTransitioning;\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={isDisabled}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"mappings":";;;;;;;;;;;;;;AAAA,MAAMA,IAAe;;;;;;;;;;;;;;;;;ACoBrB,MAAMC,IAA8B,EAClC,qBACA,qBACA,mBACA,gBACA,oBACA,mBACA,iBACA;;AAGF,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MAUAC,IAAc;;;;;QAEzBC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,WAAA;IACAE,EAAAH,IAAAC,MAAgBG,EACd;IAkEFC,EAAAL,IAAAC,OAAgBK;;MACdL,KAAKM,eAAeC;MACpBP,KAAKQ,mBAAmB;MAExB;QACE,MAAMC,UAAeT,KAAKU;QAE1B,KAAKD,EAAOE,SAAS;UACnBX,KAAKM,gBACHM,IAAAH,EAAOH,kBAAY,QAAAM,WAAA,IAAAA,IACnBC,EAAAb,MAAIF,GAAA,KAAkBgB,OAAOC;;QAEjC,OAAAC;QACAhB,KAAKM,eAAeO,EAAAb,MAAIF,GAAA,KAAkBgB,OAAOC;;QAEjDf,KAAKQ,mBAAmB;;;IAI5BS,EAAAlB,IAAAC,OAAeK;;MACbL,KAAKM,eAAeC;MACpBP,KAAKQ,mBAAmB;MAExB;QACE,MAAMC,UAAeT,KAAKkB;QAE1B,KAAKT,EAAOE,SAAS;UACnBX,KAAKM,gBACHM,IAAAH,EAAOH,kBAAY,QAAAM,WAAA,IAAAA,IACnBC,EAAAb,MAAIF,GAAA,KAAkBgB,OAAOK;;QAEjC,OAAAH;QACAhB,KAAKM,eAAeO,EAAAb,MAAIF,GAAA,KAAkBgB,OAAOK;;QAEjDnB,KAAKQ,mBAAmB;;;IAI5BY,EAAArB,IAAAC,OAAgB;;OACdY,IAAAZ,KAAKqB,mBAAa,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,KAAkBoE,WAAWI,gBAEpClC,EAAA;IAAME,OAAM;KACVF,EAAA;IAAME,OAAM;KACTtC,KAAKwB,iBAERY,EAAA;IACEE,OAAM;IACNiB,MAAK;IACLC,SAAS3C,EAAAb,MAAIuB,GAAA;IACbgD,UAAUvE,KAAK0B;IAAO,cACVb,EAAAb,MAAIF,GAAA,KAAkBoE,WAAWM;IAC7C7B,OACE3C,KAAK0B,UACDb,EAAAb,MAAIF,GAAA,KAAkBoE,WAAWO,iBACjC5D,EAAAb,MAAIF,GAAA,KAAkBoE,WAAWM;KAGvCpC,EAAA;IAAUE,OAAM;IAASE,KAAKhD;;AAO5C,GAAC8D,IAAA,SAAAA;EAGC,KAAKtD,KAAKM,cAAc;IACtB,OAAO;;EAGT,OAAO8B,EAAA;IAAKE,OAAM;KAAgCtC,KAAKM;AACzD,GAACsD,IAAA,SAAAA;EAGC,MAAMc,IACJ1E,KAAK8D,WAAW,aAAa9D,KAAK8D,WAAW;EAC/C,MAAMa,IACJ3E,KAAK8D,WAAW,cAAc9D,KAAK8D,WAAW;EAChD,MAAMc,IAAa5E,KAAKQ,oBAAoBmE;EAE5C,IAAID,GAAW;IACb,OACEtC,EAAA;MACEE,OAAM;MACNiB,MAAK;MACLC,SAAS3C,EAAAb,MAAIiB,GAAA;MACbsD,UAAUK;MACVnB,MAAK;OAEJ5C,EAAAb,MAAIF,GAAA,KAAkB4D,QAAQmB;;EAKrC,OACEzC,EAAA;IACEE,OAAM;IACNiB,MAAK;IACLC,SAAS3C,EAAAb,MAAII,GAAA;IACbmE,UAAUK;IACVnB,MAAK;KAEJ5C,EAAAb,MAAIF,GAAA,KAAkB4D,QAAQoB;AAGrC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mcpServerCss","CSS_BUNDLES","COPY_ICON","getIconPath","category","name","colorType","GxIdeMcpServer","_GxIdeMcpServer_componentLocale","set","this","_GxIdeMcpServer_chShortcutsEl","_GxIdeMcpServer_shortcutsSrc","getAssetPath","_GxIdeMcpServer_startHandler","async","errorMessage","undefined","actionInProgress","status","result","startCallback","success","serverPort","port","serverEndpoint","endpoint","_a","__classPrivateFieldGet","errors","startFailed","_b","_GxIdeMcpServer_stopHandler","stopCallback","stopFailed","_GxIdeMcpServer_closeHandler","closeCallback","call","_GxIdeMcpServer_copyEndpointHandler","copyCallback","copying","setTimeout","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","suspendShortcuts","suspend","render","h","Host","class","model","src","ref","header","title","initialLoading","_GxIdeMcpServer_instances","_GxIdeMcpServer_renderStatusBadge","loaderTitle","loader","show","info","description","details","_GxIdeMcpServer_renderStatusCard","_GxIdeMcpServer_renderError","type","onClick","part","buttons","close","_GxIdeMcpServer_renderPrimaryButton","statusText","badgeClass","isAnimated","isDimmed","statusCard","statusLabel","portLabel","endpointLabel","disabled","copyEndpoint","copiedEndpoint","isRunning","stop","start"],"sources":["src/components/mcp-server/mcp-server.scss?tag=gx-ide-mcp-server&encapsulation=shadow","src/components/mcp-server/mcp-server.tsx"],"sourcesContent":["@import \"../../global/temporary-mercury-overrides/_button.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n min-inline-size: 480px;\n min-block-size: 320px;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.title {\n margin: 0;\n}\n\n.main {\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xl);\n padding-block: var(--spacing-padding-l);\n}\n\n\n.info-section {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n color: var(--color-text-neutral-default);\n}\n\n.status-badge {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n}\n\n.status-dot {\n $dot-size: 8px;\n\n display: inline-block;\n inline-size: $dot-size;\n block-size: $dot-size;\n border-radius: 50%;\n background-color: var(--color-text-neutral-disabled);\n flex-shrink: 0;\n\n .status-badge--running & {\n background-color: var(--color-text-success-default, #22c55e);\n }\n\n .status-badge--error & {\n background-color: var(--color-text-error-default, #ef4444);\n }\n\n .status-badge--starting &,\n .status-badge--stopping & {\n background-color: var(--color-text-warning-default, #f59e0b);\n }\n\n &--animated {\n animation: pulse 1.2s ease-in-out infinite;\n }\n}\n\n@keyframes pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.3;\n }\n}\n\n.status-card {\n border: 1px solid var(--color-border-surface-on-elevation-1);\n border-radius: 4px;\n padding: var(--spacing-gap-l);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-m);\n\n &--dimmed {\n opacity: 0.5;\n }\n\n &__row {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-l);\n\n > :first-child {\n min-inline-size: 80px;\n flex-shrink: 0;\n }\n }\n\n &__endpoint {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-gap-m);\n flex-wrap: wrap;\n\n > .button-icon-only {\n padding: 0;\n block-size: auto;\n }\n }\n}\n\n.endpoint-value {\n word-break: break-all;\n color: var(--color-text-neutral-default);\n}\n\n.loader {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n}\n\n.error-message {\n color: var(--color-text-error-default, #ef4444);\n padding: var(--spacing-gap-m);\n border: 1px solid var(--color-border-error-default, #ef4444);\n border-radius: 4px;\n background-color: var(--color-surface-error-default, rgba(239, 68, 68, 0.08));\n}\n\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n getAssetPath,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n McpServerStatus,\n McpStartResult,\n McpStopResult\n} from \"./types\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/elevation\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\n\n\n@Component({\n tag: \"gx-ide-mcp-server\",\n styleUrl: \"mcp-server.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/mcp-server\"]\n})\nexport class GxIdeMcpServer {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #chShortcutsEl: HTMLChShortcutsElement;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/mcp-server/shortcuts.json`\n );\n\n @Element() el: HTMLGxIdeMcpServerElement;\n\n @State() actionInProgress: boolean = false;\n @State() errorMessage: string | undefined;\n @State() copying: boolean = false;\n\n /**\n * When `true` the component shows a loader instead of content.\n * The host sets this to `false` once the initial status is known.\n */\n @Prop({ mutable: true }) initialLoading: boolean = true;\n\n /**\n * Current MCP server status. The host is responsible for keeping\n * this prop up to date (e.g. via polling or event-driven updates).\n * The component only mutates it internally during start/stop\n * transitions (`starting`, `stopping`, result states).\n */\n @Prop({ mutable: true }) status!: McpServerStatus;\n\n /**\n * Port the MCP server is listening on (shown when running).\n */\n @Prop({ mutable: true }) serverPort: number | undefined;\n\n /**\n * Full endpoint URL (shown when running).\n */\n @Prop({ mutable: true }) serverEndpoint: string | undefined;\n\n /**\n * Callback to start the MCP server. Returns result with connection info.\n */\n @Prop() readonly startCallback!: StartCallback;\n\n /**\n * Callback to stop the MCP server.\n */\n @Prop() readonly stopCallback!: StopCallback;\n\n /**\n * Callback to copy text to the clipboard. Delegated to the IDE clipboard\n * service so the host environment controls the copy behavior.\n */\n @Prop() readonly copyCallback!: CopyCallback;\n\n /**\n * Callback to close/dismiss the dialog.\n */\n @Prop() readonly closeCallback!: CloseCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * Suspends or reactivates the shortcuts.\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n this.#chShortcutsEl.suspend = suspendShortcuts;\n }\n\n #startHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"starting\";\n\n try {\n const result = await this.startCallback();\n\n if (result.success) {\n this.status = \"running\";\n this.serverPort = result.port;\n this.serverEndpoint = result.endpoint;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.startFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.startFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #stopHandler = async () => {\n this.errorMessage = undefined;\n this.actionInProgress = true;\n this.status = \"stopping\";\n\n try {\n const result = await this.stopCallback();\n\n if (result.success) {\n this.status = \"stopped\";\n this.serverPort = undefined;\n this.serverEndpoint = undefined;\n } else {\n this.status = \"error\";\n this.errorMessage =\n result.errorMessage ??\n this.#componentLocale.errors.stopFailed;\n }\n } catch {\n this.status = \"error\";\n this.errorMessage = this.#componentLocale.errors.stopFailed;\n } finally {\n this.actionInProgress = false;\n }\n };\n\n #closeHandler = () => {\n this.closeCallback?.();\n };\n\n #copyEndpointHandler = () => {\n if (this.serverEndpoint && this.copyCallback) {\n this.copying = true;\n this.copyCallback(this.serverEndpoint);\n setTimeout(() => {\n this.copying = false;\n }, 1000);\n }\n };\n\n #renderStatusBadge() {\n const statusText =\n this.#componentLocale.status[this.status] ?? this.status;\n\n const badgeClass = `status-badge status-badge--${this.status}`;\n const isAnimated =\n this.status === \"starting\" || this.status === \"stopping\";\n\n return (\n <span class={badgeClass}>\n <span\n class={`status-dot ${isAnimated ? \"status-dot--animated\" : \"\"}`}\n ></span>\n <span class=\"body-regular-s\">{statusText}</span>\n </span>\n );\n }\n\n #renderStatusCard() {\n if (this.status !== \"running\" && this.status !== \"stopping\") {\n return null;\n }\n\n const isDimmed = this.status === \"stopping\";\n\n return (\n <div\n class={`status-card elevation-1 ${isDimmed ? \"status-card--dimmed\" : \"\"}`}\n >\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.statusLabel}\n </span>\n <span class=\"body-regular-s\">\n {this.#componentLocale.status[this.status]}\n </span>\n </div>\n\n {this.serverPort !== undefined && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.portLabel}\n </span>\n <span class=\"body-regular-s\">{this.serverPort}</span>\n </div>\n )}\n\n {this.serverEndpoint && (\n <div class=\"status-card__row\">\n <span class=\"body-semi-bold-s\">\n {this.#componentLocale.statusCard.endpointLabel}\n </span>\n <span class=\"status-card__endpoint\">\n <span class=\"body-regular-s endpoint-value\">\n {this.serverEndpoint}\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#copyEndpointHandler}\n disabled={this.copying}\n aria-label={this.#componentLocale.statusCard.copyEndpoint}\n title={\n this.copying\n ? this.#componentLocale.statusCard.copiedEndpoint\n : this.#componentLocale.statusCard.copyEndpoint\n }\n >\n <ch-image class=\"icon-m\" src={COPY_ICON}></ch-image>\n </button>\n </span>\n </div>\n )}\n </div>\n );\n }\n\n #renderError() {\n if (!this.errorMessage) {\n return null;\n }\n\n return <div class=\"error-message body-regular-s\">{this.errorMessage}</div>;\n }\n\n #renderPrimaryButton() {\n const isRunning =\n this.status === \"running\" || this.status === \"stopping\";\n\n if (isRunning) {\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#stopHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.stop}\n </button>\n );\n }\n\n return (\n <button\n class=\"button-primary primary-action\"\n type=\"button\"\n onClick={this.#startHandler}\n disabled={this.actionInProgress}\n part=\"button-confirm\"\n >\n {this.#componentLocale.buttons.start}\n </button>\n );\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section\">\n <header class=\"header dialog-header-with-border spacing-body-inline spacing-body-block-start\">\n <h1 class=\"heading-s title\">\n {this.#componentLocale.header.title}\n </h1>\n {!this.initialLoading && this.#renderStatusBadge()}\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.initialLoading ? (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loader.title}\n show\n class=\"loader\"\n ></gx-ide-loader>\n ) : ([\n <div class=\"info-section\">\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.description}\n </p>\n <p class=\"body-regular-m\">\n {this.#componentLocale.info.details}\n </p>\n </div>,\n\n this.#renderStatusCard(),\n this.#renderError()\n ])}\n </div>\n\n <footer class=\"footer dialog-footer-with-border spacing-body-inline spacing-body-block-end\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#closeHandler}\n part=\"button-cancel\"\n >\n {this.#componentLocale.buttons.close}\n </button>\n {!this.initialLoading && this.#renderPrimaryButton()}\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type StartCallback = () => Promise<McpStartResult>;\nexport type StopCallback = () => Promise<McpStopResult>;\nexport type CopyCallback = (text: string) => void;\nexport type CloseCallback = () => void;\n"],"mappings":";;;;;;;;;;;;;;AAAA,MAAMA,IAAe;;;;;;;;;;;;;;;;;ACoBrB,MAAMC,IAA8B,EAClC,qBACA,qBACA,mBACA,gBACA,oBACA,mBACA,iBACA;;AAGF,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MAUAC,IAAc;;;;;QAEzBC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,WAAA;IACAE,EAAAH,IAAAC,MAAgBG,EACd;IAkEFC,EAAAL,IAAAC,OAAgBK;;MACdL,KAAKM,eAAeC;MACpBP,KAAKQ,mBAAmB;MACxBR,KAAKS,SAAS;MAEd;QACE,MAAMC,UAAeV,KAAKW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