mito-ai 0.1.54__py3-none-any.whl → 0.1.55__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.
- mito_ai/_version.py +1 -1
- mito_ai/completions/prompt_builders/agent_system_message.py +15 -5
- mito_ai/completions/prompt_builders/chat_system_message.py +17 -2
- mito_ai/completions/prompt_builders/prompt_constants.py +22 -0
- mito_ai/completions/prompt_builders/utils.py +7 -0
- mito_ai/utils/open_ai_utils.py +3 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +147 -102
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/package.json +3 -2
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +3 -2
- mito_ai-0.1.54.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.31462f8f6a76b1cefbeb.js → mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.49c79c62671528877c61.js +2351 -501
- mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.49c79c62671528877c61.js.map +1 -0
- mito_ai-0.1.54.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.3f3c98eaba66bf084c66.js → mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.9dfbffc3592eb6f0aef9.js +21 -19
- mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.9dfbffc3592eb6f0aef9.js.map +1 -0
- mito_ai-0.1.54.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js → mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.f5d476ac514294615881.js +15 -7
- mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.f5d476ac514294615881.js.map +1 -0
- mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/themes/mito_ai/index.css +708 -0
- mito_ai-0.1.55.data/data/share/jupyter/labextensions/mito_ai/themes/mito_ai/index.js +0 -0
- {mito_ai-0.1.54.dist-info → mito_ai-0.1.55.dist-info}/METADATA +1 -1
- {mito_ai-0.1.54.dist-info → mito_ai-0.1.55.dist-info}/RECORD +41 -39
- mito_ai-0.1.54.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.31462f8f6a76b1cefbeb.js.map +0 -1
- mito_ai-0.1.54.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.3f3c98eaba66bf084c66.js.map +0 -1
- mito_ai-0.1.54.data/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +0 -1
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.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 +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.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 +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js.map +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.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.54.data → mito_ai-0.1.55.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.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js.map +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.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 +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.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 +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.54.data → mito_ai-0.1.55.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.54.dist-info → mito_ai-0.1.55.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.54.dist-info → mito_ai-0.1.55.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.54.dist-info → mito_ai-0.1.55.dist-info}/licenses/LICENSE +0 -0
|
@@ -898,13 +898,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
898
898
|
/* harmony export */ });
|
|
899
899
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
900
900
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
901
|
-
/* harmony import */ var
|
|
902
|
-
/* harmony import */ var
|
|
901
|
+
/* harmony import */ var _PythonCode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PythonCode */ "./lib/Extensions/AiChat/ChatMessage/PythonCode.js");
|
|
902
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/classNames */ "./lib/utils/classNames.js");
|
|
903
903
|
/* harmony import */ var _style_CodeBlock_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/CodeBlock.css */ "./style/CodeBlock.css");
|
|
904
904
|
/* harmony import */ var _style_AgentComponentHeader_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../style/AgentComponentHeader.css */ "./style/AgentComponentHeader.css");
|
|
905
|
-
/* harmony import */ var
|
|
906
|
-
/* harmony import */ var
|
|
907
|
-
/* harmony import */ var
|
|
905
|
+
/* harmony import */ var _icons_CodeIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../icons/CodeIcon */ "./lib/icons/CodeIcon.js");
|
|
906
|
+
/* harmony import */ var _CodeBlockToolbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CodeBlockToolbar */ "./lib/Extensions/AiChat/ChatMessage/CodeBlockToolbar.js");
|
|
907
|
+
/* harmony import */ var _components_AgentComponents_AgentComponentHeader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../components/AgentComponents/AgentComponentHeader */ "./lib/components/AgentComponents/AgentComponentHeader.js");
|
|
908
|
+
/* harmony import */ var _icons_GoToCellIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../icons/GoToCellIcon */ "./lib/icons/GoToCellIcon.js");
|
|
909
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
908
910
|
/*
|
|
909
911
|
* Copyright (c) Saga Inc.
|
|
910
912
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -917,21 +919,37 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
917
919
|
|
|
918
920
|
|
|
919
921
|
|
|
920
|
-
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
const AssistantCodeBlock = ({ code, codeSummary, isCodeComplete, renderMimeRegistry, previewAICode, acceptAICode, rejectAICode, isLastAiMessage, codeReviewStatus, agentModeEnabled, isErrorFixup, cellId, notebookPanel, }) => {
|
|
921
925
|
const [isCodeExpanded, setIsCodeExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
922
926
|
const shouldShowToolbar = isLastAiMessage || isCodeComplete;
|
|
927
|
+
const handleGoToCell = (e) => {
|
|
928
|
+
e.stopPropagation();
|
|
929
|
+
if (cellId && notebookPanel) {
|
|
930
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.setActiveCellByIDInNotebookPanel)(notebookPanel, cellId);
|
|
931
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.scrollToCell)(notebookPanel, cellId, undefined, 'center');
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
const renderActionButtons = () => {
|
|
935
|
+
if (!cellId || !notebookPanel) {
|
|
936
|
+
return null;
|
|
937
|
+
}
|
|
938
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "agent-component-header-action-button", onClick: handleGoToCell, title: "Go to cell" },
|
|
939
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_GoToCellIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null)));
|
|
940
|
+
};
|
|
923
941
|
if (agentModeEnabled) {
|
|
924
942
|
// Handle regular code blocks
|
|
925
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,
|
|
943
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)('code-block-container', 'agent-mode', {
|
|
926
944
|
'agent-mode-collapsed': !isCodeExpanded,
|
|
927
945
|
}) },
|
|
928
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
929
|
-
isCodeExpanded && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
946
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_AgentComponentHeader__WEBPACK_IMPORTED_MODULE_6__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_7__["default"], null), text: codeSummary !== null && codeSummary !== void 0 ? codeSummary : 'Generated code', onClick: () => setIsCodeExpanded(!isCodeExpanded), isExpanded: isCodeExpanded, displayBorder: !isErrorFixup, className: isErrorFixup ? 'error-fixup' : undefined, actionButtons: renderActionButtons() }),
|
|
947
|
+
isCodeExpanded && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_PythonCode__WEBPACK_IMPORTED_MODULE_8__["default"], { code: code, renderMimeRegistry: renderMimeRegistry }))));
|
|
930
948
|
}
|
|
931
949
|
else {
|
|
932
950
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "code-block-container" },
|
|
933
|
-
shouldShowToolbar && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
934
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
951
|
+
shouldShowToolbar && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_CodeBlockToolbar__WEBPACK_IMPORTED_MODULE_9__["default"], { code: code, isLastAiMessage: isLastAiMessage, codeReviewStatus: codeReviewStatus, onPreview: previewAICode, onAccept: acceptAICode, onReject: rejectAICode })),
|
|
952
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_PythonCode__WEBPACK_IMPORTED_MODULE_8__["default"], { code: code, renderMimeRegistry: renderMimeRegistry })));
|
|
935
953
|
}
|
|
936
954
|
};
|
|
937
955
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AssistantCodeBlock);
|
|
@@ -952,7 +970,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
952
970
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
953
971
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
954
972
|
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
955
|
-
/* harmony import */ var
|
|
973
|
+
/* harmony import */ var _ChatDropdownItems__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ChatDropdownItems */ "./lib/Extensions/AiChat/ChatMessage/ChatDropdownItems.js");
|
|
974
|
+
/* harmony import */ var _utils_cellReferences__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/cellReferences */ "./lib/utils/cellReferences.js");
|
|
956
975
|
/*
|
|
957
976
|
* Copyright (c) Saga Inc.
|
|
958
977
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -960,6 +979,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
960
979
|
|
|
961
980
|
|
|
962
981
|
|
|
982
|
+
|
|
963
983
|
const priortizeByType = (options, maxPerType) => {
|
|
964
984
|
/*
|
|
965
985
|
Makes sure that some of each type are displayed at the top of the dropdown so
|
|
@@ -982,7 +1002,7 @@ const priortizeByType = (options, maxPerType) => {
|
|
|
982
1002
|
// Return prioritized options first, then extras at the bottom
|
|
983
1003
|
return [...prioritizedOptions, ...extraOptions];
|
|
984
1004
|
};
|
|
985
|
-
const ChatDropdown = ({ options, onSelect, filterText, isDropdownFromButton = false, onFilterChange, onClose, }) => {
|
|
1005
|
+
const ChatDropdown = ({ options, onSelect, filterText, isDropdownFromButton = false, onFilterChange, onClose, notebookTracker, }) => {
|
|
986
1006
|
const [selectedIndex, setSelectedIndex] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
987
1007
|
const [localFilterText, setLocalFilterText] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(filterText);
|
|
988
1008
|
const searchInputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
@@ -1008,16 +1028,28 @@ const ChatDropdown = ({ options, onSelect, filterText, isDropdownFromButton = fa
|
|
|
1008
1028
|
}, [isDropdownFromButton]);
|
|
1009
1029
|
// Use local filter text when search input is shown, otherwise use prop
|
|
1010
1030
|
const effectiveFilterText = isDropdownFromButton ? localFilterText : filterText;
|
|
1031
|
+
// Get cell references if notebook tracker is available
|
|
1032
|
+
const cellReferences = (notebookTracker === null || notebookTracker === void 0 ? void 0 : notebookTracker.currentWidget)
|
|
1033
|
+
? (0,_utils_cellReferences__WEBPACK_IMPORTED_MODULE_2__.getAllCellReferences)(notebookTracker.currentWidget)
|
|
1034
|
+
: [];
|
|
1011
1035
|
// Create a list of all options with the format
|
|
1012
1036
|
// ['type': 'variable', "expandedVariable": variable]
|
|
1013
1037
|
// ['type': 'rule', "rule": rule]
|
|
1014
1038
|
// ['type': 'file', "file": file]
|
|
1039
|
+
// ['type': 'cell', "cellNumber": number, "cellId": string]
|
|
1015
1040
|
const allOptions = [
|
|
1016
1041
|
// Rules first
|
|
1017
1042
|
...rules.map((rule) => ({
|
|
1018
1043
|
type: 'rule',
|
|
1019
1044
|
rule: rule
|
|
1020
1045
|
})),
|
|
1046
|
+
// Cells second (when user types @Cell or @cell)
|
|
1047
|
+
...cellReferences.map((cell) => ({
|
|
1048
|
+
type: 'cell',
|
|
1049
|
+
cellNumber: cell.cellNumber,
|
|
1050
|
+
cellId: cell.cellId,
|
|
1051
|
+
cellType: cell.cellType
|
|
1052
|
+
})),
|
|
1021
1053
|
// Files second
|
|
1022
1054
|
...options
|
|
1023
1055
|
.filter(variable => variable.file_name) // Only files
|
|
@@ -1070,6 +1102,13 @@ const ChatDropdown = ({ options, onSelect, filterText, isDropdownFromButton = fa
|
|
|
1070
1102
|
return option.variable.variable_name.toLowerCase().includes(effectiveFilterText.toLowerCase()) ||
|
|
1071
1103
|
option.variable.value.toLowerCase().includes(effectiveFilterText.toLowerCase());
|
|
1072
1104
|
}
|
|
1105
|
+
else if (option.type === 'cell') {
|
|
1106
|
+
// Match "CellN" (no space)
|
|
1107
|
+
const cellText = `cell${option.cellNumber}`;
|
|
1108
|
+
const numberText = String(option.cellNumber);
|
|
1109
|
+
return cellText.includes(effectiveFilterText.toLowerCase()) ||
|
|
1110
|
+
numberText.includes(effectiveFilterText.toLowerCase());
|
|
1111
|
+
}
|
|
1073
1112
|
else {
|
|
1074
1113
|
return option.rule.toLowerCase().includes(effectiveFilterText.toLowerCase());
|
|
1075
1114
|
}
|
|
@@ -1159,20 +1198,24 @@ const ChatDropdown = ({ options, onSelect, filterText, isDropdownFromButton = fa
|
|
|
1159
1198
|
const uniqueKey = option.variable.parent_df
|
|
1160
1199
|
? `${option.variable.parent_df}.${option.variable.variable_name}`
|
|
1161
1200
|
: option.variable.variable_name;
|
|
1162
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1201
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdownItems__WEBPACK_IMPORTED_MODULE_3__.VariableDropdownItem, { key: uniqueKey, variable: option.variable, index: index, selectedIndex: selectedIndex, onSelect: () => onSelect(option) }));
|
|
1163
1202
|
}
|
|
1164
1203
|
case 'file': {
|
|
1165
1204
|
const uniqueKey = option.file.variable_name;
|
|
1166
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1205
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdownItems__WEBPACK_IMPORTED_MODULE_3__.FileDropdownItem, { key: uniqueKey, file: option.file, index: index, selectedIndex: selectedIndex, onSelect: () => onSelect(option) }));
|
|
1167
1206
|
}
|
|
1168
1207
|
case 'rule': {
|
|
1169
1208
|
const uniqueKey = option.rule;
|
|
1170
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1209
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdownItems__WEBPACK_IMPORTED_MODULE_3__.RuleDropdownItem, { key: uniqueKey, rule: option.rule, index: index, selectedIndex: selectedIndex, onSelect: () => onSelect(option) }));
|
|
1171
1210
|
}
|
|
1172
1211
|
case 'db': {
|
|
1173
1212
|
const uniqueKey = option.variable.variable_name;
|
|
1174
1213
|
// You can replace VariableDropdownItem with a custom DBDropdownItem if you want
|
|
1175
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1214
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdownItems__WEBPACK_IMPORTED_MODULE_3__.VariableDropdownItem, { key: uniqueKey, variable: option.variable, index: index, selectedIndex: selectedIndex, onSelect: () => onSelect(option) }));
|
|
1215
|
+
}
|
|
1216
|
+
case 'cell': {
|
|
1217
|
+
const uniqueKey = `cell-${option.cellNumber}`;
|
|
1218
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdownItems__WEBPACK_IMPORTED_MODULE_3__.CellDropdownItem, { key: uniqueKey, cellNumber: option.cellNumber, cellId: option.cellId, cellType: option.cellType, index: index, selectedIndex: selectedIndex, onSelect: () => onSelect(option) }));
|
|
1176
1219
|
}
|
|
1177
1220
|
default:
|
|
1178
1221
|
return null;
|
|
@@ -1192,6 +1235,7 @@ const ChatDropdown = ({ options, onSelect, filterText, isDropdownFromButton = fa
|
|
|
1192
1235
|
|
|
1193
1236
|
__webpack_require__.r(__webpack_exports__);
|
|
1194
1237
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1238
|
+
/* harmony export */ CellDropdownItem: () => (/* binding */ CellDropdownItem),
|
|
1195
1239
|
/* harmony export */ FileDropdownItem: () => (/* binding */ FileDropdownItem),
|
|
1196
1240
|
/* harmony export */ RuleDropdownItem: () => (/* binding */ RuleDropdownItem),
|
|
1197
1241
|
/* harmony export */ VariableDropdownItem: () => (/* binding */ VariableDropdownItem)
|
|
@@ -1249,6 +1293,24 @@ const RuleDropdownItem = ({ rule, index, selectedIndex, onSelect }) => {
|
|
|
1249
1293
|
}
|
|
1250
1294
|
} }, rule)));
|
|
1251
1295
|
};
|
|
1296
|
+
const CellDropdownItem = ({ cellNumber, cellId, cellType, index, selectedIndex, onSelect }) => {
|
|
1297
|
+
const getShortType = (type) => {
|
|
1298
|
+
if (type === 'code') {
|
|
1299
|
+
return 'code';
|
|
1300
|
+
}
|
|
1301
|
+
else if (type === 'markdown') {
|
|
1302
|
+
return 'md';
|
|
1303
|
+
}
|
|
1304
|
+
else {
|
|
1305
|
+
return 'raw';
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_1__.classNames)("chat-dropdown-item", { selected: index === selectedIndex }), onClick: () => onSelect(cellNumber, cellId), "data-testid": `chat-dropdown-item-cell-${cellNumber}` },
|
|
1309
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "chat-dropdown-item-type", title: cellType, "data-testid": `chat-dropdown-item-type-cell-${cellNumber}` }, getShortType(cellType)),
|
|
1310
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "chat-dropdown-item-name", title: `Cell ${cellNumber}`, "data-testid": `chat-dropdown-item-name-cell-${cellNumber}` },
|
|
1311
|
+
"Cell",
|
|
1312
|
+
cellNumber)));
|
|
1313
|
+
};
|
|
1252
1314
|
|
|
1253
1315
|
|
|
1254
1316
|
/***/ }),
|
|
@@ -1265,15 +1327,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1265
1327
|
/* harmony export */ });
|
|
1266
1328
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
1267
1329
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1268
|
-
/* harmony import */ var
|
|
1269
|
-
/* harmony import */ var
|
|
1330
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/classNames */ "./lib/utils/classNames.js");
|
|
1331
|
+
/* harmony import */ var _ChatDropdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ChatDropdown */ "./lib/Extensions/AiChat/ChatMessage/ChatDropdown.js");
|
|
1270
1332
|
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
1333
|
+
/* harmony import */ var _utils_cellReferences__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/cellReferences */ "./lib/utils/cellReferences.js");
|
|
1271
1334
|
/* harmony import */ var _style_ChatInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/ChatInput.css */ "./style/ChatInput.css");
|
|
1272
1335
|
/* harmony import */ var _style_ChatDropdown_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../style/ChatDropdown.css */ "./style/ChatDropdown.css");
|
|
1273
1336
|
/* harmony import */ var _hooks_useDebouncedFunction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../hooks/useDebouncedFunction */ "./lib/hooks/useDebouncedFunction.js");
|
|
1274
|
-
/* harmony import */ var
|
|
1275
|
-
/* harmony import */ var
|
|
1276
|
-
/* harmony import */ var
|
|
1337
|
+
/* harmony import */ var _components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../components/SelectedContextContainer */ "./lib/components/SelectedContextContainer.js");
|
|
1338
|
+
/* harmony import */ var _components_AttachFileButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../components/AttachFileButton */ "./lib/components/AttachFileButton.js");
|
|
1339
|
+
/* harmony import */ var _components_DatabaseButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../components/DatabaseButton */ "./lib/components/DatabaseButton.js");
|
|
1277
1340
|
/* harmony import */ var _utils_fileUpload__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/fileUpload */ "./lib/utils/fileUpload.js");
|
|
1278
1341
|
/*
|
|
1279
1342
|
* Copyright (c) Saga Inc.
|
|
@@ -1290,6 +1353,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1290
1353
|
|
|
1291
1354
|
|
|
1292
1355
|
|
|
1356
|
+
|
|
1293
1357
|
const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isEditing, contextManager, notebookTracker, agentModeEnabled = false, agentExecutionStatus = 'idle', operatingSystem = 'mac', displayOptimizedChatHistoryLength = 0, agentTargetNotebookPanelRef, isSignedUp = true, messageIndex, }) => {
|
|
1294
1358
|
var _a;
|
|
1295
1359
|
const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialContent);
|
|
@@ -1341,20 +1405,18 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1341
1405
|
e.stopPropagation();
|
|
1342
1406
|
setIsDragOver(false);
|
|
1343
1407
|
const files = e.dataTransfer.files;
|
|
1344
|
-
if (files && files.length > 0) {
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
setIsUploading(false);
|
|
1357
|
-
}
|
|
1408
|
+
if (files && files.length > 0 && !isUploading) {
|
|
1409
|
+
setIsUploading(true);
|
|
1410
|
+
try {
|
|
1411
|
+
// Upload all files to backend using the shared utility
|
|
1412
|
+
const uploadPromises = Array.from(files).map(file => (0,_utils_fileUpload__WEBPACK_IMPORTED_MODULE_4__.uploadFileToBackend)(file, notebookTracker, handleFileUpload));
|
|
1413
|
+
// Use allSettled so we wait for all uploads to finish (success or failure)
|
|
1414
|
+
// before clearing the uploading state. This avoids background uploads
|
|
1415
|
+
// mutating state after isUploading becomes false.
|
|
1416
|
+
await Promise.allSettled(uploadPromises);
|
|
1417
|
+
}
|
|
1418
|
+
finally {
|
|
1419
|
+
setIsUploading(false);
|
|
1358
1420
|
}
|
|
1359
1421
|
}
|
|
1360
1422
|
};
|
|
@@ -1435,6 +1497,16 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1435
1497
|
}
|
|
1436
1498
|
]);
|
|
1437
1499
|
}
|
|
1500
|
+
else if (option.type === 'cell') {
|
|
1501
|
+
setAdditionalContext(prev => [
|
|
1502
|
+
...prev,
|
|
1503
|
+
{
|
|
1504
|
+
type: 'cell',
|
|
1505
|
+
value: option.cellId,
|
|
1506
|
+
display: `Cell ${option.cellNumber}`
|
|
1507
|
+
}
|
|
1508
|
+
]);
|
|
1509
|
+
}
|
|
1438
1510
|
setDropdownVisible(false);
|
|
1439
1511
|
// Use setTimeout to ensure this happens after React's state update cycle
|
|
1440
1512
|
setTimeout(() => {
|
|
@@ -1481,16 +1553,27 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1481
1553
|
{ type: 'db', value: option.variable.value, display: option.variable.variable_name }
|
|
1482
1554
|
]);
|
|
1483
1555
|
}
|
|
1556
|
+
else if (option.type === 'cell') {
|
|
1557
|
+
// For cells, add them as @CellN mentions (no space for easier filtering)
|
|
1558
|
+
contextChatRepresentation = `@Cell${option.cellNumber}`;
|
|
1559
|
+
// Store the stable cell ID in additionalContext, not the @CellN format
|
|
1560
|
+
setAdditionalContext([
|
|
1561
|
+
...additionalContext,
|
|
1562
|
+
{ type: 'cell', value: option.cellId, display: `Cell ${option.cellNumber}` }
|
|
1563
|
+
]);
|
|
1564
|
+
}
|
|
1565
|
+
// Add a space after the selected item so user can continue typing
|
|
1566
|
+
const contextChatRepresentationWithSpace = contextChatRepresentation + ' ';
|
|
1484
1567
|
const newValue = input.slice(0, atIndex) +
|
|
1485
|
-
|
|
1568
|
+
contextChatRepresentationWithSpace +
|
|
1486
1569
|
textAfterCursor;
|
|
1487
1570
|
setInput(newValue);
|
|
1488
1571
|
setDropdownVisible(false);
|
|
1489
|
-
// After updating the input value, set the cursor position after the inserted
|
|
1572
|
+
// After updating the input value, set the cursor position after the inserted item and space
|
|
1490
1573
|
// We use setTimeout to ensure this happens after React's state update
|
|
1491
1574
|
setTimeout(() => {
|
|
1492
1575
|
if (textarea) {
|
|
1493
|
-
const newCursorPosition = atIndex +
|
|
1576
|
+
const newCursorPosition = atIndex + contextChatRepresentationWithSpace.length;
|
|
1494
1577
|
textarea.focus();
|
|
1495
1578
|
textarea.setSelectionRange(newCursorPosition, newCursorPosition);
|
|
1496
1579
|
}
|
|
@@ -1507,6 +1590,10 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1507
1590
|
value: contextItem.value
|
|
1508
1591
|
}));
|
|
1509
1592
|
};
|
|
1593
|
+
// Convert @Cell N references to [MITO_CELL_REF:cell_id] format before submitting
|
|
1594
|
+
const processMessageForSubmission = (messageText) => {
|
|
1595
|
+
return (0,_utils_cellReferences__WEBPACK_IMPORTED_MODULE_6__.convertCellReferencesToStableFormat)(messageText, notebookTracker.currentWidget);
|
|
1596
|
+
};
|
|
1510
1597
|
const getExpandedVarialbes = () => {
|
|
1511
1598
|
const activeNotebookContext = contextManager === null || contextManager === void 0 ? void 0 : contextManager.getActiveNotebookContext();
|
|
1512
1599
|
const expandedVariables = [
|
|
@@ -1570,6 +1657,11 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1570
1657
|
display: 'Active Cell'
|
|
1571
1658
|
}]);
|
|
1572
1659
|
}
|
|
1660
|
+
// Remove the current notebook context item
|
|
1661
|
+
const hasNotebookContext = additionalContext.some(context => context.type === 'notebook');
|
|
1662
|
+
if (hasNotebookContext) {
|
|
1663
|
+
setAdditionalContext(prev => prev.filter(context => context.type !== 'notebook'));
|
|
1664
|
+
}
|
|
1573
1665
|
}
|
|
1574
1666
|
else if (agentModeEnabled) {
|
|
1575
1667
|
// Remove active cell context when in agent mode
|
|
@@ -1577,15 +1669,24 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1577
1669
|
if (hasActiveCellContext) {
|
|
1578
1670
|
setAdditionalContext(prev => prev.filter(context => context.type !== 'active_cell'));
|
|
1579
1671
|
}
|
|
1672
|
+
const hasNotebookContext = additionalContext.some(context => context.type === 'notebook');
|
|
1673
|
+
if (!hasNotebookContext) {
|
|
1674
|
+
// Add a current notebook context item
|
|
1675
|
+
setAdditionalContext(prev => [...prev, {
|
|
1676
|
+
type: 'notebook',
|
|
1677
|
+
value: 'Notebook',
|
|
1678
|
+
display: 'Notebook'
|
|
1679
|
+
}]);
|
|
1680
|
+
}
|
|
1580
1681
|
}
|
|
1581
1682
|
}, [agentModeEnabled, additionalContext, activeCellCode]);
|
|
1582
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,
|
|
1683
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_7__.classNames)("chat-input-container", {
|
|
1583
1684
|
"editing": isEditing,
|
|
1584
1685
|
"drag-over": isDragOver
|
|
1585
1686
|
}), onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop },
|
|
1586
1687
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'context-container' },
|
|
1587
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1588
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1688
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_DatabaseButton__WEBPACK_IMPORTED_MODULE_8__["default"], { app: app }),
|
|
1689
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AttachFileButton__WEBPACK_IMPORTED_MODULE_9__["default"], { onFileUploaded: handleFileUpload, notebookTracker: notebookTracker }),
|
|
1589
1690
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "context-button", onClick: () => {
|
|
1590
1691
|
var _a;
|
|
1591
1692
|
setDropdownVisible(true);
|
|
@@ -1593,9 +1694,9 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1593
1694
|
setIsDropdownFromButton(true);
|
|
1594
1695
|
(_a = textAreaRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1595
1696
|
} }, "\uFF20 Add Context"),
|
|
1596
|
-
additionalContext.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1697
|
+
additionalContext.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_10__["default"], { key: `${context.type}-${context.value}-${index}`, title: context.display || context.value, type: context.type, onRemove: () => setAdditionalContext(additionalContext.filter((_, i) => i !== index)), notebookTracker: notebookTracker, activeCellID: activeCellID, value: context.value })))),
|
|
1597
1698
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'chat-input-text-area-container' },
|
|
1598
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textAreaRef, className: (0,
|
|
1699
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textAreaRef, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_7__.classNames)("message", "message-user", 'chat-input', { "agent-mode": agentModeEnabled }), placeholder: getPlaceholderText(), value: input, disabled: agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping', onChange: handleInputChange, onKeyDown: (e) => {
|
|
1599
1700
|
// If dropdown is visible, only handle escape to close it
|
|
1600
1701
|
if (isDropdownVisible) {
|
|
1601
1702
|
if (e.key === 'Escape') {
|
|
@@ -1609,8 +1710,9 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1609
1710
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
1610
1711
|
e.preventDefault();
|
|
1611
1712
|
adjustHeight(true);
|
|
1713
|
+
const processedMessage = processMessageForSubmission(input);
|
|
1612
1714
|
const additionalContextWithoutDisplayNames = getAdditionContextWithoutDisplayNames();
|
|
1613
|
-
handleSubmitUserMessage(
|
|
1715
|
+
handleSubmitUserMessage(processedMessage, messageIndex, additionalContextWithoutDisplayNames);
|
|
1614
1716
|
// Reset
|
|
1615
1717
|
setInput('');
|
|
1616
1718
|
setAdditionalContext([]);
|
|
@@ -1623,12 +1725,13 @@ const ChatInput = ({ app, initialContent, handleSubmitUserMessage, onCancel, isE
|
|
|
1623
1725
|
}
|
|
1624
1726
|
}
|
|
1625
1727
|
} }),
|
|
1626
|
-
isDropdownVisible && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1728
|
+
isDropdownVisible && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { options: getExpandedVarialbes(), onSelect: handleOptionSelect, filterText: dropdownFilter, isDropdownFromButton: isDropdownFromButton, onFilterChange: setDropdownFilter, onClose: handleDropdownClose, notebookTracker: notebookTracker }))),
|
|
1627
1729
|
isEditing &&
|
|
1628
1730
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "message-edit-buttons" },
|
|
1629
1731
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => {
|
|
1732
|
+
const processedMessage = processMessageForSubmission(input);
|
|
1630
1733
|
const additionalContextWithoutDisplayNames = getAdditionContextWithoutDisplayNames();
|
|
1631
|
-
handleSubmitUserMessage(
|
|
1734
|
+
handleSubmitUserMessage(processedMessage, messageIndex, additionalContextWithoutDisplayNames);
|
|
1632
1735
|
} }, "Save"),
|
|
1633
1736
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: onCancel }, "Cancel"))));
|
|
1634
1737
|
};
|
|
@@ -1649,27 +1752,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1649
1752
|
/* harmony export */ });
|
|
1650
1753
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
1651
1754
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1652
|
-
/* harmony import */ var
|
|
1653
|
-
/* harmony import */ var
|
|
1654
|
-
/* harmony import */ var
|
|
1655
|
-
/* harmony import */ var
|
|
1656
|
-
/* harmony import */ var
|
|
1657
|
-
/* harmony import */ var
|
|
1658
|
-
/* harmony import */ var
|
|
1659
|
-
/* harmony import */ var
|
|
1660
|
-
/* harmony import */ var
|
|
1661
|
-
/* harmony import */ var
|
|
1662
|
-
/* harmony import */ var
|
|
1663
|
-
/* harmony import */ var
|
|
1664
|
-
/* harmony import */ var
|
|
1755
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/classNames */ "./lib/utils/classNames.js");
|
|
1756
|
+
/* harmony import */ var _UserCodeBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UserCodeBlock */ "./lib/Extensions/AiChat/ChatMessage/UserCodeBlock.js");
|
|
1757
|
+
/* harmony import */ var _AssistantCodeBlock__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AssistantCodeBlock */ "./lib/Extensions/AiChat/ChatMessage/AssistantCodeBlock.js");
|
|
1758
|
+
/* harmony import */ var _AlertBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AlertBlock */ "./lib/Extensions/AiChat/ChatMessage/AlertBlock.js");
|
|
1759
|
+
/* harmony import */ var _MarkdownBlock__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./MarkdownBlock */ "./lib/Extensions/AiChat/ChatMessage/MarkdownBlock.js");
|
|
1760
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/strings */ "./lib/utils/strings.js");
|
|
1761
|
+
/* harmony import */ var _icons_Pencil__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../icons/Pencil */ "./lib/icons/Pencil.js");
|
|
1762
|
+
/* harmony import */ var _ChatInput__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ChatInput */ "./lib/Extensions/AiChat/ChatMessage/ChatInput.js");
|
|
1763
|
+
/* harmony import */ var _components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../components/TextAndIconButton */ "./lib/components/TextAndIconButton.js");
|
|
1764
|
+
/* harmony import */ var _icons_PlayButtonIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../icons/PlayButtonIcon */ "./lib/icons/PlayButtonIcon.js");
|
|
1765
|
+
/* harmony import */ var _icons_CopyIcon__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../icons/CopyIcon */ "./lib/icons/CopyIcon.js");
|
|
1766
|
+
/* harmony import */ var _utils_copyToClipboard__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/copyToClipboard */ "./lib/utils/copyToClipboard.js");
|
|
1767
|
+
/* harmony import */ var _components_TextButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../components/TextButton */ "./lib/components/TextButton.js");
|
|
1665
1768
|
/* harmony import */ var _style_ChatMessage_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/ChatMessage.css */ "./style/ChatMessage.css");
|
|
1666
1769
|
/* harmony import */ var _style_MarkdownMessage_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../style/MarkdownMessage.css */ "./style/MarkdownMessage.css");
|
|
1667
|
-
/* harmony import */ var
|
|
1668
|
-
/* harmony import */ var
|
|
1669
|
-
/* harmony import */ var
|
|
1670
|
-
/* harmony import */ var
|
|
1671
|
-
/* harmony import */ var
|
|
1672
|
-
/* harmony import */ var
|
|
1770
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
1771
|
+
/* harmony import */ var _components_AgentComponents_GetCellOutputToolUI__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../components/AgentComponents/GetCellOutputToolUI */ "./lib/components/AgentComponents/GetCellOutputToolUI.js");
|
|
1772
|
+
/* harmony import */ var _components_AgentComponents_AssumptionToolUI__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../components/AgentComponents/AssumptionToolUI */ "./lib/components/AgentComponents/AssumptionToolUI.js");
|
|
1773
|
+
/* harmony import */ var _components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../components/SelectedContextContainer */ "./lib/components/SelectedContextContainer.js");
|
|
1774
|
+
/* harmony import */ var _components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../components/AgentComponents/RunAllCellsToolUI */ "./lib/components/AgentComponents/RunAllCellsToolUI.js");
|
|
1775
|
+
/* harmony import */ var _components_AgentComponents_CreateStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../components/AgentComponents/CreateStreamlitAppToolUI */ "./lib/components/AgentComponents/CreateStreamlitAppToolUI.js");
|
|
1776
|
+
/* harmony import */ var _components_AgentComponents_EditStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../components/AgentComponents/EditStreamlitAppToolUI */ "./lib/components/AgentComponents/EditStreamlitAppToolUI.js");
|
|
1673
1777
|
/*
|
|
1674
1778
|
* Copyright (c) Saga Inc.
|
|
1675
1779
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -1696,14 +1800,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1696
1800
|
|
|
1697
1801
|
|
|
1698
1802
|
|
|
1803
|
+
|
|
1804
|
+
const getCellIdFromCellUpdate = (cellUpdate, notebookTracker) => {
|
|
1805
|
+
if (!cellUpdate) {
|
|
1806
|
+
return undefined;
|
|
1807
|
+
}
|
|
1808
|
+
if (cellUpdate.type === 'modification') {
|
|
1809
|
+
return cellUpdate.id;
|
|
1810
|
+
}
|
|
1811
|
+
// For 'new' type, get the cell ID by index
|
|
1812
|
+
return (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.getCellIDByIndexInNotebookPanel)(notebookTracker.currentWidget, cellUpdate.index);
|
|
1813
|
+
};
|
|
1699
1814
|
const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mitoAIConnectionError, mitoAIConnectionErrorType, notebookTracker, renderMimeRegistry, isLastAiMessage, isLastMessage, operatingSystem, previewAICode, acceptAICode, rejectAICode, contextManager, codeReviewStatus, setNextSteps, agentModeEnabled, additionalContext, handleSubmitUserMessage, }) => {
|
|
1700
1815
|
const [isEditing, setIsEditing] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
1701
1816
|
if (message.role !== 'user' && message.role !== 'assistant') {
|
|
1702
1817
|
return null;
|
|
1703
1818
|
}
|
|
1704
1819
|
const editable = message.role === 'user';
|
|
1705
|
-
const messageContentParts = (0,
|
|
1706
|
-
const messageContent = (0,
|
|
1820
|
+
const messageContentParts = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.splitStringWithCodeBlocks)(message);
|
|
1821
|
+
const messageContent = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.getContentStringFromMessage)(message);
|
|
1707
1822
|
const handleEditClick = () => {
|
|
1708
1823
|
setIsEditing(true);
|
|
1709
1824
|
};
|
|
@@ -1726,11 +1841,11 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1726
1841
|
setNextSteps(agentResponse.next_steps);
|
|
1727
1842
|
}
|
|
1728
1843
|
if (isEditing) {
|
|
1729
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1844
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_5__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(), onCancel: handleCancel, isEditing: isEditing, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: false, handleSubmitUserMessage: handleSubmitUserMessageAndCloseEditing, messageIndex: messageIndex }));
|
|
1730
1845
|
}
|
|
1731
1846
|
if (mitoAIConnectionError) {
|
|
1732
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,
|
|
1733
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1847
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_6__.classNames)("message") },
|
|
1848
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AlertBlock__WEBPACK_IMPORTED_MODULE_7__["default"], { content: message.content, mitoAIConnectionErrorType: mitoAIConnectionErrorType })));
|
|
1734
1849
|
}
|
|
1735
1850
|
// If the message is empty, don't render anything
|
|
1736
1851
|
if (messageContent === undefined || messageContent === '') {
|
|
@@ -1740,28 +1855,28 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1740
1855
|
// Users end up applying the code in the middle of streaming and it gets very confusing
|
|
1741
1856
|
// very quickly for users.
|
|
1742
1857
|
let isCodeComplete = false;
|
|
1743
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,
|
|
1858
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_6__.classNames)("message", { "message-user": message.role === 'user' }, { 'message-assistant-chat': message.role === 'assistant' }) },
|
|
1744
1859
|
messageContentParts.map((messagePart, index) => {
|
|
1745
1860
|
var _a, _b;
|
|
1746
|
-
if (messagePart.startsWith(
|
|
1861
|
+
if (messagePart.startsWith(_utils_strings__WEBPACK_IMPORTED_MODULE_4__.PYTHON_CODE_BLOCK_START_WITHOUT_NEW_LINE)) {
|
|
1747
1862
|
isCodeComplete = messagePart.endsWith('```');
|
|
1748
1863
|
// Make sure that there is actually code in the message.
|
|
1749
1864
|
// An empty code will look like this '```python ```'
|
|
1750
1865
|
if (messagePart.length > 14) {
|
|
1751
1866
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
1752
|
-
message.role === 'user' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1867
|
+
message.role === 'user' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_UserCodeBlock__WEBPACK_IMPORTED_MODULE_8__["default"], { code: messagePart, renderMimeRegistry: renderMimeRegistry, agentModeEnabled: agentModeEnabled })) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AssistantCodeBlock__WEBPACK_IMPORTED_MODULE_9__["default"], { code: messagePart, codeSummary: (_b = (_a = agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.cell_update) === null || _a === void 0 ? void 0 : _a.code_summary) !== null && _b !== void 0 ? _b : ((agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'run_all_cells' ? 'Running all cells' : undefined), isCodeComplete: isCodeComplete, renderMimeRegistry: renderMimeRegistry, previewAICode: previewAICode, acceptAICode: acceptAICode, rejectAICode: rejectAICode, isLastAiMessage: isLastAiMessage, codeReviewStatus: codeReviewStatus, agentModeEnabled: agentModeEnabled, cellId: getCellIdFromCellUpdate(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.cell_update, notebookTracker), notebookPanel: notebookTracker.currentWidget })),
|
|
1753
1868
|
!agentModeEnabled && isLastAiMessage && isCodeComplete && codeReviewStatus === 'chatPreview' &&
|
|
1754
1869
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'chat-message-buttons' },
|
|
1755
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1756
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1870
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_10__["default"], { onClick: () => { previewAICode(); }, text: 'Overwrite Active Cell', icon: _icons_PlayButtonIcon__WEBPACK_IMPORTED_MODULE_11__["default"], title: 'Write the Ai generated code to the active cell in the jupyter notebook, replacing the current code.', variant: 'gray', width: 'fit-contents' }),
|
|
1871
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_10__["default"], { onClick: () => { void (0,_utils_copyToClipboard__WEBPACK_IMPORTED_MODULE_12__["default"])(messagePart); }, text: 'Copy', icon: _icons_CopyIcon__WEBPACK_IMPORTED_MODULE_13__["default"], title: 'Copy the Ai generated code to your clipboard', variant: 'gray', width: 'fit-contents' })),
|
|
1757
1872
|
!agentModeEnabled && isLastAiMessage && isCodeComplete && codeReviewStatus === 'codeCellPreview' &&
|
|
1758
1873
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'chat-message-buttons' },
|
|
1759
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1760
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1874
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextButton__WEBPACK_IMPORTED_MODULE_14__["default"], { onClick: () => { acceptAICode(); }, text: `Accept code ${operatingSystem === 'mac' ? '⌘Y' : 'Ctrl+Y'}`, title: 'Accept the Ai generated code', variant: 'green', width: 'fit-contents' }),
|
|
1875
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextButton__WEBPACK_IMPORTED_MODULE_14__["default"], { onClick: () => { rejectAICode(); }, text: `Reject code ${operatingSystem === 'mac' ? '⌘U' : 'Ctrl+U'}`, title: 'Reject the Ai generated code and revert to the previous version of the code cell', variant: 'red', width: 'fit-contents' })),
|
|
1761
1876
|
message.role === 'user' && additionalContext && additionalContext.length > 0 &&
|
|
1762
1877
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, additionalContext
|
|
1763
1878
|
.filter(context => context.type !== 'active_cell') // Hide active cell context in chat messages
|
|
1764
|
-
.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1879
|
+
.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_15__["default"], { key: `${context.type}-${context.value}-${index}`, title: `${context.value}`, type: context.type, onRemove: () => { } }))))));
|
|
1765
1880
|
}
|
|
1766
1881
|
else {
|
|
1767
1882
|
// Return null for empty code blocks
|
|
@@ -1769,7 +1884,7 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1769
1884
|
}
|
|
1770
1885
|
}
|
|
1771
1886
|
else {
|
|
1772
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: index + messagePart, className: (0,
|
|
1887
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: index + messagePart, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_6__.classNames)('markdown-message-part') },
|
|
1773
1888
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { onDoubleClick: () => {
|
|
1774
1889
|
// Only allow users to edit their own messages, not the AI responses
|
|
1775
1890
|
if (message.role === 'user') {
|
|
@@ -1777,23 +1892,23 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1777
1892
|
}
|
|
1778
1893
|
} }, message.role === 'user' && promptType === 'smartDebug' ? (
|
|
1779
1894
|
/* Use a pre tag to preserve the newline and indentation of the error message */
|
|
1780
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", { className: "chat-taskpane-smart-debug-error-message" }, messagePart)) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1895
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", { className: "chat-taskpane-smart-debug-error-message" }, messagePart)) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_MarkdownBlock__WEBPACK_IMPORTED_MODULE_16__["default"], { markdown: messagePart, renderMimeRegistry: renderMimeRegistry, notebookTracker: notebookTracker }))),
|
|
1781
1896
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.analysis_assumptions) &&
|
|
1782
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1897
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_AssumptionToolUI__WEBPACK_IMPORTED_MODULE_17__["default"], { assumptions: agentResponse.analysis_assumptions })));
|
|
1783
1898
|
}
|
|
1784
1899
|
}),
|
|
1785
1900
|
editable &&
|
|
1786
1901
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "message-action-buttons" },
|
|
1787
1902
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "message-start-editing-button", onClick: handleEditClick, title: "Edit message" },
|
|
1788
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1903
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_Pencil__WEBPACK_IMPORTED_MODULE_18__["default"], null))),
|
|
1789
1904
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'get_cell_output' &&
|
|
1790
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1905
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_GetCellOutputToolUI__WEBPACK_IMPORTED_MODULE_19__["default"], null),
|
|
1791
1906
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'run_all_cells' && agentModeEnabled &&
|
|
1792
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1907
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_20__["default"], null),
|
|
1793
1908
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'create_streamlit_app' && agentModeEnabled &&
|
|
1794
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1909
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_CreateStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_21__["default"], { isRunning: isLastMessage }),
|
|
1795
1910
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'edit_streamlit_app' && agentModeEnabled &&
|
|
1796
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1911
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_EditStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_22__["default"], { isRunning: isLastMessage })));
|
|
1797
1912
|
};
|
|
1798
1913
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatMessage);
|
|
1799
1914
|
|
|
@@ -1813,7 +1928,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1813
1928
|
/* harmony export */ });
|
|
1814
1929
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
1815
1930
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1816
|
-
/* harmony import */ var
|
|
1931
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
1932
|
+
/* harmony import */ var _utils_cellReferences__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/cellReferences */ "./lib/utils/cellReferences.js");
|
|
1817
1933
|
/* harmony import */ var _style_Citation_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/Citation.css */ "./style/Citation.css");
|
|
1818
1934
|
/*
|
|
1819
1935
|
* Copyright (c) Saga Inc.
|
|
@@ -1822,6 +1938,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1822
1938
|
|
|
1823
1939
|
|
|
1824
1940
|
|
|
1941
|
+
|
|
1825
1942
|
// Helper function to get the display text for a line/range
|
|
1826
1943
|
const getLineDisplayText = (line) => {
|
|
1827
1944
|
if (typeof line === 'number') {
|
|
@@ -1833,15 +1950,24 @@ const getLineDisplayText = (line) => {
|
|
|
1833
1950
|
};
|
|
1834
1951
|
// Citation button component
|
|
1835
1952
|
const Citation = ({ citationIndex, cellId, line, notebookTracker }) => {
|
|
1953
|
+
// Check if the cell exists in the current notebook
|
|
1954
|
+
const cellNumber = (0,_utils_cellReferences__WEBPACK_IMPORTED_MODULE_2__.getCellNumberById)(cellId, notebookTracker.currentWidget);
|
|
1955
|
+
const isMissing = cellNumber === undefined;
|
|
1836
1956
|
const handleClick = () => {
|
|
1957
|
+
if (isMissing)
|
|
1958
|
+
return;
|
|
1837
1959
|
const lineStart = typeof line === 'number' ? line : line.start;
|
|
1838
1960
|
// In order to support old citations that have just one line, we
|
|
1839
1961
|
// we set the end line to the start line if only a single line number is provided.
|
|
1840
1962
|
const lineEnd = typeof line === 'number' ? line : line.end;
|
|
1841
1963
|
// Scroll to the cell and highlight the lines
|
|
1842
|
-
(0,
|
|
1964
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.scrollToAndHighlightCell)(notebookTracker.currentWidget, cellId, lineStart, lineEnd);
|
|
1843
1965
|
};
|
|
1844
|
-
|
|
1966
|
+
const className = isMissing ? 'citation-button citation-missing' : 'citation-button';
|
|
1967
|
+
const title = isMissing
|
|
1968
|
+
? 'Cell not found (may have been deleted or is in a different notebook)'
|
|
1969
|
+
: getLineDisplayText(line);
|
|
1970
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: className, onClick: handleClick, title: title }, citationIndex));
|
|
1845
1971
|
};
|
|
1846
1972
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Citation);
|
|
1847
1973
|
|
|
@@ -1906,7 +2032,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1906
2032
|
/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__);
|
|
1907
2033
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "webpack/sharing/consume/default/react-dom");
|
|
1908
2034
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
|
|
1909
|
-
/* harmony import */ var
|
|
2035
|
+
/* harmony import */ var _Citation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Citation */ "./lib/Extensions/AiChat/ChatMessage/Citation.js");
|
|
2036
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
2037
|
+
/* harmony import */ var _hooks_useCellOrder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../hooks/useCellOrder */ "./lib/hooks/useCellOrder.js");
|
|
2038
|
+
/* harmony import */ var _style_CellReference_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../style/CellReference.css */ "./style/CellReference.css");
|
|
1910
2039
|
/*
|
|
1911
2040
|
* Copyright (c) Saga Inc.
|
|
1912
2041
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -1915,12 +2044,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1915
2044
|
|
|
1916
2045
|
|
|
1917
2046
|
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
|
|
1918
2050
|
const CitationPortal = ({ container, ...props }) => {
|
|
1919
|
-
return (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
2051
|
+
return (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Citation__WEBPACK_IMPORTED_MODULE_4__.Citation, { ...props }), container);
|
|
1920
2052
|
};
|
|
1921
2053
|
const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
1922
2054
|
const [citationPortals, setCitationPortals] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
1923
2055
|
const containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
2056
|
+
// Track cell order to update cell references when cells are reordered
|
|
2057
|
+
const cellOrder = (0,_hooks_useCellOrder__WEBPACK_IMPORTED_MODULE_5__.useCellOrder)(notebookTracker);
|
|
2058
|
+
// Create a serialized version of cell order for dependency tracking
|
|
2059
|
+
// This ensures re-renders when cells are reordered (even if count stays the same)
|
|
2060
|
+
const cellOrderKey = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
|
|
2061
|
+
return Array.from(cellOrder.entries())
|
|
2062
|
+
.sort((a, b) => a[0].localeCompare(b[0])) // Sort by cellId for stable string
|
|
2063
|
+
.map(([cellId, cellNumber]) => `${cellId}:${cellNumber}`)
|
|
2064
|
+
.join(',');
|
|
2065
|
+
}, [cellOrder]);
|
|
1924
2066
|
// Helper function to parse line numbers or ranges
|
|
1925
2067
|
const parseLineNumber = (lineStr) => {
|
|
1926
2068
|
if (lineStr.includes('-')) {
|
|
@@ -1945,22 +2087,26 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
1945
2087
|
return parseInt(lineStr, 10);
|
|
1946
2088
|
}
|
|
1947
2089
|
};
|
|
1948
|
-
// Extract citations from the markdown, returning the markdown with
|
|
1949
|
-
//
|
|
1950
|
-
const
|
|
1951
|
-
//
|
|
2090
|
+
// Extract citations and cell references from the markdown, returning the markdown with
|
|
2091
|
+
// placeholders and arrays of citation/cell reference objects.
|
|
2092
|
+
const extractCitationsAndCellRefs = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((text) => {
|
|
2093
|
+
// Regex for citations: [MITO_CITATION:cell_id:line_number] or [MITO_CITATION:cell_id:start_line-end_line]
|
|
1952
2094
|
const citationRegex = /\[MITO_CITATION:([^:]+):(\d+(?:-\d+)?)\]/g;
|
|
2095
|
+
// Regex for cell references: [MITO_CELL_REF:cell_id]
|
|
2096
|
+
const cellRefRegex = /\[MITO_CELL_REF:([^\]]+)\]/g;
|
|
1953
2097
|
const citations = [];
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
2098
|
+
const cellRefs = [];
|
|
2099
|
+
let citationCounter = 0;
|
|
2100
|
+
let cellRefCounter = 0;
|
|
2101
|
+
// First, replace citations with placeholders
|
|
2102
|
+
let processedMarkdown = text.replace(citationRegex, (match, cellId, lineStr) => {
|
|
1957
2103
|
try {
|
|
1958
|
-
const id = `citation-${
|
|
2104
|
+
const id = `citation-${citationCounter++}`;
|
|
1959
2105
|
const line = parseLineNumber(lineStr);
|
|
1960
2106
|
citations.push({
|
|
1961
2107
|
id,
|
|
1962
2108
|
data: {
|
|
1963
|
-
citation_index:
|
|
2109
|
+
citation_index: citationCounter,
|
|
1964
2110
|
cell_id: cellId,
|
|
1965
2111
|
line: line
|
|
1966
2112
|
}
|
|
@@ -1972,7 +2118,16 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
1972
2118
|
return match;
|
|
1973
2119
|
}
|
|
1974
2120
|
});
|
|
1975
|
-
|
|
2121
|
+
// Then, replace cell references with placeholders
|
|
2122
|
+
processedMarkdown = processedMarkdown.replace(cellRefRegex, (match, cellId) => {
|
|
2123
|
+
const id = `cellref-${cellRefCounter++}`;
|
|
2124
|
+
cellRefs.push({
|
|
2125
|
+
id,
|
|
2126
|
+
cellId: cellId.trim()
|
|
2127
|
+
});
|
|
2128
|
+
return `{{${id}}}`;
|
|
2129
|
+
});
|
|
2130
|
+
return { processedMarkdown, citations, cellRefs };
|
|
1976
2131
|
}, []);
|
|
1977
2132
|
// Uses the Jupyter markdowm MimeRenderer to render the markdown content as normal HTML
|
|
1978
2133
|
const renderMarkdownContent = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (processedMarkdown) => {
|
|
@@ -1992,13 +2147,14 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
1992
2147
|
console.error("Error rendering markdown:", error);
|
|
1993
2148
|
}
|
|
1994
2149
|
}, [renderMimeRegistry]);
|
|
1995
|
-
// Replace the citation placeholders with
|
|
1996
|
-
const
|
|
1997
|
-
if (!containerRef.current || citations.length === 0)
|
|
2150
|
+
// Replace the citation and cell reference placeholders with components in the DOM
|
|
2151
|
+
const createPortalsFromPlaceholders = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((citations, cellRefs) => {
|
|
2152
|
+
if (!containerRef.current || (citations.length === 0 && cellRefs.length === 0))
|
|
1998
2153
|
return [];
|
|
1999
2154
|
const newPortals = [];
|
|
2000
|
-
// Create
|
|
2155
|
+
// Create maps for faster lookup
|
|
2001
2156
|
const citationMap = new Map(citations.map(citation => [`{{${citation.id}}}`, citation]));
|
|
2157
|
+
const cellRefMap = new Map(cellRefs.map(ref => [`{{${ref.id}}}`, ref]));
|
|
2002
2158
|
// Find all text nodes that contain our placeholder like {{citation-id}}).
|
|
2003
2159
|
// Since these placeholders exist within the text content (not as separate DOM elements):
|
|
2004
2160
|
// - Find all text nodes in the rendered markdown
|
|
@@ -2016,7 +2172,7 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
2016
2172
|
return;
|
|
2017
2173
|
// Check if this node contains any placeholders
|
|
2018
2174
|
let containsPlaceholder = false;
|
|
2019
|
-
for (const placeholder of citationMap.keys()) {
|
|
2175
|
+
for (const placeholder of [...citationMap.keys(), ...cellRefMap.keys()]) {
|
|
2020
2176
|
if (node.nodeValue.includes(placeholder)) {
|
|
2021
2177
|
containsPlaceholder = true;
|
|
2022
2178
|
break;
|
|
@@ -2024,8 +2180,8 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
2024
2180
|
}
|
|
2025
2181
|
if (!containsPlaceholder)
|
|
2026
2182
|
return;
|
|
2027
|
-
// Create a regex to match all placeholders
|
|
2028
|
-
const placeholderPattern = /\{\{citation-\d+\}\}/g;
|
|
2183
|
+
// Create a regex to match all placeholders (citations and cell refs)
|
|
2184
|
+
const placeholderPattern = /\{\{(citation|cellref)-\d+\}\}/g;
|
|
2029
2185
|
const matches = [...node.nodeValue.matchAll(placeholderPattern)];
|
|
2030
2186
|
if (matches.length === 0)
|
|
2031
2187
|
return;
|
|
@@ -2034,21 +2190,50 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
2034
2190
|
let lastIndex = 0;
|
|
2035
2191
|
matches.forEach(match => {
|
|
2036
2192
|
const placeholder = match[0];
|
|
2037
|
-
const citation = citationMap.get(placeholder);
|
|
2038
|
-
if (!citation)
|
|
2039
|
-
return;
|
|
2040
2193
|
const startIndex = match.index;
|
|
2041
2194
|
// Add text before the placeholder
|
|
2042
2195
|
if (startIndex > lastIndex) {
|
|
2043
2196
|
fragment.appendChild(document.createTextNode(node.nodeValue.substring(lastIndex, startIndex)));
|
|
2044
2197
|
}
|
|
2045
|
-
//
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2198
|
+
// Check if it's a citation or cell reference
|
|
2199
|
+
const citation = citationMap.get(placeholder);
|
|
2200
|
+
const cellRef = cellRefMap.get(placeholder);
|
|
2201
|
+
if (citation) {
|
|
2202
|
+
// Create span for the citation
|
|
2203
|
+
const span = document.createElement('span');
|
|
2204
|
+
span.classList.add('citation-container');
|
|
2205
|
+
span.dataset.citationId = citation.id;
|
|
2206
|
+
fragment.appendChild(span);
|
|
2207
|
+
// Create React portal for this span
|
|
2208
|
+
newPortals.push(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CitationPortal, { key: citation.id + '-' + matches.indexOf(match), container: span, citationIndex: citation.data.citation_index, cellId: citation.data.cell_id, line: citation.data.line, notebookTracker: notebookTracker }));
|
|
2209
|
+
}
|
|
2210
|
+
else if (cellRef) {
|
|
2211
|
+
// Create clickable span for cell reference
|
|
2212
|
+
const cellNumber = cellOrder.get(cellRef.cellId);
|
|
2213
|
+
const isMissing = cellNumber === undefined;
|
|
2214
|
+
const displayText = isMissing ? 'Cell' : `Cell ${cellNumber}`;
|
|
2215
|
+
const span = document.createElement('span');
|
|
2216
|
+
span.className = isMissing ? 'cell-reference cell-reference-missing' : 'cell-reference';
|
|
2217
|
+
span.textContent = displayText;
|
|
2218
|
+
span.title = isMissing
|
|
2219
|
+
? 'Cell not found (may have been deleted or is in a different notebook)'
|
|
2220
|
+
: `Click to navigate to ${displayText}`;
|
|
2221
|
+
// Only add click handler if cell exists
|
|
2222
|
+
if (!isMissing) {
|
|
2223
|
+
span.addEventListener('click', (e) => {
|
|
2224
|
+
e.preventDefault();
|
|
2225
|
+
e.stopPropagation();
|
|
2226
|
+
if (notebookTracker.currentWidget) {
|
|
2227
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_6__.scrollToCell)(notebookTracker.currentWidget, cellRef.cellId, undefined, 'center');
|
|
2228
|
+
// Highlight the cell after scrolling
|
|
2229
|
+
setTimeout(() => {
|
|
2230
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_6__.highlightCodeCell)(notebookTracker, cellRef.cellId);
|
|
2231
|
+
}, 500);
|
|
2232
|
+
}
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
fragment.appendChild(span);
|
|
2236
|
+
}
|
|
2052
2237
|
lastIndex = startIndex + placeholder.length;
|
|
2053
2238
|
});
|
|
2054
2239
|
// Add any remaining text after the last placeholder
|
|
@@ -2061,20 +2246,21 @@ const MarkdownBlock = ({ markdown, renderMimeRegistry, notebookTracker }) => {
|
|
|
2061
2246
|
}
|
|
2062
2247
|
});
|
|
2063
2248
|
return newPortals;
|
|
2064
|
-
}, []);
|
|
2249
|
+
}, [notebookTracker, cellOrder]);
|
|
2065
2250
|
// Process everything in one effect, but with clear separation via helper functions
|
|
2251
|
+
// cellOrderKey triggers re-render when notebook loads or cells are reordered (fixes race condition on refresh)
|
|
2066
2252
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
2067
2253
|
const processMarkdown = async () => {
|
|
2068
|
-
// Step 1: Extract citations and get processed markdown
|
|
2069
|
-
const { processedMarkdown, citations } =
|
|
2254
|
+
// Step 1: Extract citations and cell references, get processed markdown
|
|
2255
|
+
const { processedMarkdown, citations, cellRefs } = extractCitationsAndCellRefs(markdown);
|
|
2070
2256
|
// Step 2: Render markdown with placeholders
|
|
2071
2257
|
await renderMarkdownContent(processedMarkdown);
|
|
2072
|
-
// Step 3: Create and insert
|
|
2073
|
-
const portals =
|
|
2258
|
+
// Step 3: Create and insert portals for citations and cell references
|
|
2259
|
+
const portals = createPortalsFromPlaceholders(citations, cellRefs);
|
|
2074
2260
|
setCitationPortals(portals);
|
|
2075
2261
|
};
|
|
2076
2262
|
void processMarkdown();
|
|
2077
|
-
}, [markdown,
|
|
2263
|
+
}, [markdown, extractCitationsAndCellRefs, renderMarkdownContent, createPortalsFromPlaceholders, cellOrderKey]);
|
|
2078
2264
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { ref: containerRef, className: "markdown-block-with-citations" }, citationPortals));
|
|
2079
2265
|
};
|
|
2080
2266
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MarkdownBlock);
|
|
@@ -2328,34 +2514,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2328
2514
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
2329
2515
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
2330
2516
|
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
2331
|
-
/* harmony import */ var
|
|
2332
|
-
/* harmony import */ var
|
|
2333
|
-
/* harmony import */ var
|
|
2334
|
-
/* harmony import */ var
|
|
2335
|
-
/* harmony import */ var
|
|
2336
|
-
/* harmony import */ var
|
|
2337
|
-
/* harmony import */ var
|
|
2338
|
-
/* harmony import */ var
|
|
2339
|
-
/* harmony import */ var
|
|
2340
|
-
/* harmony import */ var
|
|
2341
|
-
/* harmony import */ var
|
|
2517
|
+
/* harmony import */ var _components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../components/AgentComponents/ErrorFixupToolUI */ "./lib/components/AgentComponents/ErrorFixupToolUI.js");
|
|
2518
|
+
/* harmony import */ var _components_DropdownMenu__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../components/DropdownMenu */ "./lib/components/DropdownMenu.js");
|
|
2519
|
+
/* harmony import */ var _components_IconButton__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../components/IconButton */ "./lib/components/IconButton.js");
|
|
2520
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
2521
|
+
/* harmony import */ var _components_ModelSelector__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../components/ModelSelector */ "./lib/components/ModelSelector.js");
|
|
2522
|
+
/* harmony import */ var _components_NextStepsPills__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../components/NextStepsPills */ "./lib/components/NextStepsPills.js");
|
|
2523
|
+
/* harmony import */ var _components_ToggleButton__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../components/ToggleButton */ "./lib/components/ToggleButton.js");
|
|
2524
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
2525
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
2526
|
+
/* harmony import */ var _utils_chatHistory__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../utils/chatHistory */ "./lib/utils/chatHistory.js");
|
|
2527
|
+
/* harmony import */ var _utils_codeDiff__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../utils/codeDiff */ "./lib/utils/codeDiff.js");
|
|
2342
2528
|
/* harmony import */ var _utils_cellOutput__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../utils/cellOutput */ "./lib/utils/cellOutput.js");
|
|
2343
|
-
/* harmony import */ var
|
|
2529
|
+
/* harmony import */ var _utils_waitForNotebookReady__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/waitForNotebookReady */ "./lib/utils/waitForNotebookReady.js");
|
|
2344
2530
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AiChat/utils.js");
|
|
2345
|
-
/* harmony import */ var
|
|
2346
|
-
/* harmony import */ var
|
|
2531
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
2532
|
+
/* harmony import */ var _utils_sound__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/sound */ "./lib/utils/sound.js");
|
|
2533
|
+
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
2347
2534
|
/* harmony import */ var _SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../SettingsManager/profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
2348
|
-
/* harmony import */ var
|
|
2349
|
-
/* harmony import */ var
|
|
2350
|
-
/* harmony import */ var
|
|
2351
|
-
/* harmony import */ var
|
|
2352
|
-
/* harmony import */ var
|
|
2353
|
-
/* harmony import */ var
|
|
2354
|
-
/* harmony import */ var
|
|
2355
|
-
/* harmony import */ var
|
|
2535
|
+
/* harmony import */ var _components_AgentReviewPanel__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./components/AgentReviewPanel */ "./lib/Extensions/AiChat/components/AgentReviewPanel.js");
|
|
2536
|
+
/* harmony import */ var _CTACarousel__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./CTACarousel */ "./lib/Extensions/AiChat/CTACarousel.js");
|
|
2537
|
+
/* harmony import */ var _UsageBadge__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./UsageBadge */ "./lib/Extensions/AiChat/UsageBadge.js");
|
|
2538
|
+
/* harmony import */ var _SignUpForm__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./SignUpForm */ "./lib/Extensions/AiChat/SignUpForm.js");
|
|
2539
|
+
/* harmony import */ var _FirstMessage__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./FirstMessage */ "./lib/Extensions/AiChat/FirstMessage.js");
|
|
2540
|
+
/* harmony import */ var _ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./ChatMessage/ChatInput */ "./lib/Extensions/AiChat/ChatMessage/ChatInput.js");
|
|
2541
|
+
/* harmony import */ var _ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./ChatMessage/ChatMessage */ "./lib/Extensions/AiChat/ChatMessage/ChatMessage.js");
|
|
2542
|
+
/* harmony import */ var _ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./ChatMessage/ScrollableSuggestions */ "./lib/Extensions/AiChat/ChatMessage/ScrollableSuggestions.js");
|
|
2356
2543
|
/* harmony import */ var _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ChatHistoryManager */ "./lib/Extensions/AiChat/ChatHistoryManager.js");
|
|
2357
2544
|
/* harmony import */ var _hooks_useAgentReview__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./hooks/useAgentReview */ "./lib/Extensions/AiChat/hooks/useAgentReview.js");
|
|
2358
|
-
/* harmony import */ var
|
|
2545
|
+
/* harmony import */ var _hooks_useAgentExecution__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./hooks/useAgentExecution */ "./lib/Extensions/AiChat/hooks/useAgentExecution.js");
|
|
2359
2546
|
/* harmony import */ var _hooks_useUserSignup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hooks/useUserSignup */ "./lib/Extensions/AiChat/hooks/useUserSignup.js");
|
|
2360
2547
|
/* harmony import */ var _hooks_useChatScroll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hooks/useChatScroll */ "./lib/Extensions/AiChat/hooks/useChatScroll.js");
|
|
2361
2548
|
/* harmony import */ var _hooks_useModelConfig__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hooks/useModelConfig */ "./lib/Extensions/AiChat/hooks/useModelConfig.js");
|
|
@@ -2367,8 +2554,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2367
2554
|
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
2368
2555
|
/* harmony import */ var _style_ChatTaskpane_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/ChatTaskpane.css */ "./style/ChatTaskpane.css");
|
|
2369
2556
|
/* harmony import */ var _style_TextButton_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/TextButton.css */ "./style/TextButton.css");
|
|
2370
|
-
/* harmony import */ var
|
|
2371
|
-
/* harmony import */ var
|
|
2557
|
+
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
2558
|
+
/* harmony import */ var _utils_notebookMetadata__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../utils/notebookMetadata */ "./lib/utils/notebookMetadata.js");
|
|
2372
2559
|
/*
|
|
2373
2560
|
* Copyright (c) Saga Inc.
|
|
2374
2561
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -2398,6 +2585,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2398
2585
|
|
|
2399
2586
|
|
|
2400
2587
|
|
|
2588
|
+
|
|
2401
2589
|
// Internal imports - Chat components
|
|
2402
2590
|
|
|
2403
2591
|
|
|
@@ -2433,7 +2621,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2433
2621
|
// User signup state
|
|
2434
2622
|
const { isSignedUp, refreshUserSignupState } = (0,_hooks_useUserSignup__WEBPACK_IMPORTED_MODULE_7__.useUserSignup)();
|
|
2435
2623
|
// Core chat state management
|
|
2436
|
-
const { chatHistoryManager, chatHistoryManagerRef, setChatHistoryManager,
|
|
2624
|
+
const { chatHistoryManager, chatHistoryManagerRef, setChatHistoryManager, loadingStatus, setLoadingStatus, codeReviewStatus, setCodeReviewStatus, agentReviewStatus, setAgentReviewStatus, nextSteps, setNextSteps, displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable, } = (0,_hooks_useChatState__WEBPACK_IMPORTED_MODULE_8__.useChatState)(getDefaultChatHistoryManager(notebookTracker, contextManager, app));
|
|
2437
2625
|
// Chat scroll management
|
|
2438
2626
|
const { chatTaskpaneMessagesRef, setAutoScrollFollowMode } = (0,_hooks_useChatScroll__WEBPACK_IMPORTED_MODULE_9__.useChatScroll)(chatHistoryManager);
|
|
2439
2627
|
// Model configuration
|
|
@@ -2442,6 +2630,20 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2442
2630
|
const usageBadgeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
2443
2631
|
// Streaming response management
|
|
2444
2632
|
const { streamingContentRef, streamHandlerRef, activeRequestControllerRef } = (0,_hooks_useStreamingResponse__WEBPACK_IMPORTED_MODULE_11__.useStreamingResponse)();
|
|
2633
|
+
// Audio context management
|
|
2634
|
+
const audioContextRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
2635
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
2636
|
+
audioContextRef.current = new (window.AudioContext || window.webkitAudioContext)();
|
|
2637
|
+
return () => {
|
|
2638
|
+
const audioContext = audioContextRef.current;
|
|
2639
|
+
audioContextRef.current = null;
|
|
2640
|
+
if (audioContext) {
|
|
2641
|
+
void audioContext.close().catch(() => {
|
|
2642
|
+
// Ignore errors closing (e.g. already closed)
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
};
|
|
2646
|
+
}, []);
|
|
2445
2647
|
// Agent mode state management
|
|
2446
2648
|
const { agentModeEnabled, agentModeEnabledRef, setAgentModeEnabled, hasCheckpoint, setHasCheckpoint, showRevertQuestionnaire, setShowRevertQuestionnaire, } = (0,_hooks_useAgentMode__WEBPACK_IMPORTED_MODULE_12__.useAgentMode)();
|
|
2447
2649
|
// Create a shared ref for the agent target notebook panel
|
|
@@ -2522,7 +2724,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2522
2724
|
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2523
2725
|
const smartDebugMetadata = newChatHistoryManager.addSmartDebugMessage(activeThreadIdRef.current, errorMessage);
|
|
2524
2726
|
setChatHistoryManager(newChatHistoryManager);
|
|
2525
|
-
|
|
2727
|
+
setLoadingStatus('thinking');
|
|
2526
2728
|
// Step 2: Send the message to the AI
|
|
2527
2729
|
const smartDebugCompletionRequest = {
|
|
2528
2730
|
type: 'smartDebug',
|
|
@@ -2544,7 +2746,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2544
2746
|
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2545
2747
|
const agentSmartDebugMessage = newChatHistoryManager.addAgentSmartDebugMessage(activeThreadIdRef.current, errorMessage, agentTargetNotebookPanelRef.current);
|
|
2546
2748
|
setChatHistoryManager(newChatHistoryManager);
|
|
2547
|
-
|
|
2749
|
+
setLoadingStatus('thinking');
|
|
2548
2750
|
// Step 2: Send the message to the AI
|
|
2549
2751
|
const smartDebugCompletionRequest = {
|
|
2550
2752
|
type: 'agent:autoErrorFixup',
|
|
@@ -2563,7 +2765,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2563
2765
|
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2564
2766
|
const explainCodeMetadata = newChatHistoryManager.addExplainCodeMessage(activeThreadIdRef.current);
|
|
2565
2767
|
setChatHistoryManager(newChatHistoryManager);
|
|
2566
|
-
|
|
2768
|
+
setLoadingStatus('thinking');
|
|
2567
2769
|
// Step 2: Send the message to the AI
|
|
2568
2770
|
const explainCompletionRequest = {
|
|
2569
2771
|
type: 'codeExplain',
|
|
@@ -2593,7 +2795,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2593
2795
|
}
|
|
2594
2796
|
agentExecutionMetadata.base64EncodedActiveCellOutput = await (0,_utils__WEBPACK_IMPORTED_MODULE_17__.getBase64EncodedCellOutputInNotebook)(agentTargetNotebookPanel, sendCellIDOutput);
|
|
2595
2797
|
setChatHistoryManager(newChatHistoryManager);
|
|
2596
|
-
|
|
2798
|
+
setLoadingStatus('thinking');
|
|
2597
2799
|
// Step 2: Send the message to the AI
|
|
2598
2800
|
const completionRequest = {
|
|
2599
2801
|
type: 'agent:execution',
|
|
@@ -2619,7 +2821,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2619
2821
|
}
|
|
2620
2822
|
const chatMessageMetadata = await newChatHistoryManager.addChatInputMessage(input, activeThreadIdRef.current, messageIndex, additionalContext);
|
|
2621
2823
|
setChatHistoryManager(newChatHistoryManager);
|
|
2622
|
-
|
|
2824
|
+
setLoadingStatus('thinking');
|
|
2623
2825
|
// Yield control briefly to allow React to re-render the UI
|
|
2624
2826
|
// A timeout of 0ms pushes the rest of the function to the next event loop cycle
|
|
2625
2827
|
// so we don't get stuck behind the slow getActiveCellOutput function.
|
|
@@ -2651,7 +2853,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2651
2853
|
}
|
|
2652
2854
|
};
|
|
2653
2855
|
const _sendMessageAndSaveResponse = async (completionRequest, newChatHistoryManager) => {
|
|
2654
|
-
var _a, _b
|
|
2856
|
+
var _a, _b;
|
|
2655
2857
|
// Create AbortController for this request
|
|
2656
2858
|
const abortController = new AbortController();
|
|
2657
2859
|
activeRequestControllerRef.current = abortController;
|
|
@@ -2681,11 +2883,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2681
2883
|
console.groupEnd();
|
|
2682
2884
|
}
|
|
2683
2885
|
addAIMessageFromResponseAndUpdateState(chunk.error.hint || chunk.error.title || "An error occurred", completionRequest.metadata.promptType, newChatHistoryManager, true, chunk.error.title);
|
|
2684
|
-
|
|
2886
|
+
setLoadingStatus(undefined);
|
|
2685
2887
|
}
|
|
2686
2888
|
else if (chunk.done) {
|
|
2687
2889
|
// Reset states to allow future messages to show the "Apply" button
|
|
2688
2890
|
setCodeReviewStatus('chatPreview');
|
|
2891
|
+
// Play completion sound for streaming mode
|
|
2892
|
+
(0,_utils_sound__WEBPACK_IMPORTED_MODULE_20__.playCompletionSound)(audioContextRef.current);
|
|
2689
2893
|
}
|
|
2690
2894
|
else {
|
|
2691
2895
|
// Use a ref to accumulate the content properly
|
|
@@ -2696,27 +2900,23 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2696
2900
|
setChatHistoryManager(updatedChatHistoryManager);
|
|
2697
2901
|
// Set loading to false after we receive the first chunk
|
|
2698
2902
|
if (streamingContentRef.current.length > 0) {
|
|
2699
|
-
|
|
2903
|
+
setLoadingStatus(undefined);
|
|
2700
2904
|
}
|
|
2701
2905
|
}
|
|
2702
2906
|
};
|
|
2703
|
-
// Store the handler for later cleanup
|
|
2704
|
-
streamHandlerRef.current = streamHandler;
|
|
2705
|
-
// Connect the handler
|
|
2706
|
-
websocketClient.stream.connect(streamHandler, null);
|
|
2707
2907
|
try {
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
newChatHistoryManager.addAIMessageFromAgentResponse(agentResponse);
|
|
2715
|
-
}
|
|
2908
|
+
// Store the handler for later cleanup
|
|
2909
|
+
streamHandlerRef.current = streamHandler;
|
|
2910
|
+
// Connect the handler
|
|
2911
|
+
websocketClient.stream.connect(streamHandler, null);
|
|
2912
|
+
// Send the message to the AI and let the stream handler handle the rest
|
|
2913
|
+
await websocketClient.sendMessage(completionRequest);
|
|
2716
2914
|
}
|
|
2717
2915
|
catch (error) {
|
|
2718
2916
|
addAIMessageFromResponseAndUpdateState(error.title ? error.title : `${error}`, 'chat', newChatHistoryManager, false);
|
|
2719
2917
|
addAIMessageFromResponseAndUpdateState(error.hint ? error.hint : `${error}`, completionRequest.metadata.promptType, newChatHistoryManager, true);
|
|
2918
|
+
// Reset loading status when an error occurs
|
|
2919
|
+
setLoadingStatus(undefined);
|
|
2720
2920
|
}
|
|
2721
2921
|
}
|
|
2722
2922
|
else {
|
|
@@ -2750,7 +2950,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2750
2950
|
: `${aiResponse.error.error_type}: ${aiResponse.error.title}`, completionRequest.metadata.promptType, newChatHistoryManager, true, aiResponse.error.title);
|
|
2751
2951
|
}
|
|
2752
2952
|
else {
|
|
2753
|
-
const content = (
|
|
2953
|
+
const content = (_b = (_a = aiResponse.items[0]) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : '';
|
|
2754
2954
|
if (completionRequest.metadata.promptType === 'agent:execution' || completionRequest.metadata.promptType === 'agent:autoErrorFixup') {
|
|
2755
2955
|
// Agent:Execution prompts return a CellUpdate object that we need to parse
|
|
2756
2956
|
const agentResponse = JSON.parse(content);
|
|
@@ -2777,7 +2977,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2777
2977
|
finally {
|
|
2778
2978
|
// Reset states to allow future messages to show the "Apply" button
|
|
2779
2979
|
setCodeReviewStatus('chatPreview');
|
|
2780
|
-
|
|
2980
|
+
setLoadingStatus(undefined);
|
|
2781
2981
|
}
|
|
2782
2982
|
}
|
|
2783
2983
|
// Clean up AbortController
|
|
@@ -2799,7 +2999,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2799
2999
|
setChatHistoryManager(chatHistoryManager);
|
|
2800
3000
|
};
|
|
2801
3001
|
// Initialize agent execution hook
|
|
2802
|
-
const agentExecution = (0,
|
|
3002
|
+
const agentExecution = (0,_hooks_useAgentExecution__WEBPACK_IMPORTED_MODULE_21__.useAgentExecution)({
|
|
2803
3003
|
notebookTracker,
|
|
2804
3004
|
app,
|
|
2805
3005
|
streamlitPreviewManager,
|
|
@@ -2807,7 +3007,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2807
3007
|
chatHistoryManagerRef,
|
|
2808
3008
|
activeThreadIdRef,
|
|
2809
3009
|
activeRequestControllerRef,
|
|
2810
|
-
|
|
3010
|
+
setLoadingStatus,
|
|
2811
3011
|
setAutoScrollFollowMode,
|
|
2812
3012
|
setHasCheckpoint,
|
|
2813
3013
|
addAIMessageFromResponseAndUpdateState,
|
|
@@ -2816,7 +3016,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2816
3016
|
sendAgentSmartDebugMessage,
|
|
2817
3017
|
agentReview,
|
|
2818
3018
|
agentTargetNotebookPanelRef,
|
|
2819
|
-
setAgentReviewStatus
|
|
3019
|
+
setAgentReviewStatus,
|
|
3020
|
+
audioContextRef
|
|
2820
3021
|
});
|
|
2821
3022
|
// Main initialization effect - runs once on mount
|
|
2822
3023
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -2836,9 +3037,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2836
3037
|
else {
|
|
2837
3038
|
await startNewChat();
|
|
2838
3039
|
}
|
|
2839
|
-
const firstMessage = (0,
|
|
3040
|
+
const firstMessage = (0,_FirstMessage__WEBPACK_IMPORTED_MODULE_22__.getFirstMessage)();
|
|
2840
3041
|
if (firstMessage) {
|
|
2841
|
-
await (0,
|
|
3042
|
+
await (0,_utils_waitForNotebookReady__WEBPACK_IMPORTED_MODULE_23__.waitForNotebookReady)(notebookTracker);
|
|
2842
3043
|
await startNewChat();
|
|
2843
3044
|
await agentExecution.startAgentExecution(firstMessage, setAgentReviewStatus);
|
|
2844
3045
|
}
|
|
@@ -2849,7 +3050,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2849
3050
|
addAIMessageFromResponseAndUpdateState(error.hint ? error.hint : `${error}`, 'chat', newChatHistoryManager, true);
|
|
2850
3051
|
}
|
|
2851
3052
|
};
|
|
2852
|
-
void (0,
|
|
3053
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_24__.logEvent)('opened_ai_chat_taskpane');
|
|
2853
3054
|
void initializeChatHistory();
|
|
2854
3055
|
void refreshUserSignupState(); // Get user signup state when the component first mounts
|
|
2855
3056
|
/****
|
|
@@ -2857,7 +3058,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2857
3058
|
* to specific app files
|
|
2858
3059
|
* ****/
|
|
2859
3060
|
const handleNotebookPanelChanged = () => {
|
|
2860
|
-
(0,
|
|
3061
|
+
(0,_utils_notebookMetadata__WEBPACK_IMPORTED_MODULE_25__.setNotebookID)(notebookTracker.currentWidget);
|
|
2861
3062
|
};
|
|
2862
3063
|
// Event fires every time the active notebook panel changes
|
|
2863
3064
|
notebookTracker.currentChanged.connect(handleNotebookPanelChanged);
|
|
@@ -2936,14 +3137,14 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2936
3137
|
className: 'text-button-mito-ai button-base button-green',
|
|
2937
3138
|
caption: 'Accept Code',
|
|
2938
3139
|
execute: acceptAICode,
|
|
2939
|
-
isVisible: () => (0,
|
|
3140
|
+
isVisible: () => (0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_26__.shouldShowDiffToolbarButtons)(notebookTracker, cellStateBeforeDiff.current, agentReview.changedCellsRef.current)
|
|
2940
3141
|
});
|
|
2941
3142
|
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_13__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE, {
|
|
2942
3143
|
label: `Reject ${operatingSystem === 'mac' ? '⌘U' : 'Ctrl+U'}`,
|
|
2943
3144
|
className: 'text-button-mito-ai button-base button-red',
|
|
2944
3145
|
caption: 'Reject Code',
|
|
2945
3146
|
execute: rejectAICode,
|
|
2946
|
-
isVisible: () => (0,
|
|
3147
|
+
isVisible: () => (0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_26__.shouldShowDiffToolbarButtons)(notebookTracker, cellStateBeforeDiff.current, agentReview.changedCellsRef.current)
|
|
2947
3148
|
});
|
|
2948
3149
|
}, []);
|
|
2949
3150
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -2997,7 +3198,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2997
3198
|
// In agent mode, we group consecutive error messages together.
|
|
2998
3199
|
// In chat mode, we display messages individually as they were sent
|
|
2999
3200
|
if (agentModeEnabled) {
|
|
3000
|
-
processedDisplayOptimizedChatHistory = (0,
|
|
3201
|
+
processedDisplayOptimizedChatHistory = (0,_utils_chatHistory__WEBPACK_IMPORTED_MODULE_27__.processChatHistoryForErrorGrouping)(chatHistoryManager.getDisplayOptimizedHistory());
|
|
3001
3202
|
}
|
|
3002
3203
|
else {
|
|
3003
3204
|
processedDisplayOptimizedChatHistory = chatHistoryManager.getDisplayOptimizedHistory();
|
|
@@ -3008,20 +3209,20 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3008
3209
|
};
|
|
3009
3210
|
return (
|
|
3010
3211
|
// We disable the chat taskpane if the user is not signed up AND there are no chat history items
|
|
3011
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,
|
|
3212
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_28__.classNames)('chat-taskpane', { 'disabled': !(isSignedUp || displayOptimizedChatHistory.length > 0) }) },
|
|
3012
3213
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-taskpane-header" },
|
|
3013
3214
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-taskpane-header-left" },
|
|
3014
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3015
|
-
void app.commands.execute(
|
|
3215
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_IconButton__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1__.settingsIcon.react, null), title: "Mito AI Settings", onClick: () => {
|
|
3216
|
+
void app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_30__.COMMAND_MITO_AI_SETTINGS);
|
|
3016
3217
|
} }),
|
|
3017
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3218
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_UsageBadge__WEBPACK_IMPORTED_MODULE_31__["default"], { app: app, ref: usageBadgeRef })),
|
|
3018
3219
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-taskpane-header-right" },
|
|
3019
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3020
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3220
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_IconButton__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1__.addIcon.react, null), title: "Start New Chat", onClick: async () => { await startNewChat(); } }),
|
|
3221
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_DropdownMenu__WEBPACK_IMPORTED_MODULE_32__["default"], { trigger: react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "icon-button", title: "Chat Threads", onClick: fetchChatThreads },
|
|
3021
3222
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_1__.historyIcon.react, null)), items: chatThreads.length > 0
|
|
3022
3223
|
? chatThreads.map(thread => ({
|
|
3023
3224
|
label: thread.name,
|
|
3024
|
-
primaryIcon: activeThreadIdRef.current === thread.thread_id ?
|
|
3225
|
+
primaryIcon: activeThreadIdRef.current === thread.thread_id ? _icons__WEBPACK_IMPORTED_MODULE_33__.OpenIndicatorLabIcon.react : undefined,
|
|
3025
3226
|
onClick: () => fetchChatHistoryAndSetActiveThread(thread.thread_id),
|
|
3026
3227
|
secondaryActions: [
|
|
3027
3228
|
{
|
|
@@ -3039,23 +3240,27 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3039
3240
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-messages", ref: chatTaskpaneMessagesRef },
|
|
3040
3241
|
displayOptimizedChatHistory.length === 0 &&
|
|
3041
3242
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-empty-message" }, isSignedUp === false
|
|
3042
|
-
? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3043
|
-
: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3243
|
+
? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_SignUpForm__WEBPACK_IMPORTED_MODULE_34__["default"], { onSignUpSuccess: refreshUserSignupState })
|
|
3244
|
+
: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_CTACarousel__WEBPACK_IMPORTED_MODULE_35__["default"], { app: app })),
|
|
3044
3245
|
processedDisplayOptimizedChatHistory.map((displayOptimizedChat, index) => {
|
|
3045
3246
|
if (isGroupedErrorMessages(displayOptimizedChat)) {
|
|
3046
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3247
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_36__["default"], { key: index, messages: displayOptimizedChat, renderMimeRegistry: renderMimeRegistry, notebookTracker: notebookTracker }));
|
|
3047
3248
|
}
|
|
3048
3249
|
else {
|
|
3049
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3250
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_37__["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, handleSubmitUserMessage: handleSubmitUserMessage, contextManager: contextManager, codeReviewStatus: codeReviewStatus, setNextSteps: setNextSteps, agentModeEnabled: agentModeEnabled, additionalContext: displayOptimizedChat.additionalContext }));
|
|
3050
3251
|
}
|
|
3051
3252
|
}).filter(message => message !== null),
|
|
3052
|
-
|
|
3253
|
+
loadingStatus === 'thinking' &&
|
|
3053
3254
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-loading-message" },
|
|
3054
3255
|
"Thinking ",
|
|
3055
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3056
|
-
|
|
3256
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_38__["default"], null)),
|
|
3257
|
+
loadingStatus === 'running-code' &&
|
|
3258
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-loading-message" },
|
|
3259
|
+
"Running code ",
|
|
3260
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_38__["default"], null)),
|
|
3261
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentReviewPanel__WEBPACK_IMPORTED_MODULE_39__["default"], { hasCheckpoint: hasCheckpoint, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecution.agentExecutionStatus, showRevertQuestionnaire: showRevertQuestionnaire, reviewAgentChanges: agentReview.reviewAgentChanges, acceptAllAICode: agentReview.acceptAllAICode, rejectAllAICode: agentReview.rejectAllAICode, getChangeCounts: agentReview.getChangeCounts, getReviewProgress: agentReview.getReviewProgress, hasChanges: agentReview.hasChanges, setHasCheckpoint: setHasCheckpoint, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable, setShowRevertQuestionnaire: setShowRevertQuestionnaire, getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager, app: app, notebookTracker: notebookTracker, chatTaskpaneMessagesRef: chatTaskpaneMessagesRef, agentReviewStatus: agentReviewStatus, setAgentReviewStatus: setAgentReviewStatus })),
|
|
3057
3262
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "suggestions-container" },
|
|
3058
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3263
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_40__["default"], { onSelectSuggestion: (prompt) => {
|
|
3059
3264
|
if (agentModeEnabled) {
|
|
3060
3265
|
void agentExecution.startAgentExecution(prompt, setAgentReviewStatus);
|
|
3061
3266
|
}
|
|
@@ -3064,11 +3269,11 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3064
3269
|
}
|
|
3065
3270
|
} }))),
|
|
3066
3271
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `connected-input-container ${nextSteps.length > 0 ? 'has-next-steps' : ''}` },
|
|
3067
|
-
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3068
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3272
|
+
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_NextStepsPills__WEBPACK_IMPORTED_MODULE_41__["default"], { nextSteps: nextSteps, onSelectNextStep: agentExecution.startAgentExecution, displayedNextStepsIfAvailable: displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable, setAgentReviewStatus: setAgentReviewStatus })),
|
|
3273
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_42__["default"], { app: app, initialContent: '', handleSubmitUserMessage: handleSubmitUserMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecution.agentExecutionStatus, operatingSystem: operatingSystem, displayOptimizedChatHistoryLength: displayOptimizedChatHistory.length, agentTargetNotebookPanelRef: agentTargetNotebookPanelRef, isSignedUp: isSignedUp })),
|
|
3069
3274
|
agentExecution.agentExecutionStatus !== 'working' && agentExecution.agentExecutionStatus !== 'stopping' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-controls" },
|
|
3070
3275
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-controls-left" },
|
|
3071
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3276
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_ToggleButton__WEBPACK_IMPORTED_MODULE_43__["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) => {
|
|
3072
3277
|
await startNewChat(); // TODO: delete thread instead of starting new chat
|
|
3073
3278
|
setAgentModeEnabled(!isLeftSelected);
|
|
3074
3279
|
// Clear agent checkpoint when switching modes
|
|
@@ -3080,7 +3285,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3080
3285
|
chatInput.focus();
|
|
3081
3286
|
}
|
|
3082
3287
|
} }),
|
|
3083
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3288
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_ModelSelector__WEBPACK_IMPORTED_MODULE_44__["default"], { onConfigChange: (config) => {
|
|
3084
3289
|
// Just update the backend
|
|
3085
3290
|
void updateModelOnBackend(config.model);
|
|
3086
3291
|
} })),
|
|
@@ -3104,7 +3309,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3104
3309
|
" \u23CE"))),
|
|
3105
3310
|
(agentExecution.agentExecutionStatus === 'working' || agentExecution.agentExecutionStatus === 'stopping') && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-red stop-agent-button", onClick: () => void agentExecution.markAgentForStopping('userStop'), disabled: agentExecution.agentExecutionStatus === 'stopping', "data-testid": "stop-agent-button" }, agentExecution.agentExecutionStatus === 'stopping' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "stop-agent-button-content" },
|
|
3106
3311
|
"Stopping",
|
|
3107
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
3312
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_45__["default"], null),
|
|
3108
3313
|
" ")) : ('Stop Agent')))));
|
|
3109
3314
|
};
|
|
3110
3315
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatTaskpane);
|
|
@@ -3609,11 +3814,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3609
3814
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3610
3815
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
3611
3816
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);
|
|
3612
|
-
/* harmony import */ var
|
|
3613
|
-
/* harmony import */ var
|
|
3614
|
-
/* harmony import */ var
|
|
3615
|
-
/* harmony import */ var
|
|
3616
|
-
/* harmony import */ var
|
|
3817
|
+
/* harmony import */ var _utils_checkpoint__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/checkpoint */ "./lib/utils/checkpoint.js");
|
|
3818
|
+
/* harmony import */ var _utils_agentActions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/agentActions */ "./lib/utils/agentActions.js");
|
|
3819
|
+
/* harmony import */ var _utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/blacklistedWords */ "./lib/utils/blacklistedWords.js");
|
|
3820
|
+
/* harmony import */ var _utils_sound__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/sound */ "./lib/utils/sound.js");
|
|
3821
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/strings */ "./lib/utils/strings.js");
|
|
3822
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
3617
3823
|
/*
|
|
3618
3824
|
* Copyright (c) Saga Inc.
|
|
3619
3825
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -3625,8 +3831,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3625
3831
|
|
|
3626
3832
|
|
|
3627
3833
|
|
|
3834
|
+
|
|
3628
3835
|
const AGENT_EXECUTION_DEPTH_LIMIT = 20;
|
|
3629
|
-
const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, websocketClient, chatHistoryManagerRef, activeThreadIdRef, activeRequestControllerRef,
|
|
3836
|
+
const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, websocketClient, chatHistoryManagerRef, activeThreadIdRef, activeRequestControllerRef, setLoadingStatus, setAutoScrollFollowMode, setHasCheckpoint, addAIMessageFromResponseAndUpdateState, getDuplicateChatHistoryManager, sendAgentExecutionMessage, sendAgentSmartDebugMessage, agentReview, agentTargetNotebookPanelRef, audioContextRef, }) => {
|
|
3630
3837
|
// Agent execution state
|
|
3631
3838
|
const [agentExecutionStatus, setAgentExecutionStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('idle');
|
|
3632
3839
|
const shouldContinueAgentExecution = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true);
|
|
@@ -3635,7 +3842,7 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
3635
3842
|
shouldContinueAgentExecution.current = false;
|
|
3636
3843
|
// Update state/UI
|
|
3637
3844
|
setAgentExecutionStatus('idle');
|
|
3638
|
-
|
|
3845
|
+
setLoadingStatus(undefined);
|
|
3639
3846
|
if (reason === 'userStop') {
|
|
3640
3847
|
// Immediately abort any ongoing requests
|
|
3641
3848
|
if (activeRequestControllerRef.current) {
|
|
@@ -3656,13 +3863,13 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
3656
3863
|
stream: false
|
|
3657
3864
|
});
|
|
3658
3865
|
}
|
|
3659
|
-
|
|
3866
|
+
(0,_utils_sound__WEBPACK_IMPORTED_MODULE_2__.playCompletionSound)(audioContextRef.current);
|
|
3660
3867
|
};
|
|
3661
3868
|
const startAgentExecution = async (input, setAgentReviewStatus, messageIndex, additionalContext) => {
|
|
3662
3869
|
agentTargetNotebookPanelRef.current = notebookTracker.currentWidget;
|
|
3663
3870
|
agentReview.acceptAllAICode();
|
|
3664
|
-
agentReview.setNotebookSnapshotPreAgentExecution((0,
|
|
3665
|
-
await (0,
|
|
3871
|
+
agentReview.setNotebookSnapshotPreAgentExecution((0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.getAIOptimizedCellsInNotebookPanel)(agentTargetNotebookPanelRef.current));
|
|
3872
|
+
await (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_4__.createCheckpoint)(app, setHasCheckpoint);
|
|
3666
3873
|
setAgentExecutionStatus('working');
|
|
3667
3874
|
setAgentReviewStatus('pre-agent-code-review');
|
|
3668
3875
|
// Enable follow mode when user starts agent execution
|
|
@@ -3703,9 +3910,9 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
3703
3910
|
const aiDisplayOptimizedChatItem = chatHistoryManagerRef.current.getLastAIDisplayOptimizedChatItem();
|
|
3704
3911
|
// # TODO: Make this is a helper function so we can also use it in the auto error fixup!
|
|
3705
3912
|
if (aiDisplayOptimizedChatItem) {
|
|
3706
|
-
const aiGeneratedCode = (0,
|
|
3913
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.getCodeBlockFromMessage)(aiDisplayOptimizedChatItem.message);
|
|
3707
3914
|
if (aiGeneratedCode) {
|
|
3708
|
-
const securityCheck = (0,
|
|
3915
|
+
const securityCheck = (0,_utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_6__.checkForBlacklistedWords)(aiGeneratedCode);
|
|
3709
3916
|
if (!securityCheck.safe) {
|
|
3710
3917
|
console.error('Security Warning:', securityCheck.reason);
|
|
3711
3918
|
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', chatHistoryManagerRef.current);
|
|
@@ -3747,15 +3954,21 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
3747
3954
|
}
|
|
3748
3955
|
if (agentResponse.type === 'cell_update' && agentResponse.cell_update) {
|
|
3749
3956
|
// Run the code and handle any errors
|
|
3750
|
-
|
|
3751
|
-
|
|
3957
|
+
setLoadingStatus('running-code');
|
|
3958
|
+
try {
|
|
3959
|
+
await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_7__.acceptAndRunCellUpdate)(agentResponse.cell_update, agentTargetNotebookPanelRef.current);
|
|
3960
|
+
}
|
|
3961
|
+
finally {
|
|
3962
|
+
setLoadingStatus(undefined);
|
|
3963
|
+
}
|
|
3964
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_7__.retryIfExecutionError)(agentTargetNotebookPanelRef.current, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef, setLoadingStatus);
|
|
3752
3965
|
if (status === 'interupted') {
|
|
3753
3966
|
break;
|
|
3754
3967
|
}
|
|
3755
|
-
// If we were not able to run the code, break out of the loop
|
|
3968
|
+
// If we were not able to run the code, break out of the loop
|
|
3756
3969
|
// so we don't continue to execute the plan. Instead, we encourage
|
|
3757
|
-
// the user to update the plan and try again.
|
|
3758
|
-
// TODO: Save this message in backend also even if there is not another message sent.
|
|
3970
|
+
// the user to update the plan and try again.
|
|
3971
|
+
// TODO: Save this message in backend also even if there is not another message sent.
|
|
3759
3972
|
// TODO: Move this into the retryIfExecutionError function?
|
|
3760
3973
|
if (status === 'failure') {
|
|
3761
3974
|
addAIMessageFromResponseAndUpdateState("I apologize, but I was unable to fix the error after 3 attempts. You may want to try rephrasing your request or providing more context.", 'agent:execution', chatHistoryManagerRef.current);
|
|
@@ -3763,17 +3976,24 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
3763
3976
|
}
|
|
3764
3977
|
}
|
|
3765
3978
|
if (agentResponse.type === 'get_cell_output' && agentResponse.get_cell_output_cell_id !== null && agentResponse.get_cell_output_cell_id !== undefined) {
|
|
3766
|
-
// Mark that we should send the cell output to the agent
|
|
3979
|
+
// Mark that we should send the cell output to the agent
|
|
3767
3980
|
// in the next loop iteration
|
|
3768
3981
|
sendCellIDOutput = agentResponse.get_cell_output_cell_id;
|
|
3769
3982
|
}
|
|
3770
3983
|
if (agentResponse.type === 'run_all_cells') {
|
|
3771
|
-
|
|
3984
|
+
setLoadingStatus('running-code');
|
|
3985
|
+
let result;
|
|
3986
|
+
try {
|
|
3987
|
+
result = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_7__.runAllCells)(app, agentTargetNotebookPanelRef.current);
|
|
3988
|
+
}
|
|
3989
|
+
finally {
|
|
3990
|
+
setLoadingStatus(undefined);
|
|
3991
|
+
}
|
|
3772
3992
|
// If run_all_cells resulted in an error, handle it through the error fixup process
|
|
3773
3993
|
if (!result.success && result.errorMessage && result.errorCellId) {
|
|
3774
3994
|
// Set the error cell as active so the error retry logic can work with it
|
|
3775
|
-
(0,
|
|
3776
|
-
const status = await (0,
|
|
3995
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.setActiveCellByIDInNotebookPanel)(agentTargetNotebookPanelRef.current, result.errorCellId);
|
|
3996
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_7__.retryIfExecutionError)(agentTargetNotebookPanelRef.current, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef, setLoadingStatus);
|
|
3777
3997
|
if (status === 'interupted') {
|
|
3778
3998
|
break;
|
|
3779
3999
|
}
|
|
@@ -4209,7 +4429,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4209
4429
|
* Manages:
|
|
4210
4430
|
* - chatHistoryManager: The main chat history manager instance
|
|
4211
4431
|
* - chatHistoryManagerRef: Ref to access the latest chatHistoryManager value (for use in callbacks)
|
|
4212
|
-
* -
|
|
4432
|
+
* - loadingStatus: Current loading status (undefined, 'thinking', or 'running-code')
|
|
4213
4433
|
* - codeReviewStatus: Current status of code review (preview, applied, etc.)
|
|
4214
4434
|
* - agentReviewStatus: Current status of agent review
|
|
4215
4435
|
* - nextSteps: Array of suggested next steps from the AI
|
|
@@ -4222,7 +4442,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4222
4442
|
const useChatState = (initialChatHistoryManager) => {
|
|
4223
4443
|
const [chatHistoryManager, setChatHistoryManager] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialChatHistoryManager);
|
|
4224
4444
|
const chatHistoryManagerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(chatHistoryManager);
|
|
4225
|
-
const [
|
|
4445
|
+
const [loadingStatus, setLoadingStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(undefined);
|
|
4226
4446
|
const [codeReviewStatus, setCodeReviewStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('chatPreview');
|
|
4227
4447
|
const [agentReviewStatus, setAgentReviewStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('pre-agent-code-review');
|
|
4228
4448
|
const [nextSteps, setNextSteps] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
@@ -4254,8 +4474,8 @@ const useChatState = (initialChatHistoryManager) => {
|
|
|
4254
4474
|
chatHistoryManager,
|
|
4255
4475
|
chatHistoryManagerRef,
|
|
4256
4476
|
setChatHistoryManager,
|
|
4257
|
-
|
|
4258
|
-
|
|
4477
|
+
loadingStatus,
|
|
4478
|
+
setLoadingStatus,
|
|
4259
4479
|
codeReviewStatus,
|
|
4260
4480
|
setCodeReviewStatus,
|
|
4261
4481
|
agentReviewStatus,
|
|
@@ -7282,7 +7502,7 @@ const CollapsibleWarningBlock = ({ message }) => {
|
|
|
7282
7502
|
const [isExpanded, setIsExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7283
7503
|
const lines = message.split('\n');
|
|
7284
7504
|
const warningCount = lines.filter(line => line.includes("Warning: ")).length;
|
|
7285
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "output-block" },
|
|
7505
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "output-block mito-warning-block" },
|
|
7286
7506
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { style: { display: 'flex', alignItems: 'center', gap: '8px', cursor: 'pointer' }, onClick: () => setIsExpanded(!isExpanded) },
|
|
7287
7507
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "collapse-button" }, isExpanded ? '▼' : '▶'),
|
|
7288
7508
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", { style: { margin: 0, display: 'inline' } },
|
|
@@ -7540,6 +7760,248 @@ const getFullErrorMessageFromTraceback = (tracebackArray) => {
|
|
|
7540
7760
|
};
|
|
7541
7761
|
|
|
7542
7762
|
|
|
7763
|
+
/***/ }),
|
|
7764
|
+
|
|
7765
|
+
/***/ "./lib/Extensions/MitoThemeLight/index.js":
|
|
7766
|
+
/*!************************************************!*\
|
|
7767
|
+
!*** ./lib/Extensions/MitoThemeLight/index.js ***!
|
|
7768
|
+
\************************************************/
|
|
7769
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7770
|
+
|
|
7771
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7772
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7773
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7774
|
+
/* harmony export */ });
|
|
7775
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
7776
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);
|
|
7777
|
+
/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/translation */ "webpack/sharing/consume/default/@jupyterlab/translation");
|
|
7778
|
+
/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__);
|
|
7779
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
7780
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2__);
|
|
7781
|
+
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components");
|
|
7782
|
+
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__);
|
|
7783
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7784
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
7785
|
+
/* harmony import */ var _components_RunCellButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/RunCellButton */ "./lib/components/RunCellButton.js");
|
|
7786
|
+
/* harmony import */ var _utils_lineNumbers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/lineNumbers */ "./lib/utils/lineNumbers.js");
|
|
7787
|
+
/* harmony import */ var _style_RunCellButton_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/RunCellButton.css */ "./style/RunCellButton.css");
|
|
7788
|
+
/*
|
|
7789
|
+
* Copyright (c) Saga Inc.
|
|
7790
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7791
|
+
*/
|
|
7792
|
+
|
|
7793
|
+
|
|
7794
|
+
|
|
7795
|
+
|
|
7796
|
+
|
|
7797
|
+
|
|
7798
|
+
|
|
7799
|
+
|
|
7800
|
+
/**
|
|
7801
|
+
* Updates cell numbers for all cells in a notebook.
|
|
7802
|
+
* Uses notebook.widgets which is always in the correct order.
|
|
7803
|
+
*/
|
|
7804
|
+
function updateAllCellNumbers(notebookPanel) {
|
|
7805
|
+
const notebook = notebookPanel.content;
|
|
7806
|
+
notebook.widgets.forEach((cell, index) => {
|
|
7807
|
+
const header = cell.node.querySelector('.jp-Cell-header');
|
|
7808
|
+
if (header) {
|
|
7809
|
+
// 1-indexed for display (Cell 1, Cell 2, etc.)
|
|
7810
|
+
header.setAttribute('data-cell-number', String(index + 1));
|
|
7811
|
+
}
|
|
7812
|
+
});
|
|
7813
|
+
}
|
|
7814
|
+
/**
|
|
7815
|
+
* Sets up cell numbering for a notebook panel.
|
|
7816
|
+
* Returns cleanup function to disconnect handlers.
|
|
7817
|
+
*/
|
|
7818
|
+
function setupCellNumbering(notebookPanel) {
|
|
7819
|
+
var _a;
|
|
7820
|
+
const notebook = notebookPanel.content;
|
|
7821
|
+
// Store handler references so they can be disconnected on cleanup
|
|
7822
|
+
const handleCellsChanged = () => {
|
|
7823
|
+
updateAllCellNumbers(notebookPanel);
|
|
7824
|
+
};
|
|
7825
|
+
const handleActiveCellChanged = () => {
|
|
7826
|
+
updateAllCellNumbers(notebookPanel);
|
|
7827
|
+
};
|
|
7828
|
+
// Update when cells are added, removed, or moved
|
|
7829
|
+
(_a = notebook.model) === null || _a === void 0 ? void 0 : _a.cells.changed.connect(handleCellsChanged);
|
|
7830
|
+
// Update when active cell changes (often happens when scrolling)
|
|
7831
|
+
notebook.activeCellChanged.connect(handleActiveCellChanged);
|
|
7832
|
+
// Use MutationObserver to handle virtualization (cells being attached/detached)
|
|
7833
|
+
const observer = new MutationObserver(() => {
|
|
7834
|
+
updateAllCellNumbers(notebookPanel);
|
|
7835
|
+
});
|
|
7836
|
+
observer.observe(notebook.node, { childList: true, subtree: true });
|
|
7837
|
+
// Return cleanup function
|
|
7838
|
+
return () => {
|
|
7839
|
+
var _a;
|
|
7840
|
+
(_a = notebook.model) === null || _a === void 0 ? void 0 : _a.cells.changed.disconnect(handleCellsChanged);
|
|
7841
|
+
notebook.activeCellChanged.disconnect(handleActiveCellChanged);
|
|
7842
|
+
observer.disconnect();
|
|
7843
|
+
// Remove cell numbers from all cells
|
|
7844
|
+
notebook.widgets.forEach((cell) => {
|
|
7845
|
+
const header = cell.node.querySelector('.jp-Cell-header');
|
|
7846
|
+
if (header) {
|
|
7847
|
+
header.removeAttribute('data-cell-number');
|
|
7848
|
+
}
|
|
7849
|
+
});
|
|
7850
|
+
};
|
|
7851
|
+
}
|
|
7852
|
+
/**
|
|
7853
|
+
* A plugin for the Mito Light Theme.
|
|
7854
|
+
*
|
|
7855
|
+
* The Run Cell Button, cell numbering, and hidden default toolbar buttons only apply
|
|
7856
|
+
* when the Mito Light theme is active.
|
|
7857
|
+
*/
|
|
7858
|
+
const plugin = {
|
|
7859
|
+
id: 'mito_ai:theme',
|
|
7860
|
+
description: 'Adds the Mito Light theme.',
|
|
7861
|
+
requires: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.IThemeManager, _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.ITranslator, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2__.INotebookTracker],
|
|
7862
|
+
activate: (app, manager, translator, notebookTracker) => {
|
|
7863
|
+
const trans = translator.load('jupyterlab');
|
|
7864
|
+
const style = 'mito_ai/index.css';
|
|
7865
|
+
// Store connection for cleanup
|
|
7866
|
+
let widgetAddedConnection = null;
|
|
7867
|
+
// Store cell numbering cleanup functions for each notebook
|
|
7868
|
+
const cellNumberingCleanups = new Map();
|
|
7869
|
+
// Add Run Cell button to notebook toolbar
|
|
7870
|
+
const addRunCellButton = (notebookPanel) => {
|
|
7871
|
+
const toolbar = notebookPanel.toolbar;
|
|
7872
|
+
if (!toolbar) {
|
|
7873
|
+
return;
|
|
7874
|
+
}
|
|
7875
|
+
// Check if button already exists
|
|
7876
|
+
if (toolbar.node.querySelector('.mito-run-cell-button-widget')) {
|
|
7877
|
+
return;
|
|
7878
|
+
}
|
|
7879
|
+
// Create React widget with the specific notebook panel
|
|
7880
|
+
class RunCellButtonWidget extends _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_3__.ReactWidget {
|
|
7881
|
+
constructor(panel) {
|
|
7882
|
+
super();
|
|
7883
|
+
this.panel = panel;
|
|
7884
|
+
this.addClass('mito-run-cell-button-widget');
|
|
7885
|
+
}
|
|
7886
|
+
render() {
|
|
7887
|
+
return react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_components_RunCellButton__WEBPACK_IMPORTED_MODULE_6__["default"], { notebookPanel: this.panel });
|
|
7888
|
+
}
|
|
7889
|
+
}
|
|
7890
|
+
const runCellWidget = new RunCellButtonWidget(notebookPanel);
|
|
7891
|
+
// Add to the right side of the toolbar by inserting after spacer or at the end
|
|
7892
|
+
try {
|
|
7893
|
+
toolbar.insertAfter('spacer', 'mito-run-cell-button', runCellWidget);
|
|
7894
|
+
}
|
|
7895
|
+
catch (_a) {
|
|
7896
|
+
// If spacer doesn't exist, add at the end
|
|
7897
|
+
toolbar.addItem('mito-run-cell-button', runCellWidget);
|
|
7898
|
+
}
|
|
7899
|
+
};
|
|
7900
|
+
// Remove Run Cell button from notebook toolbar
|
|
7901
|
+
const removeRunCellButton = (notebookPanel) => {
|
|
7902
|
+
const toolbar = notebookPanel.toolbar;
|
|
7903
|
+
if (!toolbar) {
|
|
7904
|
+
return;
|
|
7905
|
+
}
|
|
7906
|
+
// Find and remove the button widget by iterating toolbar items
|
|
7907
|
+
for (const name of toolbar.names()) {
|
|
7908
|
+
if (name === 'mito-run-cell-button') {
|
|
7909
|
+
// Hide the widget (disposal happens automatically when panel is disposed)
|
|
7910
|
+
const widget = Array.from(toolbar.children()).find(w => w.hasClass('mito-run-cell-button-widget'));
|
|
7911
|
+
if (widget) {
|
|
7912
|
+
widget.dispose();
|
|
7913
|
+
}
|
|
7914
|
+
break;
|
|
7915
|
+
}
|
|
7916
|
+
}
|
|
7917
|
+
};
|
|
7918
|
+
// Remove cell numbering from a notebook panel
|
|
7919
|
+
const removeCellNumbering = (notebookPanel) => {
|
|
7920
|
+
const cleanup = cellNumberingCleanups.get(notebookPanel);
|
|
7921
|
+
if (cleanup) {
|
|
7922
|
+
cleanup();
|
|
7923
|
+
cellNumberingCleanups.delete(notebookPanel);
|
|
7924
|
+
}
|
|
7925
|
+
};
|
|
7926
|
+
// Add buttons and cell numbering to all notebooks
|
|
7927
|
+
const addButtonsToAllNotebooks = () => {
|
|
7928
|
+
notebookTracker.forEach(widget => {
|
|
7929
|
+
addRunCellButton(widget);
|
|
7930
|
+
// Enable line numbers if needed
|
|
7931
|
+
void (0,_utils_lineNumbers__WEBPACK_IMPORTED_MODULE_7__.enableLineNumbersIfNeeded)(app, widget);
|
|
7932
|
+
// Setup cell numbering
|
|
7933
|
+
const cleanup = setupCellNumbering(widget);
|
|
7934
|
+
if (cleanup) {
|
|
7935
|
+
cellNumberingCleanups.set(widget, cleanup);
|
|
7936
|
+
// Also cleanup when notebook is disposed
|
|
7937
|
+
widget.disposed.connect(() => {
|
|
7938
|
+
cellNumberingCleanups.delete(widget);
|
|
7939
|
+
});
|
|
7940
|
+
}
|
|
7941
|
+
});
|
|
7942
|
+
// Connect to new notebooks
|
|
7943
|
+
widgetAddedConnection = (sender, widget) => {
|
|
7944
|
+
setTimeout(() => {
|
|
7945
|
+
// Check if widget is still valid before proceeding
|
|
7946
|
+
if (widget.isDisposed) {
|
|
7947
|
+
return;
|
|
7948
|
+
}
|
|
7949
|
+
// Only add if Mito Light theme is still active
|
|
7950
|
+
if (manager.theme === 'Mito Light') {
|
|
7951
|
+
addRunCellButton(widget);
|
|
7952
|
+
// Enable line numbers if needed
|
|
7953
|
+
void (0,_utils_lineNumbers__WEBPACK_IMPORTED_MODULE_7__.enableLineNumbersIfNeeded)(app, widget);
|
|
7954
|
+
// Setup cell numbering
|
|
7955
|
+
const cleanup = setupCellNumbering(widget);
|
|
7956
|
+
if (cleanup) {
|
|
7957
|
+
cellNumberingCleanups.set(widget, cleanup);
|
|
7958
|
+
// Also cleanup when notebook is disposed
|
|
7959
|
+
widget.disposed.connect(() => {
|
|
7960
|
+
cellNumberingCleanups.delete(widget);
|
|
7961
|
+
});
|
|
7962
|
+
}
|
|
7963
|
+
}
|
|
7964
|
+
}, 100);
|
|
7965
|
+
};
|
|
7966
|
+
notebookTracker.widgetAdded.connect(widgetAddedConnection);
|
|
7967
|
+
};
|
|
7968
|
+
// Remove buttons and cell numbering from all notebooks
|
|
7969
|
+
const removeButtonsFromAllNotebooks = () => {
|
|
7970
|
+
// Disconnect from new notebooks
|
|
7971
|
+
if (widgetAddedConnection) {
|
|
7972
|
+
notebookTracker.widgetAdded.disconnect(widgetAddedConnection);
|
|
7973
|
+
widgetAddedConnection = null;
|
|
7974
|
+
}
|
|
7975
|
+
// Remove from all existing notebooks
|
|
7976
|
+
notebookTracker.forEach(widget => {
|
|
7977
|
+
removeRunCellButton(widget);
|
|
7978
|
+
removeCellNumbering(widget);
|
|
7979
|
+
});
|
|
7980
|
+
// Clear all cleanup functions
|
|
7981
|
+
cellNumberingCleanups.clear();
|
|
7982
|
+
};
|
|
7983
|
+
manager.register({
|
|
7984
|
+
name: 'Mito Light',
|
|
7985
|
+
displayName: trans.__('Mito Light'),
|
|
7986
|
+
isLight: true,
|
|
7987
|
+
themeScrollbars: false,
|
|
7988
|
+
load: async () => {
|
|
7989
|
+
// Load theme CSS (hides default buttons)
|
|
7990
|
+
await manager.loadCSS(style);
|
|
7991
|
+
// Add Run Cell buttons to all notebooks and enable line numbers
|
|
7992
|
+
addButtonsToAllNotebooks();
|
|
7993
|
+
},
|
|
7994
|
+
unload: async () => {
|
|
7995
|
+
// Remove Run Cell buttons from all notebooks
|
|
7996
|
+
removeButtonsFromAllNotebooks();
|
|
7997
|
+
}
|
|
7998
|
+
});
|
|
7999
|
+
},
|
|
8000
|
+
autoStart: true
|
|
8001
|
+
};
|
|
8002
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugin);
|
|
8003
|
+
|
|
8004
|
+
|
|
7543
8005
|
/***/ }),
|
|
7544
8006
|
|
|
7545
8007
|
/***/ "./lib/Extensions/NotebookFooter/NotebookFooter.js":
|
|
@@ -7561,6 +8023,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7561
8023
|
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
7562
8024
|
/* harmony import */ var _icons_NotebookFooter_CodeIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../icons/NotebookFooter/CodeIcon */ "./lib/icons/NotebookFooter/CodeIcon.js");
|
|
7563
8025
|
/* harmony import */ var _icons_NotebookFooter_TextIcon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../icons/NotebookFooter/TextIcon */ "./lib/icons/NotebookFooter/TextIcon.js");
|
|
8026
|
+
/* harmony import */ var _icons_NotebookFooter_SpreadsheetIcon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../icons/NotebookFooter/SpreadsheetIcon */ "./lib/icons/NotebookFooter/SpreadsheetIcon.js");
|
|
7564
8027
|
/* harmony import */ var _utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/userSignupEvents */ "./lib/utils/userSignupEvents.js");
|
|
7565
8028
|
/* harmony import */ var _AiChat_hooks_useUserSignup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../AiChat/hooks/useUserSignup */ "./lib/Extensions/AiChat/hooks/useUserSignup.js");
|
|
7566
8029
|
/*
|
|
@@ -7577,15 +8040,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7577
8040
|
|
|
7578
8041
|
|
|
7579
8042
|
|
|
8043
|
+
|
|
7580
8044
|
const NotebookFooter = ({ notebookTracker, app }) => {
|
|
7581
8045
|
var _a;
|
|
7582
8046
|
const notebook = (_a = notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.content;
|
|
7583
8047
|
const [inputValue, setInputValue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
7584
8048
|
const [isGenerating, setIsGenerating] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
8049
|
+
const [hasMitosheet, setHasMitosheet] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7585
8050
|
const { isSignedUp, refreshUserSignupState } = (0,_AiChat_hooks_useUserSignup__WEBPACK_IMPORTED_MODULE_3__.useUserSignup)();
|
|
7586
8051
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7587
8052
|
void refreshUserSignupState();
|
|
7588
8053
|
}, []);
|
|
8054
|
+
// Check if mitosheet command exists
|
|
8055
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
8056
|
+
setHasMitosheet(app.commands.hasCommand('mitosheet:create-empty-mitosheet'));
|
|
8057
|
+
}, [app]);
|
|
7589
8058
|
// Listen for signup success events from other components
|
|
7590
8059
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7591
8060
|
const handleSignupSuccess = () => {
|
|
@@ -7619,6 +8088,9 @@ const NotebookFooter = ({ notebookTracker, app }) => {
|
|
|
7619
8088
|
if (cellType === 'code') {
|
|
7620
8089
|
_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.insertBelow(notebook);
|
|
7621
8090
|
}
|
|
8091
|
+
else if (cellType === 'spreadsheet') {
|
|
8092
|
+
void app.commands.execute('mitosheet:create-empty-mitosheet');
|
|
8093
|
+
}
|
|
7622
8094
|
else {
|
|
7623
8095
|
_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.insertBelow(notebook);
|
|
7624
8096
|
// Change the cell type after insertion
|
|
@@ -7684,7 +8156,12 @@ const NotebookFooter = ({ notebookTracker, app }) => {
|
|
|
7684
8156
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-content" },
|
|
7685
8157
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-icon" },
|
|
7686
8158
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotebookFooter_TextIcon__WEBPACK_IMPORTED_MODULE_8__["default"], null)),
|
|
7687
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Text")))
|
|
8159
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Text"))),
|
|
8160
|
+
hasMitosheet && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => addCell('spreadsheet'), className: "footer-button", onMouseDown: (e) => e.stopPropagation() },
|
|
8161
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-content" },
|
|
8162
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-icon" },
|
|
8163
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotebookFooter_SpreadsheetIcon__WEBPACK_IMPORTED_MODULE_9__["default"], null)),
|
|
8164
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Spreadsheet")))))));
|
|
7688
8165
|
};
|
|
7689
8166
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotebookFooter);
|
|
7690
8167
|
|
|
@@ -9240,7 +9717,7 @@ const ToolbarButtonsPlugin = {
|
|
|
9240
9717
|
commands.addCommand('toolbar-button:preview-as-streamlit', {
|
|
9241
9718
|
label: 'App Mode',
|
|
9242
9719
|
caption: 'Preview notebook as app and turn on App Mode',
|
|
9243
|
-
className: 'text-button-mito-ai button-base button-
|
|
9720
|
+
className: 'text-button-mito-ai button-base button-blue button-small',
|
|
9244
9721
|
execute: async () => {
|
|
9245
9722
|
void app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_2__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT);
|
|
9246
9723
|
},
|
|
@@ -9275,14 +9752,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9275
9752
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9276
9753
|
/* harmony export */ versionCheckPlugin: () => (/* binding */ versionCheckPlugin)
|
|
9277
9754
|
/* harmony export */ });
|
|
9278
|
-
/* harmony import */ var
|
|
9279
|
-
/* harmony import */ var _utils_user__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/user */ "./lib/utils/user.js");
|
|
9755
|
+
/* harmony import */ var _utils_version_check__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/version_check */ "./lib/utils/version_check.js");
|
|
9280
9756
|
/*
|
|
9281
9757
|
* Copyright (c) Saga Inc.
|
|
9282
9758
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9283
9759
|
*/
|
|
9284
9760
|
|
|
9285
|
-
|
|
9286
9761
|
// Check interval - once per day in milliseconds
|
|
9287
9762
|
const CHECK_INTERVAL = 24 * 60 * 60 * 1000;
|
|
9288
9763
|
// Cache key for storing the last check time
|
|
@@ -9355,13 +9830,7 @@ function updateLastCheckTime() {
|
|
|
9355
9830
|
* Performs the version check
|
|
9356
9831
|
*/
|
|
9357
9832
|
async function performVersionCheck(app) {
|
|
9358
|
-
|
|
9359
|
-
// Desktop users only need a single notification - when a new desktop app version is available.
|
|
9360
|
-
// That new version of the desktop app will handle updating mito-ai automatically.
|
|
9361
|
-
if ((0,_utils_user__WEBPACK_IMPORTED_MODULE_0__.isElectronBasedFrontend)()) {
|
|
9362
|
-
return;
|
|
9363
|
-
}
|
|
9364
|
-
return (0,_utils_version_check__WEBPACK_IMPORTED_MODULE_1__.checkForUpdates)(app.serviceManager.serverSettings);
|
|
9833
|
+
return (0,_utils_version_check__WEBPACK_IMPORTED_MODULE_0__.checkForUpdates)(app.serviceManager.serverSettings);
|
|
9365
9834
|
}
|
|
9366
9835
|
/**
|
|
9367
9836
|
* Sets up periodic checks for updates
|
|
@@ -9766,6 +10235,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9766
10235
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9767
10236
|
*/
|
|
9768
10237
|
const MITO_AI = 'mito_ai';
|
|
10238
|
+
// Note that this command is also used by the mitosheet package to check
|
|
10239
|
+
// if the Mito AI extension is enabled. Make sure to update it there if you change it here.
|
|
9769
10240
|
const COMMAND_MITO_AI_OPEN_CHAT = `${MITO_AI}:open-chat`;
|
|
9770
10241
|
const COMMAND_MITO_AI_PREVIEW_LATEST_CODE = `${MITO_AI}:preview-latest-code`;
|
|
9771
10242
|
const COMMAND_MITO_AI_APPLY_LATEST_CODE = `${MITO_AI}:apply-latest-code`;
|
|
@@ -9803,7 +10274,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9803
10274
|
*/
|
|
9804
10275
|
|
|
9805
10276
|
|
|
9806
|
-
const AgentComponentHeader = ({ icon, text, onClick, isExpanded, displayBorder = true, className }) => {
|
|
10277
|
+
const AgentComponentHeader = ({ icon, text, onClick, isExpanded, displayBorder = true, className, actionButtons }) => {
|
|
9807
10278
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { onClick: onClick, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_1__.classNames)('agent-component-header', {
|
|
9808
10279
|
expanded: isExpanded,
|
|
9809
10280
|
'no-border': !displayBorder
|
|
@@ -9811,10 +10282,12 @@ const AgentComponentHeader = ({ icon, text, onClick, isExpanded, displayBorder =
|
|
|
9811
10282
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-component-header-content" },
|
|
9812
10283
|
icon,
|
|
9813
10284
|
text),
|
|
9814
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
10285
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-component-header-actions" },
|
|
10286
|
+
actionButtons,
|
|
10287
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_1__.classNames)('agent-component-header-expand-icon', {
|
|
10288
|
+
expanded: isExpanded
|
|
10289
|
+
}), width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
10290
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: isExpanded ? 'rotate(90 8 8)' : 'rotate(0 8 8)' })))));
|
|
9818
10291
|
};
|
|
9819
10292
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AgentComponentHeader);
|
|
9820
10293
|
|
|
@@ -9936,15 +10409,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9936
10409
|
/* harmony export */ });
|
|
9937
10410
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
9938
10411
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9939
|
-
/* harmony import */ var
|
|
9940
|
-
/* harmony import */ var
|
|
9941
|
-
/* harmony import */ var
|
|
9942
|
-
/* harmony import */ var
|
|
9943
|
-
/* harmony import */ var
|
|
9944
|
-
/* harmony import */ var
|
|
10412
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
10413
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strings */ "./lib/utils/strings.js");
|
|
10414
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/notebook */ "./lib/utils/notebook.js");
|
|
10415
|
+
/* harmony import */ var _Extensions_AiChat_ChatMessage_PythonCode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Extensions/AiChat/ChatMessage/PythonCode */ "./lib/Extensions/AiChat/ChatMessage/PythonCode.js");
|
|
10416
|
+
/* harmony import */ var _Extensions_AiChat_ChatMessage_AssistantCodeBlock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Extensions/AiChat/ChatMessage/AssistantCodeBlock */ "./lib/Extensions/AiChat/ChatMessage/AssistantCodeBlock.js");
|
|
10417
|
+
/* harmony import */ var _icons_AlertIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../icons/AlertIcon */ "./lib/icons/AlertIcon.js");
|
|
10418
|
+
/* harmony import */ var _AgentComponentHeader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./AgentComponentHeader */ "./lib/components/AgentComponents/AgentComponentHeader.js");
|
|
9945
10419
|
/* harmony import */ var _style_ErrorFixupToolUI_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/ErrorFixupToolUI.css */ "./style/ErrorFixupToolUI.css");
|
|
9946
10420
|
/* harmony import */ var _style_AgentComponentHeader_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/AgentComponentHeader.css */ "./style/AgentComponentHeader.css");
|
|
9947
|
-
/* harmony import */ var
|
|
10421
|
+
/* harmony import */ var _RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./RunAllCellsToolUI */ "./lib/components/AgentComponents/RunAllCellsToolUI.js");
|
|
9948
10422
|
/*
|
|
9949
10423
|
* Copyright (c) Saga Inc.
|
|
9950
10424
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -9959,6 +10433,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9959
10433
|
|
|
9960
10434
|
|
|
9961
10435
|
|
|
10436
|
+
|
|
10437
|
+
const getCellIdFromCellUpdate = (cellUpdate, notebookTracker) => {
|
|
10438
|
+
if (!cellUpdate) {
|
|
10439
|
+
return undefined;
|
|
10440
|
+
}
|
|
10441
|
+
if (cellUpdate.type === 'modification') {
|
|
10442
|
+
return cellUpdate.id;
|
|
10443
|
+
}
|
|
10444
|
+
// For 'new' type, get the cell ID by index
|
|
10445
|
+
return (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.getCellIDByIndexInNotebookPanel)(notebookTracker.currentWidget, cellUpdate.index);
|
|
10446
|
+
};
|
|
9962
10447
|
const parsePythonErrorType = (content) => {
|
|
9963
10448
|
if (!content)
|
|
9964
10449
|
return 'Error';
|
|
@@ -9975,31 +10460,31 @@ const processErrorContent = (content) => {
|
|
|
9975
10460
|
};
|
|
9976
10461
|
const ErrorDetectedBlock = ({ errorMessage, renderMimeRegistry, }) => {
|
|
9977
10462
|
const [expandedError, setExpandedError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
9978
|
-
const rawErrorContent = (0,
|
|
10463
|
+
const rawErrorContent = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_4__.getContentStringFromMessage)(errorMessage);
|
|
9979
10464
|
const errorContent = processErrorContent(rawErrorContent);
|
|
9980
10465
|
const errorType = parsePythonErrorType(errorContent);
|
|
9981
10466
|
const toggleError = () => {
|
|
9982
10467
|
setExpandedError(!expandedError);
|
|
9983
10468
|
};
|
|
9984
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,
|
|
9985
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
10469
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)('error-fixup-container', { expanded: expandedError }) },
|
|
10470
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AgentComponentHeader__WEBPACK_IMPORTED_MODULE_6__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_AlertIcon__WEBPACK_IMPORTED_MODULE_7__["default"], null), text: `${errorType} Detected`, onClick: toggleError, isExpanded: expandedError, displayBorder: false }),
|
|
9986
10471
|
expandedError && errorContent && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "error-fixup-expanded" },
|
|
9987
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
10472
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Extensions_AiChat_ChatMessage_PythonCode__WEBPACK_IMPORTED_MODULE_8__["default"], { code: errorContent, renderMimeRegistry: renderMimeRegistry })))));
|
|
9988
10473
|
};
|
|
9989
|
-
const GroupedErrorsAndFixes = ({ messages, renderMimeRegistry, }) => {
|
|
10474
|
+
const GroupedErrorsAndFixes = ({ messages, renderMimeRegistry, notebookTracker, }) => {
|
|
9990
10475
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "error-fixup-root" },
|
|
9991
10476
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "error-fixup-header" },
|
|
9992
10477
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "Fixing an error")),
|
|
9993
10478
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "error-fixup-messages-container" }, messages.map((messageItem, index) => {
|
|
9994
|
-
var _a, _b, _c, _d;
|
|
10479
|
+
var _a, _b, _c, _d, _e;
|
|
9995
10480
|
const isUserMessage = messageItem.message.role === 'user';
|
|
9996
10481
|
if (isUserMessage) {
|
|
9997
10482
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ErrorDetectedBlock, { key: `error-${index}`, errorMessage: messageItem.message, renderMimeRegistry: renderMimeRegistry }));
|
|
9998
10483
|
}
|
|
9999
10484
|
if (((_a = messageItem.agentResponse) === null || _a === void 0 ? void 0 : _a.type) === 'run_all_cells') {
|
|
10000
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
10485
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_9__["default"], { key: `run-all-cells-${index}`, inErrorFixup: true }));
|
|
10001
10486
|
}
|
|
10002
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
10487
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Extensions_AiChat_ChatMessage_AssistantCodeBlock__WEBPACK_IMPORTED_MODULE_10__["default"], { key: `assistant-${index}`, code: messageItem.message.content, codeSummary: (_d = (_c = (_b = messageItem.agentResponse) === null || _b === void 0 ? void 0 : _b.cell_update) === null || _c === void 0 ? void 0 : _c.code_summary) !== null && _d !== void 0 ? _d : 'Fixing error', isCodeComplete: true, renderMimeRegistry: renderMimeRegistry, previewAICode: () => { }, acceptAICode: () => { }, rejectAICode: () => { }, isLastAiMessage: false, codeReviewStatus: "chatPreview", agentModeEnabled: true, isErrorFixup: true, cellId: getCellIdFromCellUpdate((_e = messageItem.agentResponse) === null || _e === void 0 ? void 0 : _e.cell_update, notebookTracker), notebookPanel: notebookTracker.currentWidget }));
|
|
10003
10488
|
}))));
|
|
10004
10489
|
};
|
|
10005
10490
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GroupedErrorsAndFixes);
|
|
@@ -10435,22 +10920,39 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10435
10920
|
|
|
10436
10921
|
|
|
10437
10922
|
|
|
10923
|
+
const GOOD_FOR_FAST = [
|
|
10924
|
+
'Quick data exploration',
|
|
10925
|
+
'Pandas operations',
|
|
10926
|
+
'Basic data cleaning',
|
|
10927
|
+
'Fast code iterations'
|
|
10928
|
+
];
|
|
10929
|
+
const GOOD_FOR_SMART = [
|
|
10930
|
+
'Complex data analysis',
|
|
10931
|
+
'Advanced debugging',
|
|
10932
|
+
'Statistical analysis and modeling',
|
|
10933
|
+
'Multi-step data workflows'
|
|
10934
|
+
];
|
|
10438
10935
|
const MODEL_MAPPINGS = [
|
|
10439
10936
|
{
|
|
10440
|
-
displayName:
|
|
10441
|
-
fullName:
|
|
10937
|
+
displayName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GPT_4_1_DISPLAY_NAME,
|
|
10938
|
+
fullName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GPT_4_1_MODEL_NAME,
|
|
10442
10939
|
type: 'smart',
|
|
10443
|
-
goodFor: [
|
|
10444
|
-
'Complex data analysis',
|
|
10445
|
-
'Advanced debugging',
|
|
10446
|
-
'Statistical analysis and modeling',
|
|
10447
|
-
'Multi-step data workflows'
|
|
10448
|
-
],
|
|
10940
|
+
goodFor: [...GOOD_FOR_SMART],
|
|
10449
10941
|
provider: 'OpenAI',
|
|
10450
10942
|
tokenLimit: '1M',
|
|
10451
10943
|
speed: 'Medium',
|
|
10452
10944
|
complexityHandling: 'High'
|
|
10453
10945
|
},
|
|
10946
|
+
{
|
|
10947
|
+
displayName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GPT_5_2_DISPLAY_NAME,
|
|
10948
|
+
fullName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GPT_5_2_MODEL_NAME,
|
|
10949
|
+
type: 'fast',
|
|
10950
|
+
goodFor: [...GOOD_FOR_FAST],
|
|
10951
|
+
provider: 'OpenAI',
|
|
10952
|
+
tokenLimit: '400K',
|
|
10953
|
+
speed: 'Fast',
|
|
10954
|
+
complexityHandling: 'Medium'
|
|
10955
|
+
},
|
|
10454
10956
|
{
|
|
10455
10957
|
displayName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.CLAUDE_HAIKU_DISPLAY_NAME,
|
|
10456
10958
|
fullName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.CLAUDE_HAIKU_MODEL_NAME,
|
|
@@ -10470,42 +10972,27 @@ const MODEL_MAPPINGS = [
|
|
|
10470
10972
|
displayName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.CLAUDE_SONNET_DISPLAY_NAME,
|
|
10471
10973
|
fullName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.CLAUDE_SONNET_MODEL_NAME,
|
|
10472
10974
|
type: 'smart',
|
|
10473
|
-
goodFor: [
|
|
10474
|
-
'Complex data analysis',
|
|
10475
|
-
'Advanced debugging',
|
|
10476
|
-
'Statistical analysis and modeling',
|
|
10477
|
-
'Multi-step data workflows'
|
|
10478
|
-
],
|
|
10975
|
+
goodFor: [...GOOD_FOR_SMART],
|
|
10479
10976
|
provider: 'Anthropic',
|
|
10480
10977
|
tokenLimit: '1M',
|
|
10481
10978
|
speed: 'Medium',
|
|
10482
10979
|
complexityHandling: 'High'
|
|
10483
10980
|
},
|
|
10484
10981
|
{
|
|
10485
|
-
displayName:
|
|
10486
|
-
fullName:
|
|
10487
|
-
type: '
|
|
10488
|
-
goodFor: [
|
|
10489
|
-
'Complex data analysis',
|
|
10490
|
-
'Advanced debugging',
|
|
10491
|
-
'Statistical analysis and modeling',
|
|
10492
|
-
'Multi-step data workflows'
|
|
10493
|
-
],
|
|
10982
|
+
displayName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GEMINI_3_FLASH_DISPLAY_NAME,
|
|
10983
|
+
fullName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GEMINI_3_FLASH_MODEL_NAME,
|
|
10984
|
+
type: 'fast',
|
|
10985
|
+
goodFor: [...GOOD_FOR_FAST],
|
|
10494
10986
|
provider: 'Google',
|
|
10495
10987
|
tokenLimit: '1M',
|
|
10496
|
-
speed: '
|
|
10497
|
-
complexityHandling: '
|
|
10988
|
+
speed: 'Fast',
|
|
10989
|
+
complexityHandling: 'Medium'
|
|
10498
10990
|
},
|
|
10499
10991
|
{
|
|
10500
|
-
displayName:
|
|
10501
|
-
fullName:
|
|
10992
|
+
displayName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GEMINI_3_PRO_DISPLAY_NAME,
|
|
10993
|
+
fullName: _utils_models__WEBPACK_IMPORTED_MODULE_3__.GEMINI_3_PRO_MODEL_NAME,
|
|
10502
10994
|
type: 'smart',
|
|
10503
|
-
goodFor: [
|
|
10504
|
-
'Most complex data analysis',
|
|
10505
|
-
'Advanced debugging',
|
|
10506
|
-
'Statistical analysis and modeling',
|
|
10507
|
-
'Multi-step data workflows'
|
|
10508
|
-
],
|
|
10995
|
+
goodFor: [...GOOD_FOR_SMART],
|
|
10509
10996
|
provider: 'Google',
|
|
10510
10997
|
tokenLimit: '1M',
|
|
10511
10998
|
speed: 'Slow',
|
|
@@ -10697,10 +11184,10 @@ const NextStepsPills = ({ nextSteps, onSelectNextStep, displayedNextStepsIfAvail
|
|
|
10697
11184
|
|
|
10698
11185
|
/***/ }),
|
|
10699
11186
|
|
|
10700
|
-
/***/ "./lib/components/
|
|
10701
|
-
|
|
10702
|
-
!*** ./lib/components/
|
|
10703
|
-
|
|
11187
|
+
/***/ "./lib/components/RunCellButton.js":
|
|
11188
|
+
/*!*****************************************!*\
|
|
11189
|
+
!*** ./lib/components/RunCellButton.js ***!
|
|
11190
|
+
\*****************************************/
|
|
10704
11191
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10705
11192
|
|
|
10706
11193
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -10709,12 +11196,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10709
11196
|
/* harmony export */ });
|
|
10710
11197
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
10711
11198
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10712
|
-
/* harmony import */ var
|
|
10713
|
-
/* harmony import */ var
|
|
10714
|
-
/* harmony import */ var
|
|
10715
|
-
/* harmony import */ var
|
|
10716
|
-
/* harmony import */ var
|
|
10717
|
-
/* harmony import */ var
|
|
11199
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
11200
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__);
|
|
11201
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
11202
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_2__);
|
|
11203
|
+
/* harmony import */ var _icons_ChevronIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../icons/ChevronIcon */ "./lib/icons/ChevronIcon.js");
|
|
11204
|
+
/* harmony import */ var _icons_RunAllIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icons/RunAllIcon */ "./lib/icons/RunAllIcon.js");
|
|
11205
|
+
/* harmony import */ var _icons_RestartAndRunIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icons/RestartAndRunIcon */ "./lib/icons/RestartAndRunIcon.js");
|
|
11206
|
+
/* harmony import */ var _icons_SimplePlayIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/SimplePlayIcon */ "./lib/icons/SimplePlayIcon.js");
|
|
11207
|
+
/* harmony import */ var _icons_RestartIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icons/RestartIcon */ "./lib/icons/RestartIcon.js");
|
|
11208
|
+
/* harmony import */ var _icons_StopIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../icons/StopIcon */ "./lib/icons/StopIcon.js");
|
|
11209
|
+
/* harmony import */ var _icons_ClearIcon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../icons/ClearIcon */ "./lib/icons/ClearIcon.js");
|
|
11210
|
+
/* harmony import */ var _LoadingCircle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
11211
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/classNames */ "./lib/utils/classNames.js");
|
|
10718
11212
|
/*
|
|
10719
11213
|
* Copyright (c) Saga Inc.
|
|
10720
11214
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -10726,23 +11220,298 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10726
11220
|
|
|
10727
11221
|
|
|
10728
11222
|
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
}
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
11223
|
+
|
|
11224
|
+
|
|
11225
|
+
|
|
11226
|
+
|
|
11227
|
+
|
|
11228
|
+
const RunCellButton = ({ notebookPanel }) => {
|
|
11229
|
+
const handleRunCurrentCell = () => {
|
|
11230
|
+
var _a;
|
|
11231
|
+
const notebook = notebookPanel.content;
|
|
11232
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
11233
|
+
void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.run(notebook, sessionContext);
|
|
11234
|
+
};
|
|
11235
|
+
const handleRunAllCells = () => {
|
|
11236
|
+
var _a;
|
|
11237
|
+
const notebook = notebookPanel.content;
|
|
11238
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
11239
|
+
void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.runAll(notebook, sessionContext);
|
|
11240
|
+
};
|
|
11241
|
+
const handleRestart = async () => {
|
|
11242
|
+
var _a;
|
|
11243
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
11244
|
+
if (!sessionContext) {
|
|
11245
|
+
return;
|
|
11246
|
+
}
|
|
11247
|
+
// Use SessionContextDialogs.restart() which handles the restart dialog
|
|
11248
|
+
// and waits for the kernel to be ready, matching Jupyter Lab core behavior
|
|
11249
|
+
const dialogs = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_2__.SessionContextDialogs();
|
|
11250
|
+
await dialogs.restart(sessionContext);
|
|
11251
|
+
};
|
|
11252
|
+
const handleRestartAndRunAll = async () => {
|
|
11253
|
+
var _a;
|
|
11254
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
11255
|
+
if (!sessionContext) {
|
|
11256
|
+
return;
|
|
11257
|
+
}
|
|
11258
|
+
// Use SessionContextDialogs.restart() which handles the restart dialog
|
|
11259
|
+
// and waits for the kernel to be ready, matching Jupyter Lab core behavior
|
|
11260
|
+
const dialogs = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_2__.SessionContextDialogs();
|
|
11261
|
+
const restarted = await dialogs.restart(sessionContext);
|
|
11262
|
+
if (restarted) {
|
|
11263
|
+
const notebook = notebookPanel.content;
|
|
11264
|
+
void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.runAll(notebook, sessionContext);
|
|
11265
|
+
}
|
|
11266
|
+
};
|
|
11267
|
+
const handleStop = () => {
|
|
11268
|
+
var _a, _b;
|
|
11269
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
11270
|
+
const kernel = (_b = sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.session) === null || _b === void 0 ? void 0 : _b.kernel;
|
|
11271
|
+
if (kernel) {
|
|
11272
|
+
void kernel.interrupt();
|
|
11273
|
+
}
|
|
11274
|
+
};
|
|
11275
|
+
const handleClearAllOutputs = () => {
|
|
11276
|
+
const notebook = notebookPanel.content;
|
|
11277
|
+
_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.clearAllOutputs(notebook);
|
|
11278
|
+
};
|
|
11279
|
+
const [isDropdownOpen, setIsDropdownOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
11280
|
+
const [isRunning, setIsRunning] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
11281
|
+
const dropdownRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
11282
|
+
const executionCountRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
|
|
11283
|
+
// Track execution state for this specific notebook panel
|
|
11284
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
11285
|
+
var _a;
|
|
11286
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
11287
|
+
if (!sessionContext) {
|
|
11288
|
+
setIsRunning(false);
|
|
11289
|
+
return;
|
|
11290
|
+
}
|
|
11291
|
+
// Listen to iopub messages to track execution
|
|
11292
|
+
const handleIOPubMessage = (sender, msg) => {
|
|
11293
|
+
const msgType = msg.header.msg_type;
|
|
11294
|
+
// When a cell starts executing
|
|
11295
|
+
if (msgType === 'execute_input') {
|
|
11296
|
+
executionCountRef.current += 1;
|
|
11297
|
+
setIsRunning(true);
|
|
11298
|
+
setIsDropdownOpen(false); // Close dropdown when execution starts
|
|
11299
|
+
}
|
|
11300
|
+
// When a cell finishes executing
|
|
11301
|
+
if (msgType === 'execute_reply') {
|
|
11302
|
+
executionCountRef.current = Math.max(0, executionCountRef.current - 1);
|
|
11303
|
+
// Only set to not running if no cells are executing
|
|
11304
|
+
if (executionCountRef.current === 0) {
|
|
11305
|
+
setIsRunning(false);
|
|
11306
|
+
}
|
|
11307
|
+
}
|
|
11308
|
+
};
|
|
11309
|
+
// Listen to kernel status changes - this is the primary way to detect completion
|
|
11310
|
+
const handleStatusChange = (sender, status) => {
|
|
11311
|
+
// When kernel becomes idle, execution has finished - reset to "Run all" state
|
|
11312
|
+
if (status === 'idle') {
|
|
11313
|
+
executionCountRef.current = 0;
|
|
11314
|
+
setIsRunning(false);
|
|
11315
|
+
}
|
|
11316
|
+
};
|
|
11317
|
+
// Handle kernel disconnection
|
|
11318
|
+
const handleKernelChange = () => {
|
|
11319
|
+
var _a;
|
|
11320
|
+
const kernel = (_a = sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;
|
|
11321
|
+
if (!kernel) {
|
|
11322
|
+
executionCountRef.current = 0;
|
|
11323
|
+
setIsRunning(false);
|
|
11324
|
+
}
|
|
11325
|
+
};
|
|
11326
|
+
sessionContext.iopubMessage.connect(handleIOPubMessage);
|
|
11327
|
+
sessionContext.statusChanged.connect(handleStatusChange);
|
|
11328
|
+
sessionContext.kernelChanged.connect(handleKernelChange);
|
|
11329
|
+
return () => {
|
|
11330
|
+
sessionContext.iopubMessage.disconnect(handleIOPubMessage);
|
|
11331
|
+
sessionContext.statusChanged.disconnect(handleStatusChange);
|
|
11332
|
+
sessionContext.kernelChanged.disconnect(handleKernelChange);
|
|
11333
|
+
};
|
|
11334
|
+
}, [notebookPanel]);
|
|
11335
|
+
// Close dropdown when clicking outside
|
|
11336
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
11337
|
+
const handleClickOutside = (event) => {
|
|
11338
|
+
if (dropdownRef.current &&
|
|
11339
|
+
!dropdownRef.current.contains(event.target)) {
|
|
11340
|
+
setIsDropdownOpen(false);
|
|
11341
|
+
}
|
|
11342
|
+
};
|
|
11343
|
+
if (isDropdownOpen) {
|
|
11344
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
11345
|
+
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
11346
|
+
}
|
|
11347
|
+
return undefined;
|
|
11348
|
+
}, [isDropdownOpen]);
|
|
11349
|
+
const handleMainButtonClick = () => {
|
|
11350
|
+
// When running, clicking opens the dropdown (so user can Stop)
|
|
11351
|
+
if (isRunning) {
|
|
11352
|
+
setIsDropdownOpen(!isDropdownOpen);
|
|
11353
|
+
return;
|
|
11354
|
+
}
|
|
11355
|
+
// Otherwise, run the current cell
|
|
11356
|
+
handleRunCurrentCell();
|
|
11357
|
+
};
|
|
11358
|
+
const handleDropdownButtonClick = () => {
|
|
11359
|
+
setIsDropdownOpen(!isDropdownOpen);
|
|
11360
|
+
};
|
|
11361
|
+
const menuSections = [
|
|
11362
|
+
{
|
|
11363
|
+
title: 'Run Code',
|
|
11364
|
+
items: [
|
|
11365
|
+
{
|
|
11366
|
+
label: 'Run Current Cell',
|
|
11367
|
+
icon: _icons_SimplePlayIcon__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
11368
|
+
shortcut: 'Shift+Enter',
|
|
11369
|
+
tooltip: 'Run the currently selected cell',
|
|
11370
|
+
onClick: () => {
|
|
11371
|
+
handleRunCurrentCell();
|
|
11372
|
+
setIsDropdownOpen(false);
|
|
11373
|
+
}
|
|
11374
|
+
},
|
|
11375
|
+
{
|
|
11376
|
+
label: 'Run All Cells',
|
|
11377
|
+
icon: _icons_RunAllIcon__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
11378
|
+
tooltip: 'Run all cells in the notebook from top to bottom',
|
|
11379
|
+
onClick: () => {
|
|
11380
|
+
handleRunAllCells();
|
|
11381
|
+
setIsDropdownOpen(false);
|
|
11382
|
+
}
|
|
11383
|
+
},
|
|
11384
|
+
{
|
|
11385
|
+
label: 'Restart and Run All',
|
|
11386
|
+
icon: _icons_RestartAndRunIcon__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
11387
|
+
tooltip: 'Restart the kernel to clear all variables and state, and then run all cells in the notebook',
|
|
11388
|
+
onClick: () => {
|
|
11389
|
+
void handleRestartAndRunAll();
|
|
11390
|
+
setIsDropdownOpen(false);
|
|
11391
|
+
}
|
|
11392
|
+
}
|
|
11393
|
+
]
|
|
11394
|
+
},
|
|
11395
|
+
{
|
|
11396
|
+
title: 'Kernel',
|
|
11397
|
+
items: [
|
|
11398
|
+
{
|
|
11399
|
+
label: 'Restart',
|
|
11400
|
+
icon: _icons_RestartIcon__WEBPACK_IMPORTED_MODULE_6__["default"],
|
|
11401
|
+
shortcut: '0, 0',
|
|
11402
|
+
tooltip: 'Restart the kernel, clearing all variables and state',
|
|
11403
|
+
onClick: () => {
|
|
11404
|
+
void handleRestart();
|
|
11405
|
+
setIsDropdownOpen(false);
|
|
11406
|
+
}
|
|
11407
|
+
},
|
|
11408
|
+
{
|
|
11409
|
+
label: 'Stop',
|
|
11410
|
+
icon: _icons_StopIcon__WEBPACK_IMPORTED_MODULE_7__["default"],
|
|
11411
|
+
shortcut: 'I, I',
|
|
11412
|
+
tooltip: 'Interrupt the kernel to stop the currently running cell',
|
|
11413
|
+
onClick: () => {
|
|
11414
|
+
handleStop();
|
|
11415
|
+
setIsDropdownOpen(false);
|
|
11416
|
+
}
|
|
11417
|
+
}
|
|
11418
|
+
]
|
|
11419
|
+
},
|
|
11420
|
+
{
|
|
11421
|
+
title: 'Notebook',
|
|
11422
|
+
items: [
|
|
11423
|
+
{
|
|
11424
|
+
label: 'Clear All Outputs',
|
|
11425
|
+
icon: _icons_ClearIcon__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
11426
|
+
tooltip: 'Clear all cell outputs in the notebook',
|
|
11427
|
+
onClick: () => {
|
|
11428
|
+
handleClearAllOutputs();
|
|
11429
|
+
setIsDropdownOpen(false);
|
|
11430
|
+
}
|
|
11431
|
+
}
|
|
11432
|
+
]
|
|
11433
|
+
}
|
|
11434
|
+
];
|
|
11435
|
+
const trigger = (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "mito-run-cell-button-container", ref: dropdownRef },
|
|
11436
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_9__.classNames)('mito-run-cell-button-group', { 'mito-run-cell-button-running': isRunning }) },
|
|
11437
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "mito-run-cell-button mito-run-cell-button-main", onClick: handleMainButtonClick, title: isRunning ? "Running Cells" : "Run Active Cell" }, isRunning ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
11438
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_LoadingCircle__WEBPACK_IMPORTED_MODULE_10__["default"], null),
|
|
11439
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "mito-run-cell-button-text" }, "Running Cells"))) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
11440
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_SimplePlayIcon__WEBPACK_IMPORTED_MODULE_3__["default"], null),
|
|
11441
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "mito-run-cell-button-text" }, "Run Active Cell")))),
|
|
11442
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "mito-run-cell-button-divider" }),
|
|
11443
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "mito-run-cell-button mito-run-cell-button-dropdown", onClick: handleDropdownButtonClick, title: "More actions" },
|
|
11444
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_ChevronIcon__WEBPACK_IMPORTED_MODULE_11__["default"], { direction: "down" }))),
|
|
11445
|
+
isDropdownOpen && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "mito-run-cell-dropdown-menu" }, menuSections.map((section, sectionIndex) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: sectionIndex, className: "mito-run-cell-dropdown-section" },
|
|
11446
|
+
sectionIndex > 0 && react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "mito-run-cell-dropdown-separator" }),
|
|
11447
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "mito-run-cell-dropdown-section-header" }, section.title),
|
|
11448
|
+
section.items.map((item, itemIndex) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { key: itemIndex, className: "mito-run-cell-dropdown-item", title: item.tooltip, onClick: (e) => {
|
|
11449
|
+
e.preventDefault();
|
|
11450
|
+
e.stopPropagation();
|
|
11451
|
+
item.onClick();
|
|
11452
|
+
} },
|
|
11453
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "mito-run-cell-dropdown-item-icon" }, item.icon && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(item.icon)),
|
|
11454
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "mito-run-cell-dropdown-item-label" }, item.label),
|
|
11455
|
+
item.shortcut && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "mito-run-cell-dropdown-item-shortcut" }, item.shortcut))))))))))));
|
|
11456
|
+
return trigger;
|
|
11457
|
+
};
|
|
11458
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RunCellButton);
|
|
11459
|
+
|
|
11460
|
+
|
|
11461
|
+
/***/ }),
|
|
11462
|
+
|
|
11463
|
+
/***/ "./lib/components/SelectedContextContainer.js":
|
|
11464
|
+
/*!****************************************************!*\
|
|
11465
|
+
!*** ./lib/components/SelectedContextContainer.js ***!
|
|
11466
|
+
\****************************************************/
|
|
11467
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11468
|
+
|
|
11469
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11470
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11471
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11472
|
+
/* harmony export */ });
|
|
11473
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
11474
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11475
|
+
/* harmony import */ var _style_SelectedContextContainer_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/SelectedContextContainer.css */ "./style/SelectedContextContainer.css");
|
|
11476
|
+
/* harmony import */ var _icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icons/RuleIcon */ "./lib/icons/RuleIcon.js");
|
|
11477
|
+
/* harmony import */ var _icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icons/CodeIcon */ "./lib/icons/CodeIcon.js");
|
|
11478
|
+
/* harmony import */ var _icons_DatabaseIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icons/DatabaseIcon */ "./lib/icons/DatabaseIcon.js");
|
|
11479
|
+
/* harmony import */ var _icons_PhotoIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/PhotoIcon */ "./lib/icons/PhotoIcon.js");
|
|
11480
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/notebook */ "./lib/utils/notebook.js");
|
|
11481
|
+
/*
|
|
11482
|
+
* Copyright (c) Saga Inc.
|
|
11483
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11484
|
+
*/
|
|
11485
|
+
|
|
11486
|
+
|
|
11487
|
+
|
|
11488
|
+
|
|
11489
|
+
|
|
11490
|
+
|
|
11491
|
+
|
|
11492
|
+
const SelectedContextContainer = ({ title, type, onRemove, onClick, notebookTracker, activeCellID, value }) => {
|
|
11493
|
+
const [isHovered, setIsHovered] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
11494
|
+
let icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__["default"], null);
|
|
11495
|
+
if (type.startsWith('image/')) {
|
|
11496
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_PhotoIcon__WEBPACK_IMPORTED_MODULE_3__["default"], null);
|
|
11497
|
+
}
|
|
11498
|
+
else if (type === 'rule') {
|
|
11499
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__["default"], null);
|
|
11500
|
+
}
|
|
11501
|
+
else if (type === 'variable') {
|
|
11502
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
11503
|
+
}
|
|
11504
|
+
else if (type === 'db') {
|
|
11505
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_DatabaseIcon__WEBPACK_IMPORTED_MODULE_5__["default"], null);
|
|
11506
|
+
}
|
|
11507
|
+
else if (type === 'active_cell') {
|
|
11508
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
11509
|
+
}
|
|
11510
|
+
else if (type === 'notebook') {
|
|
11511
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
11512
|
+
}
|
|
11513
|
+
else if (type === 'cell') {
|
|
11514
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
10746
11515
|
}
|
|
10747
11516
|
const handleClick = () => {
|
|
10748
11517
|
var _a;
|
|
@@ -10762,6 +11531,16 @@ const SelectedContextContainer = ({ title, type, onRemove, onClick, notebookTrac
|
|
|
10762
11531
|
}
|
|
10763
11532
|
// If notebookTracker or activeCellID are not available, do nothing
|
|
10764
11533
|
}
|
|
11534
|
+
else if (type === 'cell' && notebookTracker && value) {
|
|
11535
|
+
// Handle cell context click - scroll to the cell
|
|
11536
|
+
if (notebookTracker.currentWidget) {
|
|
11537
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_6__.scrollToCell)(notebookTracker.currentWidget, value, undefined, 'center');
|
|
11538
|
+
}
|
|
11539
|
+
// Highlight the cell
|
|
11540
|
+
setTimeout(() => {
|
|
11541
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_6__.highlightCodeCell)(notebookTracker, value);
|
|
11542
|
+
}, 500);
|
|
11543
|
+
}
|
|
10765
11544
|
else if (onClick) {
|
|
10766
11545
|
// Call the custom onClick handler for other context types
|
|
10767
11546
|
onClick();
|
|
@@ -10771,7 +11550,7 @@ const SelectedContextContainer = ({ title, type, onRemove, onClick, notebookTrac
|
|
|
10771
11550
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `icon`, onClick: (e) => {
|
|
10772
11551
|
e.stopPropagation(); // Prevent triggering the button's onClick
|
|
10773
11552
|
onRemove();
|
|
10774
|
-
}, title: isHovered ? "Remove rule" : "Selected rule" }, isHovered && type !== 'active_cell' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "remove-icon" }, "X")) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "icon" }, icon))),
|
|
11553
|
+
}, title: isHovered ? "Remove rule" : "Selected rule" }, isHovered && type !== 'active_cell' && type !== 'notebook' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "remove-icon" }, "X")) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "icon" }, icon))),
|
|
10775
11554
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "rule-name" }, title)));
|
|
10776
11555
|
};
|
|
10777
11556
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SelectedContextContainer);
|
|
@@ -10888,6 +11667,86 @@ const ToggleButton = ({ leftText, rightText, leftTooltip, rightTooltip, leftIcon
|
|
|
10888
11667
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ToggleButton);
|
|
10889
11668
|
|
|
10890
11669
|
|
|
11670
|
+
/***/ }),
|
|
11671
|
+
|
|
11672
|
+
/***/ "./lib/hooks/useCellOrder.js":
|
|
11673
|
+
/*!***********************************!*\
|
|
11674
|
+
!*** ./lib/hooks/useCellOrder.js ***!
|
|
11675
|
+
\***********************************/
|
|
11676
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11677
|
+
|
|
11678
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11679
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11680
|
+
/* harmony export */ useCellOrder: () => (/* binding */ useCellOrder)
|
|
11681
|
+
/* harmony export */ });
|
|
11682
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
11683
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11684
|
+
/*
|
|
11685
|
+
* Copyright (c) Saga Inc.
|
|
11686
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11687
|
+
*/
|
|
11688
|
+
|
|
11689
|
+
/**
|
|
11690
|
+
* Hook that tracks the current cell order in the notebook.
|
|
11691
|
+
* Returns a map of cellId → cellNumber (1-indexed).
|
|
11692
|
+
* Updates automatically when cells are added, removed, or reordered.
|
|
11693
|
+
*
|
|
11694
|
+
* @param notebookTracker - The notebook tracker to monitor
|
|
11695
|
+
* @returns A map of cellId to cellNumber (1-indexed)
|
|
11696
|
+
*/
|
|
11697
|
+
const useCellOrder = (notebookTracker) => {
|
|
11698
|
+
var _a, _b;
|
|
11699
|
+
const [cellOrderKey, setCellOrderKey] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
11700
|
+
// Track current widget ID to detect notebook switches
|
|
11701
|
+
const currentWidgetId = (_b = (_a = notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
|
|
11702
|
+
// Compute the cell order mapping
|
|
11703
|
+
const cellOrder = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
|
|
11704
|
+
const orderMap = new Map();
|
|
11705
|
+
const notebookPanel = notebookTracker.currentWidget;
|
|
11706
|
+
if (!notebookPanel) {
|
|
11707
|
+
return orderMap;
|
|
11708
|
+
}
|
|
11709
|
+
const notebook = notebookPanel.content;
|
|
11710
|
+
notebook.widgets.forEach((cell, index) => {
|
|
11711
|
+
// 1-indexed cell numbers for display
|
|
11712
|
+
orderMap.set(cell.model.id, index + 1);
|
|
11713
|
+
});
|
|
11714
|
+
return orderMap;
|
|
11715
|
+
}, [notebookTracker, cellOrderKey, currentWidgetId]);
|
|
11716
|
+
// Listen to cell changes to trigger re-computation
|
|
11717
|
+
// Include currentWidgetId in dependencies so listener re-attaches when switching notebooks
|
|
11718
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
11719
|
+
var _a;
|
|
11720
|
+
const notebookPanel = notebookTracker.currentWidget;
|
|
11721
|
+
if (!notebookPanel) {
|
|
11722
|
+
return;
|
|
11723
|
+
}
|
|
11724
|
+
const notebook = notebookPanel.content;
|
|
11725
|
+
// Update when cells are added, removed, or reordered
|
|
11726
|
+
const handleCellChange = () => {
|
|
11727
|
+
setCellOrderKey(prev => prev + 1);
|
|
11728
|
+
};
|
|
11729
|
+
// Listen to cell model changes (fires when cells are added, removed, or reordered)
|
|
11730
|
+
(_a = notebook.model) === null || _a === void 0 ? void 0 : _a.cells.changed.connect(handleCellChange);
|
|
11731
|
+
return () => {
|
|
11732
|
+
var _a;
|
|
11733
|
+
(_a = notebook.model) === null || _a === void 0 ? void 0 : _a.cells.changed.disconnect(handleCellChange);
|
|
11734
|
+
};
|
|
11735
|
+
}, [notebookTracker, currentWidgetId]);
|
|
11736
|
+
// Also update when the current notebook changes
|
|
11737
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
11738
|
+
const handleNotebookChange = () => {
|
|
11739
|
+
setCellOrderKey(prev => prev + 1);
|
|
11740
|
+
};
|
|
11741
|
+
notebookTracker.currentChanged.connect(handleNotebookChange);
|
|
11742
|
+
return () => {
|
|
11743
|
+
notebookTracker.currentChanged.disconnect(handleNotebookChange);
|
|
11744
|
+
};
|
|
11745
|
+
}, [notebookTracker]);
|
|
11746
|
+
return cellOrder;
|
|
11747
|
+
};
|
|
11748
|
+
|
|
11749
|
+
|
|
10891
11750
|
/***/ }),
|
|
10892
11751
|
|
|
10893
11752
|
/***/ "./lib/hooks/useDebouncedFunction.js":
|
|
@@ -11036,6 +11895,71 @@ const BrainIcon = ({ height = 14, width = 14, fill = 'currentColor' }) => (react
|
|
|
11036
11895
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BrainIcon);
|
|
11037
11896
|
|
|
11038
11897
|
|
|
11898
|
+
/***/ }),
|
|
11899
|
+
|
|
11900
|
+
/***/ "./lib/icons/ChevronIcon.js":
|
|
11901
|
+
/*!**********************************!*\
|
|
11902
|
+
!*** ./lib/icons/ChevronIcon.js ***!
|
|
11903
|
+
\**********************************/
|
|
11904
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11905
|
+
|
|
11906
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11907
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11908
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11909
|
+
/* harmony export */ });
|
|
11910
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
11911
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11912
|
+
/*
|
|
11913
|
+
* Copyright (c) Saga Inc.
|
|
11914
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11915
|
+
*/
|
|
11916
|
+
|
|
11917
|
+
const ChevronIcon = ({ direction = 'down', className = '', width = '16', height = '16' }) => {
|
|
11918
|
+
// Calculate rotation based on direction
|
|
11919
|
+
const getRotation = () => {
|
|
11920
|
+
switch (direction) {
|
|
11921
|
+
case 'up':
|
|
11922
|
+
return 'rotate(180 8 8)';
|
|
11923
|
+
case 'right':
|
|
11924
|
+
return 'rotate(-90 8 8)';
|
|
11925
|
+
case 'left':
|
|
11926
|
+
return 'rotate(90 8 8)';
|
|
11927
|
+
case 'down':
|
|
11928
|
+
default:
|
|
11929
|
+
return 'rotate(0 8 8)';
|
|
11930
|
+
}
|
|
11931
|
+
};
|
|
11932
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { className: className, width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11933
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: getRotation() })));
|
|
11934
|
+
};
|
|
11935
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChevronIcon);
|
|
11936
|
+
|
|
11937
|
+
|
|
11938
|
+
/***/ }),
|
|
11939
|
+
|
|
11940
|
+
/***/ "./lib/icons/ClearIcon.js":
|
|
11941
|
+
/*!********************************!*\
|
|
11942
|
+
!*** ./lib/icons/ClearIcon.js ***!
|
|
11943
|
+
\********************************/
|
|
11944
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11945
|
+
|
|
11946
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11947
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11948
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11949
|
+
/* harmony export */ });
|
|
11950
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
11951
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11952
|
+
/*
|
|
11953
|
+
* Copyright (c) Saga Inc.
|
|
11954
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11955
|
+
*/
|
|
11956
|
+
|
|
11957
|
+
const ClearIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11958
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }),
|
|
11959
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M5 5L11 11M11 5L5 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })));
|
|
11960
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ClearIcon);
|
|
11961
|
+
|
|
11962
|
+
|
|
11039
11963
|
/***/ }),
|
|
11040
11964
|
|
|
11041
11965
|
/***/ "./lib/icons/CodeIcon.js":
|
|
@@ -11163,6 +12087,30 @@ const ExpandIcon = ({ isExpanded }) => (react__WEBPACK_IMPORTED_MODULE_0___defau
|
|
|
11163
12087
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ExpandIcon);
|
|
11164
12088
|
|
|
11165
12089
|
|
|
12090
|
+
/***/ }),
|
|
12091
|
+
|
|
12092
|
+
/***/ "./lib/icons/GoToCellIcon.js":
|
|
12093
|
+
/*!***********************************!*\
|
|
12094
|
+
!*** ./lib/icons/GoToCellIcon.js ***!
|
|
12095
|
+
\***********************************/
|
|
12096
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12097
|
+
|
|
12098
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12099
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12100
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12101
|
+
/* harmony export */ });
|
|
12102
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12103
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12104
|
+
/*
|
|
12105
|
+
* Copyright (c) Saga Inc.
|
|
12106
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12107
|
+
*/
|
|
12108
|
+
|
|
12109
|
+
const GoToCellIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12110
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M3 8H11M11 8L8 5M11 8L8 11M13 3V13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
12111
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GoToCellIcon);
|
|
12112
|
+
|
|
12113
|
+
|
|
11166
12114
|
/***/ }),
|
|
11167
12115
|
|
|
11168
12116
|
/***/ "./lib/icons/LightningIcon.js":
|
|
@@ -11302,6 +12250,35 @@ const CodeIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createEleme
|
|
|
11302
12250
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CodeIcon);
|
|
11303
12251
|
|
|
11304
12252
|
|
|
12253
|
+
/***/ }),
|
|
12254
|
+
|
|
12255
|
+
/***/ "./lib/icons/NotebookFooter/SpreadsheetIcon.js":
|
|
12256
|
+
/*!*****************************************************!*\
|
|
12257
|
+
!*** ./lib/icons/NotebookFooter/SpreadsheetIcon.js ***!
|
|
12258
|
+
\*****************************************************/
|
|
12259
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12260
|
+
|
|
12261
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12262
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12263
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12264
|
+
/* harmony export */ });
|
|
12265
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12266
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12267
|
+
/*
|
|
12268
|
+
* Copyright (c) Saga Inc.
|
|
12269
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12270
|
+
*/
|
|
12271
|
+
|
|
12272
|
+
const SpreadsheetIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12273
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: 'currentColor' },
|
|
12274
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.5 9.75V1.75C15.5 0.784 14.717 0 13.75 0H1.75C0.783 0 0 0.784 0 1.75V9.75C0 10.716 0.783 11.5 1.75 11.5H13.75C14.717 11.5 15.5 10.716 15.5 9.75ZM14 1.75V9.75C14 9.888 13.888 10 13.75 10H1.75C1.612 10 1.5 9.888 1.5 9.75V1.75C1.5 1.612 1.612 1.5 1.75 1.5H13.75C13.888 1.5 14 1.612 14 1.75Z" }),
|
|
12275
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.75 8.25H14.75C15.164 8.25 15.5 7.914 15.5 7.5C15.5 7.086 15.164 6.75 14.75 6.75H0.75C0.336 6.75 0 7.086 0 7.5C0 7.914 0.336 8.25 0.75 8.25Z" }),
|
|
12276
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5 0.75V10.75C9.5 11.164 9.836 11.5 10.25 11.5C10.664 11.5 11 11.164 11 10.75V0.75C11 0.336 10.664 0 10.25 0C9.836 0 9.5 0.336 9.5 0.75Z" }),
|
|
12277
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.75 4.75H14.75C15.164 4.75 15.5 4.414 15.5 4C15.5 3.586 15.164 3.25 14.75 3.25H0.75C0.336 3.25 0 3.586 0 4C0 4.414 0.336 4.75 0.75 4.75Z" }),
|
|
12278
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.5 0.75V10.75C4.5 11.164 4.836 11.5 5.25 11.5C5.664 11.5 6 11.164 6 10.75V0.75C6 0.336 5.664 0 5.25 0C4.836 0 4.5 0.336 4.5 0.75Z" }))));
|
|
12279
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SpreadsheetIcon);
|
|
12280
|
+
|
|
12281
|
+
|
|
11305
12282
|
/***/ }),
|
|
11306
12283
|
|
|
11307
12284
|
/***/ "./lib/icons/NotebookFooter/TextIcon.js":
|
|
@@ -11397,18 +12374,145 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11397
12374
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11398
12375
|
*/
|
|
11399
12376
|
|
|
11400
|
-
const PencilIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "14", height: "14", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11401
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: 'currentColor' },
|
|
11402
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M9.88308 1.82456C9.68326 1.49798 9.43085 1.18192 9.1259 0.876387C8.8209 0.570854 8.5054 0.317998 8.18991 0.117862C7.88492 -0.0717913 7.48531 -0.0296413 7.22238 0.223215L1.15425 6.29155C1.12269 6.32317 1.10167 6.35476 1.08065 6.39691L0.0289843 9.38893C-0.0341088 9.55749 0.00796491 9.73662 0.134151 9.86302C0.218298 9.94732 0.333977 10 0.449651 10C0.502235 10 0.554818 9.98947 0.596894 9.97894L3.58363 8.92541C3.6257 8.91488 3.65723 8.88326 3.6888 8.85168L9.76744 2.78325C10.0304 2.51987 10.0724 2.13008 9.88311 1.82454L9.88308 1.82456ZM1.56439 6.80777C1.86938 6.98685 2.18488 7.2397 2.47934 7.53471C2.77382 7.82972 3.01568 8.14578 3.19449 8.45128L1.46976 9.06235C1.41717 8.957 1.34357 8.85164 1.25942 8.76734C1.16476 8.67252 1.0701 8.60931 0.964937 8.55664L1.56439 6.80777Z" }))));
|
|
11403
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PencilIcon);
|
|
12377
|
+
const PencilIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "14", height: "14", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12378
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: 'currentColor' },
|
|
12379
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M9.88308 1.82456C9.68326 1.49798 9.43085 1.18192 9.1259 0.876387C8.8209 0.570854 8.5054 0.317998 8.18991 0.117862C7.88492 -0.0717913 7.48531 -0.0296413 7.22238 0.223215L1.15425 6.29155C1.12269 6.32317 1.10167 6.35476 1.08065 6.39691L0.0289843 9.38893C-0.0341088 9.55749 0.00796491 9.73662 0.134151 9.86302C0.218298 9.94732 0.333977 10 0.449651 10C0.502235 10 0.554818 9.98947 0.596894 9.97894L3.58363 8.92541C3.6257 8.91488 3.65723 8.88326 3.6888 8.85168L9.76744 2.78325C10.0304 2.51987 10.0724 2.13008 9.88311 1.82454L9.88308 1.82456ZM1.56439 6.80777C1.86938 6.98685 2.18488 7.2397 2.47934 7.53471C2.77382 7.82972 3.01568 8.14578 3.19449 8.45128L1.46976 9.06235C1.41717 8.957 1.34357 8.85164 1.25942 8.76734C1.16476 8.67252 1.0701 8.60931 0.964937 8.55664L1.56439 6.80777Z" }))));
|
|
12380
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PencilIcon);
|
|
12381
|
+
|
|
12382
|
+
|
|
12383
|
+
/***/ }),
|
|
12384
|
+
|
|
12385
|
+
/***/ "./lib/icons/PhotoIcon.js":
|
|
12386
|
+
/*!********************************!*\
|
|
12387
|
+
!*** ./lib/icons/PhotoIcon.js ***!
|
|
12388
|
+
\********************************/
|
|
12389
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12390
|
+
|
|
12391
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12392
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12393
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12394
|
+
/* harmony export */ });
|
|
12395
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12396
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12397
|
+
/*
|
|
12398
|
+
* Copyright (c) Saga Inc.
|
|
12399
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12400
|
+
*/
|
|
12401
|
+
|
|
12402
|
+
const PhotoIcon = () => {
|
|
12403
|
+
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" },
|
|
12404
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: "currentColor" },
|
|
12405
|
+
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" }))));
|
|
12406
|
+
};
|
|
12407
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PhotoIcon);
|
|
12408
|
+
|
|
12409
|
+
|
|
12410
|
+
/***/ }),
|
|
12411
|
+
|
|
12412
|
+
/***/ "./lib/icons/PlayButtonIcon.js":
|
|
12413
|
+
/*!*************************************!*\
|
|
12414
|
+
!*** ./lib/icons/PlayButtonIcon.js ***!
|
|
12415
|
+
\*************************************/
|
|
12416
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12417
|
+
|
|
12418
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12419
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12420
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12421
|
+
/* harmony export */ });
|
|
12422
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12423
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12424
|
+
/*
|
|
12425
|
+
* Copyright (c) Saga Inc.
|
|
12426
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12427
|
+
*/
|
|
12428
|
+
|
|
12429
|
+
const PlayButtonIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 10 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12430
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: "currentColor" },
|
|
12431
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5 0.5C6.38068 0.5 7.63072 1.05968 8.53558 1.9646C9.44034 2.86935 10 4.11938 10 5.50005C10 6.88071 9.44031 8.13075 8.53558 9.03559C7.63071 9.94034 6.38058 10.5 5 10.5C3.61942 10.5 2.36928 9.94032 1.46442 9.03559C0.559662 8.13073 0 6.88062 0 5.50005C0 4.11948 0.55969 2.86935 1.46461 1.9645C2.36937 1.05975 3.61942 0.500096 5.0001 0.500096L5 0.5ZM7.31017 5.70697C7.34646 5.68679 7.37783 5.65673 7.40006 5.61816C7.46534 5.50465 7.42621 5.35975 7.31271 5.29447L3.89591 3.32169C3.85701 3.29401 3.80938 3.27775 3.75805 3.27775C3.62653 3.27775 3.51992 3.38435 3.51992 3.51588L3.51988 5.50003V7.48417H3.52085C3.52085 7.52427 3.53099 7.56497 3.55237 7.60234C3.61764 7.71585 3.76256 7.75501 3.87606 7.6897L5.59438 6.69758L7.31017 5.70697Z" }))));
|
|
12432
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PlayButtonIcon);
|
|
12433
|
+
|
|
12434
|
+
|
|
12435
|
+
/***/ }),
|
|
12436
|
+
|
|
12437
|
+
/***/ "./lib/icons/RejectIcon.js":
|
|
12438
|
+
/*!*********************************!*\
|
|
12439
|
+
!*** ./lib/icons/RejectIcon.js ***!
|
|
12440
|
+
\*********************************/
|
|
12441
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12442
|
+
|
|
12443
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12444
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12445
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12446
|
+
/* harmony export */ });
|
|
12447
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12448
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12449
|
+
/*
|
|
12450
|
+
* Copyright (c) Saga Inc.
|
|
12451
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12452
|
+
*/
|
|
12453
|
+
|
|
12454
|
+
const RejectIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 21 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12455
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: "currentColor" },
|
|
12456
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M10.2245 0C7.57229 0 5.02869 1.0536 3.15349 2.929C1.27817 4.8044 0.224487 7.348 0.224487 10C0.224487 12.652 1.27809 15.1958 3.15349 17.071C5.02889 18.9463 7.57249 20 10.2245 20C12.8765 20 15.4203 18.9464 17.2955 17.071C19.1708 15.1956 20.2245 12.652 20.2245 10C20.2245 8.2446 19.7624 6.5202 18.8847 5C18.0071 3.47984 16.7447 2.2174 15.2245 1.3398C13.7044 0.46206 11.9799 3.9978e-05 10.2245 3.9978e-05L10.2245 0ZM13.9315 12.293C14.1244 12.4794 14.2344 12.7354 14.2367 13.0036C14.2391 13.2718 14.1335 13.5298 13.9438 13.7194C13.7542 13.9091 13.4962 14.0146 13.228 14.0123C12.9598 14.01 12.7038 13.9 12.5174 13.7071L10.2244 11.4141L7.93143 13.7071C7.67737 13.9524 7.31283 14.0455 6.97229 13.9521C6.63175 13.8588 6.36565 13.5927 6.27229 13.2521C6.17893 12.9116 6.27205 12.5471 6.51737 12.293L8.81037 10L6.51737 7.707C6.27205 7.45294 6.17893 7.0884 6.27229 6.74786C6.36565 6.40732 6.63175 6.14122 6.97229 6.04786C7.31283 5.9545 7.67737 6.04763 7.93143 6.29294L10.2244 8.58594L12.5174 6.29294V6.29286C12.7715 6.04754 13.136 5.95442 13.4766 6.04778C13.8171 6.14114 14.0832 6.40724 14.1766 6.74778C14.2699 7.08832 14.1768 7.45286 13.9315 7.70692L11.6385 9.99992L13.9315 12.293Z" }))));
|
|
12457
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RejectIcon);
|
|
12458
|
+
|
|
12459
|
+
|
|
12460
|
+
/***/ }),
|
|
12461
|
+
|
|
12462
|
+
/***/ "./lib/icons/RestartAndRunIcon.js":
|
|
12463
|
+
/*!****************************************!*\
|
|
12464
|
+
!*** ./lib/icons/RestartAndRunIcon.js ***!
|
|
12465
|
+
\****************************************/
|
|
12466
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12467
|
+
|
|
12468
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12469
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12470
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12471
|
+
/* harmony export */ });
|
|
12472
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12473
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12474
|
+
/*
|
|
12475
|
+
* Copyright (c) Saga Inc.
|
|
12476
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12477
|
+
*/
|
|
12478
|
+
|
|
12479
|
+
const RestartAndRunIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12480
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "3", y: "3", width: "10", height: "10", stroke: "currentColor", strokeWidth: "1.5", fill: "none", rx: "1" }),
|
|
12481
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M6 6L8 8L6 10M9 6L11 8L9 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" })));
|
|
12482
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RestartAndRunIcon);
|
|
12483
|
+
|
|
12484
|
+
|
|
12485
|
+
/***/ }),
|
|
12486
|
+
|
|
12487
|
+
/***/ "./lib/icons/RestartIcon.js":
|
|
12488
|
+
/*!**********************************!*\
|
|
12489
|
+
!*** ./lib/icons/RestartIcon.js ***!
|
|
12490
|
+
\**********************************/
|
|
12491
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12492
|
+
|
|
12493
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12494
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12495
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12496
|
+
/* harmony export */ });
|
|
12497
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12498
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12499
|
+
/*
|
|
12500
|
+
* Copyright (c) Saga Inc.
|
|
12501
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12502
|
+
*/
|
|
12503
|
+
|
|
12504
|
+
const RestartIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12505
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M8 3C10.7614 3 13 5.23858 13 8C13 10.7614 10.7614 13 8 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", fill: "none" }),
|
|
12506
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M6 2L4 4L6 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" })));
|
|
12507
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RestartIcon);
|
|
11404
12508
|
|
|
11405
12509
|
|
|
11406
12510
|
/***/ }),
|
|
11407
12511
|
|
|
11408
|
-
/***/ "./lib/icons/
|
|
11409
|
-
|
|
11410
|
-
!*** ./lib/icons/
|
|
11411
|
-
|
|
12512
|
+
/***/ "./lib/icons/RuleIcon.js":
|
|
12513
|
+
/*!*******************************!*\
|
|
12514
|
+
!*** ./lib/icons/RuleIcon.js ***!
|
|
12515
|
+
\*******************************/
|
|
11412
12516
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11413
12517
|
|
|
11414
12518
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -11422,20 +12526,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11422
12526
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11423
12527
|
*/
|
|
11424
12528
|
|
|
11425
|
-
const
|
|
11426
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "
|
|
12529
|
+
const RuleIcon = () => {
|
|
12530
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "9", height: "12", viewBox: "0 0 9 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11427
12531
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: "currentColor" },
|
|
11428
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
12532
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M1.22727 0C0.554444 0 0 0.580846 0 1.28571V10.7143C0 11.4192 0.554444 12 1.22727 12H7.77273C8.44556 12 9 11.4192 9 10.7143V3.42857H6.95455C6.28172 3.42857 5.72727 2.84773 5.72727 2.14286V0H1.22727ZM6.54545 0V2.14286C6.54545 2.38768 6.72085 2.57143 6.95455 2.57143H9C9 2.45777 8.95688 2.3488 8.88013 2.26843L6.83468 0.125577C6.75797 0.0451748 6.65396 0 6.54545 0ZM2.45455 4.71429H6.54545C6.77139 4.71429 6.95455 4.90616 6.95455 5.14286C6.95455 5.37955 6.77139 5.57143 6.54545 5.57143H2.45455C2.22861 5.57143 2.04545 5.37955 2.04545 5.14286C2.04545 4.90616 2.22861 4.71429 2.45455 4.71429ZM2.45455 6.85714H6.54545C6.77139 6.85714 6.95455 7.04902 6.95455 7.28571C6.95455 7.52241 6.77139 7.71429 6.54545 7.71429H2.45455C2.22861 7.71429 2.04545 7.52241 2.04545 7.28571C2.04545 7.04902 2.22861 6.85714 2.45455 6.85714ZM2.45455 9H6.54545C6.77139 9 6.95455 9.19187 6.95455 9.42857C6.95455 9.66527 6.77139 9.85714 6.54545 9.85714H2.45455C2.22861 9.85714 2.04545 9.66527 2.04545 9.42857C2.04545 9.19187 2.22861 9 2.45455 9Z" }))));
|
|
11429
12533
|
};
|
|
11430
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
12534
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RuleIcon);
|
|
11431
12535
|
|
|
11432
12536
|
|
|
11433
12537
|
/***/ }),
|
|
11434
12538
|
|
|
11435
|
-
/***/ "./lib/icons/
|
|
11436
|
-
|
|
11437
|
-
!*** ./lib/icons/
|
|
11438
|
-
|
|
12539
|
+
/***/ "./lib/icons/RunAllIcon.js":
|
|
12540
|
+
/*!*********************************!*\
|
|
12541
|
+
!*** ./lib/icons/RunAllIcon.js ***!
|
|
12542
|
+
\*********************************/
|
|
11439
12543
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11440
12544
|
|
|
11441
12545
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -11449,18 +12553,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11449
12553
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11450
12554
|
*/
|
|
11451
12555
|
|
|
11452
|
-
const
|
|
11453
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
11454
|
-
|
|
11455
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
12556
|
+
const RunAllIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12557
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M3 4L7 8L3 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
12558
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M8 4L12 8L8 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
12559
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RunAllIcon);
|
|
11456
12560
|
|
|
11457
12561
|
|
|
11458
12562
|
/***/ }),
|
|
11459
12563
|
|
|
11460
|
-
/***/ "./lib/icons/
|
|
11461
|
-
|
|
11462
|
-
!*** ./lib/icons/
|
|
11463
|
-
|
|
12564
|
+
/***/ "./lib/icons/SimplePlayIcon.js":
|
|
12565
|
+
/*!*************************************!*\
|
|
12566
|
+
!*** ./lib/icons/SimplePlayIcon.js ***!
|
|
12567
|
+
\*************************************/
|
|
11464
12568
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11465
12569
|
|
|
11466
12570
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -11474,17 +12578,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11474
12578
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11475
12579
|
*/
|
|
11476
12580
|
|
|
11477
|
-
const
|
|
11478
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
11479
|
-
|
|
11480
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RejectIcon);
|
|
12581
|
+
const SimplePlayIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12582
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M6 4L12 8L6 12V4Z", fill: "currentColor" })));
|
|
12583
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SimplePlayIcon);
|
|
11481
12584
|
|
|
11482
12585
|
|
|
11483
12586
|
/***/ }),
|
|
11484
12587
|
|
|
11485
|
-
/***/ "./lib/icons/
|
|
12588
|
+
/***/ "./lib/icons/StopIcon.js":
|
|
11486
12589
|
/*!*******************************!*\
|
|
11487
|
-
!*** ./lib/icons/
|
|
12590
|
+
!*** ./lib/icons/StopIcon.js ***!
|
|
11488
12591
|
\*******************************/
|
|
11489
12592
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11490
12593
|
|
|
@@ -11499,12 +12602,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11499
12602
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11500
12603
|
*/
|
|
11501
12604
|
|
|
11502
|
-
const
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M1.22727 0C0.554444 0 0 0.580846 0 1.28571V10.7143C0 11.4192 0.554444 12 1.22727 12H7.77273C8.44556 12 9 11.4192 9 10.7143V3.42857H6.95455C6.28172 3.42857 5.72727 2.84773 5.72727 2.14286V0H1.22727ZM6.54545 0V2.14286C6.54545 2.38768 6.72085 2.57143 6.95455 2.57143H9C9 2.45777 8.95688 2.3488 8.88013 2.26843L6.83468 0.125577C6.75797 0.0451748 6.65396 0 6.54545 0ZM2.45455 4.71429H6.54545C6.77139 4.71429 6.95455 4.90616 6.95455 5.14286C6.95455 5.37955 6.77139 5.57143 6.54545 5.57143H2.45455C2.22861 5.57143 2.04545 5.37955 2.04545 5.14286C2.04545 4.90616 2.22861 4.71429 2.45455 4.71429ZM2.45455 6.85714H6.54545C6.77139 6.85714 6.95455 7.04902 6.95455 7.28571C6.95455 7.52241 6.77139 7.71429 6.54545 7.71429H2.45455C2.22861 7.71429 2.04545 7.52241 2.04545 7.28571C2.04545 7.04902 2.22861 6.85714 2.45455 6.85714ZM2.45455 9H6.54545C6.77139 9 6.95455 9.19187 6.95455 9.42857C6.95455 9.66527 6.77139 9.85714 6.54545 9.85714H2.45455C2.22861 9.85714 2.04545 9.66527 2.04545 9.42857C2.04545 9.19187 2.22861 9 2.45455 9Z" }))));
|
|
11506
|
-
};
|
|
11507
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RuleIcon);
|
|
12605
|
+
const StopIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
12606
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "4", y: "4", width: "8", height: "8", fill: "currentColor", rx: "1" })));
|
|
12607
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StopIcon);
|
|
11508
12608
|
|
|
11509
12609
|
|
|
11510
12610
|
/***/ }),
|
|
@@ -11606,6 +12706,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11606
12706
|
/* harmony import */ var _Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Extensions/SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
11607
12707
|
/* harmony import */ var _Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Extensions/VersionCheck */ "./lib/Extensions/VersionCheck/index.js");
|
|
11608
12708
|
/* harmony import */ var _Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Extensions/NotebookFooter */ "./lib/Extensions/NotebookFooter/index.js");
|
|
12709
|
+
/* harmony import */ var _Extensions_MitoThemeLight__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Extensions/MitoThemeLight */ "./lib/Extensions/MitoThemeLight/index.js");
|
|
11609
12710
|
/* harmony import */ var _Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Extensions/AppManager/ManageAppsPlugin */ "./lib/Extensions/AppManager/ManageAppsPlugin.js");
|
|
11610
12711
|
/*
|
|
11611
12712
|
* Copyright (c) Saga Inc.
|
|
@@ -11623,6 +12724,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11623
12724
|
|
|
11624
12725
|
|
|
11625
12726
|
|
|
12727
|
+
|
|
11626
12728
|
// This is the main entry point to the mito-ai extension. It must export all of the top level
|
|
11627
12729
|
// extensions that we want to load.
|
|
11628
12730
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([
|
|
@@ -11637,7 +12739,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11637
12739
|
_Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
11638
12740
|
_Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__.versionCheckPlugin,
|
|
11639
12741
|
_Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__["default"],
|
|
11640
|
-
_Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__["default"]
|
|
12742
|
+
_Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__["default"],
|
|
12743
|
+
_Extensions_MitoThemeLight__WEBPACK_IMPORTED_MODULE_12__["default"]
|
|
11641
12744
|
]);
|
|
11642
12745
|
|
|
11643
12746
|
|
|
@@ -11990,7 +13093,7 @@ const acceptAndRunCellUpdate = async (cellUpdate, notebookPanel) => {
|
|
|
11990
13093
|
// gets the most up to date data.
|
|
11991
13094
|
await (0,_sleep__WEBPACK_IMPORTED_MODULE_2__.sleep)(1000);
|
|
11992
13095
|
};
|
|
11993
|
-
const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef) => {
|
|
13096
|
+
const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef, setLoadingStatus) => {
|
|
11994
13097
|
var _a;
|
|
11995
13098
|
const cell = notebookPanel.content.activeCell;
|
|
11996
13099
|
// Note: If you update the max retries, update the message we display on each failure
|
|
@@ -12021,7 +13124,13 @@ const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMess
|
|
|
12021
13124
|
if (agentResponse.type === 'cell_update') {
|
|
12022
13125
|
const cellUpdate = agentResponse.cell_update;
|
|
12023
13126
|
if (cellUpdate !== undefined && cellUpdate !== null) {
|
|
12024
|
-
|
|
13127
|
+
setLoadingStatus('running-code');
|
|
13128
|
+
try {
|
|
13129
|
+
await acceptAndRunCellUpdate(cellUpdate, notebookPanel);
|
|
13130
|
+
}
|
|
13131
|
+
finally {
|
|
13132
|
+
setLoadingStatus(undefined);
|
|
13133
|
+
}
|
|
12025
13134
|
}
|
|
12026
13135
|
}
|
|
12027
13136
|
else if (agentResponse.type === 'run_all_cells') {
|
|
@@ -12032,7 +13141,14 @@ const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMess
|
|
|
12032
13141
|
}
|
|
12033
13142
|
runAllCellsAttempts++;
|
|
12034
13143
|
// Execute runAllCells to fix NameError issues
|
|
12035
|
-
|
|
13144
|
+
setLoadingStatus('running-code');
|
|
13145
|
+
let result;
|
|
13146
|
+
try {
|
|
13147
|
+
result = await runAllCells(app, notebookPanel);
|
|
13148
|
+
}
|
|
13149
|
+
finally {
|
|
13150
|
+
setLoadingStatus(undefined);
|
|
13151
|
+
}
|
|
12036
13152
|
if (!result.success) {
|
|
12037
13153
|
// If run_all_cells resulted in an error, we should continue with error handling
|
|
12038
13154
|
// The error will be caught in the main loop
|
|
@@ -12181,10 +13297,6 @@ const checkForBlacklistedWords = (code) => {
|
|
|
12181
13297
|
pattern: /\bdrop\s+database\b/i,
|
|
12182
13298
|
message: "This code contains an SQL DROP DATABASE command that could delete your entire database"
|
|
12183
13299
|
},
|
|
12184
|
-
{
|
|
12185
|
-
pattern: /\bformat\s*\(/,
|
|
12186
|
-
message: "This code contains a format command that could potentially format your drives or storage devices"
|
|
12187
|
-
},
|
|
12188
13300
|
{
|
|
12189
13301
|
pattern: /\bsystem\s*\(/,
|
|
12190
13302
|
message: "This code contains a system() call that could execute arbitrary system commands, which is a security risk"
|
|
@@ -12350,6 +13462,136 @@ const getCellOutputByIDInNotebook = async (notebookPanel, codeCellID) => {
|
|
|
12350
13462
|
};
|
|
12351
13463
|
|
|
12352
13464
|
|
|
13465
|
+
/***/ }),
|
|
13466
|
+
|
|
13467
|
+
/***/ "./lib/utils/cellReferences.js":
|
|
13468
|
+
/*!*************************************!*\
|
|
13469
|
+
!*** ./lib/utils/cellReferences.js ***!
|
|
13470
|
+
\*************************************/
|
|
13471
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
13472
|
+
|
|
13473
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13474
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13475
|
+
/* harmony export */ convertCellReferencesToStableFormat: () => (/* binding */ convertCellReferencesToStableFormat),
|
|
13476
|
+
/* harmony export */ getAllCellReferences: () => (/* binding */ getAllCellReferences),
|
|
13477
|
+
/* harmony export */ getCellNumberById: () => (/* binding */ getCellNumberById),
|
|
13478
|
+
/* harmony export */ parseCellReferences: () => (/* binding */ parseCellReferences)
|
|
13479
|
+
/* harmony export */ });
|
|
13480
|
+
/* harmony import */ var _notebook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notebook */ "./lib/utils/notebook.js");
|
|
13481
|
+
/*
|
|
13482
|
+
* Copyright (c) Saga Inc.
|
|
13483
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
13484
|
+
*/
|
|
13485
|
+
|
|
13486
|
+
/**
|
|
13487
|
+
* Parses cell references from a message text.
|
|
13488
|
+
* Matches patterns like "@Cell 1", "@Cell 2", "@cell 5", etc.
|
|
13489
|
+
*
|
|
13490
|
+
* @param messageText - The message text to parse
|
|
13491
|
+
* @param notebookPanel - The notebook panel to resolve cell IDs
|
|
13492
|
+
* @returns Array of cell references found in the message
|
|
13493
|
+
*/
|
|
13494
|
+
function parseCellReferences(messageText, notebookPanel) {
|
|
13495
|
+
const references = [];
|
|
13496
|
+
if (!notebookPanel) {
|
|
13497
|
+
return references;
|
|
13498
|
+
}
|
|
13499
|
+
// Match @CellN or @cellN (case insensitive, no space)
|
|
13500
|
+
const cellReferenceRegex = /@[Cc]ell(\d+)/g;
|
|
13501
|
+
let match;
|
|
13502
|
+
while ((match = cellReferenceRegex.exec(messageText)) !== null) {
|
|
13503
|
+
if (!match[1]) {
|
|
13504
|
+
continue;
|
|
13505
|
+
}
|
|
13506
|
+
const cellNumber = parseInt(match[1], 10);
|
|
13507
|
+
const startIndex = match.index;
|
|
13508
|
+
const endIndex = startIndex + match[0].length;
|
|
13509
|
+
// Convert 1-indexed cell number to 0-indexed for lookup
|
|
13510
|
+
const cellIndex = cellNumber - 1;
|
|
13511
|
+
const cellId = (0,_notebook__WEBPACK_IMPORTED_MODULE_0__.getCellIDByIndexInNotebookPanel)(notebookPanel, cellIndex);
|
|
13512
|
+
if (cellId) {
|
|
13513
|
+
references.push({
|
|
13514
|
+
cellNumber,
|
|
13515
|
+
cellId,
|
|
13516
|
+
startIndex,
|
|
13517
|
+
endIndex
|
|
13518
|
+
});
|
|
13519
|
+
}
|
|
13520
|
+
}
|
|
13521
|
+
return references;
|
|
13522
|
+
}
|
|
13523
|
+
/**
|
|
13524
|
+
* Converts @Cell N references in a message to [MITO_CELL_REF:cell_id] format.
|
|
13525
|
+
* This ensures cell references are stable even if cells are reordered.
|
|
13526
|
+
*
|
|
13527
|
+
* @param messageText - The original message text containing @Cell N references
|
|
13528
|
+
* @param notebookPanel - The notebook panel to resolve cell IDs
|
|
13529
|
+
* @returns The message with @Cell N replaced by [MITO_CELL_REF:cell_id]
|
|
13530
|
+
*/
|
|
13531
|
+
function convertCellReferencesToStableFormat(messageText, notebookPanel) {
|
|
13532
|
+
if (!notebookPanel) {
|
|
13533
|
+
return messageText;
|
|
13534
|
+
}
|
|
13535
|
+
// Find all @Cell N references
|
|
13536
|
+
const references = parseCellReferences(messageText, notebookPanel);
|
|
13537
|
+
if (references.length === 0) {
|
|
13538
|
+
return messageText;
|
|
13539
|
+
}
|
|
13540
|
+
// Replace from end to start to preserve indices
|
|
13541
|
+
let processedMessage = messageText;
|
|
13542
|
+
for (let i = references.length - 1; i >= 0; i--) {
|
|
13543
|
+
const ref = references[i];
|
|
13544
|
+
if (!ref)
|
|
13545
|
+
continue;
|
|
13546
|
+
const before = processedMessage.substring(0, ref.startIndex);
|
|
13547
|
+
const after = processedMessage.substring(ref.endIndex);
|
|
13548
|
+
processedMessage = before + `[MITO_CELL_REF:${ref.cellId}]` + after;
|
|
13549
|
+
}
|
|
13550
|
+
return processedMessage;
|
|
13551
|
+
}
|
|
13552
|
+
/**
|
|
13553
|
+
* Gets the current cell number for a given cell ID.
|
|
13554
|
+
*
|
|
13555
|
+
* @param cellId - The cell ID to look up
|
|
13556
|
+
* @param notebookPanel - The notebook panel
|
|
13557
|
+
* @returns The 1-indexed cell number, or undefined if not found
|
|
13558
|
+
*/
|
|
13559
|
+
function getCellNumberById(cellId, notebookPanel) {
|
|
13560
|
+
if (!notebookPanel) {
|
|
13561
|
+
return undefined;
|
|
13562
|
+
}
|
|
13563
|
+
const notebook = notebookPanel.content;
|
|
13564
|
+
const cellIndex = notebook.widgets.findIndex(cell => cell.model.id === cellId);
|
|
13565
|
+
if (cellIndex === -1) {
|
|
13566
|
+
return undefined;
|
|
13567
|
+
}
|
|
13568
|
+
// Return 1-indexed cell number
|
|
13569
|
+
return cellIndex + 1;
|
|
13570
|
+
}
|
|
13571
|
+
/**
|
|
13572
|
+
* Gets all available cells with their numbers and IDs.
|
|
13573
|
+
* Useful for populating dropdowns or autocomplete.
|
|
13574
|
+
*
|
|
13575
|
+
* @param notebookPanel - The notebook panel
|
|
13576
|
+
* @returns Array of { cellNumber, cellId, cellType } objects
|
|
13577
|
+
*/
|
|
13578
|
+
function getAllCellReferences(notebookPanel) {
|
|
13579
|
+
if (!notebookPanel) {
|
|
13580
|
+
return [];
|
|
13581
|
+
}
|
|
13582
|
+
const notebook = notebookPanel.content;
|
|
13583
|
+
const cells = [];
|
|
13584
|
+
notebook.widgets.forEach((cell, index) => {
|
|
13585
|
+
cells.push({
|
|
13586
|
+
cellNumber: index + 1,
|
|
13587
|
+
cellId: cell.model.id,
|
|
13588
|
+
cellType: cell.model.type
|
|
13589
|
+
});
|
|
13590
|
+
});
|
|
13591
|
+
return cells;
|
|
13592
|
+
}
|
|
13593
|
+
|
|
13594
|
+
|
|
12353
13595
|
/***/ }),
|
|
12354
13596
|
|
|
12355
13597
|
/***/ "./lib/utils/chatHistory.js":
|
|
@@ -13026,6 +14268,63 @@ const uploadFileToBackend = async (file, notebookTracker, onFileUploaded) => {
|
|
|
13026
14268
|
};
|
|
13027
14269
|
|
|
13028
14270
|
|
|
14271
|
+
/***/ }),
|
|
14272
|
+
|
|
14273
|
+
/***/ "./lib/utils/lineNumbers.js":
|
|
14274
|
+
/*!**********************************!*\
|
|
14275
|
+
!*** ./lib/utils/lineNumbers.js ***!
|
|
14276
|
+
\**********************************/
|
|
14277
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14278
|
+
|
|
14279
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14280
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14281
|
+
/* harmony export */ areLineNumbersEnabled: () => (/* binding */ areLineNumbersEnabled),
|
|
14282
|
+
/* harmony export */ enableLineNumbersIfNeeded: () => (/* binding */ enableLineNumbersIfNeeded)
|
|
14283
|
+
/* harmony export */ });
|
|
14284
|
+
/*
|
|
14285
|
+
* Copyright (c) Saga Inc.
|
|
14286
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
14287
|
+
*/
|
|
14288
|
+
/**
|
|
14289
|
+
* Check if line numbers are currently enabled in a notebook panel.
|
|
14290
|
+
* Returns true if at least one code cell has line numbers visible.
|
|
14291
|
+
*/
|
|
14292
|
+
const areLineNumbersEnabled = (notebookPanel) => {
|
|
14293
|
+
const notebook = notebookPanel.content;
|
|
14294
|
+
// Check if any code cell has line numbers visible
|
|
14295
|
+
for (const cell of notebook.widgets) {
|
|
14296
|
+
if (cell.model.type === 'code' && cell.editor) {
|
|
14297
|
+
// Check if line numbers gutter exists in the DOM
|
|
14298
|
+
const editorNode = cell.node.querySelector('.jp-Editor');
|
|
14299
|
+
if (editorNode) {
|
|
14300
|
+
// In CodeMirror 6, line numbers are in a gutter with class 'cm-lineNumbers'
|
|
14301
|
+
const lineNumbersGutter = editorNode.querySelector('.cm-lineNumbers');
|
|
14302
|
+
if (lineNumbersGutter) {
|
|
14303
|
+
return true;
|
|
14304
|
+
}
|
|
14305
|
+
}
|
|
14306
|
+
}
|
|
14307
|
+
}
|
|
14308
|
+
return false;
|
|
14309
|
+
};
|
|
14310
|
+
/**
|
|
14311
|
+
* Enable line numbers for a notebook panel if they're not already enabled.
|
|
14312
|
+
*/
|
|
14313
|
+
const enableLineNumbersIfNeeded = async (app, notebookPanel) => {
|
|
14314
|
+
// Check if line numbers are already enabled
|
|
14315
|
+
if (areLineNumbersEnabled(notebookPanel)) {
|
|
14316
|
+
return;
|
|
14317
|
+
}
|
|
14318
|
+
// If not enabled, toggle them on
|
|
14319
|
+
try {
|
|
14320
|
+
await app.commands.execute('notebook:toggle-all-cell-line-numbers');
|
|
14321
|
+
}
|
|
14322
|
+
catch (error) {
|
|
14323
|
+
console.warn('Failed to enable line numbers:', error);
|
|
14324
|
+
}
|
|
14325
|
+
};
|
|
14326
|
+
|
|
14327
|
+
|
|
13029
14328
|
/***/ }),
|
|
13030
14329
|
|
|
13031
14330
|
/***/ "./lib/utils/models.js":
|
|
@@ -13040,8 +14339,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13040
14339
|
/* harmony export */ CLAUDE_HAIKU_MODEL_NAME: () => (/* binding */ CLAUDE_HAIKU_MODEL_NAME),
|
|
13041
14340
|
/* harmony export */ CLAUDE_SONNET_DISPLAY_NAME: () => (/* binding */ CLAUDE_SONNET_DISPLAY_NAME),
|
|
13042
14341
|
/* harmony export */ CLAUDE_SONNET_MODEL_NAME: () => (/* binding */ CLAUDE_SONNET_MODEL_NAME),
|
|
14342
|
+
/* harmony export */ GEMINI_3_FLASH_DISPLAY_NAME: () => (/* binding */ GEMINI_3_FLASH_DISPLAY_NAME),
|
|
14343
|
+
/* harmony export */ GEMINI_3_FLASH_MODEL_NAME: () => (/* binding */ GEMINI_3_FLASH_MODEL_NAME),
|
|
14344
|
+
/* harmony export */ GEMINI_3_PRO_DISPLAY_NAME: () => (/* binding */ GEMINI_3_PRO_DISPLAY_NAME),
|
|
14345
|
+
/* harmony export */ GEMINI_3_PRO_MODEL_NAME: () => (/* binding */ GEMINI_3_PRO_MODEL_NAME),
|
|
13043
14346
|
/* harmony export */ GPT_4_1_DISPLAY_NAME: () => (/* binding */ GPT_4_1_DISPLAY_NAME),
|
|
13044
|
-
/* harmony export */ GPT_4_1_MODEL_NAME: () => (/* binding */ GPT_4_1_MODEL_NAME)
|
|
14347
|
+
/* harmony export */ GPT_4_1_MODEL_NAME: () => (/* binding */ GPT_4_1_MODEL_NAME),
|
|
14348
|
+
/* harmony export */ GPT_5_2_DISPLAY_NAME: () => (/* binding */ GPT_5_2_DISPLAY_NAME),
|
|
14349
|
+
/* harmony export */ GPT_5_2_MODEL_NAME: () => (/* binding */ GPT_5_2_MODEL_NAME)
|
|
13045
14350
|
/* harmony export */ });
|
|
13046
14351
|
/*
|
|
13047
14352
|
* Copyright (c) Saga Inc.
|
|
@@ -13053,6 +14358,12 @@ const CLAUDE_HAIKU_DISPLAY_NAME = 'Claude Haiku 4.5';
|
|
|
13053
14358
|
const CLAUDE_HAIKU_MODEL_NAME = 'claude-haiku-4-5-20251001';
|
|
13054
14359
|
const GPT_4_1_DISPLAY_NAME = 'GPT 4.1';
|
|
13055
14360
|
const GPT_4_1_MODEL_NAME = 'gpt-4.1';
|
|
14361
|
+
const GPT_5_2_DISPLAY_NAME = 'GPT 5.2';
|
|
14362
|
+
const GPT_5_2_MODEL_NAME = 'gpt-5.2';
|
|
14363
|
+
const GEMINI_3_FLASH_DISPLAY_NAME = 'Gemini 3 Flash';
|
|
14364
|
+
const GEMINI_3_FLASH_MODEL_NAME = 'gemini-3-flash-preview';
|
|
14365
|
+
const GEMINI_3_PRO_DISPLAY_NAME = 'Gemini 3 Pro';
|
|
14366
|
+
const GEMINI_3_PRO_MODEL_NAME = 'gemini-3-pro-preview';
|
|
13056
14367
|
|
|
13057
14368
|
|
|
13058
14369
|
/***/ }),
|
|
@@ -13079,6 +14390,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13079
14390
|
/* harmony export */ getCellByIDInNotebookPanel: () => (/* binding */ getCellByIDInNotebookPanel),
|
|
13080
14391
|
/* harmony export */ getCellCodeByID: () => (/* binding */ getCellCodeByID),
|
|
13081
14392
|
/* harmony export */ getCellCodeByIDInNotebookPanel: () => (/* binding */ getCellCodeByIDInNotebookPanel),
|
|
14393
|
+
/* harmony export */ getCellIDByIndex: () => (/* binding */ getCellIDByIndex),
|
|
14394
|
+
/* harmony export */ getCellIDByIndexInNotebookPanel: () => (/* binding */ getCellIDByIndexInNotebookPanel),
|
|
13082
14395
|
/* harmony export */ getCellIndexByID: () => (/* binding */ getCellIndexByID),
|
|
13083
14396
|
/* harmony export */ getCellIndexByIDInNotebookPanel: () => (/* binding */ getCellIndexByIDInNotebookPanel),
|
|
13084
14397
|
/* harmony export */ getNotebookName: () => (/* binding */ getNotebookName),
|
|
@@ -13164,6 +14477,18 @@ const getCellIndexByIDInNotebookPanel = (notebookPanel, cellID) => {
|
|
|
13164
14477
|
}
|
|
13165
14478
|
return undefined;
|
|
13166
14479
|
};
|
|
14480
|
+
const getCellIDByIndex = (notebookTracker, index) => {
|
|
14481
|
+
const notebookPanel = notebookTracker.currentWidget;
|
|
14482
|
+
return getCellIDByIndexInNotebookPanel(notebookPanel, index);
|
|
14483
|
+
};
|
|
14484
|
+
const getCellIDByIndexInNotebookPanel = (notebookPanel, index) => {
|
|
14485
|
+
var _a, _b;
|
|
14486
|
+
const cellList = (_a = notebookPanel === null || notebookPanel === void 0 ? void 0 : notebookPanel.model) === null || _a === void 0 ? void 0 : _a.cells;
|
|
14487
|
+
if (cellList === undefined || index < 0 || index >= cellList.length) {
|
|
14488
|
+
return undefined;
|
|
14489
|
+
}
|
|
14490
|
+
return (_b = cellList.get(index)) === null || _b === void 0 ? void 0 : _b.id;
|
|
14491
|
+
};
|
|
13167
14492
|
const setActiveCellByID = (notebookTracker, cellID) => {
|
|
13168
14493
|
const notebookPanel = notebookTracker.currentWidget;
|
|
13169
14494
|
setActiveCellByIDInNotebookPanel(notebookPanel, cellID);
|
|
@@ -13655,6 +14980,52 @@ function sleep(ms) {
|
|
|
13655
14980
|
}
|
|
13656
14981
|
|
|
13657
14982
|
|
|
14983
|
+
/***/ }),
|
|
14984
|
+
|
|
14985
|
+
/***/ "./lib/utils/sound.js":
|
|
14986
|
+
/*!****************************!*\
|
|
14987
|
+
!*** ./lib/utils/sound.js ***!
|
|
14988
|
+
\****************************/
|
|
14989
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14990
|
+
|
|
14991
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14992
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14993
|
+
/* harmony export */ playCompletionSound: () => (/* binding */ playCompletionSound)
|
|
14994
|
+
/* harmony export */ });
|
|
14995
|
+
/*
|
|
14996
|
+
* Copyright (c) Saga Inc.
|
|
14997
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
14998
|
+
*/
|
|
14999
|
+
/**
|
|
15000
|
+
* Plays a completion sound to notify the user that the agent has finished.
|
|
15001
|
+
* Uses the Web Audio API to generate a pleasant two-tone notification sound.
|
|
15002
|
+
*/
|
|
15003
|
+
const playCompletionSound = (audioContext) => {
|
|
15004
|
+
if (!audioContext) {
|
|
15005
|
+
return;
|
|
15006
|
+
}
|
|
15007
|
+
// Create a pleasant two-note completion sound
|
|
15008
|
+
const playTone = (frequency, startTime, duration) => {
|
|
15009
|
+
const oscillator = audioContext.createOscillator();
|
|
15010
|
+
const gainNode = audioContext.createGain();
|
|
15011
|
+
oscillator.connect(gainNode);
|
|
15012
|
+
gainNode.connect(audioContext.destination);
|
|
15013
|
+
oscillator.frequency.value = frequency;
|
|
15014
|
+
oscillator.type = 'sine';
|
|
15015
|
+
// Fade in and out for a smoother sound
|
|
15016
|
+
gainNode.gain.setValueAtTime(0, startTime);
|
|
15017
|
+
gainNode.gain.linearRampToValueAtTime(0.3, startTime + 0.05);
|
|
15018
|
+
gainNode.gain.linearRampToValueAtTime(0, startTime + duration);
|
|
15019
|
+
oscillator.start(startTime);
|
|
15020
|
+
oscillator.stop(startTime + duration);
|
|
15021
|
+
};
|
|
15022
|
+
const now = audioContext.currentTime;
|
|
15023
|
+
// Play two ascending tones (C5 and E5) for a pleasant "complete" sound
|
|
15024
|
+
playTone(523.25, now, 0.15); // C5
|
|
15025
|
+
playTone(659.25, now + 0.12, 0.2); // E5
|
|
15026
|
+
};
|
|
15027
|
+
|
|
15028
|
+
|
|
13658
15029
|
/***/ }),
|
|
13659
15030
|
|
|
13660
15031
|
/***/ "./lib/utils/strings.js":
|
|
@@ -13919,6 +15290,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13919
15290
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
13920
15291
|
/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! semver */ "webpack/sharing/consume/default/semver/semver");
|
|
13921
15292
|
/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_2__);
|
|
15293
|
+
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./user */ "./lib/utils/user.js");
|
|
13922
15294
|
/*
|
|
13923
15295
|
* Copyright (c) Saga Inc.
|
|
13924
15296
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -13926,9 +15298,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13926
15298
|
|
|
13927
15299
|
|
|
13928
15300
|
|
|
15301
|
+
|
|
13929
15302
|
const VERSION_CHECK_TIMEOUT = 5000;
|
|
13930
15303
|
const VERSION_CHECK_ENDPOINT = 'mito-ai/version-check';
|
|
13931
|
-
const
|
|
15304
|
+
const DESKTOP_DOCS_UPDATE_URL = 'https://docs.trymito.io/getting-started/installing-mito/upgrading-mito-desktop#how-can-i-update-mito-ai';
|
|
15305
|
+
const PIP_DOCS_UPDATE_URL = 'https://docs.trymito.io/how-to/upgrading-mito';
|
|
13932
15306
|
const RELEASE_NOTES_URL = 'https://docs.trymito.io/misc/release-notes';
|
|
13933
15307
|
/**
|
|
13934
15308
|
* Display a notification when Mito AI is outdated
|
|
@@ -13940,7 +15314,7 @@ function showVersionOutdatedNotification(currentVersion, latestVersion) {
|
|
|
13940
15314
|
{
|
|
13941
15315
|
label: 'Learn how to update',
|
|
13942
15316
|
callback: () => {
|
|
13943
|
-
window.open(
|
|
15317
|
+
window.open((0,_user__WEBPACK_IMPORTED_MODULE_3__.isElectronBasedFrontend)() ? DESKTOP_DOCS_UPDATE_URL : PIP_DOCS_UPDATE_URL, '_blank');
|
|
13944
15318
|
}
|
|
13945
15319
|
},
|
|
13946
15320
|
{
|
|
@@ -14937,6 +16311,33 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14937
16311
|
flex-shrink: 0;
|
|
14938
16312
|
}
|
|
14939
16313
|
|
|
16314
|
+
.agent-component-header-actions {
|
|
16315
|
+
display: flex;
|
|
16316
|
+
align-items: center;
|
|
16317
|
+
gap: 4px;
|
|
16318
|
+
flex-shrink: 0;
|
|
16319
|
+
}
|
|
16320
|
+
|
|
16321
|
+
.agent-component-header-action-button {
|
|
16322
|
+
display: flex;
|
|
16323
|
+
align-items: center;
|
|
16324
|
+
justify-content: center;
|
|
16325
|
+
width: 24px;
|
|
16326
|
+
height: 24px;
|
|
16327
|
+
border: none;
|
|
16328
|
+
background: transparent;
|
|
16329
|
+
cursor: pointer;
|
|
16330
|
+
border-radius: 4px;
|
|
16331
|
+
color: var(--jp-ui-font-color2);
|
|
16332
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
16333
|
+
padding: 0;
|
|
16334
|
+
}
|
|
16335
|
+
|
|
16336
|
+
.agent-component-header-action-button:hover {
|
|
16337
|
+
background-color: var(--jp-layout-color3);
|
|
16338
|
+
color: var(--jp-ui-font-color1);
|
|
16339
|
+
}
|
|
16340
|
+
|
|
14940
16341
|
.agent-component-header-expand-icon {
|
|
14941
16342
|
flex-shrink: 0;
|
|
14942
16343
|
transition: transform 0.2s ease;
|
|
@@ -14944,7 +16345,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14944
16345
|
|
|
14945
16346
|
.agent-component-header-expand-icon.expanded {
|
|
14946
16347
|
transform: rotate(90deg);
|
|
14947
|
-
} `, "",{"version":3,"sources":["webpack://./style/AgentComponentHeader.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,eAAe;IACf,+DAA+D;IAC/D,+BAA+B;IAC/B,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,oDAAoD;IACpD,sDAAsD;IACtD,8DAA8D;AAClE;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,YAAY;IACZ,0BAA0B;IAC1B,yCAAyC;AAC7C;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,OAAO;IACP,YAAY;AAChB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,cAAc;IACd,+BAA+B;AACnC;;AAEA;IACI,wBAAwB;AAC5B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.agent-component-header {\n cursor: pointer;\n padding: 10px var(--chat-taskpane-tool-call-horizontal-padding);\n color: var(--jp-ui-font-color2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--jp-cell-editor-border-color);\n border-radius: var(--chat-taskpane-item-border-radius);\n transition: background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.agent-component-header:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.agent-component-header.no-border {\n border: none;\n}\n\n.agent-component-header.expanded {\n border: none;\n border-radius: 5px 5px 0 0;\n background-color: var(--jp-layout-color2);\n}\n\n.agent-component-header.error-fixup {\n border: none;\n}\n\n.agent-component-header.error-fixup.expanded {\n background-color: var(--jp-layout-color2);\n}\n\n.agent-component-header-content {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-component-header-content svg {\n flex-shrink: 0;\n}\n\n.agent-component-header-expand-icon {\n flex-shrink: 0;\n transition: transform 0.2s ease;\n}\n\n.agent-component-header-expand-icon.expanded {\n transform: rotate(90deg);\n} "],"sourceRoot":""}]);
|
|
16348
|
+
} `, "",{"version":3,"sources":["webpack://./style/AgentComponentHeader.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,eAAe;IACf,+DAA+D;IAC/D,+BAA+B;IAC/B,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,oDAAoD;IACpD,sDAAsD;IACtD,8DAA8D;AAClE;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,YAAY;IACZ,0BAA0B;IAC1B,yCAAyC;AAC7C;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,OAAO;IACP,YAAY;AAChB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,QAAQ;IACR,cAAc;AAClB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,uBAAuB;IACvB,eAAe;IACf,kBAAkB;IAClB,+BAA+B;IAC/B,yDAAyD;IACzD,UAAU;AACd;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;AACnC;;AAEA;IACI,cAAc;IACd,+BAA+B;AACnC;;AAEA;IACI,wBAAwB;AAC5B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.agent-component-header {\n cursor: pointer;\n padding: 10px var(--chat-taskpane-tool-call-horizontal-padding);\n color: var(--jp-ui-font-color2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--jp-cell-editor-border-color);\n border-radius: var(--chat-taskpane-item-border-radius);\n transition: background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.agent-component-header:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.agent-component-header.no-border {\n border: none;\n}\n\n.agent-component-header.expanded {\n border: none;\n border-radius: 5px 5px 0 0;\n background-color: var(--jp-layout-color2);\n}\n\n.agent-component-header.error-fixup {\n border: none;\n}\n\n.agent-component-header.error-fixup.expanded {\n background-color: var(--jp-layout-color2);\n}\n\n.agent-component-header-content {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-component-header-content svg {\n flex-shrink: 0;\n}\n\n.agent-component-header-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-shrink: 0;\n}\n\n.agent-component-header-action-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n cursor: pointer;\n border-radius: 4px;\n color: var(--jp-ui-font-color2);\n transition: background-color 0.15s ease, color 0.15s ease;\n padding: 0;\n}\n\n.agent-component-header-action-button:hover {\n background-color: var(--jp-layout-color3);\n color: var(--jp-ui-font-color1);\n}\n\n.agent-component-header-expand-icon {\n flex-shrink: 0;\n transition: transform 0.2s ease;\n}\n\n.agent-component-header-expand-icon.expanded {\n transform: rotate(90deg);\n} "],"sourceRoot":""}]);
|
|
14948
16349
|
// Exports
|
|
14949
16350
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
14950
16351
|
|
|
@@ -16037,27 +17438,87 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16037
17438
|
box-sizing: border-box;
|
|
16038
17439
|
}
|
|
16039
17440
|
|
|
16040
|
-
.cta-carousel-dot.active {
|
|
16041
|
-
background-color: var(--purple-500);
|
|
17441
|
+
.cta-carousel-dot.active {
|
|
17442
|
+
background-color: var(--purple-500);
|
|
17443
|
+
}
|
|
17444
|
+
|
|
17445
|
+
.cta-carousel-button {
|
|
17446
|
+
margin-top: 8px;
|
|
17447
|
+
}
|
|
17448
|
+
|
|
17449
|
+
.cta-logo-container {
|
|
17450
|
+
margin: 0 auto 8px;
|
|
17451
|
+
display: block;
|
|
17452
|
+
text-align: center;
|
|
17453
|
+
}
|
|
17454
|
+
|
|
17455
|
+
.cta-title {
|
|
17456
|
+
display: block;
|
|
17457
|
+
text-align: center;
|
|
17458
|
+
font-weight: bold;
|
|
17459
|
+
font-size: 20px;
|
|
17460
|
+
margin-bottom: 15px;
|
|
17461
|
+
}`, "",{"version":3,"sources":["webpack://./style/CTACarousel.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,WAAW;AACf;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;AACrB;;AAEA;IACI,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,+BAA+B;IAC/B,mBAAmB;IACnB,OAAO;IACP,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,UAAU;IACV,oCAAoC;AACxC;;AAEA;IACI,aAAa;IACb,uBAAuB;IACvB,QAAQ;IACR,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,yCAAyC;IACzC,eAAe;IACf,sCAAsC;IACtC,sBAAsB;AAC1B;;AAEA;IACI,mCAAmC;AACvC;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,kBAAkB;IAClB,cAAc;IACd,kBAAkB;AACtB;;AAEA;IACI,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;AACvB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.cta-carousel {\n width: 100%;\n}\n\n.cta-carousel-container {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n\n.cta-message {\n display: block;\n text-align: center;\n font-size: 14px;\n color: var(--jp-ui-font-color3);\n margin-bottom: 15px;\n flex: 1;\n line-height: 1.3;\n min-height: 2.5em;\n padding: 0 8px;\n opacity: 1;\n transition: opacity 0.5s ease-in-out;\n}\n\n.cta-carousel-dots {\n display: flex;\n justify-content: center;\n gap: 8px;\n margin-top: 4px;\n}\n\n.cta-carousel-dot {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: var(--jp-layout-color3);\n cursor: pointer;\n transition: background-color 0.3s ease;\n box-sizing: border-box;\n}\n\n.cta-carousel-dot.active {\n background-color: var(--purple-500);\n}\n\n.cta-carousel-button {\n margin-top: 8px;\n}\n\n.cta-logo-container {\n margin: 0 auto 8px;\n display: block;\n text-align: center;\n}\n\n.cta-title {\n display: block;\n text-align: center;\n font-weight: bold;\n font-size: 20px;\n margin-bottom: 15px;\n}"],"sourceRoot":""}]);
|
|
17462
|
+
// Exports
|
|
17463
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17464
|
+
|
|
17465
|
+
|
|
17466
|
+
/***/ }),
|
|
17467
|
+
|
|
17468
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/CellReference.css":
|
|
17469
|
+
/*!***********************************************************************!*\
|
|
17470
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/CellReference.css ***!
|
|
17471
|
+
\***********************************************************************/
|
|
17472
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
17473
|
+
|
|
17474
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17475
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17476
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17477
|
+
/* harmony export */ });
|
|
17478
|
+
/* 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");
|
|
17479
|
+
/* 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__);
|
|
17480
|
+
/* 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");
|
|
17481
|
+
/* 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__);
|
|
17482
|
+
// Imports
|
|
17483
|
+
|
|
17484
|
+
|
|
17485
|
+
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()));
|
|
17486
|
+
// Module
|
|
17487
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
17488
|
+
* Copyright (c) Saga Inc.
|
|
17489
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
17490
|
+
*/
|
|
17491
|
+
|
|
17492
|
+
/* Cell reference links in chat messages - styled as standard links */
|
|
17493
|
+
.cell-reference {
|
|
17494
|
+
color: var(--purple-600);
|
|
17495
|
+
text-decoration: underline;
|
|
17496
|
+
cursor: pointer;
|
|
17497
|
+
font-weight: 500;
|
|
17498
|
+
padding: 1px 5px;
|
|
17499
|
+
border-radius: 3px;
|
|
17500
|
+
position: relative;
|
|
17501
|
+
vertical-align: baseline;
|
|
17502
|
+
}
|
|
17503
|
+
|
|
17504
|
+
.cell-reference:hover {
|
|
17505
|
+
background-color: var(--purple-300);
|
|
17506
|
+
color: var(--purple-700);
|
|
16042
17507
|
}
|
|
16043
17508
|
|
|
16044
|
-
|
|
16045
|
-
|
|
17509
|
+
/* Greyed out style for missing/unresolved cell references (deleted or in different notebook) */
|
|
17510
|
+
.cell-reference.cell-reference-missing {
|
|
17511
|
+
color: var(--jp-ui-font-color2);
|
|
17512
|
+
text-decoration: none;
|
|
17513
|
+
cursor: default;
|
|
17514
|
+
opacity: 0.6;
|
|
16046
17515
|
}
|
|
16047
17516
|
|
|
16048
|
-
.
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
text-align: center;
|
|
17517
|
+
.cell-reference.cell-reference-missing:hover {
|
|
17518
|
+
background-color: var(--jp-layout-color3);
|
|
17519
|
+
color: var(--jp-ui-font-color2);
|
|
16052
17520
|
}
|
|
16053
|
-
|
|
16054
|
-
.cta-title {
|
|
16055
|
-
display: block;
|
|
16056
|
-
text-align: center;
|
|
16057
|
-
font-weight: bold;
|
|
16058
|
-
font-size: 20px;
|
|
16059
|
-
margin-bottom: 15px;
|
|
16060
|
-
}`, "",{"version":3,"sources":["webpack://./style/CTACarousel.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,WAAW;AACf;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;AACrB;;AAEA;IACI,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,+BAA+B;IAC/B,mBAAmB;IACnB,OAAO;IACP,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,UAAU;IACV,oCAAoC;AACxC;;AAEA;IACI,aAAa;IACb,uBAAuB;IACvB,QAAQ;IACR,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,yCAAyC;IACzC,eAAe;IACf,sCAAsC;IACtC,sBAAsB;AAC1B;;AAEA;IACI,mCAAmC;AACvC;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,kBAAkB;IAClB,cAAc;IACd,kBAAkB;AACtB;;AAEA;IACI,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;AACvB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.cta-carousel {\n width: 100%;\n}\n\n.cta-carousel-container {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n}\n\n.cta-message {\n display: block;\n text-align: center;\n font-size: 14px;\n color: var(--jp-ui-font-color3);\n margin-bottom: 15px;\n flex: 1;\n line-height: 1.3;\n min-height: 2.5em;\n padding: 0 8px;\n opacity: 1;\n transition: opacity 0.5s ease-in-out;\n}\n\n.cta-carousel-dots {\n display: flex;\n justify-content: center;\n gap: 8px;\n margin-top: 4px;\n}\n\n.cta-carousel-dot {\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: var(--jp-layout-color3);\n cursor: pointer;\n transition: background-color 0.3s ease;\n box-sizing: border-box;\n}\n\n.cta-carousel-dot.active {\n background-color: var(--purple-500);\n}\n\n.cta-carousel-button {\n margin-top: 8px;\n}\n\n.cta-logo-container {\n margin: 0 auto 8px;\n display: block;\n text-align: center;\n}\n\n.cta-title {\n display: block;\n text-align: center;\n font-weight: bold;\n font-size: 20px;\n margin-bottom: 15px;\n}"],"sourceRoot":""}]);
|
|
17521
|
+
`, "",{"version":3,"sources":["webpack://./style/CellReference.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,qEAAqE;AACrE;IACI,wBAAwB;IACxB,0BAA0B;IAC1B,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;AAC5B;;AAEA;IACI,mCAAmC;IACnC,wBAAwB;AAC5B;;AAEA,+FAA+F;AAC/F;IACI,+BAA+B;IAC/B,qBAAqB;IACrB,eAAe;IACf,YAAY;AAChB;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;AACnC","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* Cell reference links in chat messages - styled as standard links */\n.cell-reference {\n color: var(--purple-600);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 500;\n padding: 1px 5px;\n border-radius: 3px;\n position: relative;\n vertical-align: baseline;\n}\n\n.cell-reference:hover {\n background-color: var(--purple-300);\n color: var(--purple-700);\n}\n\n/* Greyed out style for missing/unresolved cell references (deleted or in different notebook) */\n.cell-reference.cell-reference-missing {\n color: var(--jp-ui-font-color2);\n text-decoration: none;\n cursor: default;\n opacity: 0.6;\n}\n\n.cell-reference.cell-reference-missing:hover {\n background-color: var(--jp-layout-color3);\n color: var(--jp-ui-font-color2);\n}\n"],"sourceRoot":""}]);
|
|
16061
17522
|
// Exports
|
|
16062
17523
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16063
17524
|
|
|
@@ -16375,10 +17836,6 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16375
17836
|
padding: 0 var(--chat-taskpane-item-indent);
|
|
16376
17837
|
}
|
|
16377
17838
|
|
|
16378
|
-
.message:not(.chat-input) {
|
|
16379
|
-
margin-bottom: 20px;
|
|
16380
|
-
}
|
|
16381
|
-
|
|
16382
17839
|
.message:hover .message-start-editing-button {
|
|
16383
17840
|
opacity: 1 !important;
|
|
16384
17841
|
}
|
|
@@ -16387,6 +17844,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16387
17844
|
background-color: var(--chat-user-message-background-color);
|
|
16388
17845
|
color: var(--chat-user-message-font-color);
|
|
16389
17846
|
padding: 10px;
|
|
17847
|
+
margin-bottom: 5px;
|
|
16390
17848
|
}
|
|
16391
17849
|
|
|
16392
17850
|
.message-assistant-chat {
|
|
@@ -16499,7 +17957,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16499
17957
|
|
|
16500
17958
|
.message-edit-buttons button:hover {
|
|
16501
17959
|
background-color: var(--jp-layout-color2);
|
|
16502
|
-
}`, "",{"version":3,"sources":["webpack://./style/ChatMessage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,sDAAsD;EACtD,2CAA2C;AAC7C;;AAEA;EACE,
|
|
17960
|
+
}`, "",{"version":3,"sources":["webpack://./style/ChatMessage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,sDAAsD;EACtD,2CAA2C;AAC7C;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,2DAA2D;EAC3D,0CAA0C;EAC1C,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;EACR,gBAAgB;EAChB,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,gBAAgB;EAChB,sBAAsB;EACtB,SAAS;EACT,gBAAgB;AAClB;;AAEA;EACE,mBAAmB;AACrB;;AAEA,qCAAqC;AACrC;EACE,kBAAkB;EAClB,WAAW;EACX,UAAU;EACV,aAAa;EACb,kBAAkB;EAClB,gBAAgB,EAAE,0DAA0D;AAC9E;;AAEA,qCAAqC;AACrC;;EAEE,eAAe;EACf,UAAU;EACV;;qCAEmC;EACnC,yCAAyC;EACzC,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,oCAAoC;AACtC;;AAEA,gCAAgC;AAChC;EACE,WAAW;EACX,YAAY;EACZ,UAAU;EACV,gBAAgB,EAAE,oCAAoC;AACxD;;AAEA,yCAAyC;AACzC;EACE,+CAA+C;AACjD;;AAEA,8FAA8F;AAC9F;;EAEE,gBAAgB;AAClB;;AAEA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;AACpB;;AAEA,mBAAmB;AACnB;EACE,oCAAoC;AACtC;;AAEA,iBAAiB;AACjB;;EAEE,yCAAyC;AAC3C;;AAEA,kCAAkC;AAClC;;EAEE,UAAU;AACZ;;AAEA;EACE,aAAa;EACb,QAAQ;EACR,YAAY;AACd;;AAEA;EACE,iBAAiB;EACjB,kBAAkB;EAClB,yCAAyC;EACzC,oCAAoC;EACpC,yCAAyC;EACzC,eAAe;AACjB;;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.message {\n position: relative;\n height: min-content;\n box-sizing: border-box;\n width: 100%;\n font-size: 14px;\n border-radius: var(--chat-taskpane-item-border-radius);\n padding: 0 var(--chat-taskpane-item-indent);\n}\n\n.message:hover .message-start-editing-button {\n opacity: 1 !important;\n}\n\n.message-user {\n background-color: var(--chat-user-message-background-color);\n color: var(--chat-user-message-font-color);\n padding: 10px;\n margin-bottom: 5px;\n}\n\n.message-assistant-chat {\n color: var(--chat-assistant-message-font-color);\n}\n\n.chat-message-buttons {\n display: flex;\n flex-direction: row;\n gap: 8px;\n margin-top: 10px;\n margin-bottom: 4px;\n flex-wrap: wrap;\n}\n\n.chat-taskpane-smart-debug-error-message {\n white-space: pre;\n font-family: monospace;\n margin: 0;\n overflow-x: auto;\n}\n\n.message-text {\n align-items: center;\n}\n\n/* Message Action Buttons Container */\n.message-action-buttons {\n position: absolute;\n bottom: 8px;\n right: 8px;\n display: flex;\n border-radius: 4px;\n overflow: hidden; /* Ensures inner buttons don't break the rounded corners */\n}\n\n/* Common styles for action buttons */\n.message-action-buttons button,\n.message-start-editing-button {\n cursor: pointer;\n opacity: 0;\n transition:\n opacity 0.2s ease-in-out,\n background-color 0.2s ease-in-out;\n background-color: var(--jp-layout-color3);\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--jp-content-font-color1);\n}\n\n/* Action buttons in the group */\n.message-action-buttons button {\n width: 28px;\n height: 28px;\n padding: 0;\n border-radius: 0; /* Remove individual button radius */\n}\n\n/* Add subtle separator between buttons */\n.message-action-buttons button:not(:last-child) {\n border-right: 1px solid var(--jp-border-color1);\n}\n\n/* Remove the individual button radius styles since we're handling it at the container level */\n.message-action-buttons button:first-child,\n.message-action-buttons button:last-child {\n border-radius: 0;\n}\n\n/* Standalone edit button */\n.message-start-editing-button {\n position: relative;\n padding: 4px;\n border-radius: 4px;\n}\n\n/* SVG icon color */\n.message-action-buttons button svg {\n color: var(--jp-content-font-color1);\n}\n\n/* Hover states */\n.message-action-buttons button:hover,\n.message-start-editing-button:hover {\n background-color: var(--jp-layout-color4);\n}\n\n/* Show buttons on message hover */\n.message:hover .message-action-buttons button,\n.message:hover .message-start-editing-button {\n opacity: 1;\n}\n\n.message-edit-buttons {\n display: flex;\n gap: 8px;\n padding: 5px;\n}\n\n.message-edit-buttons button {\n padding: 4px 12px;\n border-radius: 4px;\n background-color: var(--jp-layout-color1);\n color: var(--jp-content-font-color1);\n border: 1px solid var(--jp-border-color1);\n cursor: pointer;\n}\n\n.message-edit-buttons button:hover {\n background-color: var(--jp-layout-color2);\n}"],"sourceRoot":""}]);
|
|
16503
17961
|
// Exports
|
|
16504
17962
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16505
17963
|
|
|
@@ -16790,26 +18248,38 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16790
18248
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
16791
18249
|
*/
|
|
16792
18250
|
|
|
18251
|
+
/* Citation links - styled as superscript with background for visibility */
|
|
16793
18252
|
.citation-button {
|
|
16794
|
-
background-color: var(--purple-400);
|
|
16795
18253
|
color: var(--purple-700);
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
border-radius: 2px;
|
|
16799
|
-
font-size: 12px;
|
|
18254
|
+
background-color: var(--purple-200);
|
|
18255
|
+
text-decoration: underline;
|
|
16800
18256
|
cursor: pointer;
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
18257
|
+
font-size: 11px;
|
|
18258
|
+
font-weight: 600;
|
|
18259
|
+
padding: 1px 5px;
|
|
18260
|
+
border-radius: 3px;
|
|
16804
18261
|
position: relative;
|
|
16805
|
-
top: -0.
|
|
18262
|
+
top: -0.4em;
|
|
16806
18263
|
vertical-align: baseline;
|
|
16807
|
-
margin
|
|
18264
|
+
margin: 0 2px;
|
|
16808
18265
|
}
|
|
16809
18266
|
|
|
16810
18267
|
.citation-button:hover {
|
|
16811
|
-
background-color: var(--purple-
|
|
16812
|
-
}
|
|
18268
|
+
background-color: var(--purple-300);
|
|
18269
|
+
}
|
|
18270
|
+
|
|
18271
|
+
/* Greyed out style for missing/unresolved citations (deleted or in different notebook) */
|
|
18272
|
+
.citation-button.citation-missing {
|
|
18273
|
+
color: var(--jp-ui-font-color2);
|
|
18274
|
+
text-decoration: none;
|
|
18275
|
+
cursor: default;
|
|
18276
|
+
opacity: 0.6;
|
|
18277
|
+
}
|
|
18278
|
+
|
|
18279
|
+
.citation-button.citation-missing:hover {
|
|
18280
|
+
background-color: var(--jp-layout-color3);
|
|
18281
|
+
}
|
|
18282
|
+
`, "",{"version":3,"sources":["webpack://./style/Citation.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,0EAA0E;AAC1E;IACI,wBAAwB;IACxB,mCAAmC;IACnC,0BAA0B;IAC1B,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,WAAW;IACX,wBAAwB;IACxB,aAAa;AACjB;;AAEA;IACI,mCAAmC;AACvC;;AAEA,yFAAyF;AACzF;IACI,+BAA+B;IAC/B,qBAAqB;IACrB,eAAe;IACf,YAAY;AAChB;;AAEA;IACI,yCAAyC;AAC7C","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* Citation links - styled as superscript with background for visibility */\n.citation-button {\n color: var(--purple-700);\n background-color: var(--purple-200);\n text-decoration: underline;\n cursor: pointer;\n font-size: 11px;\n font-weight: 600;\n padding: 1px 5px;\n border-radius: 3px;\n position: relative;\n top: -0.4em;\n vertical-align: baseline;\n margin: 0 2px;\n}\n\n.citation-button:hover {\n background-color: var(--purple-300);\n}\n\n/* Greyed out style for missing/unresolved citations (deleted or in different notebook) */\n.citation-button.citation-missing {\n color: var(--jp-ui-font-color2);\n text-decoration: none;\n cursor: default;\n opacity: 0.6;\n}\n\n.citation-button.citation-missing:hover {\n background-color: var(--jp-layout-color3);\n}\n"],"sourceRoot":""}]);
|
|
16813
18283
|
// Exports
|
|
16814
18284
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16815
18285
|
|
|
@@ -19039,130 +20509,391 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
19039
20509
|
margin-left: auto;
|
|
19040
20510
|
}
|
|
19041
20511
|
|
|
19042
|
-
.revert-questionnaire-button:hover::after {
|
|
19043
|
-
opacity: 1;
|
|
19044
|
-
transform: translateX(0);
|
|
19045
|
-
}`, "",{"version":3,"sources":["webpack://./style/RevertQuestionnaire.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,aAAa;IACb,sBAAsB;IACtB,QAAQ;IACR,kBAAkB;IAClB,eAAe;IACf,mBAAmB;IACnB,2DAA2D;IAC3D,yCAAyC;IACzC,sBAAsB;IACtB,wBAAwB;IACxB,6BAA6B;AACjC;;AAEA;IACI,eAAe;IACf,+BAA+B;IAC/B,mBAAmB;IACnB,qBAAqB;IACrB,yBAAyB;IACzB,eAAe;AACnB;;AAEA;IACI,oBAAoB;IACpB,mBAAmB;IACnB,8BAA8B;IAC9B,QAAQ;IACR,iBAAiB;IACjB,mCAAmC;IACnC,yCAAyC;IACzC,mBAAmB;IACnB,+BAA+B;IAC/B,eAAe;IACf,eAAe;IACf,iDAAiD;IACjD,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,sBAAsB;IACtB,qBAAqB;IACrB,yBAAyB;IACzB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,sGAAsG;IACtG,mBAAmB;IACnB,UAAU;IACV,6BAA6B;AACjC;;AAEA;IACI,mCAAmC;IACnC,uCAAuC;IACvC,yDAAyD;IACzD,oCAAoC;AACxC;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,oCAAoC;IACpC,yBAAyB;AAC7B;;AAEA;IACI,YAAY;IACZ,6BAA6B;IAC7B,iDAAiD;IACjD,UAAU;IACV,2BAA2B;IAC3B,cAAc;IACd,iBAAiB;AACrB;;AAEA;IACI,UAAU;IACV,wBAAwB;AAC5B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.revert-questionnaire-message {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 12px 16px;\n margin: 8px 8px;\n border-radius: 12px;\n background-color: var(--chat-user-message-background-color);\n border: 1px solid var(--jp-border-color2);\n box-sizing: border-box;\n width: calc(100% - 16px);\n max-width: calc(100vw - 32px);\n}\n\n.revert-questionnaire-message-text {\n font-size: 12px;\n color: var(--jp-ui-font-color1);\n margin-bottom: 20px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n max-width: 100%;\n}\n\n.revert-questionnaire-button {\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 12px;\n background: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 20px;\n color: var(--jp-ui-font-color2);\n font-size: 12px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n text-align: left;\n width: 100%;\n overflow: hidden;\n position: relative;\n margin-bottom: 6px;\n box-sizing: border-box;\n word-wrap: break-word;\n overflow-wrap: break-word;\n white-space: normal;\n min-height: 36px;\n max-width: 100%;\n}\n\n.revert-questionnaire-button::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(135deg, var(--jp-brand-color3) 0%, rgba(var(--jp-brand-color1), 0.1) 100%);\n border-radius: 20px;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n\n.revert-questionnaire-button:hover {\n background: var(--jp-layout-color2);\n transform: translateY(-1px) scale(1.02);\n box-shadow: 0 4px 12px rgba(var(--jp-brand-color1), 0.15);\n border-color: var(--jp-brand-color1);\n}\n\n.revert-questionnaire-button:hover::before {\n opacity: 1;\n}\n\n.revert-questionnaire-button:active {\n transform: translateY(0) scale(0.98);\n transition: all 0.1s ease;\n}\n\n.revert-questionnaire-button::after {\n content: '→';\n color: var(--jp-brand-color1);\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n opacity: 0;\n transform: translateX(-4px);\n flex-shrink: 0;\n margin-left: auto;\n}\n\n.revert-questionnaire-button:hover::after {\n opacity: 1;\n transform: translateX(0);\n}"],"sourceRoot":""}]);
|
|
19046
|
-
// Exports
|
|
19047
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
19048
|
-
|
|
20512
|
+
.revert-questionnaire-button:hover::after {
|
|
20513
|
+
opacity: 1;
|
|
20514
|
+
transform: translateX(0);
|
|
20515
|
+
}`, "",{"version":3,"sources":["webpack://./style/RevertQuestionnaire.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,aAAa;IACb,sBAAsB;IACtB,QAAQ;IACR,kBAAkB;IAClB,eAAe;IACf,mBAAmB;IACnB,2DAA2D;IAC3D,yCAAyC;IACzC,sBAAsB;IACtB,wBAAwB;IACxB,6BAA6B;AACjC;;AAEA;IACI,eAAe;IACf,+BAA+B;IAC/B,mBAAmB;IACnB,qBAAqB;IACrB,yBAAyB;IACzB,eAAe;AACnB;;AAEA;IACI,oBAAoB;IACpB,mBAAmB;IACnB,8BAA8B;IAC9B,QAAQ;IACR,iBAAiB;IACjB,mCAAmC;IACnC,yCAAyC;IACzC,mBAAmB;IACnB,+BAA+B;IAC/B,eAAe;IACf,eAAe;IACf,iDAAiD;IACjD,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,sBAAsB;IACtB,qBAAqB;IACrB,yBAAyB;IACzB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,sGAAsG;IACtG,mBAAmB;IACnB,UAAU;IACV,6BAA6B;AACjC;;AAEA;IACI,mCAAmC;IACnC,uCAAuC;IACvC,yDAAyD;IACzD,oCAAoC;AACxC;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,oCAAoC;IACpC,yBAAyB;AAC7B;;AAEA;IACI,YAAY;IACZ,6BAA6B;IAC7B,iDAAiD;IACjD,UAAU;IACV,2BAA2B;IAC3B,cAAc;IACd,iBAAiB;AACrB;;AAEA;IACI,UAAU;IACV,wBAAwB;AAC5B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.revert-questionnaire-message {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 12px 16px;\n margin: 8px 8px;\n border-radius: 12px;\n background-color: var(--chat-user-message-background-color);\n border: 1px solid var(--jp-border-color2);\n box-sizing: border-box;\n width: calc(100% - 16px);\n max-width: calc(100vw - 32px);\n}\n\n.revert-questionnaire-message-text {\n font-size: 12px;\n color: var(--jp-ui-font-color1);\n margin-bottom: 20px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n max-width: 100%;\n}\n\n.revert-questionnaire-button {\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 12px;\n background: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 20px;\n color: var(--jp-ui-font-color2);\n font-size: 12px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n text-align: left;\n width: 100%;\n overflow: hidden;\n position: relative;\n margin-bottom: 6px;\n box-sizing: border-box;\n word-wrap: break-word;\n overflow-wrap: break-word;\n white-space: normal;\n min-height: 36px;\n max-width: 100%;\n}\n\n.revert-questionnaire-button::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(135deg, var(--jp-brand-color3) 0%, rgba(var(--jp-brand-color1), 0.1) 100%);\n border-radius: 20px;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n\n.revert-questionnaire-button:hover {\n background: var(--jp-layout-color2);\n transform: translateY(-1px) scale(1.02);\n box-shadow: 0 4px 12px rgba(var(--jp-brand-color1), 0.15);\n border-color: var(--jp-brand-color1);\n}\n\n.revert-questionnaire-button:hover::before {\n opacity: 1;\n}\n\n.revert-questionnaire-button:active {\n transform: translateY(0) scale(0.98);\n transition: all 0.1s ease;\n}\n\n.revert-questionnaire-button::after {\n content: '→';\n color: var(--jp-brand-color1);\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n opacity: 0;\n transform: translateX(-4px);\n flex-shrink: 0;\n margin-left: auto;\n}\n\n.revert-questionnaire-button:hover::after {\n opacity: 1;\n transform: translateX(0);\n}"],"sourceRoot":""}]);
|
|
20516
|
+
// Exports
|
|
20517
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
20518
|
+
|
|
20519
|
+
|
|
20520
|
+
/***/ }),
|
|
20521
|
+
|
|
20522
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/RulesForm.css":
|
|
20523
|
+
/*!*******************************************************************!*\
|
|
20524
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/RulesForm.css ***!
|
|
20525
|
+
\*******************************************************************/
|
|
20526
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
20527
|
+
|
|
20528
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20529
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20530
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20531
|
+
/* harmony export */ });
|
|
20532
|
+
/* 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");
|
|
20533
|
+
/* 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__);
|
|
20534
|
+
/* 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");
|
|
20535
|
+
/* 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__);
|
|
20536
|
+
// Imports
|
|
20537
|
+
|
|
20538
|
+
|
|
20539
|
+
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()));
|
|
20540
|
+
// Module
|
|
20541
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
20542
|
+
* Copyright (c) Saga Inc.
|
|
20543
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
20544
|
+
*/
|
|
20545
|
+
|
|
20546
|
+
.rules-form textarea {
|
|
20547
|
+
width: 100%;
|
|
20548
|
+
box-sizing: border-box;
|
|
20549
|
+
padding: 8px 12px;
|
|
20550
|
+
border: 1px solid var(--jp-border-color1);
|
|
20551
|
+
border-radius: 4px;
|
|
20552
|
+
background: var(--jp-layout-color0);
|
|
20553
|
+
color: var(--jp-ui-font-color1);
|
|
20554
|
+
font-size: 14px;
|
|
20555
|
+
transition: border-color 0.2s;
|
|
20556
|
+
font-family: var(--jp-ui-font-family);
|
|
20557
|
+
resize: vertical;
|
|
20558
|
+
min-height: 120px;
|
|
20559
|
+
}
|
|
20560
|
+
|
|
20561
|
+
.rules-form textarea:focus {
|
|
20562
|
+
outline: none;
|
|
20563
|
+
border-color: var(--purple-500);
|
|
20564
|
+
box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
|
|
20565
|
+
}
|
|
20566
|
+
|
|
20567
|
+
.rules-form .form-group sub {
|
|
20568
|
+
color: var(--jp-ui-font-color2);
|
|
20569
|
+
margin-top: 4px;
|
|
20570
|
+
margin-bottom: 4px;
|
|
20571
|
+
display: block;
|
|
20572
|
+
}
|
|
20573
|
+
|
|
20574
|
+
/* Rules List Styling */
|
|
20575
|
+
.rules-list {
|
|
20576
|
+
margin-top: 24px;
|
|
20577
|
+
display: flex;
|
|
20578
|
+
flex-direction: column;
|
|
20579
|
+
gap: 16px;
|
|
20580
|
+
}
|
|
20581
|
+
|
|
20582
|
+
.rules-list .rule-item {
|
|
20583
|
+
display: flex;
|
|
20584
|
+
justify-content: space-between;
|
|
20585
|
+
align-items: center;
|
|
20586
|
+
padding: 20px;
|
|
20587
|
+
border: 1px solid var(--jp-border-color1);
|
|
20588
|
+
border-radius: 8px;
|
|
20589
|
+
background: var(--jp-layout-color0);
|
|
20590
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
20591
|
+
cursor: pointer;
|
|
20592
|
+
}
|
|
20593
|
+
|
|
20594
|
+
.rules-list .rule-item:hover {
|
|
20595
|
+
border-color: var(--jp-border-color2);
|
|
20596
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
20597
|
+
}
|
|
20598
|
+
|
|
20599
|
+
.rules-list .rule-content {
|
|
20600
|
+
flex: 1;
|
|
20601
|
+
margin-right: 16px;
|
|
20602
|
+
}
|
|
20603
|
+
|
|
20604
|
+
.rules-list .rule-name {
|
|
20605
|
+
margin: 0 0 8px 0;
|
|
20606
|
+
color: var(--jp-ui-font-color1);
|
|
20607
|
+
font-size: 14px;
|
|
20608
|
+
font-weight: 500;
|
|
20609
|
+
line-height: 1;
|
|
20610
|
+
}
|
|
20611
|
+
|
|
20612
|
+
.rules-list .rule-description {
|
|
20613
|
+
margin: 0;
|
|
20614
|
+
color: var(--jp-ui-font-color2);
|
|
20615
|
+
font-size: 14px;
|
|
20616
|
+
line-height: 1.5;
|
|
20617
|
+
}
|
|
20618
|
+
|
|
20619
|
+
.rules-list .rule-actions {
|
|
20620
|
+
display: flex;
|
|
20621
|
+
gap: 8px;
|
|
20622
|
+
}
|
|
20623
|
+
|
|
20624
|
+
.rules-list .empty-state {
|
|
20625
|
+
text-align: center;
|
|
20626
|
+
padding: 40px 20px;
|
|
20627
|
+
color: var(--jp-ui-font-color2);
|
|
20628
|
+
font-style: italic;
|
|
20629
|
+
}
|
|
20630
|
+
|
|
20631
|
+
.rules-list .empty-state p {
|
|
20632
|
+
margin: 0;
|
|
20633
|
+
font-size: 16px;
|
|
20634
|
+
}
|
|
20635
|
+
`, "",{"version":3,"sources":["webpack://./style/RulesForm.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,WAAW;IACX,sBAAsB;IACtB,iBAAiB;IACjB,yCAAyC;IACzC,kBAAkB;IAClB,mCAAmC;IACnC,+BAA+B;IAC/B,eAAe;IACf,6BAA6B;IAC7B,qCAAqC;IACrC,gBAAgB;IAChB,iBAAiB;AACrB;;AAEA;IACI,aAAa;IACb,+BAA+B;IAC/B,6CAA6C;AACjD;;AAEA;IACI,+BAA+B;IAC/B,eAAe;IACf,kBAAkB;IAClB,cAAc;AAClB;;AAEA,uBAAuB;AACvB;IACI,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,SAAS;AACb;;AAEA;IACI,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,aAAa;IACb,yCAAyC;IACzC,kBAAkB;IAClB,mCAAmC;IACnC,8CAA8C;IAC9C,eAAe;AACnB;;AAEA;IACI,qCAAqC;IACrC,wCAAwC;AAC5C;;AAEA;IACI,OAAO;IACP,kBAAkB;AACtB;;AAEA;IACI,iBAAiB;IACjB,+BAA+B;IAC/B,eAAe;IACf,gBAAgB;IAChB,cAAc;AAClB;;AAEA;IACI,SAAS;IACT,+BAA+B;IAC/B,eAAe;IACf,gBAAgB;AACpB;;AAEA;IACI,aAAa;IACb,QAAQ;AACZ;;AAEA;IACI,kBAAkB;IAClB,kBAAkB;IAClB,+BAA+B;IAC/B,kBAAkB;AACtB;;AAEA;IACI,SAAS;IACT,eAAe;AACnB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.rules-form textarea {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 12px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n background: var(--jp-layout-color0);\n color: var(--jp-ui-font-color1);\n font-size: 14px;\n transition: border-color 0.2s;\n font-family: var(--jp-ui-font-family);\n resize: vertical;\n min-height: 120px;\n}\n\n.rules-form textarea:focus {\n outline: none;\n border-color: var(--purple-500);\n box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);\n}\n\n.rules-form .form-group sub {\n color: var(--jp-ui-font-color2);\n margin-top: 4px;\n margin-bottom: 4px;\n display: block;\n}\n\n/* Rules List Styling */\n.rules-list {\n margin-top: 24px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.rules-list .rule-item {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 20px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n background: var(--jp-layout-color0);\n transition: border-color 0.2s, box-shadow 0.2s;\n cursor: pointer;\n}\n\n.rules-list .rule-item:hover {\n border-color: var(--jp-border-color2);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.rules-list .rule-content {\n flex: 1;\n margin-right: 16px;\n}\n\n.rules-list .rule-name {\n margin: 0 0 8px 0;\n color: var(--jp-ui-font-color1);\n font-size: 14px;\n font-weight: 500;\n line-height: 1;\n}\n\n.rules-list .rule-description {\n margin: 0;\n color: var(--jp-ui-font-color2);\n font-size: 14px;\n line-height: 1.5;\n}\n\n.rules-list .rule-actions {\n display: flex;\n gap: 8px;\n}\n\n.rules-list .empty-state {\n text-align: center;\n padding: 40px 20px;\n color: var(--jp-ui-font-color2);\n font-style: italic;\n}\n\n.rules-list .empty-state p {\n margin: 0;\n font-size: 16px;\n}\n"],"sourceRoot":""}]);
|
|
20636
|
+
// Exports
|
|
20637
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
20638
|
+
|
|
20639
|
+
|
|
20640
|
+
/***/ }),
|
|
20641
|
+
|
|
20642
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/RunCellButton.css":
|
|
20643
|
+
/*!***********************************************************************!*\
|
|
20644
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/RunCellButton.css ***!
|
|
20645
|
+
\***********************************************************************/
|
|
20646
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
20647
|
+
|
|
20648
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20649
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20650
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20651
|
+
/* harmony export */ });
|
|
20652
|
+
/* 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");
|
|
20653
|
+
/* 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__);
|
|
20654
|
+
/* 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");
|
|
20655
|
+
/* 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__);
|
|
20656
|
+
// Imports
|
|
20657
|
+
|
|
20658
|
+
|
|
20659
|
+
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()));
|
|
20660
|
+
// Module
|
|
20661
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
20662
|
+
* Copyright (c) Saga Inc.
|
|
20663
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
20664
|
+
*/
|
|
20665
|
+
|
|
20666
|
+
.mito-run-cell-button-container {
|
|
20667
|
+
position: relative;
|
|
20668
|
+
display: block;
|
|
20669
|
+
width: 160px;
|
|
20670
|
+
}
|
|
20671
|
+
|
|
20672
|
+
/* Button group - contains both buttons */
|
|
20673
|
+
.mito-run-cell-button-group {
|
|
20674
|
+
display: flex;
|
|
20675
|
+
align-items: center;
|
|
20676
|
+
height: var(--toolbar-button-height);
|
|
20677
|
+
width: 100%;
|
|
20678
|
+
border-radius: 4px;
|
|
20679
|
+
overflow: hidden;
|
|
20680
|
+
background-color: var(--blue-300);
|
|
20681
|
+
border: 0.5px solid var(--blue-900);
|
|
20682
|
+
}
|
|
20683
|
+
|
|
20684
|
+
/* Shared button styles */
|
|
20685
|
+
.mito-run-cell-button {
|
|
20686
|
+
display: flex;
|
|
20687
|
+
align-items: center;
|
|
20688
|
+
border: none;
|
|
20689
|
+
padding: 0;
|
|
20690
|
+
border-radius: 0;
|
|
20691
|
+
cursor: pointer;
|
|
20692
|
+
color: var(--blue-900);
|
|
20693
|
+
font-size: 13px;
|
|
20694
|
+
font-weight: 400;
|
|
20695
|
+
transition: background-color 0.15s ease;
|
|
20696
|
+
height: 100%;
|
|
20697
|
+
background-color: transparent;
|
|
20698
|
+
}
|
|
20699
|
+
|
|
20700
|
+
.mito-run-cell-button:hover {
|
|
20701
|
+
background-color: var(--blue-400);
|
|
20702
|
+
}
|
|
20703
|
+
|
|
20704
|
+
/* Main button (left side - play icon + text) */
|
|
20705
|
+
.mito-run-cell-button-main {
|
|
20706
|
+
flex: 1;
|
|
20707
|
+
gap: 6px;
|
|
20708
|
+
padding: 0 10px;
|
|
20709
|
+
}
|
|
20710
|
+
|
|
20711
|
+
/* Divider between buttons */
|
|
20712
|
+
.mito-run-cell-button-divider {
|
|
20713
|
+
width: 1px;
|
|
20714
|
+
height: 14px;
|
|
20715
|
+
background: linear-gradient(
|
|
20716
|
+
to bottom,
|
|
20717
|
+
transparent,
|
|
20718
|
+
var(--blue-900) 20%,
|
|
20719
|
+
var(--blue-900) 80%,
|
|
20720
|
+
transparent
|
|
20721
|
+
);
|
|
20722
|
+
opacity: 0.4;
|
|
20723
|
+
flex-shrink: 0;
|
|
20724
|
+
}
|
|
20725
|
+
|
|
20726
|
+
/* Dropdown button (right side - chevron) */
|
|
20727
|
+
.mito-run-cell-button-dropdown {
|
|
20728
|
+
padding: 0 6px;
|
|
20729
|
+
display: flex;
|
|
20730
|
+
align-items: center;
|
|
20731
|
+
justify-content: center;
|
|
20732
|
+
border-radius: 0;
|
|
20733
|
+
}
|
|
20734
|
+
|
|
20735
|
+
/* Play icon styling */
|
|
20736
|
+
.mito-run-cell-button-main > svg {
|
|
20737
|
+
color: var(--blue-900);
|
|
20738
|
+
fill: var(--blue-900);
|
|
20739
|
+
width: 12px;
|
|
20740
|
+
height: 12px;
|
|
20741
|
+
flex-shrink: 0;
|
|
20742
|
+
}
|
|
20743
|
+
|
|
20744
|
+
/* Chevron styling */
|
|
20745
|
+
.mito-run-cell-button-dropdown svg {
|
|
20746
|
+
width: 14px;
|
|
20747
|
+
height: 14px;
|
|
20748
|
+
color: var(--blue-900);
|
|
20749
|
+
}
|
|
20750
|
+
|
|
20751
|
+
/* Ensure chevron path only uses stroke, not fill */
|
|
20752
|
+
.mito-run-cell-button-dropdown svg path {
|
|
20753
|
+
fill: none;
|
|
20754
|
+
stroke: currentColor;
|
|
20755
|
+
}
|
|
20756
|
+
|
|
20757
|
+
.mito-run-cell-button-text {
|
|
20758
|
+
white-space: nowrap;
|
|
20759
|
+
}
|
|
20760
|
+
|
|
20761
|
+
/* Running state - applied to the group */
|
|
20762
|
+
.mito-run-cell-button-running {
|
|
20763
|
+
border-color: var(--green-900);
|
|
20764
|
+
}
|
|
19049
20765
|
|
|
19050
|
-
|
|
20766
|
+
.mito-run-cell-button-running .mito-run-cell-button,
|
|
20767
|
+
.mito-run-cell-button-running .mito-run-cell-button-dropdown {
|
|
20768
|
+
background-color: var(--green-300);
|
|
20769
|
+
color: var(--green-900);
|
|
20770
|
+
}
|
|
19051
20771
|
|
|
19052
|
-
|
|
19053
|
-
|
|
19054
|
-
|
|
19055
|
-
\*******************************************************************/
|
|
19056
|
-
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
20772
|
+
.mito-run-cell-button-running .mito-run-cell-button-dropdown:hover {
|
|
20773
|
+
background-color: var(--green-500);
|
|
20774
|
+
}
|
|
19057
20775
|
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19065
|
-
|
|
19066
|
-
|
|
20776
|
+
.mito-run-cell-button-running .mito-run-cell-button-divider {
|
|
20777
|
+
background: linear-gradient(
|
|
20778
|
+
to bottom,
|
|
20779
|
+
transparent,
|
|
20780
|
+
var(--green-900) 20%,
|
|
20781
|
+
var(--green-900) 80%,
|
|
20782
|
+
transparent
|
|
20783
|
+
);
|
|
20784
|
+
opacity: 0.5;
|
|
20785
|
+
}
|
|
19067
20786
|
|
|
20787
|
+
/* LoadingCircle styling when running */
|
|
20788
|
+
.mito-run-cell-button-running .mito-run-cell-button-main > svg {
|
|
20789
|
+
color: var(--green-900);
|
|
20790
|
+
fill: var(--green-900);
|
|
20791
|
+
width: 16px;
|
|
20792
|
+
height: 16px;
|
|
20793
|
+
}
|
|
19068
20794
|
|
|
19069
|
-
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
* Copyright (c) Saga Inc.
|
|
19073
|
-
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
19074
|
-
*/
|
|
20795
|
+
.mito-run-cell-button-running .mito-run-cell-button-text {
|
|
20796
|
+
color: var(--green-900);
|
|
20797
|
+
}
|
|
19075
20798
|
|
|
19076
|
-
.
|
|
19077
|
-
|
|
19078
|
-
box-sizing: border-box;
|
|
19079
|
-
padding: 8px 12px;
|
|
19080
|
-
border: 1px solid var(--jp-border-color1);
|
|
19081
|
-
border-radius: 4px;
|
|
19082
|
-
background: var(--jp-layout-color0);
|
|
19083
|
-
color: var(--jp-ui-font-color1);
|
|
19084
|
-
font-size: 14px;
|
|
19085
|
-
transition: border-color 0.2s;
|
|
19086
|
-
font-family: var(--jp-ui-font-family);
|
|
19087
|
-
resize: vertical;
|
|
19088
|
-
min-height: 120px;
|
|
20799
|
+
.mito-run-cell-button-running .mito-run-cell-button-dropdown svg {
|
|
20800
|
+
color: var(--green-900);
|
|
19089
20801
|
}
|
|
19090
20802
|
|
|
19091
|
-
.
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
20803
|
+
.mito-run-cell-dropdown-menu {
|
|
20804
|
+
position: absolute;
|
|
20805
|
+
top: calc(100% + 4px);
|
|
20806
|
+
right: 0;
|
|
20807
|
+
z-index: 1000;
|
|
20808
|
+
background-color: var(--jp-layout-color1);
|
|
20809
|
+
border: 1px solid var(--jp-layout-color2);
|
|
20810
|
+
border-radius: 3px;
|
|
20811
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
20812
|
+
min-width: 200px;
|
|
20813
|
+
white-space: nowrap;
|
|
20814
|
+
padding: 4px 0;
|
|
19095
20815
|
}
|
|
19096
20816
|
|
|
19097
|
-
.
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
margin-bottom: 4px;
|
|
19101
|
-
display: block;
|
|
20817
|
+
.mito-run-cell-dropdown-section {
|
|
20818
|
+
display: flex;
|
|
20819
|
+
flex-direction: column;
|
|
19102
20820
|
}
|
|
19103
20821
|
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
20822
|
+
.mito-run-cell-dropdown-section-header {
|
|
20823
|
+
padding: 6px 12px 4px 12px;
|
|
20824
|
+
font-size: 11px;
|
|
20825
|
+
font-weight: 600;
|
|
20826
|
+
color: var(--jp-ui-font-color2);
|
|
20827
|
+
text-transform: uppercase;
|
|
20828
|
+
letter-spacing: 0.5px;
|
|
19110
20829
|
}
|
|
19111
20830
|
|
|
19112
|
-
.
|
|
19113
|
-
|
|
19114
|
-
|
|
19115
|
-
|
|
19116
|
-
padding: 20px;
|
|
19117
|
-
border: 1px solid var(--jp-border-color1);
|
|
19118
|
-
border-radius: 8px;
|
|
19119
|
-
background: var(--jp-layout-color0);
|
|
19120
|
-
transition: border-color 0.2s, box-shadow 0.2s;
|
|
19121
|
-
cursor: pointer;
|
|
20831
|
+
.mito-run-cell-dropdown-separator {
|
|
20832
|
+
height: 1px;
|
|
20833
|
+
background-color: var(--jp-layout-color2);
|
|
20834
|
+
margin: 4px 0;
|
|
19122
20835
|
}
|
|
19123
20836
|
|
|
19124
|
-
.
|
|
19125
|
-
|
|
19126
|
-
|
|
20837
|
+
.mito-run-cell-dropdown-item {
|
|
20838
|
+
display: flex;
|
|
20839
|
+
align-items: center;
|
|
20840
|
+
width: 100%;
|
|
20841
|
+
padding: 6px 12px;
|
|
20842
|
+
text-align: left;
|
|
20843
|
+
border: none;
|
|
20844
|
+
background: none;
|
|
20845
|
+
color: var(--jp-ui-font-color1);
|
|
20846
|
+
cursor: pointer;
|
|
20847
|
+
font-size: 13px;
|
|
20848
|
+
font-weight: 400;
|
|
20849
|
+
gap: 8px;
|
|
19127
20850
|
}
|
|
19128
20851
|
|
|
19129
|
-
.
|
|
19130
|
-
|
|
19131
|
-
margin-right: 16px;
|
|
20852
|
+
.mito-run-cell-dropdown-item:hover {
|
|
20853
|
+
background-color: var(--jp-layout-color2);
|
|
19132
20854
|
}
|
|
19133
20855
|
|
|
19134
|
-
.
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
|
|
19139
|
-
|
|
20856
|
+
.mito-run-cell-dropdown-item-icon {
|
|
20857
|
+
display: flex;
|
|
20858
|
+
align-items: center;
|
|
20859
|
+
justify-content: center;
|
|
20860
|
+
width: 20px; /* Fixed width to align all icons */
|
|
20861
|
+
height: 16px;
|
|
20862
|
+
flex-shrink: 0;
|
|
20863
|
+
color: var(--jp-ui-font-color1);
|
|
20864
|
+
line-height: 0; /* Remove extra line height for better alignment */
|
|
19140
20865
|
}
|
|
19141
20866
|
|
|
19142
|
-
.
|
|
19143
|
-
|
|
19144
|
-
|
|
19145
|
-
|
|
19146
|
-
|
|
20867
|
+
.mito-run-cell-dropdown-item-icon svg {
|
|
20868
|
+
width: 16px;
|
|
20869
|
+
height: 16px;
|
|
20870
|
+
display: block; /* Remove inline spacing */
|
|
20871
|
+
margin: 0 auto; /* Center the icon within the fixed width container */
|
|
20872
|
+
color: var(--jp-ui-font-color1);
|
|
19147
20873
|
}
|
|
19148
20874
|
|
|
19149
|
-
.
|
|
19150
|
-
|
|
19151
|
-
gap: 8px;
|
|
20875
|
+
.mito-run-cell-dropdown-item-label {
|
|
20876
|
+
flex: 1;
|
|
19152
20877
|
}
|
|
19153
20878
|
|
|
19154
|
-
.
|
|
19155
|
-
|
|
19156
|
-
|
|
19157
|
-
|
|
19158
|
-
|
|
20879
|
+
.mito-run-cell-dropdown-item-shortcut {
|
|
20880
|
+
color: var(--jp-ui-font-color2);
|
|
20881
|
+
font-size: 11px;
|
|
20882
|
+
margin-left: 10px;
|
|
20883
|
+
opacity: 0.7;
|
|
19159
20884
|
}
|
|
19160
20885
|
|
|
19161
|
-
|
|
19162
|
-
|
|
19163
|
-
|
|
20886
|
+
/* Position the button widget on the right side of the toolbar */
|
|
20887
|
+
.jp-Notebook-toolbar .mito-run-cell-button-widget {
|
|
20888
|
+
margin-left: auto;
|
|
20889
|
+
order: 9999; /* Ensure it appears last */
|
|
19164
20890
|
}
|
|
19165
|
-
|
|
20891
|
+
|
|
20892
|
+
/* Ensure toolbar uses flexbox for proper alignment */
|
|
20893
|
+
.jp-Notebook-toolbar {
|
|
20894
|
+
display: flex;
|
|
20895
|
+
align-items: center;
|
|
20896
|
+
}`, "",{"version":3,"sources":["webpack://./style/RunCellButton.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,cAAc;EACd,YAAY;AACd;;AAEA,yCAAyC;AACzC;EACE,aAAa;EACb,mBAAmB;EACnB,oCAAoC;EACpC,WAAW;EACX,kBAAkB;EAClB,gBAAgB;EAChB,iCAAiC;EACjC,mCAAmC;AACrC;;AAEA,yBAAyB;AACzB;EACE,aAAa;EACb,mBAAmB;EACnB,YAAY;EACZ,UAAU;EACV,gBAAgB;EAChB,eAAe;EACf,sBAAsB;EACtB,eAAe;EACf,gBAAgB;EAChB,uCAAuC;EACvC,YAAY;EACZ,6BAA6B;AAC/B;;AAEA;EACE,iCAAiC;AACnC;;AAEA,+CAA+C;AAC/C;EACE,OAAO;EACP,QAAQ;EACR,eAAe;AACjB;;AAEA,4BAA4B;AAC5B;EACE,UAAU;EACV,YAAY;EACZ;;;;;;GAMC;EACD,YAAY;EACZ,cAAc;AAChB;;AAEA,2CAA2C;AAC3C;EACE,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,gBAAgB;AAClB;;AAEA,sBAAsB;AACtB;EACE,sBAAsB;EACtB,qBAAqB;EACrB,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;;AAEA,oBAAoB;AACpB;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;AACxB;;AAEA,mDAAmD;AACnD;EACE,UAAU;EACV,oBAAoB;AACtB;;AAEA;EACE,mBAAmB;AACrB;;AAEA,yCAAyC;AACzC;EACE,8BAA8B;AAChC;;AAEA;;EAEE,kCAAkC;EAClC,uBAAuB;AACzB;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE;;;;;;GAMC;EACD,YAAY;AACd;;AAEA,uCAAuC;AACvC;EACE,uBAAuB;EACvB,sBAAsB;EACtB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,uBAAuB;AACzB;;AAEA;EACE,uBAAuB;AACzB;;AAEA;EACE,kBAAkB;EAClB,qBAAqB;EACrB,QAAQ;EACR,aAAa;EACb,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,wCAAwC;EACxC,gBAAgB;EAChB,mBAAmB;EACnB,cAAc;AAChB;;AAEA;EACE,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,0BAA0B;EAC1B,eAAe;EACf,gBAAgB;EAChB,+BAA+B;EAC/B,yBAAyB;EACzB,qBAAqB;AACvB;;AAEA;EACE,WAAW;EACX,yCAAyC;EACzC,aAAa;AACf;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,WAAW;EACX,iBAAiB;EACjB,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;EAChB,+BAA+B;EAC/B,eAAe;EACf,eAAe;EACf,gBAAgB;EAChB,QAAQ;AACV;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW,EAAE,mCAAmC;EAChD,YAAY;EACZ,cAAc;EACd,+BAA+B;EAC/B,cAAc,EAAE,kDAAkD;AACpE;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,cAAc,EAAE,0BAA0B;EAC1C,cAAc,EAAE,qDAAqD;EACrE,+BAA+B;AACjC;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,+BAA+B;EAC/B,eAAe;EACf,iBAAiB;EACjB,YAAY;AACd;;AAEA,gEAAgE;AAChE;EACE,iBAAiB;EACjB,WAAW,EAAE,2BAA2B;AAC1C;;AAEA,qDAAqD;AACrD;EACE,aAAa;EACb,mBAAmB;AACrB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.mito-run-cell-button-container {\n position: relative;\n display: block;\n width: 160px;\n}\n\n/* Button group - contains both buttons */\n.mito-run-cell-button-group {\n display: flex;\n align-items: center;\n height: var(--toolbar-button-height);\n width: 100%;\n border-radius: 4px;\n overflow: hidden;\n background-color: var(--blue-300);\n border: 0.5px solid var(--blue-900);\n}\n\n/* Shared button styles */\n.mito-run-cell-button {\n display: flex;\n align-items: center;\n border: none;\n padding: 0;\n border-radius: 0;\n cursor: pointer;\n color: var(--blue-900);\n font-size: 13px;\n font-weight: 400;\n transition: background-color 0.15s ease;\n height: 100%;\n background-color: transparent;\n}\n\n.mito-run-cell-button:hover {\n background-color: var(--blue-400);\n}\n\n/* Main button (left side - play icon + text) */\n.mito-run-cell-button-main {\n flex: 1;\n gap: 6px;\n padding: 0 10px;\n}\n\n/* Divider between buttons */\n.mito-run-cell-button-divider {\n width: 1px;\n height: 14px;\n background: linear-gradient(\n to bottom,\n transparent,\n var(--blue-900) 20%,\n var(--blue-900) 80%,\n transparent\n );\n opacity: 0.4;\n flex-shrink: 0;\n}\n\n/* Dropdown button (right side - chevron) */\n.mito-run-cell-button-dropdown {\n padding: 0 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 0;\n}\n\n/* Play icon styling */\n.mito-run-cell-button-main > svg {\n color: var(--blue-900);\n fill: var(--blue-900);\n width: 12px;\n height: 12px;\n flex-shrink: 0;\n}\n\n/* Chevron styling */\n.mito-run-cell-button-dropdown svg {\n width: 14px;\n height: 14px;\n color: var(--blue-900);\n}\n\n/* Ensure chevron path only uses stroke, not fill */\n.mito-run-cell-button-dropdown svg path {\n fill: none;\n stroke: currentColor;\n}\n\n.mito-run-cell-button-text {\n white-space: nowrap;\n}\n\n/* Running state - applied to the group */\n.mito-run-cell-button-running {\n border-color: var(--green-900);\n}\n\n.mito-run-cell-button-running .mito-run-cell-button,\n.mito-run-cell-button-running .mito-run-cell-button-dropdown {\n background-color: var(--green-300);\n color: var(--green-900);\n}\n\n.mito-run-cell-button-running .mito-run-cell-button-dropdown:hover {\n background-color: var(--green-500);\n}\n\n.mito-run-cell-button-running .mito-run-cell-button-divider {\n background: linear-gradient(\n to bottom,\n transparent,\n var(--green-900) 20%,\n var(--green-900) 80%,\n transparent\n );\n opacity: 0.5;\n}\n\n/* LoadingCircle styling when running */\n.mito-run-cell-button-running .mito-run-cell-button-main > svg {\n color: var(--green-900);\n fill: var(--green-900);\n width: 16px;\n height: 16px;\n}\n\n.mito-run-cell-button-running .mito-run-cell-button-text {\n color: var(--green-900);\n}\n\n.mito-run-cell-button-running .mito-run-cell-button-dropdown svg {\n color: var(--green-900);\n}\n\n.mito-run-cell-dropdown-menu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 1000;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-layout-color2);\n border-radius: 3px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n min-width: 200px;\n white-space: nowrap;\n padding: 4px 0;\n}\n\n.mito-run-cell-dropdown-section {\n display: flex;\n flex-direction: column;\n}\n\n.mito-run-cell-dropdown-section-header {\n padding: 6px 12px 4px 12px;\n font-size: 11px;\n font-weight: 600;\n color: var(--jp-ui-font-color2);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mito-run-cell-dropdown-separator {\n height: 1px;\n background-color: var(--jp-layout-color2);\n margin: 4px 0;\n}\n\n.mito-run-cell-dropdown-item {\n display: flex;\n align-items: center;\n width: 100%;\n padding: 6px 12px;\n text-align: left;\n border: none;\n background: none;\n color: var(--jp-ui-font-color1);\n cursor: pointer;\n font-size: 13px;\n font-weight: 400;\n gap: 8px;\n}\n\n.mito-run-cell-dropdown-item:hover {\n background-color: var(--jp-layout-color2);\n}\n\n.mito-run-cell-dropdown-item-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px; /* Fixed width to align all icons */\n height: 16px;\n flex-shrink: 0;\n color: var(--jp-ui-font-color1);\n line-height: 0; /* Remove extra line height for better alignment */\n}\n\n.mito-run-cell-dropdown-item-icon svg {\n width: 16px;\n height: 16px;\n display: block; /* Remove inline spacing */\n margin: 0 auto; /* Center the icon within the fixed width container */\n color: var(--jp-ui-font-color1); \n}\n\n.mito-run-cell-dropdown-item-label {\n flex: 1;\n}\n\n.mito-run-cell-dropdown-item-shortcut {\n color: var(--jp-ui-font-color2);\n font-size: 11px;\n margin-left: 10px;\n opacity: 0.7;\n}\n\n/* Position the button widget on the right side of the toolbar */\n.jp-Notebook-toolbar .mito-run-cell-button-widget {\n margin-left: auto;\n order: 9999; /* Ensure it appears last */\n}\n\n/* Ensure toolbar uses flexbox for proper alignment */\n.jp-Notebook-toolbar {\n display: flex;\n align-items: center;\n}"],"sourceRoot":""}]);
|
|
19166
20897
|
// Exports
|
|
19167
20898
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
19168
20899
|
|
|
@@ -20029,6 +21760,17 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
20029
21760
|
background-color: var(--purple-400);
|
|
20030
21761
|
}
|
|
20031
21762
|
|
|
21763
|
+
.button-blue {
|
|
21764
|
+
background-color: var(--blue-300);
|
|
21765
|
+
color: var(--blue-900) !important;
|
|
21766
|
+
border: 0.5px solid var(--blue-900);
|
|
21767
|
+
border-radius: 4px;
|
|
21768
|
+
}
|
|
21769
|
+
|
|
21770
|
+
.button-blue:hover {
|
|
21771
|
+
background-color: var(--blue-400);
|
|
21772
|
+
}
|
|
21773
|
+
|
|
20032
21774
|
.button-dark-purple {
|
|
20033
21775
|
background-color: var(--purple-500);
|
|
20034
21776
|
color: var(--white) !important;
|
|
@@ -20047,11 +21789,11 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
20047
21789
|
}
|
|
20048
21790
|
|
|
20049
21791
|
.button-small {
|
|
20050
|
-
height:
|
|
21792
|
+
height: var(--toolbar-button-height);
|
|
20051
21793
|
font-size: 12px;
|
|
20052
21794
|
padding: 2px 5px;
|
|
20053
21795
|
}
|
|
20054
|
-
`, "",{"version":3,"sources":["webpack://./style/button.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;;;;CAIC;;AAED;EACE,YAAY;EACZ,kBAAkB;EAClB,eAAe;EACf,eAAe;EACf,2EAA2E;EAC3E,mBAAmB;EACnB,iBAAiB;AACnB;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,gCAAgC;EAChC,gCAAgC;AAClC;;AAEA;EACE,gCAAgC;AAClC;;AAEA;EACE,yCAAyC;EACzC,+CAA+C;AACjD;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mCAAmC;EACnC,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;EACnC,8BAA8B;AAChC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,
|
|
21796
|
+
`, "",{"version":3,"sources":["webpack://./style/button.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;;;;CAIC;;AAED;EACE,YAAY;EACZ,kBAAkB;EAClB,eAAe;EACf,eAAe;EACf,2EAA2E;EAC3E,mBAAmB;EACnB,iBAAiB;AACnB;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,gCAAgC;EAChC,gCAAgC;AAClC;;AAEA;EACE,gCAAgC;AAClC;;AAEA;EACE,yCAAyC;EACzC,+CAA+C;AACjD;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mCAAmC;EACnC,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,iCAAiC;EACjC,iCAAiC;EACjC,mCAAmC;EACnC,kBAAkB;AACpB;;AAEA;EACE,iCAAiC;AACnC;;AAEA;EACE,mCAAmC;EACnC,8BAA8B;AAChC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,oCAAoC;EACpC,eAAe;EACf,gBAAgB;AAClB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* \n Classes that can be used for any button, making it easier to keep \n the theme consistent. For example, use them to make a textButton or\n textAndIconButton green.\n*/\n\n.button-base {\n border: none;\n border-radius: 3px;\n cursor: pointer;\n font-size: 14px;\n /* Make sure the button grows large enough so that the text does not wrap */\n white-space: nowrap;\n padding: 5px 10px;\n}\n\n.button-green {\n background-color: var(--green-400);\n color: var(--green-900) !important;\n}\n\n.button-green:hover {\n background-color: var(--green-500);\n}\n\n.button-red {\n background-color: var(--red-400);\n color: var(--red-900) !important;\n}\n\n.button-red:hover {\n background-color: var(--red-500);\n}\n\n.button-gray {\n background-color: var(--jp-layout-color2);\n color: var(--jp-content-font-color1) !important;\n}\n\n.button-gray:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.button-purple {\n background-color: var(--purple-300);\n color: var(--purple-700) !important;\n}\n\n.button-purple:hover {\n background-color: var(--purple-400);\n}\n\n.button-blue {\n background-color: var(--blue-300);\n color: var(--blue-900) !important;\n border: 0.5px solid var(--blue-900);\n border-radius: 4px;\n}\n\n.button-blue:hover {\n background-color: var(--blue-400);\n}\n\n.button-dark-purple {\n background-color: var(--purple-500);\n color: var(--white) !important;\n}\n\n.button-dark-purple:hover {\n background-color: var(--purple-600);\n}\n\n.button-width-block {\n width: 100%;\n}\n\n.button-width-fit-contents {\n width: fit-content;\n}\n\n.button-small {\n height: var(--toolbar-button-height);\n font-size: 12px;\n padding: 2px 5px;\n}\n"],"sourceRoot":""}]);
|
|
20055
21797
|
// Exports
|
|
20056
21798
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
20057
21799
|
|
|
@@ -20578,6 +22320,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
20578
22320
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_CTACarousel_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_CTACarousel_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_CTACarousel_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
20579
22321
|
|
|
20580
22322
|
|
|
22323
|
+
/***/ }),
|
|
22324
|
+
|
|
22325
|
+
/***/ "./style/CellReference.css":
|
|
22326
|
+
/*!*********************************!*\
|
|
22327
|
+
!*** ./style/CellReference.css ***!
|
|
22328
|
+
\*********************************/
|
|
22329
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
22330
|
+
|
|
22331
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22332
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22333
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
22334
|
+
/* harmony export */ });
|
|
22335
|
+
/* 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");
|
|
22336
|
+
/* 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__);
|
|
22337
|
+
/* 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");
|
|
22338
|
+
/* 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__);
|
|
22339
|
+
/* 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");
|
|
22340
|
+
/* 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__);
|
|
22341
|
+
/* 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");
|
|
22342
|
+
/* 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__);
|
|
22343
|
+
/* 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");
|
|
22344
|
+
/* 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__);
|
|
22345
|
+
/* 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");
|
|
22346
|
+
/* 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__);
|
|
22347
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./CellReference.css */ "./node_modules/css-loader/dist/cjs.js!./style/CellReference.css");
|
|
22348
|
+
|
|
22349
|
+
|
|
22350
|
+
|
|
22351
|
+
|
|
22352
|
+
|
|
22353
|
+
|
|
22354
|
+
|
|
22355
|
+
|
|
22356
|
+
|
|
22357
|
+
|
|
22358
|
+
|
|
22359
|
+
var options = {};
|
|
22360
|
+
|
|
22361
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
22362
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
22363
|
+
|
|
22364
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
22365
|
+
|
|
22366
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
22367
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
22368
|
+
|
|
22369
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
22370
|
+
|
|
22371
|
+
|
|
22372
|
+
|
|
22373
|
+
|
|
22374
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
22375
|
+
|
|
22376
|
+
|
|
20581
22377
|
/***/ }),
|
|
20582
22378
|
|
|
20583
22379
|
/***/ "./style/ChatDropdown.css":
|
|
@@ -21766,6 +23562,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
21766
23562
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_RulesForm_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_RulesForm_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_RulesForm_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
21767
23563
|
|
|
21768
23564
|
|
|
23565
|
+
/***/ }),
|
|
23566
|
+
|
|
23567
|
+
/***/ "./style/RunCellButton.css":
|
|
23568
|
+
/*!*********************************!*\
|
|
23569
|
+
!*** ./style/RunCellButton.css ***!
|
|
23570
|
+
\*********************************/
|
|
23571
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23572
|
+
|
|
23573
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23574
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23575
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23576
|
+
/* harmony export */ });
|
|
23577
|
+
/* 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");
|
|
23578
|
+
/* 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__);
|
|
23579
|
+
/* 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");
|
|
23580
|
+
/* 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__);
|
|
23581
|
+
/* 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");
|
|
23582
|
+
/* 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__);
|
|
23583
|
+
/* 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");
|
|
23584
|
+
/* 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__);
|
|
23585
|
+
/* 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");
|
|
23586
|
+
/* 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__);
|
|
23587
|
+
/* 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");
|
|
23588
|
+
/* 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__);
|
|
23589
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_RunCellButton_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./RunCellButton.css */ "./node_modules/css-loader/dist/cjs.js!./style/RunCellButton.css");
|
|
23590
|
+
|
|
23591
|
+
|
|
23592
|
+
|
|
23593
|
+
|
|
23594
|
+
|
|
23595
|
+
|
|
23596
|
+
|
|
23597
|
+
|
|
23598
|
+
|
|
23599
|
+
|
|
23600
|
+
|
|
23601
|
+
var options = {};
|
|
23602
|
+
|
|
23603
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
23604
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
23605
|
+
|
|
23606
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
23607
|
+
|
|
23608
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
23609
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
23610
|
+
|
|
23611
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_RunCellButton_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
23612
|
+
|
|
23613
|
+
|
|
23614
|
+
|
|
23615
|
+
|
|
23616
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_RunCellButton_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_RunCellButton_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_RunCellButton_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
23617
|
+
|
|
23618
|
+
|
|
21769
23619
|
/***/ }),
|
|
21770
23620
|
|
|
21771
23621
|
/***/ "./style/SelectedContextContainer.css":
|
|
@@ -22363,4 +24213,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
22363
24213
|
/***/ })
|
|
22364
24214
|
|
|
22365
24215
|
}]);
|
|
22366
|
-
//# sourceMappingURL=lib_index_js.
|
|
24216
|
+
//# sourceMappingURL=lib_index_js.49c79c62671528877c61.js.map
|