mito-ai 0.1.41__py3-none-any.whl → 0.1.43__py3-none-any.whl
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.
Potentially problematic release.
This version of mito-ai might be problematic. Click here for more details.
- mito_ai/__init__.py +7 -0
- mito_ai/_version.py +1 -1
- mito_ai/app_manager/__init__.py +4 -0
- mito_ai/app_manager/handlers.py +134 -0
- mito_ai/app_manager/models.py +57 -0
- mito_ai/app_manager/utils.py +24 -0
- mito_ai/completions/completion_handlers/agent_execution_handler.py +1 -1
- mito_ai/completions/completion_handlers/chat_completion_handler.py +2 -2
- mito_ai/completions/completion_handlers/utils.py +99 -37
- mito_ai/completions/prompt_builders/utils.py +7 -1
- mito_ai/file_uploads/handlers.py +49 -26
- mito_ai/tests/completions/completion_handlers_utils_test.py +190 -0
- mito_ai/tests/file_uploads/test_handlers.py +15 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +100 -100
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.01a962c68c8fae380f30.js → mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.81703ac2bc645e5c2fc2.js +1324 -247
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.81703ac2bc645e5c2fc2.js.map +1 -0
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +198 -0
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +1 -0
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.9a70f033717ba8689564.js → mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.502aef26f0416fab7435.js +23 -23
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.502aef26f0416fab7435.js.map +1 -0
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js +533 -0
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js.map +1 -0
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_mjs.16430abf3466c3153f59.js → mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js +2977 -610
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js.map +1 -0
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.61289bff0db44828605b.js → mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js +1 -481
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js.map +1 -0
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_core_dist_esm_singleton_apis_fetchAuthSession_mjs-node_modul-758875.dc495fd682071d97070c.js → mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js +2 -60
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js.map +1 -0
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js → mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +2 -240
- mito_ai-0.1.43.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +1 -0
- {mito_ai-0.1.41.dist-info → mito_ai-0.1.43.dist-info}/METADATA +1 -1
- {mito_ai-0.1.41.dist-info → mito_ai-0.1.43.dist-info}/RECORD +46 -41
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.01a962c68c8fae380f30.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_aws-amplify_core_dist_esm_singleton_apis_fetchAuthSession_mjs.182232e7bc6311fe4528.js +0 -63
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/node_modules_aws-amplify_core_dist_esm_singleton_apis_fetchAuthSession_mjs.182232e7bc6311fe4528.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.9a70f033717ba8689564.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_mjs.16430abf3466c3153f59.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_core_dist_esm_singleton_Amplify_mjs.3c0035b95fe369aede82.js +0 -2345
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_core_dist_esm_singleton_Amplify_mjs.3c0035b95fe369aede82.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_core_dist_esm_singleton_apis_fetchAuthSession_mjs-node_modul-758875.dc495fd682071d97070c.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.61289bff0db44828605b.js.map +0 -1
- mito_ai-0.1.41.data/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js.map +0 -1
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js.map +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.41.data → mito_ai-0.1.43.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js.map +0 -0
- {mito_ai-0.1.41.dist-info → mito_ai-0.1.43.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.41.dist-info → mito_ai-0.1.43.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.41.dist-info → mito_ai-0.1.43.dist-info}/licenses/LICENSE +0 -0
|
@@ -771,7 +771,8 @@ const ChatDropdown = ({ options, onSelect, filterText, maxDropdownItems = 10, is
|
|
|
771
771
|
return option.file.variable_name.toLowerCase().includes(effectiveFilterText.toLowerCase());
|
|
772
772
|
}
|
|
773
773
|
else if (option.type === 'db') {
|
|
774
|
-
return option.variable.
|
|
774
|
+
return option.variable.variable_name.toLowerCase().includes(effectiveFilterText.toLowerCase()) ||
|
|
775
|
+
option.variable.value.toLowerCase().includes(effectiveFilterText.toLowerCase());
|
|
775
776
|
}
|
|
776
777
|
else {
|
|
777
778
|
return option.rule.toLowerCase().includes(effectiveFilterText.toLowerCase());
|
|
@@ -997,13 +998,23 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
997
998
|
const [dropdownFilter, setDropdownFilter] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
998
999
|
const [additionalContext, setAdditionalContext] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
999
1000
|
const [isDropdownFromButton, setIsDropdownFromButton] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
1000
|
-
const
|
|
1001
|
+
const handleFileUpload = (file) => {
|
|
1002
|
+
let uploadType;
|
|
1003
|
+
if (file.type.startsWith('image/')) {
|
|
1004
|
+
// If the file is an image, we want to preserve the file type.
|
|
1005
|
+
// The type is used to display the image icon in the SelectedContextContainer,
|
|
1006
|
+
// and is used to encode the image on the backend.
|
|
1007
|
+
uploadType = file.type;
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
uploadType = 'file';
|
|
1011
|
+
}
|
|
1001
1012
|
// Add the uploaded file to the additional context
|
|
1002
1013
|
setAdditionalContext(prev => [
|
|
1003
1014
|
...prev, {
|
|
1004
|
-
type:
|
|
1005
|
-
value:
|
|
1006
|
-
display:
|
|
1015
|
+
type: uploadType,
|
|
1016
|
+
value: file.name,
|
|
1017
|
+
display: file.name
|
|
1007
1018
|
}
|
|
1008
1019
|
]);
|
|
1009
1020
|
};
|
|
@@ -1150,15 +1161,19 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1150
1161
|
setIsDropdownFromButton(false);
|
|
1151
1162
|
};
|
|
1152
1163
|
const mapAdditionalContext = () => {
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1164
|
+
const result = [];
|
|
1165
|
+
additionalContext.forEach(contextItem => {
|
|
1166
|
+
if (contextItem.type === 'db') {
|
|
1167
|
+
result.push({
|
|
1168
|
+
type: contextItem.type,
|
|
1169
|
+
value: contextItem.value
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
else {
|
|
1173
|
+
result.push(contextItem);
|
|
1159
1174
|
}
|
|
1160
|
-
return context;
|
|
1161
1175
|
});
|
|
1176
|
+
return result;
|
|
1162
1177
|
};
|
|
1163
1178
|
// Update the expandedVariables arr when the variable manager changes
|
|
1164
1179
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -1211,7 +1226,7 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1211
1226
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("chat-input-container") },
|
|
1212
1227
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'context-container' },
|
|
1213
1228
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_DatabaseButton__WEBPACK_IMPORTED_MODULE_6__["default"], { app: app }),
|
|
1214
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AttachFileButton__WEBPACK_IMPORTED_MODULE_7__["default"], { onFileUploaded:
|
|
1229
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AttachFileButton__WEBPACK_IMPORTED_MODULE_7__["default"], { onFileUploaded: handleFileUpload, notebookTracker: notebookTracker }),
|
|
1215
1230
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "context-button", onClick: () => {
|
|
1216
1231
|
var _a;
|
|
1217
1232
|
setDropdownVisible(true);
|
|
@@ -1943,41 +1958,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1943
1958
|
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);
|
|
1944
1959
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
1945
1960
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);
|
|
1946
|
-
/* harmony import */ var
|
|
1947
|
-
/* harmony import */ var
|
|
1948
|
-
/* harmony import */ var
|
|
1949
|
-
/* harmony import */ var
|
|
1950
|
-
/* harmony import */ var
|
|
1951
|
-
/* harmony import */ var
|
|
1961
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
1962
|
+
/* harmony import */ var _components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../components/AgentComponents/ErrorFixupToolUI */ "./lib/components/AgentComponents/ErrorFixupToolUI.js");
|
|
1963
|
+
/* harmony import */ var _components_DropdownMenu__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/DropdownMenu */ "./lib/components/DropdownMenu.js");
|
|
1964
|
+
/* harmony import */ var _components_IconButton__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/IconButton */ "./lib/components/IconButton.js");
|
|
1965
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
1966
|
+
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
1952
1967
|
/* harmony import */ var _components_ModelSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/ModelSelector */ "./lib/components/ModelSelector.js");
|
|
1953
|
-
/* harmony import */ var
|
|
1954
|
-
/* harmony import */ var
|
|
1955
|
-
/* harmony import */ var
|
|
1956
|
-
/* harmony import */ var
|
|
1957
|
-
/* harmony import */ var
|
|
1958
|
-
/* harmony import */ var
|
|
1959
|
-
/* harmony import */ var
|
|
1960
|
-
/* harmony import */ var
|
|
1961
|
-
/* harmony import */ var
|
|
1962
|
-
/* harmony import */ var
|
|
1963
|
-
/* harmony import */ var
|
|
1968
|
+
/* harmony import */ var _components_NextStepsPills__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../components/NextStepsPills */ "./lib/components/NextStepsPills.js");
|
|
1969
|
+
/* harmony import */ var _components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../components/TextAndIconButton */ "./lib/components/TextAndIconButton.js");
|
|
1970
|
+
/* harmony import */ var _components_ToggleButton__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../components/ToggleButton */ "./lib/components/ToggleButton.js");
|
|
1971
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
1972
|
+
/* harmony import */ var _icons_MitoLogo__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../icons/MitoLogo */ "./lib/icons/MitoLogo.js");
|
|
1973
|
+
/* harmony import */ var _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../icons/UndoIcon */ "./lib/icons/UndoIcon.js");
|
|
1974
|
+
/* harmony import */ var _utils_agentActions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../utils/agentActions */ "./lib/utils/agentActions.js");
|
|
1975
|
+
/* harmony import */ var _utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/blacklistedWords */ "./lib/utils/blacklistedWords.js");
|
|
1976
|
+
/* harmony import */ var _utils_checkpoint__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/checkpoint */ "./lib/utils/checkpoint.js");
|
|
1977
|
+
/* harmony import */ var _utils_chatHistory__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../utils/chatHistory */ "./lib/utils/chatHistory.js");
|
|
1978
|
+
/* harmony import */ var _utils_codeDiff__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/codeDiff */ "./lib/utils/codeDiff.js");
|
|
1964
1979
|
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../utils/notebook */ "./lib/utils/notebook.js");
|
|
1965
1980
|
/* harmony import */ var _utils_scroll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/scroll */ "./lib/utils/scroll.js");
|
|
1966
|
-
/* harmony import */ var
|
|
1981
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/strings */ "./lib/utils/strings.js");
|
|
1967
1982
|
/* harmony import */ var _utils_waitForNotebookReady__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/waitForNotebookReady */ "./lib/utils/waitForNotebookReady.js");
|
|
1968
|
-
/* harmony import */ var
|
|
1969
|
-
/* harmony import */ var
|
|
1970
|
-
/* harmony import */ var
|
|
1983
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AiChat/utils.js");
|
|
1984
|
+
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
1985
|
+
/* harmony import */ var _SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../SettingsManager/profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
1986
|
+
/* harmony import */ var _CTACarousel__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./CTACarousel */ "./lib/Extensions/AiChat/CTACarousel.js");
|
|
1987
|
+
/* harmony import */ var _CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CodeDiffDisplay */ "./lib/Extensions/AiChat/CodeDiffDisplay.js");
|
|
1971
1988
|
/* harmony import */ var _FirstMessage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FirstMessage */ "./lib/Extensions/AiChat/FirstMessage.js");
|
|
1972
|
-
/* harmony import */ var
|
|
1973
|
-
/* harmony import */ var
|
|
1974
|
-
/* harmony import */ var
|
|
1975
|
-
/* harmony import */ var
|
|
1989
|
+
/* harmony import */ var _ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./ChatMessage/ChatInput */ "./lib/Extensions/AiChat/ChatMessage/ChatInput.js");
|
|
1990
|
+
/* harmony import */ var _ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ChatMessage/ChatMessage */ "./lib/Extensions/AiChat/ChatMessage/ChatMessage.js");
|
|
1991
|
+
/* harmony import */ var _ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./ChatMessage/RevertQuestionnaire */ "./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js");
|
|
1992
|
+
/* harmony import */ var _ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ChatMessage/ScrollableSuggestions */ "./lib/Extensions/AiChat/ChatMessage/ScrollableSuggestions.js");
|
|
1976
1993
|
/* harmony import */ var _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ChatHistoryManager */ "./lib/Extensions/AiChat/ChatHistoryManager.js");
|
|
1977
1994
|
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
1978
1995
|
/* harmony import */ var _style_ChatTaskpane_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/ChatTaskpane.css */ "./style/ChatTaskpane.css");
|
|
1979
1996
|
/* harmony import */ var _style_TextButton_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../style/TextButton.css */ "./style/TextButton.css");
|
|
1980
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AiChat/utils.js");
|
|
1981
1997
|
/*
|
|
1982
1998
|
* Copyright (c) Saga Inc.
|
|
1983
1999
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -2015,6 +2031,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2015
2031
|
|
|
2016
2032
|
|
|
2017
2033
|
|
|
2034
|
+
|
|
2035
|
+
|
|
2018
2036
|
// Internal imports - Chat components
|
|
2019
2037
|
|
|
2020
2038
|
|
|
@@ -2028,7 +2046,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2028
2046
|
|
|
2029
2047
|
|
|
2030
2048
|
|
|
2031
|
-
|
|
2032
2049
|
const AGENT_EXECUTION_DEPTH_LIMIT = 20;
|
|
2033
2050
|
const getDefaultChatHistoryManager = (notebookTracker, contextManager) => {
|
|
2034
2051
|
const chatHistoryManager = new _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__.ChatHistoryManager(contextManager, notebookTracker);
|
|
@@ -2475,6 +2492,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2475
2492
|
};
|
|
2476
2493
|
const _sendMessageAndSaveResponse = async (completionRequest, newChatHistoryManager) => {
|
|
2477
2494
|
var _a, _b, _c, _d;
|
|
2495
|
+
// Capture the completion request for debugging
|
|
2496
|
+
(0,_SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_14__.captureCompletionRequest)(completionRequest);
|
|
2478
2497
|
if (completionRequest.stream) {
|
|
2479
2498
|
// Reset the streaming response and set streaming state
|
|
2480
2499
|
streamingContentRef.current = '';
|
|
@@ -2610,7 +2629,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2610
2629
|
setAgentExecutionStatus('idle');
|
|
2611
2630
|
};
|
|
2612
2631
|
const startAgentExecution = async (input, messageIndex, additionalContext) => {
|
|
2613
|
-
await (0,
|
|
2632
|
+
await (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_15__.createCheckpoint)(app, setHasCheckpoint);
|
|
2614
2633
|
setAgentExecutionStatus('working');
|
|
2615
2634
|
// Enable follow mode when user starts agent execution
|
|
2616
2635
|
setAutoScrollFollowMode(true);
|
|
@@ -2642,9 +2661,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2642
2661
|
const aiDisplayOptimizedChatItem = chatHistoryManagerRef.current.getLastAIDisplayOptimizedChatItem();
|
|
2643
2662
|
// # TODO: Make this is a helper function so we can also use it in the auto error fixup!
|
|
2644
2663
|
if (aiDisplayOptimizedChatItem) {
|
|
2645
|
-
const aiGeneratedCode = (0,
|
|
2664
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_16__.getCodeBlockFromMessage)(aiDisplayOptimizedChatItem.message);
|
|
2646
2665
|
if (aiGeneratedCode) {
|
|
2647
|
-
const securityCheck = (0,
|
|
2666
|
+
const securityCheck = (0,_utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_17__.checkForBlacklistedWords)(aiGeneratedCode);
|
|
2648
2667
|
if (!securityCheck.safe) {
|
|
2649
2668
|
console.error('Security Warning:', securityCheck.reason);
|
|
2650
2669
|
addAIMessageFromResponseAndUpdateState(`I cannot execute this code without your approval because this code did not pass my security checks. ${securityCheck.reason}. For your safety, I am stopping execution of this plan.`, 'agent:execution', chatHistoryManager);
|
|
@@ -2671,8 +2690,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2671
2690
|
}
|
|
2672
2691
|
if (agentResponse.type === 'cell_update' && agentResponse.cell_update) {
|
|
2673
2692
|
// Run the code and handle any errors
|
|
2674
|
-
await (0,
|
|
2675
|
-
const status = await (0,
|
|
2693
|
+
await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_18__.acceptAndRunCellUpdate)(agentResponse.cell_update, notebookTracker, app, previewAICodeToActiveCell, acceptAICode);
|
|
2694
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_18__.retryIfExecutionError)(notebookTracker, app, getDuplicateChatHistoryManager, addAIMessageFromResponseAndUpdateState, sendAgentSmartDebugMessage, previewAICodeToActiveCell, acceptAICode, shouldContinueAgentExecution, finalizeAgentStop, chatHistoryManagerRef);
|
|
2676
2695
|
if (status === 'interupted') {
|
|
2677
2696
|
break;
|
|
2678
2697
|
}
|
|
@@ -2692,12 +2711,12 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2692
2711
|
sendCellIDOutput = agentResponse.get_cell_output_cell_id;
|
|
2693
2712
|
}
|
|
2694
2713
|
if (agentResponse.type === 'run_all_cells') {
|
|
2695
|
-
const result = await (0,
|
|
2714
|
+
const result = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_18__.runAllCells)(app, notebookTracker);
|
|
2696
2715
|
// If run_all_cells resulted in an error, handle it through the error fixup process
|
|
2697
2716
|
if (!result.success && result.errorMessage && result.errorCellId) {
|
|
2698
2717
|
// Set the error cell as active so the error retry logic can work with it
|
|
2699
2718
|
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_13__.setActiveCellByID)(notebookTracker, result.errorCellId);
|
|
2700
|
-
const status = await (0,
|
|
2719
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_18__.retryIfExecutionError)(notebookTracker, app, getDuplicateChatHistoryManager, addAIMessageFromResponseAndUpdateState, sendAgentSmartDebugMessage, previewAICodeToActiveCell, acceptAICode, shouldContinueAgentExecution, finalizeAgentStop, chatHistoryManagerRef);
|
|
2701
2720
|
if (status === 'interupted') {
|
|
2702
2721
|
break;
|
|
2703
2722
|
}
|
|
@@ -2722,9 +2741,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2722
2741
|
return;
|
|
2723
2742
|
}
|
|
2724
2743
|
// Extract the code from the AI's message and then calculate the code diffs
|
|
2725
|
-
const aiGeneratedCode = (0,
|
|
2726
|
-
const aiGeneratedCodeCleaned = (0,
|
|
2727
|
-
const { unifiedCodeString, unifiedDiffs } = (0,
|
|
2744
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_16__.getCodeBlockFromMessage)(aiMessage);
|
|
2745
|
+
const aiGeneratedCodeCleaned = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_16__.removeMarkdownCodeFormatting)(aiGeneratedCode || '');
|
|
2746
|
+
const { unifiedCodeString, unifiedDiffs } = (0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_19__.getCodeDiffsAndUnifiedCodeString)(updateCellCode, aiGeneratedCodeCleaned);
|
|
2728
2747
|
// Store the code cell ID where we write the code diffs so that we can
|
|
2729
2748
|
// accept or reject the code diffs to the correct cell
|
|
2730
2749
|
cellStateBeforeDiff.current = { codeCellID: updateCellID, code: updateCellCode };
|
|
@@ -2753,7 +2772,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2753
2772
|
if (!lastAIMessage || !cellStateBeforeDiff.current) {
|
|
2754
2773
|
return;
|
|
2755
2774
|
}
|
|
2756
|
-
const aiGeneratedCode = (0,
|
|
2775
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_16__.getCodeBlockFromMessage)(lastAIMessage.message);
|
|
2757
2776
|
if (!aiGeneratedCode) {
|
|
2758
2777
|
return;
|
|
2759
2778
|
}
|
|
@@ -2802,17 +2821,17 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2802
2821
|
the first time we create the chat. Registering the command when it is already created causes
|
|
2803
2822
|
errors.
|
|
2804
2823
|
*/
|
|
2805
|
-
app.commands.addCommand(
|
|
2824
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_PREVIEW_LATEST_CODE, {
|
|
2806
2825
|
execute: () => {
|
|
2807
2826
|
previewAICodeToActiveCell();
|
|
2808
2827
|
}
|
|
2809
2828
|
});
|
|
2810
|
-
app.commands.addCommand(
|
|
2829
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_APPLY_LATEST_CODE, {
|
|
2811
2830
|
execute: () => {
|
|
2812
2831
|
acceptAICode();
|
|
2813
2832
|
}
|
|
2814
2833
|
});
|
|
2815
|
-
app.commands.addCommand(
|
|
2834
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_REJECT_LATEST_CODE, {
|
|
2816
2835
|
execute: () => {
|
|
2817
2836
|
rejectAICode();
|
|
2818
2837
|
}
|
|
@@ -2821,19 +2840,19 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2821
2840
|
Add a new command to the JupyterLab command registry that sends the current chat message.
|
|
2822
2841
|
We use this to automatically send the message when the user adds an error to the chat.
|
|
2823
2842
|
*/
|
|
2824
|
-
app.commands.addCommand(
|
|
2843
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_SEND_DEBUG_ERROR_MESSAGE, {
|
|
2825
2844
|
execute: async (args) => {
|
|
2826
2845
|
if (args === null || args === void 0 ? void 0 : args.input) {
|
|
2827
2846
|
await sendSmartDebugMessage(args.input.toString());
|
|
2828
2847
|
}
|
|
2829
2848
|
}
|
|
2830
2849
|
});
|
|
2831
|
-
app.commands.addCommand(
|
|
2850
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_SEND_EXPLAIN_CODE_MESSAGE, {
|
|
2832
2851
|
execute: async () => {
|
|
2833
2852
|
await sendExplainCodeMessage();
|
|
2834
2853
|
}
|
|
2835
2854
|
});
|
|
2836
|
-
app.commands.addCommand(
|
|
2855
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_SEND_AGENT_MESSAGE, {
|
|
2837
2856
|
execute: async (args) => {
|
|
2838
2857
|
if (args === null || args === void 0 ? void 0 : args.input) {
|
|
2839
2858
|
// Make sure we're in agent mode
|
|
@@ -2852,7 +2871,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2852
2871
|
/*
|
|
2853
2872
|
Register the code cell toolbar buttons for accepting and rejecting code.
|
|
2854
2873
|
*/
|
|
2855
|
-
app.commands.addCommand(
|
|
2874
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE, {
|
|
2856
2875
|
label: `Accept ${operatingSystem === 'mac' ? '⌘Y' : 'Ctrl+Y'}`,
|
|
2857
2876
|
className: 'text-button-mito-ai button-base button-green',
|
|
2858
2877
|
caption: 'Accept Code',
|
|
@@ -2870,7 +2889,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2870
2889
|
}
|
|
2871
2890
|
}
|
|
2872
2891
|
});
|
|
2873
|
-
app.commands.addCommand(
|
|
2892
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE, {
|
|
2874
2893
|
label: `Reject ${operatingSystem === 'mac' ? '⌘U' : 'Ctrl+U'}`,
|
|
2875
2894
|
className: 'text-button-mito-ai button-base button-red',
|
|
2876
2895
|
caption: 'Reject Code',
|
|
@@ -2891,13 +2910,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2891
2910
|
// Register keyboard shortcuts
|
|
2892
2911
|
const accelYDisposable = app.commands.addKeyBinding({
|
|
2893
2912
|
command: codeReviewStatus === 'chatPreview' ?
|
|
2894
|
-
|
|
2895
|
-
|
|
2913
|
+
_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_PREVIEW_LATEST_CODE :
|
|
2914
|
+
_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_APPLY_LATEST_CODE,
|
|
2896
2915
|
keys: ['Accel Y'],
|
|
2897
2916
|
selector: 'body',
|
|
2898
2917
|
});
|
|
2899
2918
|
const accelDDisposable = app.commands.addKeyBinding({
|
|
2900
|
-
command:
|
|
2919
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_REJECT_LATEST_CODE,
|
|
2901
2920
|
keys: ['Accel U'],
|
|
2902
2921
|
selector: 'body',
|
|
2903
2922
|
preventDefault: true,
|
|
@@ -2914,8 +2933,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2914
2933
|
// Without this, the user needs to take some action, like switching to a different cell
|
|
2915
2934
|
// and then switching back in order for the Jupyter to re-evaluate if it should
|
|
2916
2935
|
// show the toolbar buttons.
|
|
2917
|
-
app.commands.notifyCommandChanged(
|
|
2918
|
-
app.commands.notifyCommandChanged(
|
|
2936
|
+
app.commands.notifyCommandChanged(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE);
|
|
2937
|
+
app.commands.notifyCommandChanged(_commands__WEBPACK_IMPORTED_MODULE_20__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE);
|
|
2919
2938
|
};
|
|
2920
2939
|
const codeDiffStripesCompartments = react__WEBPACK_IMPORTED_MODULE_1___default().useRef(new Map());
|
|
2921
2940
|
// Function to update the extensions of code cells
|
|
@@ -2943,13 +2962,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2943
2962
|
codeDiffStripesCompartments.current.set(cellId, compartment);
|
|
2944
2963
|
// Apply the initial configuration
|
|
2945
2964
|
editorView.dispatch({
|
|
2946
|
-
effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.StateEffect.appendConfig.of(compartment.of(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,
|
|
2965
|
+
effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.StateEffect.appendConfig.of(compartment.of(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,_CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_21__.codeDiffStripesExtension)({ unifiedDiffLines: unifiedDiffLines }) : [])),
|
|
2947
2966
|
});
|
|
2948
2967
|
}
|
|
2949
2968
|
else {
|
|
2950
2969
|
// Reconfigure the compartment
|
|
2951
2970
|
editorView.dispatch({
|
|
2952
|
-
effects: compartment.reconfigure(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,
|
|
2971
|
+
effects: compartment.reconfigure(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,_CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_21__.codeDiffStripesExtension)({ unifiedDiffLines: unifiedDiffLines }) : []),
|
|
2953
2972
|
});
|
|
2954
2973
|
}
|
|
2955
2974
|
}
|
|
@@ -2964,7 +2983,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2964
2983
|
// In agent mode, we group consecutive error messages together.
|
|
2965
2984
|
// In chat mode, we display messages individually as they were sent
|
|
2966
2985
|
if (agentModeEnabled) {
|
|
2967
|
-
processedDisplayOptimizedChatHistory = (0,
|
|
2986
|
+
processedDisplayOptimizedChatHistory = (0,_utils_chatHistory__WEBPACK_IMPORTED_MODULE_22__.processChatHistoryForErrorGrouping)(chatHistoryManager.getDisplayOptimizedHistory());
|
|
2968
2987
|
}
|
|
2969
2988
|
else {
|
|
2970
2989
|
processedDisplayOptimizedChatHistory = chatHistoryManager.getDisplayOptimizedHistory();
|
|
@@ -2976,16 +2995,16 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2976
2995
|
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane" },
|
|
2977
2996
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header" },
|
|
2978
2997
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-left" },
|
|
2979
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2980
|
-
void app.commands.execute(
|
|
2998
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_IconButton__WEBPACK_IMPORTED_MODULE_23__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.settingsIcon.react, null), title: "Mito AI Settings", onClick: () => {
|
|
2999
|
+
void app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_24__.COMMAND_MITO_AI_SETTINGS);
|
|
2981
3000
|
} })),
|
|
2982
3001
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-right" },
|
|
2983
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2984
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3002
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_IconButton__WEBPACK_IMPORTED_MODULE_23__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.addIcon.react, null), title: "Start New Chat", onClick: async () => { await startNewChat(); } }),
|
|
3003
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_DropdownMenu__WEBPACK_IMPORTED_MODULE_25__["default"], { trigger: react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "icon-button", title: "Chat Threads", onClick: fetchChatThreads },
|
|
2985
3004
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.historyIcon.react, null)), items: chatThreads.length > 0
|
|
2986
3005
|
? chatThreads.map(thread => ({
|
|
2987
3006
|
label: thread.name,
|
|
2988
|
-
primaryIcon: activeThreadIdRef.current === thread.thread_id ?
|
|
3007
|
+
primaryIcon: activeThreadIdRef.current === thread.thread_id ? _icons__WEBPACK_IMPORTED_MODULE_26__.OpenIndicatorLabIcon.react : undefined,
|
|
2989
3008
|
onClick: () => fetchChatHistoryAndSetActiveThread(thread.thread_id),
|
|
2990
3009
|
secondaryActions: [
|
|
2991
3010
|
{
|
|
@@ -3004,36 +3023,36 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3004
3023
|
displayOptimizedChatHistory.length === 0 &&
|
|
3005
3024
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-empty-message" },
|
|
3006
3025
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { style: { margin: '0 auto 8px', display: 'block', textAlign: 'center' } },
|
|
3007
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3026
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icons_MitoLogo__WEBPACK_IMPORTED_MODULE_27__["default"], { width: "60", height: "30" })),
|
|
3008
3027
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", { style: { display: 'block', textAlign: 'center', fontWeight: 'bold', fontSize: '20px', marginBottom: '15px' } }, "Data Copilot"),
|
|
3009
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3028
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_CTACarousel__WEBPACK_IMPORTED_MODULE_28__["default"], { app: app })),
|
|
3010
3029
|
processedDisplayOptimizedChatHistory.map((displayOptimizedChat, index) => {
|
|
3011
3030
|
if (isGroupedErrorMessages(displayOptimizedChat)) {
|
|
3012
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3031
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_29__["default"], { key: index, messages: displayOptimizedChat, renderMimeRegistry: renderMimeRegistry }));
|
|
3013
3032
|
}
|
|
3014
3033
|
else {
|
|
3015
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3034
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_30__["default"], { key: index, message: displayOptimizedChat.message, promptType: displayOptimizedChat.promptType, agentResponse: displayOptimizedChat.agentResponse, codeCellID: displayOptimizedChat.codeCellID, mitoAIConnectionError: displayOptimizedChat.type === 'connection error', mitoAIConnectionErrorType: displayOptimizedChat.mitoAIConnectionErrorType || null, messageIndex: index, notebookTracker: notebookTracker, renderMimeRegistry: renderMimeRegistry, app: app, isLastAiMessage: index === lastAIMessagesIndex, isLastMessage: index === displayOptimizedChatHistory.length - 1, operatingSystem: operatingSystem, previewAICode: previewAICodeToActiveCell, acceptAICode: acceptAICode, rejectAICode: rejectAICode, onUpdateMessage: handleUpdateMessage, contextManager: contextManager, codeReviewStatus: codeReviewStatus, setNextSteps: setNextSteps, agentModeEnabled: agentModeEnabled, additionalContext: displayOptimizedChat.additionalContext }));
|
|
3016
3035
|
}
|
|
3017
3036
|
}).filter(message => message !== null),
|
|
3018
3037
|
loadingAIResponse &&
|
|
3019
3038
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-loading-message" },
|
|
3020
3039
|
"Thinking ",
|
|
3021
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3040
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_31__["default"], null)),
|
|
3022
3041
|
hasCheckpoint &&
|
|
3023
3042
|
agentModeEnabled &&
|
|
3024
3043
|
agentExecutionStatus === 'idle' &&
|
|
3025
3044
|
displayOptimizedChatHistory.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
3026
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3027
|
-
void (0,
|
|
3045
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_32__["default"], { text: "Revert changes", icon: _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_33__["default"], title: "Revert changes", onClick: () => {
|
|
3046
|
+
void (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_15__.restoreCheckpoint)(app, notebookTracker, setHasCheckpoint);
|
|
3028
3047
|
setDisplayedNextStepsIfAvailable(false);
|
|
3029
3048
|
setHasCheckpoint(false);
|
|
3030
3049
|
setShowRevertQuestionnaire(true);
|
|
3031
3050
|
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_11__.scrollToDiv)(chatMessagesRef);
|
|
3032
3051
|
}, variant: "gray", width: "fit-contents", iconPosition: "left" }),
|
|
3033
3052
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("p", { className: "text-muted text-sm" }, "Undo the most recent changes made by the agent"))),
|
|
3034
|
-
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3053
|
+
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_34__["default"], { onDestroy: () => setShowRevertQuestionnaire(false), getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager }))),
|
|
3035
3054
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "suggestions-container" },
|
|
3036
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3055
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_35__["default"], { onSelectSuggestion: (prompt) => {
|
|
3037
3056
|
if (agentModeEnabled) {
|
|
3038
3057
|
void startAgentExecution(prompt);
|
|
3039
3058
|
}
|
|
@@ -3042,15 +3061,15 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3042
3061
|
}
|
|
3043
3062
|
} }))),
|
|
3044
3063
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: `connected-input-container ${nextSteps.length > 0 ? 'has-next-steps' : ''}` },
|
|
3045
|
-
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3046
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3064
|
+
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_NextStepsPills__WEBPACK_IMPORTED_MODULE_36__["default"], { nextSteps: nextSteps, onSelectNextStep: agentModeEnabled ? startAgentExecution : sendChatInputMessage, displayedNextStepsIfAvailable: displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable })),
|
|
3065
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_37__["default"], { app: app, initialContent: '', placeholder: agentExecutionStatus === 'working' ? 'Agent is working...' :
|
|
3047
3066
|
agentExecutionStatus === 'stopping' ? 'Agent is stopping...' :
|
|
3048
3067
|
agentModeEnabled ? 'Ask agent to do anything' :
|
|
3049
3068
|
displayOptimizedChatHistory.length < 2 ? `Ask question (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`
|
|
3050
3069
|
: `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`, onSave: agentModeEnabled ? startAgentExecution : sendChatInputMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecutionStatus })),
|
|
3051
3070
|
agentExecutionStatus !== 'working' && agentExecutionStatus !== 'stopping' && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls" },
|
|
3052
3071
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls-left" },
|
|
3053
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3072
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_ToggleButton__WEBPACK_IMPORTED_MODULE_38__["default"], { leftText: "Chat", leftTooltip: "Chat mode suggests an edit to the active cell and let's you decide to accept or reject it.", rightText: "Agent", rightTooltip: "Agent mode writes and executes code until it's finished your request.", isLeftSelected: !agentModeEnabled, onChange: async (isLeftSelected) => {
|
|
3054
3073
|
await startNewChat(); // TODO: delete thread instead of starting new chat
|
|
3055
3074
|
setAgentModeEnabled(!isLeftSelected);
|
|
3056
3075
|
// Clear agent checkpoint when switching modes
|
|
@@ -3086,7 +3105,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3086
3105
|
" \u23CE"))),
|
|
3087
3106
|
(agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping') && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "button-base button-red stop-agent-button", onClick: markAgentForStopping, disabled: agentExecutionStatus === 'stopping', "data-testid": "stop-agent-button" }, agentExecutionStatus === 'stopping' ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "stop-agent-button-content" },
|
|
3088
3107
|
"Stopping",
|
|
3089
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3108
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_39__["default"], null),
|
|
3090
3109
|
" ")) : ('Stop Agent')))));
|
|
3091
3110
|
};
|
|
3092
3111
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatTaskpane);
|
|
@@ -3683,7 +3702,7 @@ const convertNotebookToStreamlit = async (notebookTracker, appBuilderService) =>
|
|
|
3683
3702
|
type: 'build-app',
|
|
3684
3703
|
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__.UUID.uuid4(),
|
|
3685
3704
|
notebook_path: notebookPath,
|
|
3686
|
-
jwt_token: jwtToken
|
|
3705
|
+
jwt_token: jwtToken
|
|
3687
3706
|
});
|
|
3688
3707
|
if (response.error) {
|
|
3689
3708
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit(response.error.title, 'error', {
|
|
@@ -3828,9 +3847,11 @@ const AuthPopup = ({ isOpen, onClose, onSuccess }) => {
|
|
|
3828
3847
|
__webpack_require__.r(__webpack_exports__);
|
|
3829
3848
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3830
3849
|
/* harmony export */ getAuthHeaders: () => (/* binding */ getAuthHeaders),
|
|
3831
|
-
/* harmony export */ getJWTToken: () => (/* binding */ getJWTToken)
|
|
3850
|
+
/* harmony export */ getJWTToken: () => (/* binding */ getJWTToken),
|
|
3851
|
+
/* harmony export */ logoutAndClearJWTTokens: () => (/* binding */ logoutAndClearJWTTokens)
|
|
3832
3852
|
/* harmony export */ });
|
|
3833
3853
|
/* harmony import */ var aws_amplify_auth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! aws-amplify/auth */ "./node_modules/@aws-amplify/core/dist/esm/singleton/apis/fetchAuthSession.mjs");
|
|
3854
|
+
/* harmony import */ var aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! aws-amplify/auth */ "./node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signOut.mjs");
|
|
3834
3855
|
/* harmony import */ var _aws_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./aws-config */ "./lib/Extensions/AppBuilder/aws-config.js");
|
|
3835
3856
|
/*
|
|
3836
3857
|
* Copyright (c) Saga Inc.
|
|
@@ -3867,6 +3888,35 @@ const getAuthHeaders = async () => {
|
|
|
3867
3888
|
}
|
|
3868
3889
|
return {};
|
|
3869
3890
|
};
|
|
3891
|
+
/**
|
|
3892
|
+
* Logout user and clear all AWS Amplify/Cognito localStorage items
|
|
3893
|
+
*/
|
|
3894
|
+
const logoutAndClearJWTTokens = async () => {
|
|
3895
|
+
try {
|
|
3896
|
+
// Sign out from AWS Cognito using Amplify
|
|
3897
|
+
await (0,aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2__.signOut)();
|
|
3898
|
+
console.log('User logged out successfully');
|
|
3899
|
+
}
|
|
3900
|
+
catch (error) {
|
|
3901
|
+
console.error('Error during logout:', error);
|
|
3902
|
+
throw error;
|
|
3903
|
+
}
|
|
3904
|
+
finally {
|
|
3905
|
+
// Remove all keys that start with common Amplify prefixes
|
|
3906
|
+
const keysToRemove = [];
|
|
3907
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
3908
|
+
const key = localStorage.key(i);
|
|
3909
|
+
if (key && (key.startsWith('CognitoIdentityServiceProvider.'))) {
|
|
3910
|
+
keysToRemove.push(key);
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
// Remove all identified keys
|
|
3914
|
+
keysToRemove.forEach(key => {
|
|
3915
|
+
localStorage.removeItem(key);
|
|
3916
|
+
});
|
|
3917
|
+
console.log('Auth tokens cleared successfully');
|
|
3918
|
+
}
|
|
3919
|
+
};
|
|
3870
3920
|
|
|
3871
3921
|
|
|
3872
3922
|
/***/ }),
|
|
@@ -4174,6 +4224,312 @@ with tempfile.TemporaryDirectory() as temp_dir:
|
|
|
4174
4224
|
};
|
|
4175
4225
|
|
|
4176
4226
|
|
|
4227
|
+
/***/ }),
|
|
4228
|
+
|
|
4229
|
+
/***/ "./lib/Extensions/AppManager/AppsList.js":
|
|
4230
|
+
/*!***********************************************!*\
|
|
4231
|
+
!*** ./lib/Extensions/AppManager/AppsList.js ***!
|
|
4232
|
+
\***********************************************/
|
|
4233
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4234
|
+
|
|
4235
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4236
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4237
|
+
/* harmony export */ AppsList: () => (/* binding */ AppsList)
|
|
4238
|
+
/* harmony export */ });
|
|
4239
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
4240
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4241
|
+
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components");
|
|
4242
|
+
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
4243
|
+
/* harmony import */ var _AppBuilder_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../AppBuilder/auth */ "./lib/Extensions/AppBuilder/auth.js");
|
|
4244
|
+
/* harmony import */ var _ListAppsAPI__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ListAppsAPI */ "./lib/Extensions/AppManager/ListAppsAPI.js");
|
|
4245
|
+
/* harmony import */ var _style_AppsList_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/AppsList.css */ "./style/AppsList.css");
|
|
4246
|
+
/*
|
|
4247
|
+
* Copyright (c) Saga Inc.
|
|
4248
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4249
|
+
*/
|
|
4250
|
+
//app-list.tsx
|
|
4251
|
+
|
|
4252
|
+
|
|
4253
|
+
|
|
4254
|
+
|
|
4255
|
+
|
|
4256
|
+
const AppsList = ({ appManagerService }) => {
|
|
4257
|
+
const [apps, setApps] = react__WEBPACK_IMPORTED_MODULE_0__.useState([]);
|
|
4258
|
+
const [loading, setLoading] = react__WEBPACK_IMPORTED_MODULE_0__.useState(true);
|
|
4259
|
+
const [error, setError] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);
|
|
4260
|
+
// Fetch apps on component mount
|
|
4261
|
+
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
|
4262
|
+
const loadApps = async () => {
|
|
4263
|
+
try {
|
|
4264
|
+
console.log('[AppsList] Starting to load apps...');
|
|
4265
|
+
setLoading(true);
|
|
4266
|
+
setError(null);
|
|
4267
|
+
console.log('[AppsList] Calling fetchUserApps...');
|
|
4268
|
+
const response = await (0,_ListAppsAPI__WEBPACK_IMPORTED_MODULE_3__.fetchUserApps)(appManagerService);
|
|
4269
|
+
console.log('[AppsList] fetchUserApps response:', response);
|
|
4270
|
+
if ((0,_ListAppsAPI__WEBPACK_IMPORTED_MODULE_3__.isGetAppsSuccess)(response)) {
|
|
4271
|
+
setApps(response.apps);
|
|
4272
|
+
}
|
|
4273
|
+
else {
|
|
4274
|
+
setError(response.errorMessage || 'Failed to load apps');
|
|
4275
|
+
setApps([]);
|
|
4276
|
+
}
|
|
4277
|
+
}
|
|
4278
|
+
catch (err) {
|
|
4279
|
+
console.error('[AppsList] Error loading apps:', err);
|
|
4280
|
+
setError(err instanceof Error ? err.message : 'An unexpected error occurred');
|
|
4281
|
+
setApps([]);
|
|
4282
|
+
}
|
|
4283
|
+
finally {
|
|
4284
|
+
setLoading(false);
|
|
4285
|
+
}
|
|
4286
|
+
};
|
|
4287
|
+
console.log('[AppsList] Component mounted, calling loadApps...');
|
|
4288
|
+
void loadApps();
|
|
4289
|
+
}, [appManagerService]);
|
|
4290
|
+
const refreshApps = async () => {
|
|
4291
|
+
const response = await (0,_ListAppsAPI__WEBPACK_IMPORTED_MODULE_3__.fetchUserApps)(appManagerService);
|
|
4292
|
+
if ((0,_ListAppsAPI__WEBPACK_IMPORTED_MODULE_3__.isGetAppsSuccess)(response)) {
|
|
4293
|
+
setApps(response.apps);
|
|
4294
|
+
setError(null);
|
|
4295
|
+
}
|
|
4296
|
+
else {
|
|
4297
|
+
setError(response.errorMessage || 'Failed to refresh apps');
|
|
4298
|
+
}
|
|
4299
|
+
};
|
|
4300
|
+
const copyToClipboard = async (url, appName) => {
|
|
4301
|
+
try {
|
|
4302
|
+
await navigator.clipboard.writeText(url);
|
|
4303
|
+
console.log(`Copied URL for ${appName}: ${url}`);
|
|
4304
|
+
}
|
|
4305
|
+
catch (err) {
|
|
4306
|
+
console.error('Failed to copy URL:', err);
|
|
4307
|
+
// Fallback for older browsers
|
|
4308
|
+
const textArea = document.createElement('textarea');
|
|
4309
|
+
textArea.value = url;
|
|
4310
|
+
document.body.appendChild(textArea);
|
|
4311
|
+
textArea.select();
|
|
4312
|
+
document.execCommand('copy');
|
|
4313
|
+
document.body.removeChild(textArea);
|
|
4314
|
+
}
|
|
4315
|
+
};
|
|
4316
|
+
const getStatusColor = (status) => {
|
|
4317
|
+
switch (status) {
|
|
4318
|
+
case 'active':
|
|
4319
|
+
return '#4caf50';
|
|
4320
|
+
case 'error':
|
|
4321
|
+
return '#f44336';
|
|
4322
|
+
case 'deploying':
|
|
4323
|
+
return '#2196f3';
|
|
4324
|
+
case 'shut down':
|
|
4325
|
+
return '#9e9e9e';
|
|
4326
|
+
default:
|
|
4327
|
+
return '#9e9e9e';
|
|
4328
|
+
}
|
|
4329
|
+
};
|
|
4330
|
+
const getStatusText = (status) => {
|
|
4331
|
+
return status.charAt(0).toUpperCase() + status.slice(1);
|
|
4332
|
+
};
|
|
4333
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-container" },
|
|
4334
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-header" },
|
|
4335
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3", { className: "apps-list-title" }, "Your Apps"),
|
|
4336
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-actions" },
|
|
4337
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { onClick: refreshApps, disabled: loading, className: "apps-list-button", title: "Refresh apps" }, loading ? 'Loading...' : 'Refresh'),
|
|
4338
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { onClick: () => {
|
|
4339
|
+
console.log('Logout clicked');
|
|
4340
|
+
void (0,_AppBuilder_auth__WEBPACK_IMPORTED_MODULE_4__.logoutAndClearJWTTokens)();
|
|
4341
|
+
}, className: "apps-list-button", title: "Logout" }, "Logout"))),
|
|
4342
|
+
loading ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-loading" }, "Loading apps...")) : error ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-error" },
|
|
4343
|
+
"Error: ",
|
|
4344
|
+
error,
|
|
4345
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-error-actions" },
|
|
4346
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { onClick: refreshApps, className: "apps-list-button primary" }, "Try Again")))) : apps.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "apps-list-empty" }, "No apps deployed yet")) : (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, apps.map((app) => (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: app.name, className: "app-item" },
|
|
4347
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-header" },
|
|
4348
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-content" },
|
|
4349
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-name" }, app.name),
|
|
4350
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-status-container" },
|
|
4351
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "app-item-status-indicator", style: { backgroundColor: getStatusColor(app.status) } }),
|
|
4352
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "app-item-status-text" }, getStatusText(app.status))),
|
|
4353
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-last-deployed" },
|
|
4354
|
+
"Last Deployed at: ",
|
|
4355
|
+
app.lastDeployedAt))),
|
|
4356
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-url-container" },
|
|
4357
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "app-item-url" }, app.url),
|
|
4358
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { onClick: () => copyToClipboard(app.url, app.name), className: "app-item-copy-button", title: `Copy URL for ${app.name}` },
|
|
4359
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1__.copyIcon.react, { width: "14px", height: "14px", fill: "var(--jp-ui-font-color2)" }))))))))));
|
|
4360
|
+
};
|
|
4361
|
+
|
|
4362
|
+
|
|
4363
|
+
/***/ }),
|
|
4364
|
+
|
|
4365
|
+
/***/ "./lib/Extensions/AppManager/ListAppsAPI.js":
|
|
4366
|
+
/*!**************************************************!*\
|
|
4367
|
+
!*** ./lib/Extensions/AppManager/ListAppsAPI.js ***!
|
|
4368
|
+
\**************************************************/
|
|
4369
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4370
|
+
|
|
4371
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4372
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4373
|
+
/* harmony export */ fetchUserApps: () => (/* binding */ fetchUserApps),
|
|
4374
|
+
/* harmony export */ isGetAppsFailure: () => (/* binding */ isGetAppsFailure),
|
|
4375
|
+
/* harmony export */ isGetAppsSuccess: () => (/* binding */ isGetAppsSuccess)
|
|
4376
|
+
/* harmony export */ });
|
|
4377
|
+
/* harmony import */ var _AppBuilder_auth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AppBuilder/auth */ "./lib/Extensions/AppBuilder/auth.js");
|
|
4378
|
+
/*
|
|
4379
|
+
* Copyright (c) Saga Inc.
|
|
4380
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4381
|
+
*/
|
|
4382
|
+
|
|
4383
|
+
// Type guards for working with the discriminated union
|
|
4384
|
+
const isGetAppsSuccess = (response) => {
|
|
4385
|
+
return response.success === true;
|
|
4386
|
+
};
|
|
4387
|
+
const isGetAppsFailure = (response) => {
|
|
4388
|
+
return response.success === false;
|
|
4389
|
+
};
|
|
4390
|
+
const fetchUserApps = async (appManagerService) => {
|
|
4391
|
+
try {
|
|
4392
|
+
const jwtToken = await (0,_AppBuilder_auth__WEBPACK_IMPORTED_MODULE_0__.getJWTToken)();
|
|
4393
|
+
if (!jwtToken) {
|
|
4394
|
+
return {
|
|
4395
|
+
success: false,
|
|
4396
|
+
errorMessage: 'User not authenticated'
|
|
4397
|
+
};
|
|
4398
|
+
}
|
|
4399
|
+
// Create the request message with proper typing
|
|
4400
|
+
const request = {
|
|
4401
|
+
type: 'manage-app',
|
|
4402
|
+
jwt_token: jwtToken
|
|
4403
|
+
};
|
|
4404
|
+
// Using websocket service with correct message structure and proper typing
|
|
4405
|
+
const response = await appManagerService.client.sendMessage(request);
|
|
4406
|
+
// Check if the response indicates an error
|
|
4407
|
+
if (response.error) {
|
|
4408
|
+
return {
|
|
4409
|
+
success: false,
|
|
4410
|
+
errorMessage: response.error.title || 'Failed to fetch apps'
|
|
4411
|
+
};
|
|
4412
|
+
}
|
|
4413
|
+
// Transform the response to match expected format
|
|
4414
|
+
const apps = (response.apps || []).map(app => {
|
|
4415
|
+
var _a;
|
|
4416
|
+
return ({
|
|
4417
|
+
name: app.app_name,
|
|
4418
|
+
url: app.url,
|
|
4419
|
+
status: (_a = app.status) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
|
|
4420
|
+
lastDeployedAt: app.last_deployed_at
|
|
4421
|
+
});
|
|
4422
|
+
});
|
|
4423
|
+
return {
|
|
4424
|
+
success: true,
|
|
4425
|
+
apps
|
|
4426
|
+
};
|
|
4427
|
+
}
|
|
4428
|
+
catch (error) {
|
|
4429
|
+
console.error('Error fetching apps:', error);
|
|
4430
|
+
return {
|
|
4431
|
+
success: false,
|
|
4432
|
+
errorMessage: error instanceof Error ? error.message : 'Failed to fetch apps'
|
|
4433
|
+
};
|
|
4434
|
+
}
|
|
4435
|
+
};
|
|
4436
|
+
|
|
4437
|
+
|
|
4438
|
+
/***/ }),
|
|
4439
|
+
|
|
4440
|
+
/***/ "./lib/Extensions/AppManager/ManageAppsPlugin.js":
|
|
4441
|
+
/*!*******************************************************!*\
|
|
4442
|
+
!*** ./lib/Extensions/AppManager/ManageAppsPlugin.js ***!
|
|
4443
|
+
\*******************************************************/
|
|
4444
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4445
|
+
|
|
4446
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4447
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4448
|
+
/* harmony export */ IAppManagerService: () => (/* binding */ IAppManagerService),
|
|
4449
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4450
|
+
/* harmony export */ });
|
|
4451
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
4452
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);
|
|
4453
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
4454
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4455
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
4456
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
4457
|
+
/* harmony import */ var _AppsList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AppsList */ "./lib/Extensions/AppManager/AppsList.js");
|
|
4458
|
+
/* harmony import */ var _websockets_appManager_appManagerWebsocketClient__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../websockets/appManager/appManagerWebsocketClient */ "./lib/websockets/appManager/appManagerWebsocketClient.js");
|
|
4459
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
4460
|
+
/*
|
|
4461
|
+
* Copyright (c) Saga Inc.
|
|
4462
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4463
|
+
*/
|
|
4464
|
+
|
|
4465
|
+
|
|
4466
|
+
|
|
4467
|
+
|
|
4468
|
+
|
|
4469
|
+
|
|
4470
|
+
/**
|
|
4471
|
+
* The token for the AppManager service.
|
|
4472
|
+
*/
|
|
4473
|
+
const IAppManagerService = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.Token('mito-ai:IAppManagerService', 'Token for the AppManager service that provides access to the websocket client');
|
|
4474
|
+
/**
|
|
4475
|
+
* Implementation of the AppManager service.
|
|
4476
|
+
*/
|
|
4477
|
+
class AppManagerService {
|
|
4478
|
+
/**
|
|
4479
|
+
* Create a new AppManager service.
|
|
4480
|
+
*/
|
|
4481
|
+
constructor(app) {
|
|
4482
|
+
// Create the websocket client with the app's server settings
|
|
4483
|
+
this.client = new _websockets_appManager_appManagerWebsocketClient__WEBPACK_IMPORTED_MODULE_3__.AppManagerWebsocketClient({
|
|
4484
|
+
serverSettings: app.serviceManager.serverSettings
|
|
4485
|
+
});
|
|
4486
|
+
// Initialize the websocket connection in the background
|
|
4487
|
+
void this.client.initialize().catch(error => {
|
|
4488
|
+
console.error('Failed to initialize AppManager websocket client:', error);
|
|
4489
|
+
// We don't need to throw the error since the client will attempt to reconnect when used
|
|
4490
|
+
});
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
class ManageAppsWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.ReactWidget {
|
|
4494
|
+
constructor(appManagerService) {
|
|
4495
|
+
super();
|
|
4496
|
+
this._appManagerService = appManagerService;
|
|
4497
|
+
}
|
|
4498
|
+
render() {
|
|
4499
|
+
// Pass the appManagerService as a prop to the AppsList component
|
|
4500
|
+
return react__WEBPACK_IMPORTED_MODULE_2__.createElement(_AppsList__WEBPACK_IMPORTED_MODULE_4__.AppsList, {
|
|
4501
|
+
appManagerService: this._appManagerService
|
|
4502
|
+
});
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4505
|
+
const ManageAppsPlugin = {
|
|
4506
|
+
id: 'manage-apps:manage-app-plugin',
|
|
4507
|
+
autoStart: true,
|
|
4508
|
+
provides: IAppManagerService,
|
|
4509
|
+
activate: (app) => {
|
|
4510
|
+
console.log('ManageApps plugin activated');
|
|
4511
|
+
// Create the AppManager service
|
|
4512
|
+
const appManagerService = new AppManagerService(app);
|
|
4513
|
+
// Create and add the ManageApps widget
|
|
4514
|
+
const widget = new ManageAppsWidget(appManagerService);
|
|
4515
|
+
widget.title.label = 'Manage apps';
|
|
4516
|
+
widget.id = 'manage-apps-widget';
|
|
4517
|
+
// For now, only show the manage apps widget if beta mode is enabled
|
|
4518
|
+
(0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_5__.getSetting)('beta_mode').then(value => {
|
|
4519
|
+
if (value === 'true') {
|
|
4520
|
+
// Add to right sidebar
|
|
4521
|
+
app.shell.add(widget, 'right');
|
|
4522
|
+
}
|
|
4523
|
+
}).catch(error => {
|
|
4524
|
+
console.error('Error checking beta mode:', error);
|
|
4525
|
+
});
|
|
4526
|
+
// Return the service so other plugins can use it
|
|
4527
|
+
return appManagerService;
|
|
4528
|
+
}
|
|
4529
|
+
};
|
|
4530
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ManageAppsPlugin);
|
|
4531
|
+
|
|
4532
|
+
|
|
4177
4533
|
/***/ }),
|
|
4178
4534
|
|
|
4179
4535
|
/***/ "./lib/Extensions/ContextManager/ContextManagerPlugin.js":
|
|
@@ -4979,7 +5335,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4979
5335
|
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__);
|
|
4980
5336
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
4981
5337
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
4982
|
-
/* harmony import */ var
|
|
5338
|
+
/* harmony import */ var _SettingsWidget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SettingsWidget */ "./lib/Extensions/SettingsManager/SettingsWidget.js");
|
|
5339
|
+
/* harmony import */ var _ContextManager_ContextManagerPlugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ContextManager/ContextManagerPlugin */ "./lib/Extensions/ContextManager/ContextManagerPlugin.js");
|
|
4983
5340
|
/*
|
|
4984
5341
|
* Copyright (c) Saga Inc.
|
|
4985
5342
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -4987,6 +5344,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4987
5344
|
|
|
4988
5345
|
|
|
4989
5346
|
|
|
5347
|
+
|
|
4990
5348
|
const COMMAND_MITO_AI_SETTINGS = 'mito-ai:open-settings';
|
|
4991
5349
|
/**
|
|
4992
5350
|
* Initialization data for the mito settings extension.
|
|
@@ -4995,14 +5353,14 @@ const SettingsManagerPlugin = {
|
|
|
4995
5353
|
id: 'mito-ai:settings-manager',
|
|
4996
5354
|
description: 'Mito AI settings manager',
|
|
4997
5355
|
autoStart: true,
|
|
4998
|
-
requires: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette],
|
|
5356
|
+
requires: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette, _ContextManager_ContextManagerPlugin__WEBPACK_IMPORTED_MODULE_2__.IContextManager],
|
|
4999
5357
|
optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILayoutRestorer],
|
|
5000
5358
|
activate: _activate
|
|
5001
5359
|
};
|
|
5002
|
-
function _activate(app, palette, restorer) {
|
|
5360
|
+
function _activate(app, palette, contextManager, restorer) {
|
|
5003
5361
|
// Create a widget creator function
|
|
5004
5362
|
const newWidget = () => {
|
|
5005
|
-
const content = new
|
|
5363
|
+
const content = new _SettingsWidget__WEBPACK_IMPORTED_MODULE_3__.SettingsWidget(contextManager);
|
|
5006
5364
|
const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content });
|
|
5007
5365
|
widget.id = 'mito-ai-settings';
|
|
5008
5366
|
widget.title.label = 'Mito AI Settings';
|
|
@@ -5067,9 +5425,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5067
5425
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
5068
5426
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
5069
5427
|
/* harmony import */ var _database_DatabasePage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./database/DatabasePage */ "./lib/Extensions/SettingsManager/database/DatabasePage.js");
|
|
5070
|
-
/* harmony import */ var
|
|
5428
|
+
/* harmony import */ var _support_SupportPage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./support/SupportPage */ "./lib/Extensions/SettingsManager/support/SupportPage.js");
|
|
5071
5429
|
/* harmony import */ var _general_GeneralPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./general/GeneralPage */ "./lib/Extensions/SettingsManager/general/GeneralPage.js");
|
|
5072
5430
|
/* harmony import */ var _rules_RulesPage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./rules/RulesPage */ "./lib/Extensions/SettingsManager/rules/RulesPage.js");
|
|
5431
|
+
/* harmony import */ var _profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
5073
5432
|
/* harmony import */ var _style_SettingsWidget_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/SettingsWidget.css */ "./style/SettingsWidget.css");
|
|
5074
5433
|
/*
|
|
5075
5434
|
* Copyright (c) Saga Inc.
|
|
@@ -5082,7 +5441,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5082
5441
|
|
|
5083
5442
|
|
|
5084
5443
|
|
|
5085
|
-
|
|
5444
|
+
|
|
5445
|
+
const TABS_CONFIG = (contextManager) => ({
|
|
5086
5446
|
database: {
|
|
5087
5447
|
label: 'Database',
|
|
5088
5448
|
component: _database_DatabasePage__WEBPACK_IMPORTED_MODULE_3__.DatabasePage
|
|
@@ -5095,31 +5455,37 @@ const TABS_CONFIG = {
|
|
|
5095
5455
|
label: 'Rules',
|
|
5096
5456
|
component: _rules_RulesPage__WEBPACK_IMPORTED_MODULE_5__.RulesPage
|
|
5097
5457
|
},
|
|
5458
|
+
profiler: {
|
|
5459
|
+
label: 'Profiler',
|
|
5460
|
+
component: () => react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_6__.ProfilerPage, { contextManager: contextManager })
|
|
5461
|
+
},
|
|
5098
5462
|
support: {
|
|
5099
5463
|
label: 'Support',
|
|
5100
|
-
component:
|
|
5464
|
+
component: _support_SupportPage__WEBPACK_IMPORTED_MODULE_7__.SupportPage
|
|
5101
5465
|
},
|
|
5102
|
-
};
|
|
5103
|
-
const App = () => {
|
|
5466
|
+
});
|
|
5467
|
+
const App = ({ contextManager }) => {
|
|
5104
5468
|
const [activeTab, setActiveTab] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('database');
|
|
5469
|
+
const tabsConfig = TABS_CONFIG(contextManager);
|
|
5105
5470
|
const renderContent = () => {
|
|
5106
|
-
const TabComponent =
|
|
5471
|
+
const TabComponent = tabsConfig[activeTab].component;
|
|
5107
5472
|
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TabComponent, null);
|
|
5108
5473
|
};
|
|
5109
5474
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-widget" },
|
|
5110
5475
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-layout" },
|
|
5111
5476
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-sidebar" },
|
|
5112
5477
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("nav", null,
|
|
5113
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", null, Object.entries(
|
|
5478
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", null, Object.entries(tabsConfig).map(([key, { label }]) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: key, className: activeTab === key ? 'active' : '', onClick: () => setActiveTab(key) }, label)))))),
|
|
5114
5479
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-main" }, renderContent()))));
|
|
5115
5480
|
};
|
|
5116
5481
|
class SettingsWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ReactWidget {
|
|
5117
|
-
constructor() {
|
|
5482
|
+
constructor(contextManager) {
|
|
5118
5483
|
super();
|
|
5484
|
+
this.contextManager = contextManager;
|
|
5119
5485
|
this.addClass('jp-ReactWidget');
|
|
5120
5486
|
}
|
|
5121
5487
|
render() {
|
|
5122
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(App,
|
|
5488
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(App, { contextManager: this.contextManager });
|
|
5123
5489
|
}
|
|
5124
5490
|
}
|
|
5125
5491
|
|
|
@@ -5769,113 +6135,305 @@ const GeneralPage = () => {
|
|
|
5769
6135
|
|
|
5770
6136
|
/***/ }),
|
|
5771
6137
|
|
|
5772
|
-
/***/ "./lib/Extensions/SettingsManager/
|
|
5773
|
-
|
|
5774
|
-
!*** ./lib/Extensions/SettingsManager/
|
|
5775
|
-
|
|
6138
|
+
/***/ "./lib/Extensions/SettingsManager/profiler/CapturedRequestsSection.js":
|
|
6139
|
+
/*!****************************************************************************!*\
|
|
6140
|
+
!*** ./lib/Extensions/SettingsManager/profiler/CapturedRequestsSection.js ***!
|
|
6141
|
+
\****************************************************************************/
|
|
5776
6142
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5777
6143
|
|
|
5778
6144
|
__webpack_require__.r(__webpack_exports__);
|
|
5779
6145
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5780
|
-
/* harmony export */
|
|
6146
|
+
/* harmony export */ CapturedRequestsSection: () => (/* binding */ CapturedRequestsSection)
|
|
5781
6147
|
/* harmony export */ });
|
|
5782
6148
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5783
6149
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5784
|
-
/* harmony import */ var
|
|
5785
|
-
/* harmony import */ var _style_RulesForm_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/RulesForm.css */ "./style/RulesForm.css");
|
|
5786
|
-
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/classNames */ "./lib/utils/classNames.js");
|
|
6150
|
+
/* harmony import */ var _utils_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/constants */ "./lib/utils/constants.js");
|
|
5787
6151
|
/*
|
|
5788
6152
|
* Copyright (c) Saga Inc.
|
|
5789
6153
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5790
6154
|
*/
|
|
5791
6155
|
|
|
5792
6156
|
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
6157
|
+
const CapturedRequestsSection = () => {
|
|
6158
|
+
const [capturedRequests, setCapturedRequests] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
6159
|
+
// Listen for captured completion requests
|
|
6160
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6161
|
+
const handleCapturedRequest = (event) => {
|
|
6162
|
+
setCapturedRequests(prev => [event.detail, ...prev]);
|
|
6163
|
+
};
|
|
6164
|
+
window.addEventListener(_utils_constants__WEBPACK_IMPORTED_MODULE_1__.EVENT_NAMES.MITO_AI_CAPTURE_REQUEST, handleCapturedRequest);
|
|
6165
|
+
return () => {
|
|
6166
|
+
window.removeEventListener(_utils_constants__WEBPACK_IMPORTED_MODULE_1__.EVENT_NAMES.MITO_AI_CAPTURE_REQUEST, handleCapturedRequest);
|
|
6167
|
+
};
|
|
6168
|
+
}, []);
|
|
6169
|
+
const clearCapturedRequests = () => {
|
|
6170
|
+
setCapturedRequests([]);
|
|
6171
|
+
};
|
|
6172
|
+
const copyRequestToClipboard = async (request) => {
|
|
5800
6173
|
try {
|
|
5801
|
-
await
|
|
6174
|
+
await navigator.clipboard.writeText(JSON.stringify(request, null, 2));
|
|
6175
|
+
console.log('Request copied to clipboard');
|
|
5802
6176
|
}
|
|
5803
|
-
|
|
5804
|
-
|
|
6177
|
+
catch (err) {
|
|
6178
|
+
console.error('Failed to copy request to clipboard:', err);
|
|
5805
6179
|
}
|
|
5806
6180
|
};
|
|
5807
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5808
|
-
|
|
5809
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5810
|
-
|
|
5811
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5812
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { htmlFor: "description" }, "Rule Content"),
|
|
5816
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { id: "description", name: "description", value: formData.description, onChange: onInputChange, placeholder: "Enter or paste rule content here", rows: 30, required: true, className: "form-textarea" })),
|
|
5817
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "form-actions" },
|
|
5818
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "button", className: "button-base button-gray", onClick: onClose, disabled: isLoading }, "Cancel"),
|
|
5819
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "submit", className: "button-base button-purple", disabled: isLoading }, isLoading ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
5820
|
-
"Saving Rule",
|
|
5821
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { style: { color: 'var(--purple-700)' } },
|
|
5822
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_3__["default"], null)))) : (isEditing ? 'Update Rule' : 'Add Rule')))));
|
|
6181
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
6182
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, "Captured Completion Requests"),
|
|
6183
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base profiler-clear-button", onClick: clearCapturedRequests }, "Clear Captured Requests"),
|
|
6184
|
+
capturedRequests.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "profiler-no-requests" }, "No requests captured yet. Send a message in the AI chat to see captured requests here.")) : (capturedRequests.map((captured, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: index, className: "profiler-request-container" },
|
|
6185
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "profiler-request-header" },
|
|
6186
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h4", null, capturedRequests.length - index),
|
|
6187
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base profiler-copy-button", onClick: () => copyRequestToClipboard(captured.request) }, "Copy")),
|
|
6188
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", { className: "json-container" }, JSON.stringify(captured.request, null, 2))))))));
|
|
5823
6189
|
};
|
|
5824
6190
|
|
|
5825
6191
|
|
|
5826
6192
|
/***/ }),
|
|
5827
6193
|
|
|
5828
|
-
/***/ "./lib/Extensions/SettingsManager/
|
|
5829
|
-
|
|
5830
|
-
!*** ./lib/Extensions/SettingsManager/
|
|
5831
|
-
|
|
6194
|
+
/***/ "./lib/Extensions/SettingsManager/profiler/ContextManagerSection.js":
|
|
6195
|
+
/*!**************************************************************************!*\
|
|
6196
|
+
!*** ./lib/Extensions/SettingsManager/profiler/ContextManagerSection.js ***!
|
|
6197
|
+
\**************************************************************************/
|
|
5832
6198
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5833
6199
|
|
|
5834
6200
|
__webpack_require__.r(__webpack_exports__);
|
|
5835
6201
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5836
|
-
/* harmony export */
|
|
6202
|
+
/* harmony export */ ContextManagerSection: () => (/* binding */ ContextManagerSection)
|
|
5837
6203
|
/* harmony export */ });
|
|
5838
6204
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5839
6205
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5840
|
-
/* harmony import */ var _RulesForm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RulesForm */ "./lib/Extensions/SettingsManager/rules/RulesForm.js");
|
|
5841
|
-
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
5842
|
-
/* harmony import */ var _utils_fileName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/fileName */ "./lib/utils/fileName.js");
|
|
5843
6206
|
/*
|
|
5844
6207
|
* Copyright (c) Saga Inc.
|
|
5845
6208
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5846
6209
|
*/
|
|
5847
6210
|
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
const
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
const [formError, setFormError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
5860
|
-
const fetchRules = async () => {
|
|
6211
|
+
const ContextManagerSection = ({ contextManager }) => {
|
|
6212
|
+
const [refreshKey, setRefreshKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
6213
|
+
const handleRefreshContextManager = () => {
|
|
6214
|
+
// Force a re-render by toggling the state
|
|
6215
|
+
setRefreshKey(prev => prev + 1);
|
|
6216
|
+
};
|
|
6217
|
+
const copyContextManagerToClipboard = async () => {
|
|
6218
|
+
const jsonContent = JSON.stringify({
|
|
6219
|
+
variables: contextManager.variables,
|
|
6220
|
+
files: contextManager.files
|
|
6221
|
+
}, null, 2);
|
|
5861
6222
|
try {
|
|
5862
|
-
|
|
5863
|
-
|
|
6223
|
+
await navigator.clipboard.writeText(jsonContent);
|
|
6224
|
+
console.log('Context Manager contents copied to clipboard');
|
|
5864
6225
|
}
|
|
5865
6226
|
catch (err) {
|
|
5866
|
-
|
|
6227
|
+
console.error('Failed to copy to clipboard:', err);
|
|
5867
6228
|
}
|
|
5868
6229
|
};
|
|
5869
|
-
(
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
6230
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
6231
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, "Context Manager"),
|
|
6232
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "profiler-button-container" },
|
|
6233
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base", onClick: handleRefreshContextManager }, "Refresh"),
|
|
6234
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base", onClick: copyContextManagerToClipboard }, "Copy")),
|
|
6235
|
+
refreshKey > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-option" },
|
|
6236
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", { className: "json-container" }, JSON.stringify({
|
|
6237
|
+
variables: contextManager.variables,
|
|
6238
|
+
files: contextManager.files
|
|
6239
|
+
}, null, 2))))));
|
|
6240
|
+
};
|
|
6241
|
+
|
|
6242
|
+
|
|
6243
|
+
/***/ }),
|
|
6244
|
+
|
|
6245
|
+
/***/ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js":
|
|
6246
|
+
/*!*****************************************************************!*\
|
|
6247
|
+
!*** ./lib/Extensions/SettingsManager/profiler/ProfilerPage.js ***!
|
|
6248
|
+
\*****************************************************************/
|
|
6249
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6250
|
+
|
|
6251
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6252
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6253
|
+
/* harmony export */ ProfilerPage: () => (/* binding */ ProfilerPage),
|
|
6254
|
+
/* harmony export */ captureCompletionRequest: () => (/* binding */ captureCompletionRequest)
|
|
6255
|
+
/* harmony export */ });
|
|
6256
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
6257
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6258
|
+
/* harmony import */ var _ContextManagerSection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ContextManagerSection */ "./lib/Extensions/SettingsManager/profiler/ContextManagerSection.js");
|
|
6259
|
+
/* harmony import */ var _CapturedRequestsSection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CapturedRequestsSection */ "./lib/Extensions/SettingsManager/profiler/CapturedRequestsSection.js");
|
|
6260
|
+
/* harmony import */ var _utils_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/constants */ "./lib/utils/constants.js");
|
|
6261
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
6262
|
+
/* harmony import */ var _style_ProfilerPage_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/ProfilerPage.css */ "./style/ProfilerPage.css");
|
|
6263
|
+
/*
|
|
6264
|
+
* Copyright (c) Saga Inc.
|
|
6265
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
6266
|
+
*/
|
|
6267
|
+
|
|
6268
|
+
|
|
6269
|
+
|
|
6270
|
+
|
|
6271
|
+
|
|
6272
|
+
|
|
6273
|
+
// Simple event system for capturing completion requests.
|
|
6274
|
+
// These events are usually variables that are not stored in the context manager,
|
|
6275
|
+
// and are created dynamically. So we capture them before they are sent to the backend.
|
|
6276
|
+
const captureCompletionRequest = (request) => {
|
|
6277
|
+
const event = new CustomEvent(_utils_constants__WEBPACK_IMPORTED_MODULE_2__.EVENT_NAMES.MITO_AI_CAPTURE_REQUEST, {
|
|
6278
|
+
detail: {
|
|
6279
|
+
request,
|
|
6280
|
+
}
|
|
6281
|
+
});
|
|
6282
|
+
window.dispatchEvent(event);
|
|
6283
|
+
};
|
|
6284
|
+
const ProfilerPage = ({ contextManager }) => {
|
|
6285
|
+
const [hasAcceptedDisclaimer, setHasAcceptedDisclaimer] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
6286
|
+
// When we first open the page, check if the user has already accepted the disclaimer
|
|
6287
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6288
|
+
const checkDisclaimerStatus = async () => {
|
|
6289
|
+
try {
|
|
6290
|
+
const disclaimerAccepted = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_3__.getSetting)('profiler_disclaimer_accepted');
|
|
6291
|
+
setHasAcceptedDisclaimer(disclaimerAccepted === 'true');
|
|
6292
|
+
}
|
|
6293
|
+
catch (error) {
|
|
6294
|
+
console.error('Error checking disclaimer status:', error);
|
|
6295
|
+
// If there's an error, default to showing the disclaimer
|
|
6296
|
+
setHasAcceptedDisclaimer(false);
|
|
6297
|
+
}
|
|
6298
|
+
};
|
|
6299
|
+
void checkDisclaimerStatus();
|
|
6300
|
+
}, []);
|
|
6301
|
+
const handleAcceptDisclaimer = async () => {
|
|
6302
|
+
try {
|
|
6303
|
+
await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_3__.updateSettings)('profiler_disclaimer_accepted', 'true');
|
|
6304
|
+
setHasAcceptedDisclaimer(true);
|
|
6305
|
+
}
|
|
6306
|
+
catch (error) {
|
|
6307
|
+
console.error('Error accepting disclaimer:', error);
|
|
6308
|
+
}
|
|
6309
|
+
};
|
|
6310
|
+
// Show disclaimer if not yet accepted
|
|
6311
|
+
if (!hasAcceptedDisclaimer) {
|
|
6312
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
6313
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-header" },
|
|
6314
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h2", null, "Profiler")),
|
|
6315
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "The profiler is an internal debugging tool intended for use by the Mito development team. It is not designed, tested, or supported for general usage. Running the profiler may impact performance, produce unstable behavior, or generate incomplete results. Use at your own discretion."),
|
|
6316
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-gray", onClick: handleAcceptDisclaimer }, "Accept")));
|
|
6317
|
+
}
|
|
6318
|
+
// Show the actual profiler content after disclaimer is accepted
|
|
6319
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
6320
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-header" },
|
|
6321
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h2", null, "Profiler")),
|
|
6322
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "profiler-warning" }, "For internal debugging only."),
|
|
6323
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ContextManagerSection__WEBPACK_IMPORTED_MODULE_4__.ContextManagerSection, { contextManager: contextManager }),
|
|
6324
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_CapturedRequestsSection__WEBPACK_IMPORTED_MODULE_5__.CapturedRequestsSection, null)));
|
|
6325
|
+
};
|
|
6326
|
+
|
|
6327
|
+
|
|
6328
|
+
/***/ }),
|
|
6329
|
+
|
|
6330
|
+
/***/ "./lib/Extensions/SettingsManager/rules/RulesForm.js":
|
|
6331
|
+
/*!***********************************************************!*\
|
|
6332
|
+
!*** ./lib/Extensions/SettingsManager/rules/RulesForm.js ***!
|
|
6333
|
+
\***********************************************************/
|
|
6334
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6335
|
+
|
|
6336
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6337
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6338
|
+
/* harmony export */ RulesForm: () => (/* binding */ RulesForm)
|
|
6339
|
+
/* harmony export */ });
|
|
6340
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
6341
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6342
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
6343
|
+
/* harmony import */ var _style_RulesForm_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/RulesForm.css */ "./style/RulesForm.css");
|
|
6344
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/classNames */ "./lib/utils/classNames.js");
|
|
6345
|
+
/*
|
|
6346
|
+
* Copyright (c) Saga Inc.
|
|
6347
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
6348
|
+
*/
|
|
6349
|
+
|
|
6350
|
+
|
|
6351
|
+
|
|
6352
|
+
|
|
6353
|
+
const RulesForm = ({ formData, formError, onInputChange, onSubmit, onClose, isEditing }) => {
|
|
6354
|
+
const [isLoading, setIsLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
6355
|
+
const handleSubmit = async (e) => {
|
|
6356
|
+
e.preventDefault();
|
|
6357
|
+
setIsLoading(true);
|
|
6358
|
+
try {
|
|
6359
|
+
await onSubmit(e);
|
|
6360
|
+
}
|
|
6361
|
+
finally {
|
|
6362
|
+
setIsLoading(false);
|
|
6363
|
+
}
|
|
6364
|
+
};
|
|
6365
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("form", { onSubmit: handleSubmit, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_2__.classNames)("connection-form", "rules-form") },
|
|
6366
|
+
formError && react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "error" }, formError),
|
|
6367
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "form-group" },
|
|
6368
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { htmlFor: "name" }, "Rule Name"),
|
|
6369
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("sub", null,
|
|
6370
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "Rules must contain only alphanumeric characters, underscores, or hyphens.")),
|
|
6371
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", id: "name", name: "name", value: formData.name, onChange: onInputChange, placeholder: "Enter rule name", required: true })),
|
|
6372
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "form-group" },
|
|
6373
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { htmlFor: "description" }, "Rule Content"),
|
|
6374
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { id: "description", name: "description", value: formData.description, onChange: onInputChange, placeholder: "Enter or paste rule content here", rows: 30, required: true, className: "form-textarea" })),
|
|
6375
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "form-actions" },
|
|
6376
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "button", className: "button-base button-gray", onClick: onClose, disabled: isLoading }, "Cancel"),
|
|
6377
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "submit", className: "button-base button-purple", disabled: isLoading }, isLoading ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
6378
|
+
"Saving Rule",
|
|
6379
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { style: { color: 'var(--purple-700)' } },
|
|
6380
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_3__["default"], null)))) : (isEditing ? 'Update Rule' : 'Add Rule')))));
|
|
6381
|
+
};
|
|
6382
|
+
|
|
6383
|
+
|
|
6384
|
+
/***/ }),
|
|
6385
|
+
|
|
6386
|
+
/***/ "./lib/Extensions/SettingsManager/rules/RulesPage.js":
|
|
6387
|
+
/*!***********************************************************!*\
|
|
6388
|
+
!*** ./lib/Extensions/SettingsManager/rules/RulesPage.js ***!
|
|
6389
|
+
\***********************************************************/
|
|
6390
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6391
|
+
|
|
6392
|
+
__webpack_require__.r(__webpack_exports__);
|
|
6393
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6394
|
+
/* harmony export */ RulesPage: () => (/* binding */ RulesPage)
|
|
6395
|
+
/* harmony export */ });
|
|
6396
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
6397
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6398
|
+
/* harmony import */ var _RulesForm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RulesForm */ "./lib/Extensions/SettingsManager/rules/RulesForm.js");
|
|
6399
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
6400
|
+
/* harmony import */ var _utils_fileName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/fileName */ "./lib/utils/fileName.js");
|
|
6401
|
+
/*
|
|
6402
|
+
* Copyright (c) Saga Inc.
|
|
6403
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
6404
|
+
*/
|
|
6405
|
+
|
|
6406
|
+
|
|
6407
|
+
|
|
6408
|
+
|
|
6409
|
+
const RulesPage = () => {
|
|
6410
|
+
const [modalStatus, setModalStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(undefined);
|
|
6411
|
+
const [rules, setRules] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
6412
|
+
const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
6413
|
+
const [formData, setFormData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
|
6414
|
+
name: '',
|
|
6415
|
+
description: ''
|
|
6416
|
+
});
|
|
6417
|
+
const [formError, setFormError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
6418
|
+
const fetchRules = async () => {
|
|
6419
|
+
try {
|
|
6420
|
+
const rules = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__.getRules)();
|
|
6421
|
+
setRules(rules.sort());
|
|
6422
|
+
}
|
|
6423
|
+
catch (err) {
|
|
6424
|
+
setError(err instanceof Error ? err.message : 'An error occurred');
|
|
6425
|
+
}
|
|
6426
|
+
};
|
|
6427
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6428
|
+
void fetchRules();
|
|
6429
|
+
}, []);
|
|
6430
|
+
const handleInputChange = (e) => {
|
|
6431
|
+
const { name, value } = e.target;
|
|
6432
|
+
setFormData(prev => ({ ...prev, [name]: value }));
|
|
6433
|
+
};
|
|
6434
|
+
const handleSubmit = async (e) => {
|
|
6435
|
+
e.preventDefault();
|
|
6436
|
+
// Make sure tha the rule is a valid file name
|
|
5879
6437
|
if (!(0,_utils_fileName__WEBPACK_IMPORTED_MODULE_2__.isValidFileName)(formData.name)) {
|
|
5880
6438
|
setFormError('Invalid rule name. Rules must contain only alphanumeric characters, underscores, or hyphens.');
|
|
5881
6439
|
return;
|
|
@@ -7078,7 +7636,7 @@ const AttachFileButton = ({ onFileUploaded, notebookTracker }) => {
|
|
|
7078
7636
|
}
|
|
7079
7637
|
console.log(`Successfully uploaded all ${totalChunks} chunks for file: ${file.name}`);
|
|
7080
7638
|
// Notify the parent component that the file was uploaded
|
|
7081
|
-
onFileUploaded(file
|
|
7639
|
+
onFileUploaded(file);
|
|
7082
7640
|
};
|
|
7083
7641
|
const uploadChunk = async (chunk, filename, chunkNumber, totalChunks, notebookDir) => {
|
|
7084
7642
|
try {
|
|
@@ -7142,13 +7700,12 @@ const AttachFileButton = ({ onFileUploaded, notebookTracker }) => {
|
|
|
7142
7700
|
autoClose: 5 * 1000 // 5 seconds
|
|
7143
7701
|
});
|
|
7144
7702
|
console.error('Upload failed:', resp.error.message);
|
|
7145
|
-
throw new Error(resp.error.message);
|
|
7146
7703
|
}
|
|
7147
7704
|
else if (resp.data) {
|
|
7148
7705
|
console.log('File uploaded successfully:', resp.data);
|
|
7149
7706
|
// Notify the parent component that the file was uploaded,
|
|
7150
7707
|
// which will update the context manager.
|
|
7151
|
-
onFileUploaded(file
|
|
7708
|
+
onFileUploaded(file);
|
|
7152
7709
|
}
|
|
7153
7710
|
};
|
|
7154
7711
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { style: { position: 'relative' } },
|
|
@@ -7575,9 +8132,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7575
8132
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7576
8133
|
/* harmony import */ var _style_SelectedContextContainer_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/SelectedContextContainer.css */ "./style/SelectedContextContainer.css");
|
|
7577
8134
|
/* harmony import */ var _icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icons/RuleIcon */ "./lib/icons/RuleIcon.js");
|
|
7578
|
-
/* harmony import */ var
|
|
7579
|
-
/* harmony import */ var
|
|
7580
|
-
/* harmony import */ var
|
|
8135
|
+
/* harmony import */ var _icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icons/CodeIcon */ "./lib/icons/CodeIcon.js");
|
|
8136
|
+
/* harmony import */ var _icons_DatabaseIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icons/DatabaseIcon */ "./lib/icons/DatabaseIcon.js");
|
|
8137
|
+
/* harmony import */ var _icons_PhotoIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/PhotoIcon */ "./lib/icons/PhotoIcon.js");
|
|
8138
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/notebook */ "./lib/utils/notebook.js");
|
|
7581
8139
|
/*
|
|
7582
8140
|
* Copyright (c) Saga Inc.
|
|
7583
8141
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -7588,22 +8146,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7588
8146
|
|
|
7589
8147
|
|
|
7590
8148
|
|
|
8149
|
+
|
|
7591
8150
|
const SelectedContextContainer = ({ title, type, onRemove, onClick, notebookTracker, activeCellID }) => {
|
|
7592
8151
|
const [isHovered, setIsHovered] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7593
8152
|
let icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__["default"], null);
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
8153
|
+
if (type.startsWith('image/')) {
|
|
8154
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_PhotoIcon__WEBPACK_IMPORTED_MODULE_3__["default"], null);
|
|
8155
|
+
}
|
|
8156
|
+
else if (type === 'rule') {
|
|
8157
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__["default"], null);
|
|
8158
|
+
}
|
|
8159
|
+
else if (type === 'variable') {
|
|
8160
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
8161
|
+
}
|
|
8162
|
+
else if (type === 'db') {
|
|
8163
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_DatabaseIcon__WEBPACK_IMPORTED_MODULE_5__["default"], null);
|
|
8164
|
+
}
|
|
8165
|
+
else if (type === 'active_cell') {
|
|
8166
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
7607
8167
|
}
|
|
7608
8168
|
const handleClick = () => {
|
|
7609
8169
|
var _a;
|
|
@@ -7611,13 +8171,13 @@ const SelectedContextContainer = ({ title, type, onRemove, onClick, notebookTrac
|
|
|
7611
8171
|
// Handle active cell context click
|
|
7612
8172
|
if (notebookTracker && activeCellID) {
|
|
7613
8173
|
// Find the cell
|
|
7614
|
-
const cell = (0,
|
|
8174
|
+
const cell = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_6__.getCellByID)(notebookTracker, activeCellID);
|
|
7615
8175
|
if (cell) {
|
|
7616
8176
|
// Scroll to the cell
|
|
7617
8177
|
void ((_a = notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.content.scrollToCell(cell, 'center'));
|
|
7618
8178
|
// Highlight the cell
|
|
7619
8179
|
setTimeout(() => {
|
|
7620
|
-
(0,
|
|
8180
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_6__.highlightCodeCell)(notebookTracker, activeCellID);
|
|
7621
8181
|
}, 500);
|
|
7622
8182
|
}
|
|
7623
8183
|
}
|
|
@@ -8185,6 +8745,33 @@ const PencilIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createEle
|
|
|
8185
8745
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PencilIcon);
|
|
8186
8746
|
|
|
8187
8747
|
|
|
8748
|
+
/***/ }),
|
|
8749
|
+
|
|
8750
|
+
/***/ "./lib/icons/PhotoIcon.js":
|
|
8751
|
+
/*!********************************!*\
|
|
8752
|
+
!*** ./lib/icons/PhotoIcon.js ***!
|
|
8753
|
+
\********************************/
|
|
8754
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8755
|
+
|
|
8756
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8757
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8758
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8759
|
+
/* harmony export */ });
|
|
8760
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8761
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8762
|
+
/*
|
|
8763
|
+
* Copyright (c) Saga Inc.
|
|
8764
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8765
|
+
*/
|
|
8766
|
+
|
|
8767
|
+
const PhotoIcon = () => {
|
|
8768
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "14", height: "14", viewBox: "0 0 98 76", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
8769
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: "currentColor" },
|
|
8770
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.85 0.129997H83.15C91.32 0.129997 98 6.82 98 14.98V61.02C98 69.18 91.32 75.87 83.15 75.87H14.85C6.68 75.87 0 69.18 0 61.02V14.98C0 6.82 6.68 0.129997 14.85 0.129997ZM70.01 11.03C74.21 11.03 77.61 14.43 77.61 18.63C77.61 22.83 74.21 26.24 70.01 26.24C65.81 26.24 62.4 22.83 62.4 18.63C62.4 14.43 65.81 11.03 70.01 11.03ZM21.03 52.61L38.48 24.28C39.94 22.6 43.25 22.6 44.71 24.28L56.04 42.66L60.53 35.37C61.57 34.17 63.92 34.17 64.96 35.37L77.35 55.49C79.69 59.29 77.22 63.95 73.08 63.95C57.73 63.95 42.38 63.95 27.03 63.95C21.14 63.95 17.73 57.96 21.03 52.61Z" }))));
|
|
8771
|
+
};
|
|
8772
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PhotoIcon);
|
|
8773
|
+
|
|
8774
|
+
|
|
8188
8775
|
/***/ }),
|
|
8189
8776
|
|
|
8190
8777
|
/***/ "./lib/icons/PlayButtonIcon.js":
|
|
@@ -8365,6 +8952,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8365
8952
|
/* harmony import */ var _Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Extensions/SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
8366
8953
|
/* harmony import */ var _Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Extensions/VersionCheck */ "./lib/Extensions/VersionCheck/index.js");
|
|
8367
8954
|
/* harmony import */ var _Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Extensions/NotebookFooter */ "./lib/Extensions/NotebookFooter/index.js");
|
|
8955
|
+
/* harmony import */ var _Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Extensions/AppManager/ManageAppsPlugin */ "./lib/Extensions/AppManager/ManageAppsPlugin.js");
|
|
8368
8956
|
/*
|
|
8369
8957
|
* Copyright (c) Saga Inc.
|
|
8370
8958
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -8380,6 +8968,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8380
8968
|
|
|
8381
8969
|
|
|
8382
8970
|
|
|
8971
|
+
|
|
8383
8972
|
// This is the main entry point to the mito-ai extension. It must export all of the top level
|
|
8384
8973
|
// extensions that we want to load.
|
|
8385
8974
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([
|
|
@@ -8393,7 +8982,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8393
8982
|
_Extensions_status__WEBPACK_IMPORTED_MODULE_7__.statusItem,
|
|
8394
8983
|
_Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
8395
8984
|
_Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__.versionCheckPlugin,
|
|
8396
|
-
_Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__["default"]
|
|
8985
|
+
_Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__["default"],
|
|
8986
|
+
_Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__["default"]
|
|
8397
8987
|
]);
|
|
8398
8988
|
|
|
8399
8989
|
|
|
@@ -9287,6 +9877,27 @@ const getCodeDiffsAndUnifiedCodeString = (originalCode, modifiedCode) => {
|
|
|
9287
9877
|
};
|
|
9288
9878
|
|
|
9289
9879
|
|
|
9880
|
+
/***/ }),
|
|
9881
|
+
|
|
9882
|
+
/***/ "./lib/utils/constants.js":
|
|
9883
|
+
/*!********************************!*\
|
|
9884
|
+
!*** ./lib/utils/constants.js ***!
|
|
9885
|
+
\********************************/
|
|
9886
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9887
|
+
|
|
9888
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9889
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9890
|
+
/* harmony export */ EVENT_NAMES: () => (/* binding */ EVENT_NAMES)
|
|
9891
|
+
/* harmony export */ });
|
|
9892
|
+
/*
|
|
9893
|
+
* Copyright (c) Saga Inc.
|
|
9894
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9895
|
+
*/
|
|
9896
|
+
const EVENT_NAMES = {
|
|
9897
|
+
MITO_AI_CAPTURE_REQUEST: 'mito-ai-capture-request',
|
|
9898
|
+
};
|
|
9899
|
+
|
|
9900
|
+
|
|
9290
9901
|
/***/ }),
|
|
9291
9902
|
|
|
9292
9903
|
/***/ "./lib/utils/copyToClipboard.js":
|
|
@@ -10748,6 +11359,101 @@ class AppBuilderWebsocketClient extends _BaseWebsocketClient__WEBPACK_IMPORTED_M
|
|
|
10748
11359
|
}
|
|
10749
11360
|
|
|
10750
11361
|
|
|
11362
|
+
/***/ }),
|
|
11363
|
+
|
|
11364
|
+
/***/ "./lib/websockets/appManager/appManagerWebsocketClient.js":
|
|
11365
|
+
/*!****************************************************************!*\
|
|
11366
|
+
!*** ./lib/websockets/appManager/appManagerWebsocketClient.js ***!
|
|
11367
|
+
\****************************************************************/
|
|
11368
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11369
|
+
|
|
11370
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11371
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11372
|
+
/* harmony export */ AppManagerWebsocketClient: () => (/* binding */ AppManagerWebsocketClient)
|
|
11373
|
+
/* harmony export */ });
|
|
11374
|
+
/* harmony import */ var _BaseWebsocketClient__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BaseWebsocketClient */ "./lib/websockets/BaseWebsocketClient.js");
|
|
11375
|
+
/*
|
|
11376
|
+
* Copyright (c) Saga Inc.
|
|
11377
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11378
|
+
*/
|
|
11379
|
+
|
|
11380
|
+
/**
|
|
11381
|
+
* Mito AI app manager client
|
|
11382
|
+
*
|
|
11383
|
+
* It communicates with the backend over a WebSocket for app managing functionality.
|
|
11384
|
+
*/
|
|
11385
|
+
class AppManagerWebsocketClient extends _BaseWebsocketClient__WEBPACK_IMPORTED_MODULE_0__.BaseWebsocketClient {
|
|
11386
|
+
/**
|
|
11387
|
+
* Create a new app manager client.
|
|
11388
|
+
*/
|
|
11389
|
+
constructor(options = {}) {
|
|
11390
|
+
super(options);
|
|
11391
|
+
/**
|
|
11392
|
+
* The service URL for the websocket endpoint.
|
|
11393
|
+
*/
|
|
11394
|
+
this.SERVICE_URL = 'mito-ai/app-manager';
|
|
11395
|
+
}
|
|
11396
|
+
/**
|
|
11397
|
+
* App manager messages stream.
|
|
11398
|
+
*/
|
|
11399
|
+
get messages() {
|
|
11400
|
+
return this._messages;
|
|
11401
|
+
}
|
|
11402
|
+
/**
|
|
11403
|
+
* Stream of connection status events
|
|
11404
|
+
*/
|
|
11405
|
+
get connectionStatus() {
|
|
11406
|
+
return this._connectionStatus;
|
|
11407
|
+
}
|
|
11408
|
+
/**
|
|
11409
|
+
* Get message ID from request (required by BaseWebsocketClient)
|
|
11410
|
+
*/
|
|
11411
|
+
getMessageId(request) {
|
|
11412
|
+
return `${request.type}_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
11413
|
+
}
|
|
11414
|
+
/**
|
|
11415
|
+
* Process a message received from the websocket.
|
|
11416
|
+
* Routes responses to the appropriate pending requests.
|
|
11417
|
+
*/
|
|
11418
|
+
_onMessage(message) {
|
|
11419
|
+
// Emit the message to stream listeners
|
|
11420
|
+
this._messages.emit(message);
|
|
11421
|
+
// Determine which pending request this message belongs to
|
|
11422
|
+
let pendingId = null;
|
|
11423
|
+
let pendingReply = null;
|
|
11424
|
+
const messageId = message.message_id;
|
|
11425
|
+
// First, try to match by message_id
|
|
11426
|
+
if (messageId && this._pendingRepliesMap.has(messageId)) {
|
|
11427
|
+
pendingId = messageId;
|
|
11428
|
+
pendingReply = this._pendingRepliesMap.get(messageId);
|
|
11429
|
+
}
|
|
11430
|
+
// If no message_id, check if this is a response to a single pending request
|
|
11431
|
+
else if (this._pendingRepliesMap.size === 1 && !messageId) {
|
|
11432
|
+
const entries = Array.from(this._pendingRepliesMap.entries());
|
|
11433
|
+
if (entries.length > 0) {
|
|
11434
|
+
const entry = entries[0];
|
|
11435
|
+
if (entry) {
|
|
11436
|
+
pendingId = entry[0];
|
|
11437
|
+
pendingReply = entry[1];
|
|
11438
|
+
}
|
|
11439
|
+
}
|
|
11440
|
+
}
|
|
11441
|
+
// Guard clause - exit if we couldn't find a matching pending request
|
|
11442
|
+
if (!pendingId || !pendingReply) {
|
|
11443
|
+
return;
|
|
11444
|
+
}
|
|
11445
|
+
// Common cleanup and resolution logic
|
|
11446
|
+
this._pendingRepliesMap.delete(pendingId);
|
|
11447
|
+
if (message.error) {
|
|
11448
|
+
pendingReply.reject(new Error(message.error.title || 'Server error'));
|
|
11449
|
+
}
|
|
11450
|
+
else {
|
|
11451
|
+
pendingReply.resolve(message);
|
|
11452
|
+
}
|
|
11453
|
+
}
|
|
11454
|
+
}
|
|
11455
|
+
|
|
11456
|
+
|
|
10751
11457
|
/***/ }),
|
|
10752
11458
|
|
|
10753
11459
|
/***/ "./lib/websockets/completions/CompletionsWebsocketClient.js":
|
|
@@ -11107,90 +11813,281 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
11107
11813
|
color: var(--red-800);
|
|
11108
11814
|
}
|
|
11109
11815
|
|
|
11110
|
-
.chat-message-alert-container.upgrade .alert-action-item {
|
|
11111
|
-
color: var(--purple-800);
|
|
11816
|
+
.chat-message-alert-container.upgrade .alert-action-item {
|
|
11817
|
+
color: var(--purple-800);
|
|
11818
|
+
}
|
|
11819
|
+
|
|
11820
|
+
.action-icon {
|
|
11821
|
+
font-size: 16px;
|
|
11822
|
+
flex-shrink: 0;
|
|
11823
|
+
margin-top: 1px;
|
|
11824
|
+
}
|
|
11825
|
+
|
|
11826
|
+
.details-toggle {
|
|
11827
|
+
display: inline-flex;
|
|
11828
|
+
align-items: center;
|
|
11829
|
+
}
|
|
11830
|
+
|
|
11831
|
+
.toggle-button {
|
|
11832
|
+
background: none;
|
|
11833
|
+
border: none;
|
|
11834
|
+
padding: 0;
|
|
11835
|
+
cursor: pointer;
|
|
11836
|
+
display: flex;
|
|
11837
|
+
align-items: center;
|
|
11838
|
+
gap: 4px;
|
|
11839
|
+
font-size: 12px;
|
|
11840
|
+
font-family: inherit;
|
|
11841
|
+
text-decoration: underline;
|
|
11842
|
+
}
|
|
11843
|
+
|
|
11844
|
+
.chat-message-alert-container.error .toggle-button {
|
|
11845
|
+
color: var(--red-900);
|
|
11846
|
+
}
|
|
11847
|
+
|
|
11848
|
+
.toggle-button:hover {
|
|
11849
|
+
text-decoration: none;
|
|
11850
|
+
}
|
|
11851
|
+
|
|
11852
|
+
.chat-message-alert-container.error .toggle-button:hover {
|
|
11853
|
+
color: var(--red-800);
|
|
11854
|
+
}
|
|
11855
|
+
|
|
11856
|
+
.chat-message-alert-container.upgrade .toggle-button:hover {
|
|
11857
|
+
color: var(--purple-800);
|
|
11858
|
+
}
|
|
11859
|
+
|
|
11860
|
+
.toggle-caret {
|
|
11861
|
+
font-size: 10px;
|
|
11862
|
+
transition: transform 0.2s ease;
|
|
11863
|
+
display: inline-block;
|
|
11864
|
+
text-decoration: none !important;
|
|
11865
|
+
}
|
|
11866
|
+
|
|
11867
|
+
.toggle-caret.open {
|
|
11868
|
+
transform: rotate(180deg);
|
|
11869
|
+
}
|
|
11870
|
+
|
|
11871
|
+
.details-content {
|
|
11872
|
+
margin-top: 8px;
|
|
11873
|
+
margin-left: 16px;
|
|
11874
|
+
padding: 8px;
|
|
11875
|
+
background-color: var(--grey-100);
|
|
11876
|
+
border-radius: 4px;
|
|
11877
|
+
animation: slideDown 0.2s ease-out;
|
|
11878
|
+
}
|
|
11879
|
+
|
|
11880
|
+
@keyframes slideDown {
|
|
11881
|
+
from {
|
|
11882
|
+
opacity: 0;
|
|
11883
|
+
transform: translateY(-4px);
|
|
11884
|
+
}
|
|
11885
|
+
to {
|
|
11886
|
+
opacity: 1;
|
|
11887
|
+
transform: translateY(0);
|
|
11888
|
+
}
|
|
11889
|
+
}
|
|
11890
|
+
|
|
11891
|
+
.secondary-option-link {
|
|
11892
|
+
color: var(--purple-700) !important;
|
|
11893
|
+
text-decoration: underline !important;
|
|
11894
|
+
}
|
|
11895
|
+
|
|
11896
|
+
.secondary-option-link:hover {
|
|
11897
|
+
color: var(--purple-600) !important;
|
|
11898
|
+
}
|
|
11899
|
+
`, "",{"version":3,"sources":["webpack://./style/AlertBlock.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,gCAAgC;AAChC;EACE,aAAa;EACb,sBAAsB;EACtB,SAAS;EACT,kBAAkB;EAClB,aAAa;EACb,iBAAiB;AACnB;;AAEA,2BAA2B;AAC3B;EACE,gCAAgC;EAChC,4BAA4B;EAC5B,qBAAqB;AACvB;;AAEA,qCAAqC;AACrC;EACE,mCAAmC;EACnC,sBAAsB;AACxB;;AAEA;EACE,mCAAmC;EACnC,0BAA0B;AAC5B;;AAEA,uCAAuC;AACvC;EACE,eAAe;EACf,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,iBAAiB;EACjB,eAAe;AACjB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,SAAS;EACT,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,kBAAkB;EAClB,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,uBAAuB;EACvB,QAAQ;EACR,cAAc;EACd,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,eAAe;EACf,cAAc;EACd,eAAe;AACjB;;AAEA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,YAAY;EACZ,UAAU;EACV,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,QAAQ;EACR,eAAe;EACf,oBAAoB;EACpB,0BAA0B;AAC5B;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,eAAe;EACf,+BAA+B;EAC/B,qBAAqB;EACrB,gCAAgC;AAClC;;AAEA;EACE,yBAAyB;AAC3B;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,iCAAiC;EACjC,kBAAkB;EAClB,kCAAkC;AACpC;;AAEA;EACE;IACE,UAAU;IACV,2BAA2B;EAC7B;EACA;IACE,UAAU;IACV,wBAAwB;EAC1B;AACF;;AAEA;IACI,mCAAmC;IACnC,qCAAqC;AACzC;;AAEA;IACI,mCAAmC;AACvC","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* Base alert container styles */\n.chat-message-alert-container {\n display: flex;\n flex-direction: column;\n gap: 10px;\n border-radius: 5px;\n padding: 10px;\n border: 1px solid;\n}\n\n/* Red variant for errors */\n.chat-message-alert-container.error {\n background-color: var(--red-300);\n border-color: var(--red-900);\n color: var(--red-900);\n}\n\n/* Purple variant for upgrades/CTAs */\n.chat-message-alert-container.upgrade {\n background-color: var(--purple-300);\n color: var(--grey-900);\n}\n\n.chat-message-alert a {\n color: var(--purple-700) !important;\n text-decoration: underline;\n}\n\n/* Error message styles - red variant */\n.alert-error-message {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.4;\n margin-bottom: 8px;\n}\n\n.chat-message-alert-container.error .alert-error-message {\n color: var(--red-900);\n}\n\n.alert-actions-header {\n margin-bottom: 12px;\n}\n\n.alert-actions-title {\n font-weight: 500;\n margin: 0 0 8px 0;\n font-size: 13px;\n}\n\n.chat-message-alert-container.error .alert-actions-title {\n color: var(--red-900);\n}\n\n.alert-actions-list {\n margin: 0;\n padding-left: 16px;\n}\n\n.chat-message-alert-container.error .alert-actions-list {\n color: var(--red-800);\n}\n\n.chat-message-alert-container.upgrade .alert-actions-list {\n color: var(--purple-800);\n}\n\n.alert-actions-list li {\n margin-bottom: 4px;\n font-size: 13px;\n line-height: 1.4;\n}\n\n.alert-action-item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 0;\n font-size: 13px;\n line-height: 1.4;\n}\n\n.chat-message-alert-container.error .alert-action-item {\n color: var(--red-800);\n}\n\n.chat-message-alert-container.upgrade .alert-action-item {\n color: var(--purple-800);\n}\n\n.action-icon {\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.details-toggle {\n display: inline-flex;\n align-items: center;\n}\n\n.toggle-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-family: inherit;\n text-decoration: underline;\n}\n\n.chat-message-alert-container.error .toggle-button {\n color: var(--red-900);\n}\n\n.toggle-button:hover {\n text-decoration: none;\n}\n\n.chat-message-alert-container.error .toggle-button:hover {\n color: var(--red-800);\n}\n\n.chat-message-alert-container.upgrade .toggle-button:hover {\n color: var(--purple-800);\n}\n\n.toggle-caret {\n font-size: 10px;\n transition: transform 0.2s ease;\n display: inline-block;\n text-decoration: none !important;\n}\n\n.toggle-caret.open {\n transform: rotate(180deg);\n}\n\n.details-content {\n margin-top: 8px;\n margin-left: 16px;\n padding: 8px;\n background-color: var(--grey-100);\n border-radius: 4px;\n animation: slideDown 0.2s ease-out;\n}\n\n@keyframes slideDown {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.secondary-option-link {\n color: var(--purple-700) !important;\n text-decoration: underline !important;\n}\n\n.secondary-option-link:hover {\n color: var(--purple-600) !important;\n}\n"],"sourceRoot":""}]);
|
|
11900
|
+
// Exports
|
|
11901
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
11902
|
+
|
|
11903
|
+
|
|
11904
|
+
/***/ }),
|
|
11905
|
+
|
|
11906
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/AppsList.css":
|
|
11907
|
+
/*!******************************************************************!*\
|
|
11908
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/AppsList.css ***!
|
|
11909
|
+
\******************************************************************/
|
|
11910
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
11911
|
+
|
|
11912
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11913
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11914
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11915
|
+
/* harmony export */ });
|
|
11916
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
11917
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
11918
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
11919
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
11920
|
+
// Imports
|
|
11921
|
+
|
|
11922
|
+
|
|
11923
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
11924
|
+
// Module
|
|
11925
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
11926
|
+
* Copyright (c) Saga Inc.
|
|
11927
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11928
|
+
*/
|
|
11929
|
+
|
|
11930
|
+
/* apps-list.css */
|
|
11931
|
+
.apps-list-container {
|
|
11932
|
+
padding: 16px;
|
|
11933
|
+
font-size: 13px;
|
|
11934
|
+
font-family: var(--jp-ui-font-family);
|
|
11935
|
+
}
|
|
11936
|
+
|
|
11937
|
+
.apps-list-header {
|
|
11938
|
+
display: flex;
|
|
11939
|
+
justify-content: space-between;
|
|
11940
|
+
align-items: center;
|
|
11941
|
+
margin-bottom: 16px;
|
|
11942
|
+
}
|
|
11943
|
+
|
|
11944
|
+
.apps-list-title {
|
|
11945
|
+
margin: 0;
|
|
11946
|
+
font-size: 14px;
|
|
11947
|
+
font-weight: bold;
|
|
11948
|
+
color: var(--jp-ui-font-color1);
|
|
11949
|
+
}
|
|
11950
|
+
|
|
11951
|
+
.apps-list-actions {
|
|
11952
|
+
display: flex;
|
|
11953
|
+
gap: 8px;
|
|
11954
|
+
}
|
|
11955
|
+
|
|
11956
|
+
.apps-list-button {
|
|
11957
|
+
padding: 4px 8px;
|
|
11958
|
+
font-size: 11px;
|
|
11959
|
+
background-color: transparent;
|
|
11960
|
+
color: var(--jp-ui-font-color2);
|
|
11961
|
+
border: 1px solid var(--jp-border-color2);
|
|
11962
|
+
border-radius: 3px;
|
|
11963
|
+
cursor: pointer;
|
|
11964
|
+
font-weight: normal;
|
|
11965
|
+
transition: background-color 0.2s ease;
|
|
11966
|
+
}
|
|
11967
|
+
|
|
11968
|
+
.apps-list-button:hover {
|
|
11969
|
+
background-color: var(--jp-layout-color2);
|
|
11970
|
+
}
|
|
11971
|
+
|
|
11972
|
+
.apps-list-button:disabled {
|
|
11973
|
+
cursor: not-allowed;
|
|
11974
|
+
}
|
|
11975
|
+
|
|
11976
|
+
.apps-list-button.primary {
|
|
11977
|
+
background-color: var(--jp-brand-color1);
|
|
11978
|
+
color: white;
|
|
11979
|
+
border: none;
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11982
|
+
.apps-list-loading {
|
|
11983
|
+
color: var(--jp-ui-font-color2);
|
|
11984
|
+
text-align: center;
|
|
11985
|
+
padding: 20px 0;
|
|
11986
|
+
}
|
|
11987
|
+
|
|
11988
|
+
.apps-list-error {
|
|
11989
|
+
color: #f44336;
|
|
11990
|
+
text-align: center;
|
|
11991
|
+
padding: 20px 0;
|
|
11992
|
+
background-color: var(--jp-layout-color1);
|
|
11993
|
+
border: 1px solid #f44336;
|
|
11994
|
+
border-radius: 4px;
|
|
11995
|
+
}
|
|
11996
|
+
|
|
11997
|
+
.apps-list-error-actions {
|
|
11998
|
+
margin-top: 8px;
|
|
11112
11999
|
}
|
|
11113
12000
|
|
|
11114
|
-
.
|
|
11115
|
-
font-
|
|
11116
|
-
|
|
11117
|
-
|
|
12001
|
+
.apps-list-empty {
|
|
12002
|
+
color: var(--jp-ui-font-color2);
|
|
12003
|
+
text-align: center;
|
|
12004
|
+
padding: 20px 0;
|
|
11118
12005
|
}
|
|
11119
12006
|
|
|
11120
|
-
.
|
|
11121
|
-
|
|
11122
|
-
|
|
12007
|
+
.app-item {
|
|
12008
|
+
border: 1px solid var(--jp-border-color1);
|
|
12009
|
+
border-radius: 4px;
|
|
12010
|
+
padding: 12px;
|
|
12011
|
+
margin-bottom: 8px;
|
|
12012
|
+
background-color: var(--jp-layout-color0);
|
|
11123
12013
|
}
|
|
11124
12014
|
|
|
11125
|
-
.
|
|
11126
|
-
background: none;
|
|
11127
|
-
border: none;
|
|
11128
|
-
padding: 0;
|
|
11129
|
-
cursor: pointer;
|
|
12015
|
+
.app-item-header {
|
|
11130
12016
|
display: flex;
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
font-family: inherit;
|
|
11135
|
-
text-decoration: underline;
|
|
12017
|
+
justify-content: space-between;
|
|
12018
|
+
align-items: flex-start;
|
|
12019
|
+
margin-bottom: 8px;
|
|
11136
12020
|
}
|
|
11137
12021
|
|
|
11138
|
-
.
|
|
11139
|
-
|
|
12022
|
+
.app-item-content {
|
|
12023
|
+
flex: 1;
|
|
11140
12024
|
}
|
|
11141
12025
|
|
|
11142
|
-
.
|
|
11143
|
-
|
|
12026
|
+
.app-item-name {
|
|
12027
|
+
font-weight: bold;
|
|
12028
|
+
color: var(--jp-ui-font-color1);
|
|
12029
|
+
margin-bottom: 4px;
|
|
11144
12030
|
}
|
|
11145
12031
|
|
|
11146
|
-
.
|
|
11147
|
-
|
|
12032
|
+
.app-item-status-container {
|
|
12033
|
+
display: flex;
|
|
12034
|
+
align-items: center;
|
|
12035
|
+
margin-bottom: 4px;
|
|
11148
12036
|
}
|
|
11149
12037
|
|
|
11150
|
-
.
|
|
11151
|
-
|
|
12038
|
+
.app-item-status-indicator {
|
|
12039
|
+
display: inline-block;
|
|
12040
|
+
width: 8px;
|
|
12041
|
+
height: 8px;
|
|
12042
|
+
border-radius: 50%;
|
|
12043
|
+
margin-right: 6px;
|
|
11152
12044
|
}
|
|
11153
12045
|
|
|
11154
|
-
.
|
|
11155
|
-
font-
|
|
11156
|
-
|
|
11157
|
-
display: inline-block;
|
|
11158
|
-
text-decoration: none !important;
|
|
12046
|
+
.app-item-status-text {
|
|
12047
|
+
color: var(--jp-ui-font-color2);
|
|
12048
|
+
font-size: 12px;
|
|
11159
12049
|
}
|
|
11160
12050
|
|
|
11161
|
-
.
|
|
11162
|
-
|
|
12051
|
+
.app-item-last-deployed {
|
|
12052
|
+
color: var(--jp-ui-font-color2);
|
|
12053
|
+
font-size: 11px;
|
|
11163
12054
|
}
|
|
11164
12055
|
|
|
11165
|
-
.
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
border-radius:
|
|
11171
|
-
|
|
12056
|
+
.app-item-url-container {
|
|
12057
|
+
display: flex;
|
|
12058
|
+
align-items: center;
|
|
12059
|
+
background-color: var(--jp-layout-color1);
|
|
12060
|
+
border: 1px solid var(--jp-border-color2);
|
|
12061
|
+
border-radius: 3px;
|
|
12062
|
+
padding: 6px 8px;
|
|
11172
12063
|
}
|
|
11173
12064
|
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
}
|
|
12065
|
+
.app-item-url {
|
|
12066
|
+
flex: 1;
|
|
12067
|
+
color: var(--jp-ui-font-color1);
|
|
12068
|
+
font-size: 11px;
|
|
12069
|
+
overflow: hidden;
|
|
12070
|
+
text-overflow: ellipsis;
|
|
12071
|
+
white-space: nowrap;
|
|
12072
|
+
font-family: var(--jp-code-font-family);
|
|
11183
12073
|
}
|
|
11184
12074
|
|
|
11185
|
-
.
|
|
11186
|
-
|
|
11187
|
-
|
|
12075
|
+
.app-item-copy-button {
|
|
12076
|
+
border: none;
|
|
12077
|
+
background: transparent;
|
|
12078
|
+
cursor: pointer;
|
|
12079
|
+
padding: 2px;
|
|
12080
|
+
display: flex;
|
|
12081
|
+
align-items: center;
|
|
12082
|
+
justify-content: center;
|
|
12083
|
+
margin-left: 8px;
|
|
12084
|
+
border-radius: 2px;
|
|
11188
12085
|
}
|
|
11189
12086
|
|
|
11190
|
-
.
|
|
11191
|
-
|
|
12087
|
+
.app-item-copy-button:hover {
|
|
12088
|
+
background-color: var(--jp-layout-color2);
|
|
11192
12089
|
}
|
|
11193
|
-
`, "",{"version":3,"sources":["webpack://./style/
|
|
12090
|
+
`, "",{"version":3,"sources":["webpack://./style/AppsList.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,kBAAkB;AAClB;EACE,aAAa;EACb,eAAe;EACf,qCAAqC;AACvC;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,mBAAmB;AACrB;;AAEA;EACE,SAAS;EACT,eAAe;EACf,iBAAiB;EACjB,+BAA+B;AACjC;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,6BAA6B;EAC7B,+BAA+B;EAC/B,yCAAyC;EACzC,kBAAkB;EAClB,eAAe;EACf,mBAAmB;EACnB,sCAAsC;AACxC;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,+BAA+B;EAC/B,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,eAAe;EACf,yCAAyC;EACzC,yBAAyB;EACzB,kBAAkB;AACpB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,+BAA+B;EAC/B,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,yCAAyC;EACzC,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,yCAAyC;AAC3C;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,uBAAuB;EACvB,kBAAkB;AACpB;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,iBAAiB;EACjB,+BAA+B;EAC/B,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;EACrB,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,iBAAiB;AACnB;;AAEA;EACE,+BAA+B;EAC/B,eAAe;AACjB;;AAEA;EACE,+BAA+B;EAC/B,eAAe;AACjB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,OAAO;EACP,+BAA+B;EAC/B,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;EACnB,uCAAuC;AACzC;;AAEA;EACE,YAAY;EACZ,uBAAuB;EACvB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;EACE,yCAAyC;AAC3C","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* apps-list.css */\n.apps-list-container {\n padding: 16px;\n font-size: 13px;\n font-family: var(--jp-ui-font-family);\n}\n\n.apps-list-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n}\n\n.apps-list-title {\n margin: 0;\n font-size: 14px;\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n}\n\n.apps-list-actions {\n display: flex;\n gap: 8px;\n}\n\n.apps-list-button {\n padding: 4px 8px;\n font-size: 11px;\n background-color: transparent;\n color: var(--jp-ui-font-color2);\n border: 1px solid var(--jp-border-color2);\n border-radius: 3px;\n cursor: pointer;\n font-weight: normal;\n transition: background-color 0.2s ease;\n}\n\n.apps-list-button:hover {\n background-color: var(--jp-layout-color2);\n}\n\n.apps-list-button:disabled {\n cursor: not-allowed;\n}\n\n.apps-list-button.primary {\n background-color: var(--jp-brand-color1);\n color: white;\n border: none;\n}\n\n.apps-list-loading {\n color: var(--jp-ui-font-color2);\n text-align: center;\n padding: 20px 0;\n}\n\n.apps-list-error {\n color: #f44336;\n text-align: center;\n padding: 20px 0;\n background-color: var(--jp-layout-color1);\n border: 1px solid #f44336;\n border-radius: 4px;\n}\n\n.apps-list-error-actions {\n margin-top: 8px;\n}\n\n.apps-list-empty {\n color: var(--jp-ui-font-color2);\n text-align: center;\n padding: 20px 0;\n}\n\n.app-item {\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n padding: 12px;\n margin-bottom: 8px;\n background-color: var(--jp-layout-color0);\n}\n\n.app-item-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n}\n\n.app-item-content {\n flex: 1;\n}\n\n.app-item-name {\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n margin-bottom: 4px;\n}\n\n.app-item-status-container {\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.app-item-status-indicator {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n margin-right: 6px;\n}\n\n.app-item-status-text {\n color: var(--jp-ui-font-color2);\n font-size: 12px;\n}\n\n.app-item-last-deployed {\n color: var(--jp-ui-font-color2);\n font-size: 11px;\n}\n\n.app-item-url-container {\n display: flex;\n align-items: center;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 3px;\n padding: 6px 8px;\n}\n\n.app-item-url {\n flex: 1;\n color: var(--jp-ui-font-color1);\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--jp-code-font-family);\n}\n\n.app-item-copy-button {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 8px;\n border-radius: 2px;\n}\n\n.app-item-copy-button:hover {\n background-color: var(--jp-layout-color2);\n}\n"],"sourceRoot":""}]);
|
|
11194
12091
|
// Exports
|
|
11195
12092
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
11196
12093
|
|
|
@@ -14160,6 +15057,78 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14160
15057
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
14161
15058
|
|
|
14162
15059
|
|
|
15060
|
+
/***/ }),
|
|
15061
|
+
|
|
15062
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ProfilerPage.css":
|
|
15063
|
+
/*!**********************************************************************!*\
|
|
15064
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/ProfilerPage.css ***!
|
|
15065
|
+
\**********************************************************************/
|
|
15066
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
15067
|
+
|
|
15068
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15069
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15070
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15071
|
+
/* harmony export */ });
|
|
15072
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
15073
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
15074
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
15075
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
15076
|
+
// Imports
|
|
15077
|
+
|
|
15078
|
+
|
|
15079
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
15080
|
+
// Module
|
|
15081
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
15082
|
+
* Copyright (c) Saga Inc.
|
|
15083
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
15084
|
+
*/
|
|
15085
|
+
|
|
15086
|
+
.profiler-warning {
|
|
15087
|
+
color: red;
|
|
15088
|
+
}
|
|
15089
|
+
|
|
15090
|
+
.profiler-button-container {
|
|
15091
|
+
display: flex;
|
|
15092
|
+
gap: 10px;
|
|
15093
|
+
margin-bottom: 10px;
|
|
15094
|
+
}
|
|
15095
|
+
|
|
15096
|
+
.json-container {
|
|
15097
|
+
overflow-y: auto;
|
|
15098
|
+
padding: 10px;
|
|
15099
|
+
background-color: var(--jp-input-background);
|
|
15100
|
+
}
|
|
15101
|
+
|
|
15102
|
+
.profiler-clear-button {
|
|
15103
|
+
margin-bottom: 10px;
|
|
15104
|
+
}
|
|
15105
|
+
|
|
15106
|
+
.profiler-no-requests {
|
|
15107
|
+
color: #666;
|
|
15108
|
+
font-style: italic;
|
|
15109
|
+
}
|
|
15110
|
+
|
|
15111
|
+
.profiler-request-container {
|
|
15112
|
+
margin-bottom: 20px;
|
|
15113
|
+
}
|
|
15114
|
+
|
|
15115
|
+
.profiler-request-header {
|
|
15116
|
+
display: flex;
|
|
15117
|
+
justify-content: space-between;
|
|
15118
|
+
align-items: center;
|
|
15119
|
+
margin-bottom: 5px;
|
|
15120
|
+
}
|
|
15121
|
+
|
|
15122
|
+
.profiler-copy-button {
|
|
15123
|
+
font-size: 12px;
|
|
15124
|
+
padding: 4px 8px;
|
|
15125
|
+
}
|
|
15126
|
+
|
|
15127
|
+
`, "",{"version":3,"sources":["webpack://./style/ProfilerPage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,UAAU;AACd;;AAEA;IACI,aAAa;IACb,SAAS;IACT,mBAAmB;AACvB;;AAEA;IACI,gBAAgB;IAChB,aAAa;IACb,4CAA4C;AAChD;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,WAAW;IACX,kBAAkB;AACtB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,gBAAgB;AACpB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.profiler-warning {\n color: red;\n}\n\n.profiler-button-container {\n display: flex;\n gap: 10px;\n margin-bottom: 10px;\n}\n\n.json-container {\n overflow-y: auto;\n padding: 10px;\n background-color: var(--jp-input-background);\n}\n\n.profiler-clear-button {\n margin-bottom: 10px;\n}\n\n.profiler-no-requests {\n color: #666;\n font-style: italic;\n}\n\n.profiler-request-container {\n margin-bottom: 20px;\n}\n\n.profiler-request-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 5px;\n}\n\n.profiler-copy-button {\n font-size: 12px;\n padding: 4px 8px;\n}\n\n"],"sourceRoot":""}]);
|
|
15128
|
+
// Exports
|
|
15129
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
15130
|
+
|
|
15131
|
+
|
|
14163
15132
|
/***/ }),
|
|
14164
15133
|
|
|
14165
15134
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/PythonCode.css":
|
|
@@ -15157,6 +16126,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
15157
16126
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_AlertBlock_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_AlertBlock_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_AlertBlock_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
15158
16127
|
|
|
15159
16128
|
|
|
16129
|
+
/***/ }),
|
|
16130
|
+
|
|
16131
|
+
/***/ "./style/AppsList.css":
|
|
16132
|
+
/*!****************************!*\
|
|
16133
|
+
!*** ./style/AppsList.css ***!
|
|
16134
|
+
\****************************/
|
|
16135
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16136
|
+
|
|
16137
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16138
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16139
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16140
|
+
/* harmony export */ });
|
|
16141
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
16142
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
16143
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
|
16144
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
16145
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
|
16146
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
16147
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
|
16148
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
16149
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
|
16150
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
16151
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
|
16152
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
16153
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./AppsList.css */ "./node_modules/css-loader/dist/cjs.js!./style/AppsList.css");
|
|
16154
|
+
|
|
16155
|
+
|
|
16156
|
+
|
|
16157
|
+
|
|
16158
|
+
|
|
16159
|
+
|
|
16160
|
+
|
|
16161
|
+
|
|
16162
|
+
|
|
16163
|
+
|
|
16164
|
+
|
|
16165
|
+
var options = {};
|
|
16166
|
+
|
|
16167
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
16168
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
16169
|
+
|
|
16170
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
16171
|
+
|
|
16172
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
16173
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
16174
|
+
|
|
16175
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
16176
|
+
|
|
16177
|
+
|
|
16178
|
+
|
|
16179
|
+
|
|
16180
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
16181
|
+
|
|
16182
|
+
|
|
15160
16183
|
/***/ }),
|
|
15161
16184
|
|
|
15162
16185
|
/***/ "./style/AssumptionTool.css":
|
|
@@ -16183,6 +17206,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
16183
17206
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_NotebookFooter_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_NotebookFooter_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_NotebookFooter_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
16184
17207
|
|
|
16185
17208
|
|
|
17209
|
+
/***/ }),
|
|
17210
|
+
|
|
17211
|
+
/***/ "./style/ProfilerPage.css":
|
|
17212
|
+
/*!********************************!*\
|
|
17213
|
+
!*** ./style/ProfilerPage.css ***!
|
|
17214
|
+
\********************************/
|
|
17215
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17216
|
+
|
|
17217
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17218
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17219
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17220
|
+
/* harmony export */ });
|
|
17221
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
17222
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
17223
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
|
17224
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
17225
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
|
17226
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
17227
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
|
17228
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
17229
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
|
17230
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
17231
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
|
17232
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
17233
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ProfilerPage_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./ProfilerPage.css */ "./node_modules/css-loader/dist/cjs.js!./style/ProfilerPage.css");
|
|
17234
|
+
|
|
17235
|
+
|
|
17236
|
+
|
|
17237
|
+
|
|
17238
|
+
|
|
17239
|
+
|
|
17240
|
+
|
|
17241
|
+
|
|
17242
|
+
|
|
17243
|
+
|
|
17244
|
+
|
|
17245
|
+
var options = {};
|
|
17246
|
+
|
|
17247
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
17248
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
17249
|
+
|
|
17250
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
17251
|
+
|
|
17252
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
17253
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
17254
|
+
|
|
17255
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_ProfilerPage_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
17256
|
+
|
|
17257
|
+
|
|
17258
|
+
|
|
17259
|
+
|
|
17260
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ProfilerPage_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_ProfilerPage_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_ProfilerPage_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
17261
|
+
|
|
17262
|
+
|
|
16186
17263
|
/***/ }),
|
|
16187
17264
|
|
|
16188
17265
|
/***/ "./style/PythonCode.css":
|
|
@@ -16672,4 +17749,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
16672
17749
|
/***/ })
|
|
16673
17750
|
|
|
16674
17751
|
}]);
|
|
16675
|
-
//# sourceMappingURL=lib_index_js.
|
|
17752
|
+
//# sourceMappingURL=lib_index_js.81703ac2bc645e5c2fc2.js.map
|