mito-ai 0.1.44__py3-none-any.whl → 0.1.46__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/__init__.py +10 -1
- mito_ai/_version.py +1 -1
- mito_ai/anthropic_client.py +92 -8
- mito_ai/app_deploy/app_deploy_utils.py +25 -0
- mito_ai/app_deploy/handlers.py +9 -12
- mito_ai/app_deploy/models.py +4 -1
- mito_ai/chat_history/handlers.py +63 -0
- mito_ai/chat_history/urls.py +32 -0
- mito_ai/completions/handlers.py +44 -20
- mito_ai/completions/models.py +1 -0
- mito_ai/completions/prompt_builders/prompt_constants.py +22 -4
- mito_ai/constants.py +3 -0
- mito_ai/streamlit_conversion/agent_utils.py +148 -30
- mito_ai/streamlit_conversion/prompts/prompt_constants.py +147 -24
- mito_ai/streamlit_conversion/prompts/streamlit_app_creation_prompt.py +2 -1
- mito_ai/streamlit_conversion/prompts/streamlit_error_correction_prompt.py +2 -2
- mito_ai/streamlit_conversion/prompts/streamlit_finish_todo_prompt.py +4 -3
- mito_ai/streamlit_conversion/prompts/update_existing_app_prompt.py +50 -0
- mito_ai/streamlit_conversion/streamlit_agent_handler.py +101 -104
- mito_ai/streamlit_conversion/streamlit_system_prompt.py +1 -0
- mito_ai/streamlit_conversion/streamlit_utils.py +18 -17
- mito_ai/streamlit_conversion/validate_streamlit_app.py +66 -62
- mito_ai/streamlit_preview/handlers.py +5 -3
- mito_ai/streamlit_preview/utils.py +11 -7
- mito_ai/tests/chat_history/test_chat_history.py +211 -0
- mito_ai/tests/deploy_app/test_app_deploy_utils.py +71 -0
- mito_ai/tests/message_history/test_message_history_utils.py +43 -19
- mito_ai/tests/providers/test_anthropic_client.py +180 -8
- mito_ai/tests/streamlit_conversion/test_apply_patch_to_text.py +368 -0
- mito_ai/tests/streamlit_conversion/test_fix_diff_headers.py +533 -0
- mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +71 -158
- mito_ai/tests/streamlit_conversion/test_streamlit_utils.py +16 -16
- mito_ai/tests/streamlit_conversion/test_validate_streamlit_app.py +16 -28
- mito_ai/tests/streamlit_preview/test_streamlit_preview_handler.py +2 -2
- mito_ai/tests/user/__init__.py +2 -0
- mito_ai/tests/user/test_user.py +120 -0
- mito_ai/tests/utils/test_anthropic_utils.py +4 -4
- mito_ai/user/handlers.py +33 -0
- mito_ai/user/urls.py +21 -0
- mito_ai/utils/anthropic_utils.py +15 -21
- mito_ai/utils/message_history_utils.py +4 -3
- mito_ai/utils/telemetry_utils.py +7 -4
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +100 -100
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
- mito_ai-0.1.44.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.cf2e3ad2797fbb53826b.js → mito_ai-0.1.46.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.20f12766ecd3d430568e.js +1520 -300
- mito_ai-0.1.46.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.20f12766ecd3d430568e.js.map +1 -0
- mito_ai-0.1.44.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.5482493d1270f55b7283.js → mito_ai-0.1.46.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.54126ab6511271265443.js +18 -18
- mito_ai-0.1.44.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.5482493d1270f55b7283.js.map → mito_ai-0.1.46.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.54126ab6511271265443.js.map +1 -1
- {mito_ai-0.1.44.dist-info → mito_ai-0.1.46.dist-info}/METADATA +2 -2
- {mito_ai-0.1.44.dist-info → mito_ai-0.1.46.dist-info}/RECORD +75 -63
- mito_ai-0.1.44.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.cf2e3ad2797fbb53826b.js.map +0 -1
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.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.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.44.data → mito_ai-0.1.46.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.44.dist-info → mito_ai-0.1.46.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.44.dist-info → mito_ai-0.1.46.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.44.dist-info → mito_ai-0.1.46.dist-info}/licenses/LICENSE +0 -0
|
@@ -166,6 +166,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
166
166
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
167
167
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
168
168
|
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
169
|
+
/* harmony import */ var _icons_MitoLogo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icons/MitoLogo */ "./lib/icons/MitoLogo.js");
|
|
169
170
|
/* harmony import */ var _style_CTACarousel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/CTACarousel.css */ "./style/CTACarousel.css");
|
|
170
171
|
/*
|
|
171
172
|
* Copyright (c) Saga Inc.
|
|
@@ -174,6 +175,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
|
|
178
|
+
|
|
177
179
|
const CTACarousel = ({ app }) => {
|
|
178
180
|
const [currentIndex, setCurrentIndex] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
179
181
|
// Define messages inside component to access app prop
|
|
@@ -194,6 +196,9 @@ const CTACarousel = ({ app }) => {
|
|
|
194
196
|
];
|
|
195
197
|
const currentMessage = CTACAROUSEL_MESSAGES[Math.min(currentIndex, CTACAROUSEL_MESSAGES.length - 1)].content;
|
|
196
198
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-carousel" },
|
|
199
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-logo-container" },
|
|
200
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_MitoLogo__WEBPACK_IMPORTED_MODULE_3__["default"], { width: "60", height: "30" })),
|
|
201
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "cta-title" }, "Data Copilot"),
|
|
197
202
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-carousel-container" },
|
|
198
203
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-message", "data-testid": "cta-message" }, currentMessage)),
|
|
199
204
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-carousel-dots" }, CTACAROUSEL_MESSAGES.map((_, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: index, className: `cta-carousel-dot ${index === currentIndex ? 'active' : ''}`, onClick: () => setCurrentIndex(index), "data-testid": "cta-carousel-dot", role: "button" }))))));
|
|
@@ -1027,7 +1032,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1027
1032
|
|
|
1028
1033
|
|
|
1029
1034
|
|
|
1030
|
-
const ChatInput = ({ app, initialContent,
|
|
1035
|
+
const ChatInput = ({ app, initialContent, onSave, onCancel, isEditing, contextManager, notebookTracker, agentModeEnabled = false, agentExecutionStatus = 'idle', operatingSystem = 'mac', displayOptimizedChatHistoryLength = 0, agentTargetNotebookPanelRef, isSignedUp = true, }) => {
|
|
1031
1036
|
var _a;
|
|
1032
1037
|
const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialContent);
|
|
1033
1038
|
const textAreaRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
|
|
@@ -1081,9 +1086,10 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1081
1086
|
if (!textarea)
|
|
1082
1087
|
return;
|
|
1083
1088
|
textarea.style.minHeight = 'auto';
|
|
1089
|
+
const maxHeight = 350;
|
|
1084
1090
|
textarea.style.height = !textarea.value || resetHeight
|
|
1085
1091
|
? '80px'
|
|
1086
|
-
: `${Math.max(80, textarea.scrollHeight)}px`;
|
|
1092
|
+
: `${Math.min(maxHeight, Math.max(80, textarea.scrollHeight))}px`;
|
|
1087
1093
|
};
|
|
1088
1094
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
1089
1095
|
adjustHeight();
|
|
@@ -1241,6 +1247,30 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1241
1247
|
];
|
|
1242
1248
|
return expandedVariables;
|
|
1243
1249
|
};
|
|
1250
|
+
const getPlaceholderText = () => {
|
|
1251
|
+
var _a;
|
|
1252
|
+
if (!isSignedUp && displayOptimizedChatHistoryLength === 0) {
|
|
1253
|
+
return 'Sign up above to use Mito AI';
|
|
1254
|
+
}
|
|
1255
|
+
else if (agentExecutionStatus === 'working') {
|
|
1256
|
+
return `Agent is editing ${(_a = agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current) === null || _a === void 0 ? void 0 : _a.context.path.split('/').pop()}`;
|
|
1257
|
+
}
|
|
1258
|
+
else if (agentExecutionStatus === 'stopping') {
|
|
1259
|
+
return 'Agent is stopping...';
|
|
1260
|
+
}
|
|
1261
|
+
else if (agentModeEnabled) {
|
|
1262
|
+
return 'Ask agent to do anything';
|
|
1263
|
+
}
|
|
1264
|
+
else if (isEditing) {
|
|
1265
|
+
return 'Edit your message';
|
|
1266
|
+
}
|
|
1267
|
+
else if (displayOptimizedChatHistoryLength < 2) {
|
|
1268
|
+
return `Ask question (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`;
|
|
1269
|
+
}
|
|
1270
|
+
else {
|
|
1271
|
+
return `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`;
|
|
1272
|
+
}
|
|
1273
|
+
};
|
|
1244
1274
|
// Automatically add active cell context when in Chat mode and there's active cell code
|
|
1245
1275
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
1246
1276
|
if (!agentModeEnabled) {
|
|
@@ -1262,7 +1292,7 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1262
1292
|
}
|
|
1263
1293
|
}
|
|
1264
1294
|
}, [agentModeEnabled, additionalContext, activeCellCode]);
|
|
1265
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("chat-input-container") },
|
|
1295
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("chat-input-container", { "editing": isEditing }) },
|
|
1266
1296
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'context-container' },
|
|
1267
1297
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_DatabaseButton__WEBPACK_IMPORTED_MODULE_6__["default"], { app: app }),
|
|
1268
1298
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AttachFileButton__WEBPACK_IMPORTED_MODULE_7__["default"], { onFileUploaded: handleFileUpload, notebookTracker: notebookTracker }),
|
|
@@ -1275,7 +1305,7 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1275
1305
|
} }, "\uFF20 Add Context"),
|
|
1276
1306
|
additionalContext.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_8__["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 })))),
|
|
1277
1307
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'chat-input-text-area-container' },
|
|
1278
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textAreaRef, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message", "message-user", 'chat-input', { "agent-mode": agentModeEnabled }), placeholder:
|
|
1308
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textAreaRef, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message", "message-user", 'chat-input', { "agent-mode": agentModeEnabled }), placeholder: getPlaceholderText(), value: input, disabled: agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping', onChange: handleInputChange, onKeyDown: (e) => {
|
|
1279
1309
|
// If dropdown is visible, only handle escape to close it
|
|
1280
1310
|
if (isDropdownVisible) {
|
|
1281
1311
|
if (e.key === 'Escape') {
|
|
@@ -1398,7 +1428,7 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1398
1428
|
setNextSteps(agentResponse.next_steps);
|
|
1399
1429
|
}
|
|
1400
1430
|
if (isEditing) {
|
|
1401
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(),
|
|
1431
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(), onSave: handleSave, onCancel: handleCancel, isEditing: isEditing, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: false }));
|
|
1402
1432
|
}
|
|
1403
1433
|
if (mitoAIConnectionError) {
|
|
1404
1434
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message") },
|
|
@@ -1896,7 +1926,7 @@ const DEFAULT_SUGGESTION_OPTIONS = [
|
|
|
1896
1926
|
prompt: "Graph the countries that have the highest trade surplus with America. Use the data from https://raw.githubusercontent.com/mito-ds/mito/refs/heads/dev/jupyterhub/us_tarrifs.csv"
|
|
1897
1927
|
}
|
|
1898
1928
|
];
|
|
1899
|
-
const ScrollableSuggestions = ({ onSelectSuggestion }) => {
|
|
1929
|
+
const ScrollableSuggestions = ({ onSelectSuggestion, }) => {
|
|
1900
1930
|
const suggestionsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1901
1931
|
// Apply the scroll mask to the suggestions container when it mounts, updates, or is scrolled
|
|
1902
1932
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -1997,43 +2027,46 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1997
2027
|
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);
|
|
1998
2028
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
1999
2029
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);
|
|
2000
|
-
/* harmony import */ var
|
|
2001
|
-
/* harmony import */ var
|
|
2002
|
-
/* harmony import */ var
|
|
2003
|
-
/* harmony import */ var
|
|
2004
|
-
/* harmony import */ var
|
|
2030
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
2031
|
+
/* harmony import */ var _components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../components/AgentComponents/ErrorFixupToolUI */ "./lib/components/AgentComponents/ErrorFixupToolUI.js");
|
|
2032
|
+
/* harmony import */ var _components_DropdownMenu__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../components/DropdownMenu */ "./lib/components/DropdownMenu.js");
|
|
2033
|
+
/* harmony import */ var _components_IconButton__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/IconButton */ "./lib/components/IconButton.js");
|
|
2034
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
2005
2035
|
/* harmony import */ var _components_ModelSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/ModelSelector */ "./lib/components/ModelSelector.js");
|
|
2006
|
-
/* harmony import */ var
|
|
2007
|
-
/* harmony import */ var
|
|
2008
|
-
/* harmony import */ var
|
|
2009
|
-
/* harmony import */ var
|
|
2010
|
-
/* harmony import */ var
|
|
2011
|
-
/* harmony import */ var
|
|
2012
|
-
/* harmony import */ var
|
|
2013
|
-
/* harmony import */ var
|
|
2014
|
-
/* harmony import */ var
|
|
2015
|
-
/* harmony import */ var
|
|
2016
|
-
/* harmony import */ var
|
|
2017
|
-
/* harmony import */ var
|
|
2018
|
-
/* harmony import */ var
|
|
2019
|
-
/* harmony import */ var
|
|
2020
|
-
/* harmony import */ var
|
|
2036
|
+
/* harmony import */ var _components_NextStepsPills__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../components/NextStepsPills */ "./lib/components/NextStepsPills.js");
|
|
2037
|
+
/* harmony import */ var _components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../components/TextAndIconButton */ "./lib/components/TextAndIconButton.js");
|
|
2038
|
+
/* harmony import */ var _components_ToggleButton__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../components/ToggleButton */ "./lib/components/ToggleButton.js");
|
|
2039
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
2040
|
+
/* harmony import */ var _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../icons/UndoIcon */ "./lib/icons/UndoIcon.js");
|
|
2041
|
+
/* harmony import */ var _utils_agentActions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/agentActions */ "./lib/utils/agentActions.js");
|
|
2042
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
2043
|
+
/* harmony import */ var _utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/blacklistedWords */ "./lib/utils/blacklistedWords.js");
|
|
2044
|
+
/* harmony import */ var _utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/checkpoint */ "./lib/utils/checkpoint.js");
|
|
2045
|
+
/* harmony import */ var _utils_chatHistory__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../utils/chatHistory */ "./lib/utils/chatHistory.js");
|
|
2046
|
+
/* harmony import */ var _utils_codeDiff__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../utils/codeDiff */ "./lib/utils/codeDiff.js");
|
|
2047
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../utils/notebook */ "./lib/utils/notebook.js");
|
|
2048
|
+
/* harmony import */ var _utils_cellOutput__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/cellOutput */ "./lib/utils/cellOutput.js");
|
|
2049
|
+
/* harmony import */ var _utils_scroll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../utils/scroll */ "./lib/utils/scroll.js");
|
|
2050
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../utils/strings */ "./lib/utils/strings.js");
|
|
2021
2051
|
/* harmony import */ var _utils_waitForNotebookReady__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/waitForNotebookReady */ "./lib/utils/waitForNotebookReady.js");
|
|
2022
|
-
/* harmony import */ var
|
|
2023
|
-
/* harmony import */ var
|
|
2024
|
-
/* harmony import */ var
|
|
2025
|
-
/* harmony import */ var
|
|
2026
|
-
/* harmony import */ var
|
|
2052
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AiChat/utils.js");
|
|
2053
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
2054
|
+
/* harmony import */ var _utils_userSignupState__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/userSignupState */ "./lib/utils/userSignupState.js");
|
|
2055
|
+
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
2056
|
+
/* harmony import */ var _SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../SettingsManager/profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
2057
|
+
/* harmony import */ var _CTACarousel__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./CTACarousel */ "./lib/Extensions/AiChat/CTACarousel.js");
|
|
2058
|
+
/* harmony import */ var _SignUpForm__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./SignUpForm */ "./lib/Extensions/AiChat/SignUpForm.js");
|
|
2059
|
+
/* harmony import */ var _CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CodeDiffDisplay */ "./lib/Extensions/AiChat/CodeDiffDisplay.js");
|
|
2027
2060
|
/* harmony import */ var _FirstMessage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FirstMessage */ "./lib/Extensions/AiChat/FirstMessage.js");
|
|
2028
|
-
/* harmony import */ var
|
|
2029
|
-
/* harmony import */ var
|
|
2030
|
-
/* harmony import */ var
|
|
2031
|
-
/* harmony import */ var
|
|
2061
|
+
/* harmony import */ var _ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./ChatMessage/ChatInput */ "./lib/Extensions/AiChat/ChatMessage/ChatInput.js");
|
|
2062
|
+
/* harmony import */ var _ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./ChatMessage/ChatMessage */ "./lib/Extensions/AiChat/ChatMessage/ChatMessage.js");
|
|
2063
|
+
/* harmony import */ var _ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./ChatMessage/RevertQuestionnaire */ "./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js");
|
|
2064
|
+
/* harmony import */ var _ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./ChatMessage/ScrollableSuggestions */ "./lib/Extensions/AiChat/ChatMessage/ScrollableSuggestions.js");
|
|
2032
2065
|
/* harmony import */ var _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ChatHistoryManager */ "./lib/Extensions/AiChat/ChatHistoryManager.js");
|
|
2033
2066
|
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
2034
2067
|
/* harmony import */ var _style_ChatTaskpane_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/ChatTaskpane.css */ "./style/ChatTaskpane.css");
|
|
2035
2068
|
/* harmony import */ var _style_TextButton_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../style/TextButton.css */ "./style/TextButton.css");
|
|
2036
|
-
/* harmony import */ var
|
|
2069
|
+
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
2037
2070
|
/*
|
|
2038
2071
|
* Copyright (c) Saga Inc.
|
|
2039
2072
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -2058,7 +2091,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2058
2091
|
// Internal imports - Icons
|
|
2059
2092
|
|
|
2060
2093
|
|
|
2061
|
-
|
|
2062
2094
|
// Internal imports - Utils
|
|
2063
2095
|
|
|
2064
2096
|
|
|
@@ -2073,6 +2105,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2073
2105
|
|
|
2074
2106
|
|
|
2075
2107
|
|
|
2108
|
+
|
|
2109
|
+
|
|
2110
|
+
|
|
2076
2111
|
// Internal imports - Chat components
|
|
2077
2112
|
|
|
2078
2113
|
|
|
@@ -2082,6 +2117,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2082
2117
|
|
|
2083
2118
|
|
|
2084
2119
|
|
|
2120
|
+
|
|
2085
2121
|
// Styles
|
|
2086
2122
|
|
|
2087
2123
|
|
|
@@ -2093,7 +2129,7 @@ const getDefaultChatHistoryManager = (notebookTracker, contextManager) => {
|
|
|
2093
2129
|
return chatHistoryManager;
|
|
2094
2130
|
};
|
|
2095
2131
|
const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app, operatingSystem, websocketClient, }) => {
|
|
2096
|
-
|
|
2132
|
+
const [isSignedUp, setIsSignedUp] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
|
|
2097
2133
|
const [chatHistoryManager, setChatHistoryManager] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(() => getDefaultChatHistoryManager(notebookTracker, contextManager));
|
|
2098
2134
|
const chatHistoryManagerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(chatHistoryManager);
|
|
2099
2135
|
const [loadingAIResponse, setLoadingAIResponse] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
@@ -2145,6 +2181,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2145
2181
|
const shouldContinueAgentExecution = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(true);
|
|
2146
2182
|
const streamingContentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');
|
|
2147
2183
|
const streamHandlerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
2184
|
+
// Track active requests for cancellation
|
|
2185
|
+
const activeRequestControllerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
2148
2186
|
// State for managing next steps from responses
|
|
2149
2187
|
// If the user hides the next steps, we keep them hidden until they re-open them
|
|
2150
2188
|
const [nextSteps, setNextSteps] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
|
|
@@ -2285,6 +2323,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2285
2323
|
}
|
|
2286
2324
|
return newChatHistoryManager;
|
|
2287
2325
|
};
|
|
2326
|
+
// Main initialization effect - runs once on mount
|
|
2288
2327
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
2289
2328
|
const initializeChatHistory = async () => {
|
|
2290
2329
|
try {
|
|
@@ -2332,7 +2371,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2332
2371
|
addAIMessageFromResponseAndUpdateState(error.hint ? error.hint : `${error}`, 'chat', newChatHistoryManager, true);
|
|
2333
2372
|
}
|
|
2334
2373
|
};
|
|
2374
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_11__.logEvent)('opened_ai_chat_taskpane');
|
|
2335
2375
|
void initializeChatHistory();
|
|
2376
|
+
void refreshUserSignupState(); // Get user signup state when the component first mounts
|
|
2336
2377
|
}, [websocketClient]);
|
|
2337
2378
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
2338
2379
|
/*
|
|
@@ -2357,10 +2398,15 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2357
2398
|
*/
|
|
2358
2399
|
chatHistoryManagerRef.current = chatHistoryManager;
|
|
2359
2400
|
}, [chatHistoryManager]);
|
|
2401
|
+
// Function to refresh user signup state using the shared helper
|
|
2402
|
+
const refreshUserSignupState = async () => {
|
|
2403
|
+
const signupState = await (0,_utils_userSignupState__WEBPACK_IMPORTED_MODULE_12__.checkUserSignupState)();
|
|
2404
|
+
setIsSignedUp(signupState.isSignedUp);
|
|
2405
|
+
};
|
|
2360
2406
|
// Scroll to bottom whenever chat history updates, but only if in follow mode
|
|
2361
2407
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
2362
2408
|
if (autoScrollFollowMode) {
|
|
2363
|
-
(0,
|
|
2409
|
+
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_13__.scrollToDiv)(chatMessagesRef);
|
|
2364
2410
|
}
|
|
2365
2411
|
}, [chatHistoryManager.getDisplayOptimizedHistory().length, chatHistoryManager, autoScrollFollowMode]);
|
|
2366
2412
|
// Add scroll event handler to detect manual scrolling
|
|
@@ -2482,7 +2528,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2482
2528
|
if (messageIndex !== undefined) {
|
|
2483
2529
|
agentExecutionMetadata.index = messageIndex;
|
|
2484
2530
|
}
|
|
2485
|
-
agentExecutionMetadata.base64EncodedActiveCellOutput = await (0,
|
|
2531
|
+
agentExecutionMetadata.base64EncodedActiveCellOutput = await (0,_utils__WEBPACK_IMPORTED_MODULE_14__.getBase64EncodedCellOutputInNotebook)(agentTargetNotebookPanel, sendCellIDOutput);
|
|
2486
2532
|
setChatHistoryManager(newChatHistoryManager);
|
|
2487
2533
|
setLoadingAIResponse(true);
|
|
2488
2534
|
// Step 2: Send the message to the AI
|
|
@@ -2518,7 +2564,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2518
2564
|
// Add the active cell output to the metadata afterwards setting the chatHistoryManager so that
|
|
2519
2565
|
// we don't have to wait on turning the output into a base64 image before we can add the user's message
|
|
2520
2566
|
// to the chat.
|
|
2521
|
-
const activeCellOutput = await (0,
|
|
2567
|
+
const activeCellOutput = await (0,_utils_cellOutput__WEBPACK_IMPORTED_MODULE_15__.getActiveCellOutput)(notebookTracker);
|
|
2522
2568
|
if (activeCellOutput !== undefined) {
|
|
2523
2569
|
chatMessageMetadata.base64EncodedActiveCellOutput = activeCellOutput;
|
|
2524
2570
|
}
|
|
@@ -2542,8 +2588,11 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2542
2588
|
};
|
|
2543
2589
|
const _sendMessageAndSaveResponse = async (completionRequest, newChatHistoryManager) => {
|
|
2544
2590
|
var _a, _b, _c, _d;
|
|
2591
|
+
// Create AbortController for this request
|
|
2592
|
+
const abortController = new AbortController();
|
|
2593
|
+
activeRequestControllerRef.current = abortController;
|
|
2545
2594
|
// Capture the completion request for debugging
|
|
2546
|
-
(0,
|
|
2595
|
+
(0,_SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_16__.captureCompletionRequest)(completionRequest);
|
|
2547
2596
|
if (completionRequest.stream) {
|
|
2548
2597
|
// Reset the streaming response and set streaming state
|
|
2549
2598
|
streamingContentRef.current = '';
|
|
@@ -2610,7 +2659,15 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2610
2659
|
// NON-STREAMING RESPONSES
|
|
2611
2660
|
// Once we move everything to streaming, we can remove everything in this else block
|
|
2612
2661
|
try {
|
|
2662
|
+
// Check if request was aborted before making the call
|
|
2663
|
+
if (abortController.signal.aborted) {
|
|
2664
|
+
throw new Error('Request aborted');
|
|
2665
|
+
}
|
|
2613
2666
|
const aiResponse = await websocketClient.sendMessage(completionRequest);
|
|
2667
|
+
// Check if request was aborted after receiving response
|
|
2668
|
+
if (abortController.signal.aborted) {
|
|
2669
|
+
throw new Error('Request aborted');
|
|
2670
|
+
}
|
|
2614
2671
|
if (aiResponse.error) {
|
|
2615
2672
|
console.group('Error calling OpenAI API:');
|
|
2616
2673
|
console.error('Title:', aiResponse.error.title);
|
|
@@ -2645,6 +2702,11 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2645
2702
|
}
|
|
2646
2703
|
}
|
|
2647
2704
|
catch (error) {
|
|
2705
|
+
// Check if this was an abort error
|
|
2706
|
+
if (error.message === 'Request aborted') {
|
|
2707
|
+
// Don't show error message for aborted requests
|
|
2708
|
+
return false;
|
|
2709
|
+
}
|
|
2648
2710
|
addAIMessageFromResponseAndUpdateState(error.title ? error.title : `${error}`, 'chat', newChatHistoryManager, false);
|
|
2649
2711
|
addAIMessageFromResponseAndUpdateState(error.hint ? error.hint : `${error}`, completionRequest.metadata.promptType, newChatHistoryManager, true);
|
|
2650
2712
|
}
|
|
@@ -2654,6 +2716,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2654
2716
|
setLoadingAIResponse(false);
|
|
2655
2717
|
}
|
|
2656
2718
|
}
|
|
2719
|
+
// Clean up AbortController
|
|
2720
|
+
if (activeRequestControllerRef.current === abortController) {
|
|
2721
|
+
activeRequestControllerRef.current = null;
|
|
2722
|
+
}
|
|
2657
2723
|
return true;
|
|
2658
2724
|
};
|
|
2659
2725
|
const addAIMessageFromResponseAndUpdateState = (messageContent, promptType, chatHistoryManager, mitoAIConnectionError = false, mitoAIConnectionErrorType = null) => {
|
|
@@ -2664,23 +2730,37 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2664
2730
|
chatHistoryManager.addAIMessageFromResponse(messageContent, promptType, mitoAIConnectionError, mitoAIConnectionErrorType);
|
|
2665
2731
|
setChatHistoryManager(chatHistoryManager);
|
|
2666
2732
|
};
|
|
2667
|
-
const markAgentForStopping = () => {
|
|
2668
|
-
// Signal that the agent should stop
|
|
2669
|
-
shouldContinueAgentExecution.current = false;
|
|
2670
|
-
// Update UI to show stopping state
|
|
2671
|
-
setAgentExecutionStatus('stopping');
|
|
2672
|
-
};
|
|
2673
|
-
const finalizeAgentStop = () => {
|
|
2674
|
-
// Notify user that agent has been stopped
|
|
2733
|
+
const markAgentForStopping = async (reason = 'naturalConclusion') => {
|
|
2734
|
+
// Signal that the agent should stop immediately
|
|
2675
2735
|
shouldContinueAgentExecution.current = false;
|
|
2676
|
-
|
|
2677
|
-
addAIMessageFromResponseAndUpdateState("Agent execution stopped. You can continue the conversation or start a new one.", 'chat', newChatHistoryManager);
|
|
2678
|
-
// Reset agent to idle state
|
|
2736
|
+
// Update state/UI
|
|
2679
2737
|
setAgentExecutionStatus('idle');
|
|
2738
|
+
setLoadingAIResponse(false);
|
|
2739
|
+
if (reason === 'userStop') {
|
|
2740
|
+
// Immediately abort any ongoing requests
|
|
2741
|
+
if (activeRequestControllerRef.current) {
|
|
2742
|
+
activeRequestControllerRef.current.abort();
|
|
2743
|
+
activeRequestControllerRef.current = null;
|
|
2744
|
+
}
|
|
2745
|
+
// Add feedback message based on reason
|
|
2746
|
+
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2747
|
+
addAIMessageFromResponseAndUpdateState("Agent stopped by user.", 'chat', newChatHistoryManager);
|
|
2748
|
+
// Send stop message to backend
|
|
2749
|
+
await websocketClient.sendMessage({
|
|
2750
|
+
type: "stop_agent",
|
|
2751
|
+
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.UUID.uuid4(),
|
|
2752
|
+
metadata: {
|
|
2753
|
+
promptType: "stop_agent",
|
|
2754
|
+
threadId: activeThreadIdRef.current
|
|
2755
|
+
},
|
|
2756
|
+
stream: false
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
return;
|
|
2680
2760
|
};
|
|
2681
2761
|
const startAgentExecution = async (input, messageIndex, additionalContext) => {
|
|
2682
2762
|
agentTargetNotebookPanelRef.current = notebookTracker.currentWidget;
|
|
2683
|
-
await (0,
|
|
2763
|
+
await (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__.createCheckpoint)(app, setHasCheckpoint);
|
|
2684
2764
|
setAgentExecutionStatus('working');
|
|
2685
2765
|
// Enable follow mode when user starts agent execution
|
|
2686
2766
|
setAutoScrollFollowMode(true);
|
|
@@ -2693,7 +2773,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2693
2773
|
while (!isAgentFinished && agentExecutionDepth <= AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
2694
2774
|
// Check if we should continue execution
|
|
2695
2775
|
if (!shouldContinueAgentExecution.current) {
|
|
2696
|
-
|
|
2776
|
+
await markAgentForStopping();
|
|
2697
2777
|
break;
|
|
2698
2778
|
}
|
|
2699
2779
|
// Only the first message sent to the Agent should contain the user's input.
|
|
@@ -2712,13 +2792,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2712
2792
|
const aiDisplayOptimizedChatItem = chatHistoryManagerRef.current.getLastAIDisplayOptimizedChatItem();
|
|
2713
2793
|
// # TODO: Make this is a helper function so we can also use it in the auto error fixup!
|
|
2714
2794
|
if (aiDisplayOptimizedChatItem) {
|
|
2715
|
-
const aiGeneratedCode = (0,
|
|
2795
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.getCodeBlockFromMessage)(aiDisplayOptimizedChatItem.message);
|
|
2716
2796
|
if (aiGeneratedCode) {
|
|
2717
|
-
const securityCheck = (0,
|
|
2797
|
+
const securityCheck = (0,_utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_19__.checkForBlacklistedWords)(aiGeneratedCode);
|
|
2718
2798
|
if (!securityCheck.safe) {
|
|
2719
2799
|
console.error('Security Warning:', securityCheck.reason);
|
|
2720
2800
|
addAIMessageFromResponseAndUpdateState(`I cannot execute this code without your approval because this code did not pass my security checks. ${securityCheck.reason}. For your safety, I am stopping execution of this plan.`, 'agent:execution', chatHistoryManager);
|
|
2721
|
-
|
|
2801
|
+
await markAgentForStopping();
|
|
2722
2802
|
break;
|
|
2723
2803
|
}
|
|
2724
2804
|
}
|
|
@@ -2726,28 +2806,32 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2726
2806
|
const agentResponse = aiDisplayOptimizedChatItem === null || aiDisplayOptimizedChatItem === void 0 ? void 0 : aiDisplayOptimizedChatItem.agentResponse;
|
|
2727
2807
|
if (agentTargetNotebookPanelRef.current === null) {
|
|
2728
2808
|
// If the agent target notebook panel is not set, we don't know where to run the code so we stop
|
|
2809
|
+
await markAgentForStopping();
|
|
2729
2810
|
isAgentFinished = true;
|
|
2730
2811
|
break;
|
|
2731
2812
|
}
|
|
2732
2813
|
if (agentResponse === undefined) {
|
|
2733
2814
|
// If the agent response is undefined, we need to send a message to the agent
|
|
2815
|
+
await markAgentForStopping();
|
|
2734
2816
|
isAgentFinished = true;
|
|
2735
2817
|
break;
|
|
2736
2818
|
}
|
|
2737
2819
|
if (agentResponse.type === 'finished_task') {
|
|
2738
2820
|
// If the agent told us that it is finished, we can stop
|
|
2821
|
+
await markAgentForStopping();
|
|
2739
2822
|
isAgentFinished = true;
|
|
2740
2823
|
break;
|
|
2741
2824
|
}
|
|
2742
2825
|
if (agentResponse.type === 'cell_update' && (agentResponse.cell_update === undefined || agentResponse.cell_update === null)) {
|
|
2743
2826
|
// If the agent's response is not formatted correctly, stop. This is for typechecking mostly
|
|
2827
|
+
await markAgentForStopping();
|
|
2744
2828
|
isAgentFinished = true;
|
|
2745
2829
|
break;
|
|
2746
2830
|
}
|
|
2747
2831
|
if (agentResponse.type === 'cell_update' && agentResponse.cell_update) {
|
|
2748
2832
|
// Run the code and handle any errors
|
|
2749
|
-
await (0,
|
|
2750
|
-
const status = await (0,
|
|
2833
|
+
await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.acceptAndRunCellUpdate)(agentResponse.cell_update, agentTargetNotebookPanelRef.current);
|
|
2834
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.retryIfExecutionError)(agentTargetNotebookPanelRef.current, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef);
|
|
2751
2835
|
if (status === 'interupted') {
|
|
2752
2836
|
break;
|
|
2753
2837
|
}
|
|
@@ -2767,12 +2851,12 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2767
2851
|
sendCellIDOutput = agentResponse.get_cell_output_cell_id;
|
|
2768
2852
|
}
|
|
2769
2853
|
if (agentResponse.type === 'run_all_cells') {
|
|
2770
|
-
const result = await (0,
|
|
2854
|
+
const result = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.runAllCells)(app, agentTargetNotebookPanelRef.current);
|
|
2771
2855
|
// If run_all_cells resulted in an error, handle it through the error fixup process
|
|
2772
2856
|
if (!result.success && result.errorMessage && result.errorCellId) {
|
|
2773
2857
|
// Set the error cell as active so the error retry logic can work with it
|
|
2774
|
-
(0,
|
|
2775
|
-
const status = await (0,
|
|
2858
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.setActiveCellByIDInNotebookPanel)(agentTargetNotebookPanelRef.current, result.errorCellId);
|
|
2859
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.retryIfExecutionError)(agentTargetNotebookPanelRef.current, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef);
|
|
2776
2860
|
if (status === 'interupted') {
|
|
2777
2861
|
break;
|
|
2778
2862
|
}
|
|
@@ -2786,39 +2870,40 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2786
2870
|
if (agentExecutionDepth > AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
2787
2871
|
addAIMessageFromResponseAndUpdateState("Since I've been working for a while now, give my work a review and then tell me how to continue.", 'agent:execution', chatHistoryManager);
|
|
2788
2872
|
}
|
|
2789
|
-
|
|
2873
|
+
// Use markAgentForStopping for natural conclusion to ensure consistent cleanup
|
|
2874
|
+
await markAgentForStopping();
|
|
2790
2875
|
};
|
|
2791
2876
|
const updateCodeDiffStripes = (aiMessage, updateCellID) => {
|
|
2792
2877
|
if (!aiMessage) {
|
|
2793
2878
|
return;
|
|
2794
2879
|
}
|
|
2795
|
-
const updateCellCode = (0,
|
|
2880
|
+
const updateCellCode = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.getCellCodeByID)(notebookTracker, updateCellID);
|
|
2796
2881
|
if (updateCellID === undefined || updateCellCode === undefined) {
|
|
2797
2882
|
return;
|
|
2798
2883
|
}
|
|
2799
2884
|
// Extract the code from the AI's message and then calculate the code diffs
|
|
2800
|
-
const aiGeneratedCode = (0,
|
|
2801
|
-
const aiGeneratedCodeCleaned = (0,
|
|
2802
|
-
const { unifiedCodeString, unifiedDiffs } = (0,
|
|
2885
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.getCodeBlockFromMessage)(aiMessage);
|
|
2886
|
+
const aiGeneratedCodeCleaned = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.removeMarkdownCodeFormatting)(aiGeneratedCode || '');
|
|
2887
|
+
const { unifiedCodeString, unifiedDiffs } = (0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_22__.getCodeDiffsAndUnifiedCodeString)(updateCellCode, aiGeneratedCodeCleaned);
|
|
2803
2888
|
// Store the code cell ID where we write the code diffs so that we can
|
|
2804
2889
|
// accept or reject the code diffs to the correct cell
|
|
2805
2890
|
cellStateBeforeDiff.current = { codeCellID: updateCellID, code: updateCellCode };
|
|
2806
2891
|
// Temporarily write the unified code string to the active cell so we can display
|
|
2807
2892
|
// the code diffs to the user
|
|
2808
|
-
(0,
|
|
2893
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.writeCodeToCellByID)(notebookTracker, unifiedCodeString, updateCellID);
|
|
2809
2894
|
updateCodeCellsExtensions(unifiedDiffs);
|
|
2810
2895
|
// Briefly highlight the code cell to draw the user's attention to it
|
|
2811
|
-
(0,
|
|
2896
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.highlightCodeCell)(notebookTracker, updateCellID);
|
|
2812
2897
|
};
|
|
2813
2898
|
const displayOptimizedChatHistory = chatHistoryManager.getDisplayOptimizedHistory();
|
|
2814
2899
|
const previewAICodeToActiveCell = () => {
|
|
2815
2900
|
setCodeReviewStatus('codeCellPreview');
|
|
2816
|
-
const activeCellID = (0,
|
|
2901
|
+
const activeCellID = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.getActiveCellID)(notebookTracker);
|
|
2817
2902
|
const lastAIDisplayMessage = chatHistoryManagerRef.current.getLastAIDisplayOptimizedChatItem();
|
|
2818
2903
|
if (activeCellID === undefined || lastAIDisplayMessage === undefined) {
|
|
2819
2904
|
return;
|
|
2820
2905
|
}
|
|
2821
|
-
(0,
|
|
2906
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.scrollToCell)(notebookTracker.currentWidget, activeCellID, undefined, 'end');
|
|
2822
2907
|
updateCodeDiffStripes(lastAIDisplayMessage.message, activeCellID);
|
|
2823
2908
|
updateCellToolbarButtons();
|
|
2824
2909
|
};
|
|
@@ -2828,7 +2913,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2828
2913
|
if (!lastAIMessage || !cellStateBeforeDiff.current) {
|
|
2829
2914
|
return;
|
|
2830
2915
|
}
|
|
2831
|
-
const aiGeneratedCode = (0,
|
|
2916
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.getCodeBlockFromMessage)(lastAIMessage.message);
|
|
2832
2917
|
if (!aiGeneratedCode) {
|
|
2833
2918
|
return;
|
|
2834
2919
|
}
|
|
@@ -2837,10 +2922,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2837
2922
|
// Write to the cell that has the code diffs
|
|
2838
2923
|
writeCodeToCellAndTurnOffDiffs(aiGeneratedCode, targetCellID);
|
|
2839
2924
|
// Focus on the active cell after the code is written
|
|
2840
|
-
const targetCell = (0,
|
|
2925
|
+
const targetCell = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.getCellByID)(notebookTracker, targetCellID);
|
|
2841
2926
|
if (targetCell) {
|
|
2842
2927
|
// Make the target cell the active cell
|
|
2843
|
-
(0,
|
|
2928
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.setActiveCellByID)(notebookTracker, targetCellID);
|
|
2844
2929
|
// Focus on the active cell
|
|
2845
2930
|
targetCell.activate();
|
|
2846
2931
|
}
|
|
@@ -2866,7 +2951,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2866
2951
|
updateCodeCellsExtensions(undefined);
|
|
2867
2952
|
cellStateBeforeDiff.current = undefined;
|
|
2868
2953
|
if (codeCellID !== undefined) {
|
|
2869
|
-
(0,
|
|
2954
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.writeCodeToCellByID)(notebookTracker, code, codeCellID);
|
|
2870
2955
|
updateCellToolbarButtons();
|
|
2871
2956
|
}
|
|
2872
2957
|
};
|
|
@@ -2877,17 +2962,17 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2877
2962
|
the first time we create the chat. Registering the command when it is already created causes
|
|
2878
2963
|
errors.
|
|
2879
2964
|
*/
|
|
2880
|
-
app.commands.addCommand(
|
|
2965
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_PREVIEW_LATEST_CODE, {
|
|
2881
2966
|
execute: () => {
|
|
2882
2967
|
previewAICodeToActiveCell();
|
|
2883
2968
|
}
|
|
2884
2969
|
});
|
|
2885
|
-
app.commands.addCommand(
|
|
2970
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_APPLY_LATEST_CODE, {
|
|
2886
2971
|
execute: () => {
|
|
2887
2972
|
acceptAICode();
|
|
2888
2973
|
}
|
|
2889
2974
|
});
|
|
2890
|
-
app.commands.addCommand(
|
|
2975
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_REJECT_LATEST_CODE, {
|
|
2891
2976
|
execute: () => {
|
|
2892
2977
|
rejectAICode();
|
|
2893
2978
|
}
|
|
@@ -2896,19 +2981,19 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2896
2981
|
Add a new command to the JupyterLab command registry that sends the current chat message.
|
|
2897
2982
|
We use this to automatically send the message when the user adds an error to the chat.
|
|
2898
2983
|
*/
|
|
2899
|
-
app.commands.addCommand(
|
|
2984
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_SEND_DEBUG_ERROR_MESSAGE, {
|
|
2900
2985
|
execute: async (args) => {
|
|
2901
2986
|
if (args === null || args === void 0 ? void 0 : args.input) {
|
|
2902
2987
|
await sendSmartDebugMessage(args.input.toString());
|
|
2903
2988
|
}
|
|
2904
2989
|
}
|
|
2905
2990
|
});
|
|
2906
|
-
app.commands.addCommand(
|
|
2991
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_SEND_EXPLAIN_CODE_MESSAGE, {
|
|
2907
2992
|
execute: async () => {
|
|
2908
2993
|
await sendExplainCodeMessage();
|
|
2909
2994
|
}
|
|
2910
2995
|
});
|
|
2911
|
-
app.commands.addCommand(
|
|
2996
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_SEND_AGENT_MESSAGE, {
|
|
2912
2997
|
execute: async (args) => {
|
|
2913
2998
|
if (args === null || args === void 0 ? void 0 : args.input) {
|
|
2914
2999
|
// If its not already in agent mode, start a new chat in agent mode
|
|
@@ -2925,7 +3010,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2925
3010
|
/*
|
|
2926
3011
|
Register the code cell toolbar buttons for accepting and rejecting code.
|
|
2927
3012
|
*/
|
|
2928
|
-
app.commands.addCommand(
|
|
3013
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE, {
|
|
2929
3014
|
label: `Accept ${operatingSystem === 'mac' ? '⌘Y' : 'Ctrl+Y'}`,
|
|
2930
3015
|
className: 'text-button-mito-ai button-base button-green',
|
|
2931
3016
|
caption: 'Accept Code',
|
|
@@ -2943,7 +3028,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2943
3028
|
}
|
|
2944
3029
|
}
|
|
2945
3030
|
});
|
|
2946
|
-
app.commands.addCommand(
|
|
3031
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE, {
|
|
2947
3032
|
label: `Reject ${operatingSystem === 'mac' ? '⌘U' : 'Ctrl+U'}`,
|
|
2948
3033
|
className: 'text-button-mito-ai button-base button-red',
|
|
2949
3034
|
caption: 'Reject Code',
|
|
@@ -2964,13 +3049,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2964
3049
|
// Register keyboard shortcuts
|
|
2965
3050
|
const accelYDisposable = app.commands.addKeyBinding({
|
|
2966
3051
|
command: codeReviewStatus === 'chatPreview' ?
|
|
2967
|
-
|
|
2968
|
-
|
|
3052
|
+
_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_PREVIEW_LATEST_CODE :
|
|
3053
|
+
_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_APPLY_LATEST_CODE,
|
|
2969
3054
|
keys: ['Accel Y'],
|
|
2970
3055
|
selector: 'body',
|
|
2971
3056
|
});
|
|
2972
3057
|
const accelDDisposable = app.commands.addKeyBinding({
|
|
2973
|
-
command:
|
|
3058
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_REJECT_LATEST_CODE,
|
|
2974
3059
|
keys: ['Accel U'],
|
|
2975
3060
|
selector: 'body',
|
|
2976
3061
|
preventDefault: true,
|
|
@@ -2987,8 +3072,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2987
3072
|
// Without this, the user needs to take some action, like switching to a different cell
|
|
2988
3073
|
// and then switching back in order for the Jupyter to re-evaluate if it should
|
|
2989
3074
|
// show the toolbar buttons.
|
|
2990
|
-
app.commands.notifyCommandChanged(
|
|
2991
|
-
app.commands.notifyCommandChanged(
|
|
3075
|
+
app.commands.notifyCommandChanged(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE);
|
|
3076
|
+
app.commands.notifyCommandChanged(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE);
|
|
2992
3077
|
};
|
|
2993
3078
|
const codeDiffStripesCompartments = react__WEBPACK_IMPORTED_MODULE_1___default().useRef(new Map());
|
|
2994
3079
|
// Function to update the extensions of code cells
|
|
@@ -3016,13 +3101,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3016
3101
|
codeDiffStripesCompartments.current.set(cellId, compartment);
|
|
3017
3102
|
// Apply the initial configuration
|
|
3018
3103
|
editorView.dispatch({
|
|
3019
|
-
effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.StateEffect.appendConfig.of(compartment.of(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,
|
|
3104
|
+
effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.StateEffect.appendConfig.of(compartment.of(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,_CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__.codeDiffStripesExtension)({ unifiedDiffLines: unifiedDiffLines }) : [])),
|
|
3020
3105
|
});
|
|
3021
3106
|
}
|
|
3022
3107
|
else {
|
|
3023
3108
|
// Reconfigure the compartment
|
|
3024
3109
|
editorView.dispatch({
|
|
3025
|
-
effects: compartment.reconfigure(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,
|
|
3110
|
+
effects: compartment.reconfigure(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,_CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__.codeDiffStripesExtension)({ unifiedDiffLines: unifiedDiffLines }) : []),
|
|
3026
3111
|
});
|
|
3027
3112
|
}
|
|
3028
3113
|
}
|
|
@@ -3037,7 +3122,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3037
3122
|
// In agent mode, we group consecutive error messages together.
|
|
3038
3123
|
// In chat mode, we display messages individually as they were sent
|
|
3039
3124
|
if (agentModeEnabled) {
|
|
3040
|
-
processedDisplayOptimizedChatHistory = (0,
|
|
3125
|
+
processedDisplayOptimizedChatHistory = (0,_utils_chatHistory__WEBPACK_IMPORTED_MODULE_25__.processChatHistoryForErrorGrouping)(chatHistoryManager.getDisplayOptimizedHistory());
|
|
3041
3126
|
}
|
|
3042
3127
|
else {
|
|
3043
3128
|
processedDisplayOptimizedChatHistory = chatHistoryManager.getDisplayOptimizedHistory();
|
|
@@ -3046,19 +3131,21 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3046
3131
|
const isGroupedErrorMessages = (item) => {
|
|
3047
3132
|
return Array.isArray(item);
|
|
3048
3133
|
};
|
|
3049
|
-
return (
|
|
3134
|
+
return (
|
|
3135
|
+
// We disable the chat taskpane if the user is not signed up AND there are no chat history items
|
|
3136
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_26__.classNames)('chat-taskpane', { 'disabled': !(isSignedUp || displayOptimizedChatHistory.length > 0) }) },
|
|
3050
3137
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header" },
|
|
3051
3138
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-left" },
|
|
3052
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3053
|
-
void app.commands.execute(
|
|
3139
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_IconButton__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.settingsIcon.react, null), title: "Mito AI Settings", onClick: () => {
|
|
3140
|
+
void app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_28__.COMMAND_MITO_AI_SETTINGS);
|
|
3054
3141
|
} })),
|
|
3055
3142
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-right" },
|
|
3056
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3057
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3143
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_IconButton__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.addIcon.react, null), title: "Start New Chat", onClick: async () => { await startNewChat(); } }),
|
|
3144
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_DropdownMenu__WEBPACK_IMPORTED_MODULE_29__["default"], { trigger: react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "icon-button", title: "Chat Threads", onClick: fetchChatThreads },
|
|
3058
3145
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.historyIcon.react, null)), items: chatThreads.length > 0
|
|
3059
3146
|
? chatThreads.map(thread => ({
|
|
3060
3147
|
label: thread.name,
|
|
3061
|
-
primaryIcon: activeThreadIdRef.current === thread.thread_id ?
|
|
3148
|
+
primaryIcon: activeThreadIdRef.current === thread.thread_id ? _icons__WEBPACK_IMPORTED_MODULE_30__.OpenIndicatorLabIcon.react : undefined,
|
|
3062
3149
|
onClick: () => fetchChatHistoryAndSetActiveThread(thread.thread_id),
|
|
3063
3150
|
secondaryActions: [
|
|
3064
3151
|
{
|
|
@@ -3075,38 +3162,36 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3075
3162
|
}], alignment: "right" }))),
|
|
3076
3163
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-messages", ref: chatMessagesRef },
|
|
3077
3164
|
displayOptimizedChatHistory.length === 0 &&
|
|
3078
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-empty-message" },
|
|
3079
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("
|
|
3080
|
-
|
|
3081
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", { style: { display: 'block', textAlign: 'center', fontWeight: 'bold', fontSize: '20px', marginBottom: '15px' } }, "Data Copilot"),
|
|
3082
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_CTACarousel__WEBPACK_IMPORTED_MODULE_29__["default"], { app: app })),
|
|
3165
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-empty-message" }, isSignedUp === false
|
|
3166
|
+
? react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SignUpForm__WEBPACK_IMPORTED_MODULE_31__["default"], { onSignUpSuccess: refreshUserSignupState })
|
|
3167
|
+
: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_CTACarousel__WEBPACK_IMPORTED_MODULE_32__["default"], { app: app })),
|
|
3083
3168
|
processedDisplayOptimizedChatHistory.map((displayOptimizedChat, index) => {
|
|
3084
3169
|
if (isGroupedErrorMessages(displayOptimizedChat)) {
|
|
3085
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3170
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_33__["default"], { key: index, messages: displayOptimizedChat, renderMimeRegistry: renderMimeRegistry }));
|
|
3086
3171
|
}
|
|
3087
3172
|
else {
|
|
3088
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3173
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_34__["default"], { key: index, message: displayOptimizedChat.message, promptType: displayOptimizedChat.promptType, agentResponse: displayOptimizedChat.agentResponse, codeCellID: displayOptimizedChat.codeCellID, mitoAIConnectionError: displayOptimizedChat.type === 'connection error', mitoAIConnectionErrorType: displayOptimizedChat.mitoAIConnectionErrorType || null, messageIndex: index, notebookTracker: notebookTracker, renderMimeRegistry: renderMimeRegistry, app: app, isLastAiMessage: index === lastAIMessagesIndex, isLastMessage: index === displayOptimizedChatHistory.length - 1, operatingSystem: operatingSystem, previewAICode: previewAICodeToActiveCell, acceptAICode: acceptAICode, rejectAICode: rejectAICode, onUpdateMessage: handleUpdateMessage, contextManager: contextManager, codeReviewStatus: codeReviewStatus, setNextSteps: setNextSteps, agentModeEnabled: agentModeEnabled, additionalContext: displayOptimizedChat.additionalContext }));
|
|
3089
3174
|
}
|
|
3090
3175
|
}).filter(message => message !== null),
|
|
3091
3176
|
loadingAIResponse &&
|
|
3092
3177
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-loading-message" },
|
|
3093
3178
|
"Thinking ",
|
|
3094
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3179
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_35__["default"], null)),
|
|
3095
3180
|
hasCheckpoint &&
|
|
3096
3181
|
agentModeEnabled &&
|
|
3097
3182
|
agentExecutionStatus === 'idle' &&
|
|
3098
3183
|
displayOptimizedChatHistory.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
3099
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3100
|
-
void (0,
|
|
3184
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_36__["default"], { text: "Revert changes", icon: _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_37__["default"], title: "Revert changes", onClick: () => {
|
|
3185
|
+
void (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__.restoreCheckpoint)(app, notebookTracker, setHasCheckpoint);
|
|
3101
3186
|
setDisplayedNextStepsIfAvailable(false);
|
|
3102
3187
|
setHasCheckpoint(false);
|
|
3103
3188
|
setShowRevertQuestionnaire(true);
|
|
3104
|
-
(0,
|
|
3189
|
+
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_13__.scrollToDiv)(chatMessagesRef);
|
|
3105
3190
|
}, variant: "gray", width: "fit-contents", iconPosition: "left" }),
|
|
3106
3191
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("p", { className: "text-muted text-sm" }, "Undo the most recent changes made by the agent"))),
|
|
3107
|
-
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3192
|
+
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_38__["default"], { onDestroy: () => setShowRevertQuestionnaire(false), getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager }))),
|
|
3108
3193
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "suggestions-container" },
|
|
3109
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3194
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_39__["default"], { onSelectSuggestion: (prompt) => {
|
|
3110
3195
|
if (agentModeEnabled) {
|
|
3111
3196
|
void startAgentExecution(prompt);
|
|
3112
3197
|
}
|
|
@@ -3115,15 +3200,11 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3115
3200
|
}
|
|
3116
3201
|
} }))),
|
|
3117
3202
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: `connected-input-container ${nextSteps.length > 0 ? 'has-next-steps' : ''}` },
|
|
3118
|
-
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3119
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3120
|
-
agentExecutionStatus === 'stopping' ? 'Agent is stopping...' :
|
|
3121
|
-
agentModeEnabled ? 'Ask agent to do anything' :
|
|
3122
|
-
displayOptimizedChatHistory.length < 2 ? `Ask question (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`
|
|
3123
|
-
: `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`, onSave: agentModeEnabled ? startAgentExecution : sendChatInputMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecutionStatus })),
|
|
3203
|
+
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_NextStepsPills__WEBPACK_IMPORTED_MODULE_40__["default"], { nextSteps: nextSteps, onSelectNextStep: agentModeEnabled ? startAgentExecution : sendChatInputMessage, displayedNextStepsIfAvailable: displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable })),
|
|
3204
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_41__["default"], { app: app, initialContent: '', onSave: agentModeEnabled ? startAgentExecution : sendChatInputMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecutionStatus, operatingSystem: operatingSystem, displayOptimizedChatHistoryLength: displayOptimizedChatHistory.length, agentTargetNotebookPanelRef: agentTargetNotebookPanelRef, isSignedUp: isSignedUp })),
|
|
3124
3205
|
agentExecutionStatus !== 'working' && agentExecutionStatus !== 'stopping' && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls" },
|
|
3125
3206
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls-left" },
|
|
3126
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3207
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_ToggleButton__WEBPACK_IMPORTED_MODULE_42__["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) => {
|
|
3127
3208
|
await startNewChat(); // TODO: delete thread instead of starting new chat
|
|
3128
3209
|
setAgentModeEnabled(!isLeftSelected);
|
|
3129
3210
|
// Clear agent checkpoint when switching modes
|
|
@@ -3157,9 +3238,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3157
3238
|
} },
|
|
3158
3239
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", { className: "submit-text" }, "Submit"),
|
|
3159
3240
|
" \u23CE"))),
|
|
3160
|
-
(agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping') && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "button-base button-red stop-agent-button", onClick: markAgentForStopping, disabled: agentExecutionStatus === 'stopping', "data-testid": "stop-agent-button" }, agentExecutionStatus === 'stopping' ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "stop-agent-button-content" },
|
|
3241
|
+
(agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping') && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "button-base button-red stop-agent-button", onClick: () => void markAgentForStopping('userStop'), disabled: agentExecutionStatus === 'stopping', "data-testid": "stop-agent-button" }, agentExecutionStatus === 'stopping' ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "stop-agent-button-content" },
|
|
3161
3242
|
"Stopping",
|
|
3162
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3243
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_43__["default"], null),
|
|
3163
3244
|
" ")) : ('Stop Agent')))));
|
|
3164
3245
|
};
|
|
3165
3246
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatTaskpane);
|
|
@@ -3433,6 +3514,59 @@ const getFirstMessageFromCookie = () => {
|
|
|
3433
3514
|
};
|
|
3434
3515
|
|
|
3435
3516
|
|
|
3517
|
+
/***/ }),
|
|
3518
|
+
|
|
3519
|
+
/***/ "./lib/Extensions/AiChat/SignUpForm.js":
|
|
3520
|
+
/*!*********************************************!*\
|
|
3521
|
+
!*** ./lib/Extensions/AiChat/SignUpForm.js ***!
|
|
3522
|
+
\*********************************************/
|
|
3523
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3524
|
+
|
|
3525
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3526
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3527
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3528
|
+
/* harmony export */ });
|
|
3529
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
3530
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3531
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
3532
|
+
/* harmony import */ var _icons_MitoLogo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../icons/MitoLogo */ "./lib/icons/MitoLogo.js");
|
|
3533
|
+
/* harmony import */ var _utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/userSignupEvents */ "./lib/utils/userSignupEvents.js");
|
|
3534
|
+
/* harmony import */ var _style_SignUpForm_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/SignUpForm.css */ "./style/SignUpForm.css");
|
|
3535
|
+
/*
|
|
3536
|
+
* Copyright (c) Saga Inc.
|
|
3537
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
3538
|
+
*/
|
|
3539
|
+
|
|
3540
|
+
|
|
3541
|
+
|
|
3542
|
+
|
|
3543
|
+
|
|
3544
|
+
const SignUpForm = ({ onSignUpSuccess }) => {
|
|
3545
|
+
const [email, setEmail] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
3546
|
+
const handleSubmit = async (e) => {
|
|
3547
|
+
e.preventDefault();
|
|
3548
|
+
try {
|
|
3549
|
+
await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.setUserKey)('user_email', email);
|
|
3550
|
+
onSignUpSuccess === null || onSignUpSuccess === void 0 ? void 0 : onSignUpSuccess();
|
|
3551
|
+
// Emit signup success event for other components to listen to
|
|
3552
|
+
_utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_3__.userSignupEvents.emitSignupSuccess();
|
|
3553
|
+
}
|
|
3554
|
+
catch (error) {
|
|
3555
|
+
console.error('Failed to set user email:', error);
|
|
3556
|
+
}
|
|
3557
|
+
};
|
|
3558
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "signup-form-container" },
|
|
3559
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "signup-form-header-logo" },
|
|
3560
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_MitoLogo__WEBPACK_IMPORTED_MODULE_4__["default"], { width: "60", height: "30" })),
|
|
3561
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "signup-form-header" }, "Sign Up for Mito"),
|
|
3562
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "signup-form-message", "data-testid": "signup-form-message" }, "To avoid abuse of our free AI credits, we ask that you login to use Mito AI. No credit card required, just an email."),
|
|
3563
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("form", { onSubmit: handleSubmit, style: { marginTop: '15px' } },
|
|
3564
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "Your work email", className: "signup-form-input", required: true }),
|
|
3565
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "submit", className: "button-base signup-form-button" }, "Sign Up"))));
|
|
3566
|
+
};
|
|
3567
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SignUpForm);
|
|
3568
|
+
|
|
3569
|
+
|
|
3436
3570
|
/***/ }),
|
|
3437
3571
|
|
|
3438
3572
|
/***/ "./lib/Extensions/AiChat/jupyterSettingsManager.js":
|
|
@@ -3573,6 +3707,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3573
3707
|
* Handles common mistakes like string instead of array, missing fields, etc.
|
|
3574
3708
|
*/
|
|
3575
3709
|
function validateAndCorrectAgentResponse(agentResponse) {
|
|
3710
|
+
var _a;
|
|
3576
3711
|
// Create a copy to avoid mutating the original
|
|
3577
3712
|
const correctedResponse = { ...agentResponse };
|
|
3578
3713
|
// Ensure type is valid. Default to finished_task if not valid.
|
|
@@ -3594,6 +3729,8 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
3594
3729
|
// Correct analysis_assumptions - handle string to array conversion
|
|
3595
3730
|
if (correctedResponse.analysis_assumptions !== undefined && correctedResponse.analysis_assumptions !== null) {
|
|
3596
3731
|
correctedResponse.analysis_assumptions = correctStringArray(correctedResponse.analysis_assumptions);
|
|
3732
|
+
// No empty strings in the assumptions
|
|
3733
|
+
correctedResponse.analysis_assumptions = (_a = correctedResponse.analysis_assumptions) === null || _a === void 0 ? void 0 : _a.filter(assumption => assumption.trim() !== '');
|
|
3597
3734
|
}
|
|
3598
3735
|
// For now we don't validate the cell_update object itself, as this is more complex and has
|
|
3599
3736
|
// not caused issues thus far.
|
|
@@ -3611,7 +3748,7 @@ function correctStringArray(value) {
|
|
|
3611
3748
|
if (typeof value === 'string') {
|
|
3612
3749
|
return [value];
|
|
3613
3750
|
}
|
|
3614
|
-
return
|
|
3751
|
+
return undefined;
|
|
3615
3752
|
}
|
|
3616
3753
|
|
|
3617
3754
|
|
|
@@ -3696,28 +3833,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3696
3833
|
*/
|
|
3697
3834
|
|
|
3698
3835
|
|
|
3699
|
-
const deployAppNotification = (url, appManagerService) => {
|
|
3836
|
+
const deployAppNotification = (url, appManagerService, notificationId) => {
|
|
3700
3837
|
// Total deployment time in milliseconds (3 minutes = 180000ms)
|
|
3701
3838
|
const totalDeploymentTime = 180000;
|
|
3702
3839
|
// Create an array of deployment steps
|
|
3703
3840
|
const deploymentSteps = [
|
|
3704
|
-
"Step
|
|
3705
|
-
"Step
|
|
3706
|
-
"Step
|
|
3707
|
-
"Step
|
|
3708
|
-
"Step
|
|
3709
|
-
"Step
|
|
3841
|
+
"Step 2/7: Preparing your app...",
|
|
3842
|
+
"Step 3/7: Assembling clouds...",
|
|
3843
|
+
"Step 4/7: Building your app...",
|
|
3844
|
+
"Step 5/7: Configuring network settings...",
|
|
3845
|
+
"Step 6/7: Adding final touches...",
|
|
3846
|
+
"Step 7/7: Running security checks...",
|
|
3710
3847
|
"Deployment complete! Your app is ready."
|
|
3711
3848
|
];
|
|
3712
|
-
// Create initial "in progress" notification to get notificaiton id
|
|
3713
|
-
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit(deploymentSteps[0], 'in-progress', {
|
|
3714
|
-
autoClose: false
|
|
3715
|
-
});
|
|
3716
3849
|
// Calculate time between steps (evenly distribute throughout the total deployment time)
|
|
3717
3850
|
const stepInterval = totalDeploymentTime / (deploymentSteps.length - 1);
|
|
3718
3851
|
let retryCount = 5;
|
|
3719
3852
|
// Update message at each step interval
|
|
3720
|
-
for (let i =
|
|
3853
|
+
for (let i = 0; i < deploymentSteps.length; i++) {
|
|
3721
3854
|
setTimeout(() => {
|
|
3722
3855
|
const isLastStep = i === deploymentSteps.length - 1;
|
|
3723
3856
|
if (isLastStep) {
|
|
@@ -3784,6 +3917,127 @@ const deployAppNotification = (url, appManagerService) => {
|
|
|
3784
3917
|
};
|
|
3785
3918
|
|
|
3786
3919
|
|
|
3920
|
+
/***/ }),
|
|
3921
|
+
|
|
3922
|
+
/***/ "./lib/Extensions/AppDeploy/DeployFilesSelector.js":
|
|
3923
|
+
/*!*********************************************************!*\
|
|
3924
|
+
!*** ./lib/Extensions/AppDeploy/DeployFilesSelector.js ***!
|
|
3925
|
+
\*********************************************************/
|
|
3926
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3927
|
+
|
|
3928
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3929
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3930
|
+
/* harmony export */ FileUploadPopup: () => (/* binding */ FileUploadPopup)
|
|
3931
|
+
/* harmony export */ });
|
|
3932
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
3933
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3934
|
+
/* harmony import */ var _style_ConnectionForm_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/ConnectionForm.css */ "./style/ConnectionForm.css");
|
|
3935
|
+
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
3936
|
+
/* harmony import */ var _style_FilesSelector_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../style/FilesSelector.css */ "./style/FilesSelector.css");
|
|
3937
|
+
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components");
|
|
3938
|
+
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_4__);
|
|
3939
|
+
/*
|
|
3940
|
+
* Copyright (c) Saga Inc.
|
|
3941
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
3942
|
+
*/
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+
|
|
3946
|
+
|
|
3947
|
+
|
|
3948
|
+
const FileIcon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_4__.fileIcon.react;
|
|
3949
|
+
const FolderIcon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_4__.folderIcon.react;
|
|
3950
|
+
const CloseIcon = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_4__.closeIcon.react;
|
|
3951
|
+
const FileUploadPopup = ({ filePath, onClose, onSubmit }) => {
|
|
3952
|
+
const [items, setItems] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
3953
|
+
const [selectedItems, setSelectedItems] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(new Set());
|
|
3954
|
+
// Figure out current notebook directory
|
|
3955
|
+
const getNotebookDir = () => {
|
|
3956
|
+
if (!filePath)
|
|
3957
|
+
return '';
|
|
3958
|
+
const parts = filePath.split('/');
|
|
3959
|
+
parts.pop(); // remove notebook filename
|
|
3960
|
+
return parts.join('/');
|
|
3961
|
+
};
|
|
3962
|
+
const alwaysSelected = ['requirements.txt', 'app.py'];
|
|
3963
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
3964
|
+
const nbDir = getNotebookDir();
|
|
3965
|
+
const apiPath = nbDir ? `/api/contents/${nbDir}` : '/api/contents/';
|
|
3966
|
+
fetch(apiPath)
|
|
3967
|
+
.then(res => res.json())
|
|
3968
|
+
.then(data => {
|
|
3969
|
+
const entries = data.content.map((item) => ({
|
|
3970
|
+
name: item.name,
|
|
3971
|
+
type: item.type, // "file" or "directory"
|
|
3972
|
+
}))
|
|
3973
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
3974
|
+
setItems(entries);
|
|
3975
|
+
// Pre-select default files
|
|
3976
|
+
const defaultFiles = new Set();
|
|
3977
|
+
entries.forEach(entry => {
|
|
3978
|
+
if (alwaysSelected.includes(entry.name)) {
|
|
3979
|
+
defaultFiles.add(entry.name);
|
|
3980
|
+
}
|
|
3981
|
+
});
|
|
3982
|
+
setSelectedItems(defaultFiles);
|
|
3983
|
+
})
|
|
3984
|
+
.catch(err => console.error('Error fetching files/dirs:', err));
|
|
3985
|
+
}, []);
|
|
3986
|
+
const handleCheckboxChange = (name) => {
|
|
3987
|
+
setSelectedItems(prev => {
|
|
3988
|
+
const newSet = new Set(prev);
|
|
3989
|
+
if (newSet.has(name))
|
|
3990
|
+
newSet.delete(name);
|
|
3991
|
+
else
|
|
3992
|
+
newSet.add(name);
|
|
3993
|
+
return newSet;
|
|
3994
|
+
});
|
|
3995
|
+
};
|
|
3996
|
+
const handleSelectAll = (checked) => {
|
|
3997
|
+
if (checked) {
|
|
3998
|
+
// select all, nothing excluded
|
|
3999
|
+
setSelectedItems(new Set(items.map(i => i.name)));
|
|
4000
|
+
}
|
|
4001
|
+
else {
|
|
4002
|
+
// keep only alwaysSelected
|
|
4003
|
+
setSelectedItems(new Set(alwaysSelected));
|
|
4004
|
+
}
|
|
4005
|
+
};
|
|
4006
|
+
const handleSubmit = () => {
|
|
4007
|
+
const selectedPaths = Array.from(selectedItems);
|
|
4008
|
+
onSubmit(selectedPaths);
|
|
4009
|
+
onClose();
|
|
4010
|
+
};
|
|
4011
|
+
const allSelected = items.length > 0 && selectedItems.size === items.length;
|
|
4012
|
+
const partiallySelected = selectedItems.size > 0 && selectedItems.size < items.length;
|
|
4013
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-overlay" },
|
|
4014
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-content" },
|
|
4015
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-header" },
|
|
4016
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, "Upload files Required for the App"),
|
|
4017
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: onClose, className: "modal-close-button", title: "Close" },
|
|
4018
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CloseIcon, null))),
|
|
4019
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-subheader" },
|
|
4020
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "modal-subtext" }, "Select the files and/or directories that are required to render the app. For example, if your app reads data from a csv file, you must select it here.")),
|
|
4021
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-body" }, items.length === 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "No items found.")) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
4022
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "files-selector-select-all" },
|
|
4023
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "checkbox-label" },
|
|
4024
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "checkbox", checked: allSelected, ref: el => {
|
|
4025
|
+
if (el)
|
|
4026
|
+
el.indeterminate = partiallySelected;
|
|
4027
|
+
}, onChange: e => handleSelectAll(e.target.checked) }),
|
|
4028
|
+
"Select All")),
|
|
4029
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "file-list-scrollable" },
|
|
4030
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "file-list" }, items.map((item, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: index },
|
|
4031
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "checkbox-label" },
|
|
4032
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "checkbox", checked: selectedItems.has(item.name), onChange: () => handleCheckboxChange(item.name), disabled: alwaysSelected.includes(item.name), title: alwaysSelected.includes(item.name) ? "Required for deploying your app" : undefined }),
|
|
4033
|
+
item.type === 'directory' ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(FolderIcon, null) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(FileIcon, null),
|
|
4034
|
+
" ",
|
|
4035
|
+
item.name))))))))),
|
|
4036
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-footer" },
|
|
4037
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "files-selector-submit-button", onClick: handleSubmit, disabled: selectedItems.size === 0 }, "Deploy App")))));
|
|
4038
|
+
};
|
|
4039
|
+
|
|
4040
|
+
|
|
3787
4041
|
/***/ }),
|
|
3788
4042
|
|
|
3789
4043
|
/***/ "./lib/Extensions/AppDeploy/DeployStreamlitApp.js":
|
|
@@ -3802,9 +4056,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3802
4056
|
/* harmony import */ var _fileUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fileUtils */ "./lib/Extensions/AppDeploy/fileUtils.js");
|
|
3803
4057
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
3804
4058
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);
|
|
3805
|
-
/* harmony import */ var
|
|
4059
|
+
/* harmony import */ var _DeployAppNotification__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DeployAppNotification */ "./lib/Extensions/AppDeploy/DeployAppNotification.js");
|
|
3806
4060
|
/* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auth */ "./lib/Extensions/AppDeploy/auth.js");
|
|
3807
4061
|
/* harmony import */ var _authPopupUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./authPopupUtils */ "./lib/Extensions/AppDeploy/authPopupUtils.js");
|
|
4062
|
+
/* harmony import */ var _FilesSelectorUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FilesSelectorUtils */ "./lib/Extensions/AppDeploy/FilesSelectorUtils.js");
|
|
3808
4063
|
/*
|
|
3809
4064
|
* Copyright (c) Saga Inc.
|
|
3810
4065
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -3816,11 +4071,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3816
4071
|
|
|
3817
4072
|
|
|
3818
4073
|
|
|
4074
|
+
|
|
3819
4075
|
/*
|
|
3820
4076
|
This function generates the requirements.txt file needed to host the streamlit app,
|
|
3821
4077
|
and deploys it!
|
|
3822
4078
|
*/
|
|
3823
4079
|
const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerService) => {
|
|
4080
|
+
let selectedFiles = [];
|
|
3824
4081
|
let jwtToken = await (0,_auth__WEBPACK_IMPORTED_MODULE_2__.getJWTToken)();
|
|
3825
4082
|
if (!jwtToken) {
|
|
3826
4083
|
// No token found, show authentication popup
|
|
@@ -3849,10 +4106,24 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
3849
4106
|
return;
|
|
3850
4107
|
}
|
|
3851
4108
|
const notebookPath = notebookPanel.context.path;
|
|
4109
|
+
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit('Step 1/7: Gathering requirements...', 'in-progress', {
|
|
4110
|
+
autoClose: false
|
|
4111
|
+
});
|
|
3852
4112
|
// Build the requirements.txt file
|
|
3853
4113
|
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_4__.generateRequirementsTxt)(notebookTracker);
|
|
3854
4114
|
// Save the files to the current directory
|
|
3855
4115
|
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_5__.saveFileWithKernel)(notebookTracker, './requirements.txt', requirementsContent);
|
|
4116
|
+
try {
|
|
4117
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.dismiss(notificationId);
|
|
4118
|
+
selectedFiles = await (0,_FilesSelectorUtils__WEBPACK_IMPORTED_MODULE_6__.fileSelectorPopup)(notebookPath);
|
|
4119
|
+
}
|
|
4120
|
+
catch (error) {
|
|
4121
|
+
console.log('File selection failed:', error);
|
|
4122
|
+
return;
|
|
4123
|
+
}
|
|
4124
|
+
const newNotificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit("Step 2/7: Preparing your app...", 'in-progress', {
|
|
4125
|
+
autoClose: false
|
|
4126
|
+
});
|
|
3856
4127
|
// After building the files, we need to send a request to the backend to deploy the app
|
|
3857
4128
|
try {
|
|
3858
4129
|
console.log("Sending request to deploy the app");
|
|
@@ -3861,17 +4132,21 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
3861
4132
|
type: 'deploy-app',
|
|
3862
4133
|
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.UUID.uuid4(),
|
|
3863
4134
|
notebook_path: notebookPath,
|
|
3864
|
-
jwt_token: jwtToken
|
|
4135
|
+
jwt_token: jwtToken,
|
|
4136
|
+
selected_files: selectedFiles
|
|
3865
4137
|
});
|
|
3866
4138
|
if (response.error) {
|
|
3867
|
-
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.
|
|
4139
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
4140
|
+
id: newNotificationId,
|
|
4141
|
+
message: response.error.title,
|
|
4142
|
+
type: 'error',
|
|
3868
4143
|
autoClose: false
|
|
3869
4144
|
});
|
|
3870
4145
|
}
|
|
3871
4146
|
else {
|
|
3872
4147
|
console.log("App deployment response:", response);
|
|
3873
4148
|
const url = response.url;
|
|
3874
|
-
(0,
|
|
4149
|
+
(0,_DeployAppNotification__WEBPACK_IMPORTED_MODULE_7__.deployAppNotification)(url, appManagerService, newNotificationId);
|
|
3875
4150
|
}
|
|
3876
4151
|
}
|
|
3877
4152
|
catch (error) {
|
|
@@ -3881,6 +4156,59 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
3881
4156
|
};
|
|
3882
4157
|
|
|
3883
4158
|
|
|
4159
|
+
/***/ }),
|
|
4160
|
+
|
|
4161
|
+
/***/ "./lib/Extensions/AppDeploy/FilesSelectorUtils.js":
|
|
4162
|
+
/*!********************************************************!*\
|
|
4163
|
+
!*** ./lib/Extensions/AppDeploy/FilesSelectorUtils.js ***!
|
|
4164
|
+
\********************************************************/
|
|
4165
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4166
|
+
|
|
4167
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4168
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4169
|
+
/* harmony export */ fileSelectorPopup: () => (/* binding */ fileSelectorPopup)
|
|
4170
|
+
/* harmony export */ });
|
|
4171
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
4172
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4173
|
+
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
|
|
4174
|
+
/* harmony import */ var _DeployFilesSelector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DeployFilesSelector */ "./lib/Extensions/AppDeploy/DeployFilesSelector.js");
|
|
4175
|
+
/*
|
|
4176
|
+
* Copyright (c) Saga Inc.
|
|
4177
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4178
|
+
*/
|
|
4179
|
+
|
|
4180
|
+
|
|
4181
|
+
|
|
4182
|
+
/**
|
|
4183
|
+
* Shows a file selector popup
|
|
4184
|
+
*/
|
|
4185
|
+
const fileSelectorPopup = (notebookPath) => {
|
|
4186
|
+
return new Promise((resolve, reject) => {
|
|
4187
|
+
console.log("Starting file selector for:", notebookPath);
|
|
4188
|
+
// Create a container for the popup
|
|
4189
|
+
const popupContainer = document.createElement('div');
|
|
4190
|
+
popupContainer.id = 'file-selector-popup-container';
|
|
4191
|
+
document.body.appendChild(popupContainer);
|
|
4192
|
+
// Create root
|
|
4193
|
+
const root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(popupContainer);
|
|
4194
|
+
const handleSubmit = (items) => {
|
|
4195
|
+
// Clean up the popup
|
|
4196
|
+
root.unmount();
|
|
4197
|
+
document.body.removeChild(popupContainer);
|
|
4198
|
+
resolve(items);
|
|
4199
|
+
};
|
|
4200
|
+
const handleClose = () => {
|
|
4201
|
+
// Clean up the popup
|
|
4202
|
+
root.unmount();
|
|
4203
|
+
document.body.removeChild(popupContainer);
|
|
4204
|
+
reject(new Error('File selection cancelled'));
|
|
4205
|
+
};
|
|
4206
|
+
// Render the AuthPopup
|
|
4207
|
+
root.render(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_DeployFilesSelector__WEBPACK_IMPORTED_MODULE_2__.FileUploadPopup, { filePath: notebookPath, onClose: handleClose, onSubmit: handleSubmit }));
|
|
4208
|
+
});
|
|
4209
|
+
};
|
|
4210
|
+
|
|
4211
|
+
|
|
3884
4212
|
/***/ }),
|
|
3885
4213
|
|
|
3886
4214
|
/***/ "./lib/Extensions/AppDeploy/auth-popup-deploy.js":
|
|
@@ -4266,70 +4594,77 @@ const generateRequirementsTxt = async (notebookTracker) => {
|
|
|
4266
4594
|
// Use the kernel to execute Python code using pipreqs
|
|
4267
4595
|
const session = notebookPanel.sessionContext.session;
|
|
4268
4596
|
if (session) {
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
let codeContent = '';
|
|
4272
|
-
// Gather all code cells content
|
|
4273
|
-
notebook.widgets.forEach(cell => {
|
|
4274
|
-
if (cell.model.type === 'code') {
|
|
4275
|
-
const source = cell.model.sharedModel.source;
|
|
4276
|
-
// Filter out lines that start with shell commands
|
|
4277
|
-
const filteredLines = source.split('\n').filter(line => {
|
|
4278
|
-
const trimmed = line.trim();
|
|
4279
|
-
return !trimmed.startsWith('!') && !trimmed.startsWith('%');
|
|
4280
|
-
});
|
|
4281
|
-
if (filteredLines.length > 0) {
|
|
4282
|
-
codeContent += filteredLines.join('\n') + '\n\n';
|
|
4283
|
-
}
|
|
4284
|
-
}
|
|
4285
|
-
});
|
|
4286
|
-
// Create Python code to run pipreqs on a temporary directory
|
|
4597
|
+
const appPyPath = `app.py`;
|
|
4598
|
+
// Create Python code to run pipreqs on the app.py file
|
|
4287
4599
|
const pythonCode = `
|
|
4288
4600
|
import subprocess
|
|
4289
4601
|
import os
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
#
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4602
|
+
|
|
4603
|
+
# Check if app.py exists in the notebook directory
|
|
4604
|
+
app_py_path = os.path.join(os.getcwd(), "${appPyPath}")
|
|
4605
|
+
if not os.path.exists(app_py_path):
|
|
4606
|
+
print(f"Error: app.py not found at {app_py_path}")
|
|
4607
|
+
exit(1)
|
|
4608
|
+
|
|
4609
|
+
# Make sure pipreqs is installed. Then
|
|
4610
|
+
# 1. Create a requirements.in file
|
|
4611
|
+
# 2. From the requirements.in file, generate the requirements.txt file with the canonical PyPI name of the packages
|
|
4612
|
+
# and the versions as they exist on the user's terminal
|
|
4613
|
+
try:
|
|
4614
|
+
# Run pipreqs on the directory containing app.py
|
|
4615
|
+
notebook_dir = os.path.dirname(app_py_path)
|
|
4616
|
+
generate_req_in_file = subprocess.run(
|
|
4617
|
+
['pipreqs', '--encoding=utf-8', '--savepath', 'requirements.in', '--force', notebook_dir],
|
|
4618
|
+
capture_output=True,
|
|
4619
|
+
text=True
|
|
4620
|
+
)
|
|
4621
|
+
|
|
4622
|
+
print("Log: ", generate_req_in_file.stderr)
|
|
4623
|
+
|
|
4624
|
+
# Read requirements.in and process each line
|
|
4625
|
+
requirements_in_path = os.path.join(notebook_dir, 'requirements.in')
|
|
4626
|
+
if os.path.exists(requirements_in_path):
|
|
4627
|
+
with open(requirements_in_path, 'r') as f:
|
|
4628
|
+
lines = f.readlines()
|
|
4629
|
+
|
|
4630
|
+
processed_requirements = []
|
|
4631
|
+
for line in lines:
|
|
4632
|
+
line = line.strip()
|
|
4633
|
+
if not line:
|
|
4634
|
+
continue
|
|
4635
|
+
|
|
4636
|
+
# Extract package name (everything before =)
|
|
4637
|
+
pkg_name = line.split('=')[0].strip()
|
|
4638
|
+
|
|
4639
|
+
# Get package info using pip show
|
|
4640
|
+
try:
|
|
4641
|
+
result = subprocess.run(['pip', 'show', pkg_name],
|
|
4642
|
+
capture_output=True, text=True, check=True)
|
|
4643
|
+
output = result.stdout
|
|
4644
|
+
|
|
4645
|
+
# Parse the output to get Name and Version
|
|
4646
|
+
name = None
|
|
4647
|
+
version = None
|
|
4648
|
+
for output_line in output.split('\\n'):
|
|
4649
|
+
if output_line.startswith('Name:'):
|
|
4650
|
+
name = output_line.split(':', 1)[1].strip()
|
|
4651
|
+
elif output_line.startswith('Version:'):
|
|
4652
|
+
version = output_line.split(':', 1)[1].strip()
|
|
4653
|
+
|
|
4654
|
+
if name and version:
|
|
4655
|
+
processed_requirements.append(f"{name}=={version}")
|
|
4656
|
+
else:
|
|
4657
|
+
processed_requirements.append(line)
|
|
4658
|
+
except subprocess.CalledProcessError:
|
|
4659
|
+
# If pip show fails, use the original line
|
|
4660
|
+
processed_requirements.append(line)
|
|
4661
|
+
|
|
4662
|
+
# Print the processed requirements
|
|
4663
|
+
for req in processed_requirements:
|
|
4664
|
+
print(req)
|
|
4665
|
+
|
|
4666
|
+
except Exception as e:
|
|
4667
|
+
print(f"Error running pipreqs: {e}")
|
|
4333
4668
|
`;
|
|
4334
4669
|
const kernel = session.kernel;
|
|
4335
4670
|
if (kernel === null) {
|
|
@@ -4351,6 +4686,7 @@ with tempfile.TemporaryDirectory() as temp_dir:
|
|
|
4351
4686
|
console.error(text);
|
|
4352
4687
|
}
|
|
4353
4688
|
else {
|
|
4689
|
+
console.log('Found dependencies:\n', text);
|
|
4354
4690
|
resultText += text;
|
|
4355
4691
|
}
|
|
4356
4692
|
}
|
|
@@ -4748,14 +5084,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4748
5084
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
4749
5085
|
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
|
|
4750
5086
|
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_3__);
|
|
4751
|
-
/* harmony import */ var
|
|
4752
|
-
/* harmony import */ var
|
|
4753
|
-
/* harmony import */ var
|
|
4754
|
-
/* harmony import */ var
|
|
4755
|
-
/* harmony import */ var
|
|
4756
|
-
/* harmony import */ var
|
|
5087
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
5088
|
+
/* harmony import */ var _AppDeploy_DeployStreamlitApp__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../AppDeploy/DeployStreamlitApp */ "./lib/Extensions/AppDeploy/DeployStreamlitApp.js");
|
|
5089
|
+
/* harmony import */ var _AppDeploy_AppDeployPlugin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../AppDeploy/AppDeployPlugin */ "./lib/Extensions/AppDeploy/AppDeployPlugin.js");
|
|
5090
|
+
/* harmony import */ var _AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../AppManager/ManageAppsPlugin */ "./lib/Extensions/AppManager/ManageAppsPlugin.js");
|
|
5091
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
5092
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
4757
5093
|
/* harmony import */ var _style_StreamlitPreviewPlugin_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/StreamlitPreviewPlugin.css */ "./style/StreamlitPreviewPlugin.css");
|
|
4758
|
-
/* harmony import */ var
|
|
5094
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AppPreview/utils.js");
|
|
5095
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5096
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
|
|
5097
|
+
/* harmony import */ var _UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UpdateAppDropdown */ "./lib/Extensions/AppPreview/UpdateAppDropdown.js");
|
|
5098
|
+
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
|
|
4759
5099
|
/*
|
|
4760
5100
|
* Copyright (c) Saga Inc.
|
|
4761
5101
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -4774,6 +5114,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4774
5114
|
|
|
4775
5115
|
|
|
4776
5116
|
|
|
5117
|
+
|
|
5118
|
+
|
|
5119
|
+
|
|
5120
|
+
|
|
4777
5121
|
/**
|
|
4778
5122
|
* Simple HTML widget for displaying iframe content.
|
|
4779
5123
|
*/
|
|
@@ -4795,17 +5139,71 @@ class IFrameWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {
|
|
|
4795
5139
|
}
|
|
4796
5140
|
}
|
|
4797
5141
|
}
|
|
5142
|
+
async function showRecreateAppConfirmation(notebookPath) {
|
|
5143
|
+
const result = await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({
|
|
5144
|
+
title: 'Recreate App',
|
|
5145
|
+
body: 'This will recreate the app from scratch, discarding all your current edits. This action cannot be undone. Are you sure you want to continue?',
|
|
5146
|
+
buttons: [
|
|
5147
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton({ label: 'Cancel' }),
|
|
5148
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.warnButton({ label: 'Recreate App' })
|
|
5149
|
+
],
|
|
5150
|
+
defaultButton: 1
|
|
5151
|
+
});
|
|
5152
|
+
if (result.button.accept) {
|
|
5153
|
+
void (0,_utils__WEBPACK_IMPORTED_MODULE_7__.startStreamlitPreviewAndNotify)(notebookPath, true, undefined, 'Recreating app from scratch...', 'App recreated successfully!');
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
/**
|
|
5157
|
+
* Show the update app dropdown.
|
|
5158
|
+
*/
|
|
5159
|
+
function showUpdateAppDropdown(buttonElement, notebookPath) {
|
|
5160
|
+
// Remove any existing dropdown
|
|
5161
|
+
const existingDropdown = document.querySelector('.update-app-dropdown');
|
|
5162
|
+
if (existingDropdown) {
|
|
5163
|
+
existingDropdown.remove();
|
|
5164
|
+
}
|
|
5165
|
+
// Create dropdown container
|
|
5166
|
+
const dropdownContainer = document.createElement('div');
|
|
5167
|
+
dropdownContainer.className = 'update-app-dropdown';
|
|
5168
|
+
dropdownContainer.style.position = 'absolute';
|
|
5169
|
+
dropdownContainer.style.zIndex = '1000';
|
|
5170
|
+
// Position the dropdown below the button
|
|
5171
|
+
const buttonRect = buttonElement.getBoundingClientRect();
|
|
5172
|
+
dropdownContainer.style.top = `${buttonRect.bottom + 4}px`;
|
|
5173
|
+
dropdownContainer.style.left = `${buttonRect.left}px`;
|
|
5174
|
+
// Add to document
|
|
5175
|
+
document.body.appendChild(dropdownContainer);
|
|
5176
|
+
// Render the React component
|
|
5177
|
+
(0,react_dom_client__WEBPACK_IMPORTED_MODULE_6__.createRoot)(dropdownContainer).render(react__WEBPACK_IMPORTED_MODULE_5__.createElement(_UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__["default"], { onSubmit: async (message) => {
|
|
5178
|
+
await (0,_utils__WEBPACK_IMPORTED_MODULE_7__.startStreamlitPreviewAndNotify)(notebookPath, true, message, 'Updating app...', 'App updated successfully!');
|
|
5179
|
+
dropdownContainer.remove();
|
|
5180
|
+
}, onClose: () => {
|
|
5181
|
+
dropdownContainer.remove();
|
|
5182
|
+
} }));
|
|
5183
|
+
// Close dropdown when clicking outside
|
|
5184
|
+
const handleClickOutside = (event) => {
|
|
5185
|
+
if (!dropdownContainer.contains(event.target) &&
|
|
5186
|
+
!buttonElement.contains(event.target)) {
|
|
5187
|
+
dropdownContainer.remove();
|
|
5188
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
5189
|
+
}
|
|
5190
|
+
};
|
|
5191
|
+
// Add click outside listener after a small delay to avoid immediate closure
|
|
5192
|
+
setTimeout(() => {
|
|
5193
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
5194
|
+
}, 100);
|
|
5195
|
+
}
|
|
4798
5196
|
/**
|
|
4799
5197
|
* The streamlit preview plugin.
|
|
4800
5198
|
*/
|
|
4801
5199
|
const StreamlitPreviewPlugin = {
|
|
4802
5200
|
id: 'mito-ai:streamlit-preview',
|
|
4803
5201
|
autoStart: true,
|
|
4804
|
-
requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__.INotebookTracker, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette,
|
|
5202
|
+
requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__.INotebookTracker, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette, _AppDeploy_AppDeployPlugin__WEBPACK_IMPORTED_MODULE_9__.IAppDeployService, _AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_10__.IAppManagerService],
|
|
4805
5203
|
activate: (app, notebookTracker, palette, appDeployService, appManagerService) => {
|
|
4806
5204
|
console.log('mito-ai: StreamlitPreviewPlugin activated');
|
|
4807
5205
|
// Add command to command palette
|
|
4808
|
-
app.commands.addCommand(
|
|
5206
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT, {
|
|
4809
5207
|
label: 'Preview as Streamlit',
|
|
4810
5208
|
caption: 'Convert current notebook to Streamlit app and preview it',
|
|
4811
5209
|
execute: async () => {
|
|
@@ -4814,7 +5212,7 @@ const StreamlitPreviewPlugin = {
|
|
|
4814
5212
|
});
|
|
4815
5213
|
// Add to command palette
|
|
4816
5214
|
palette.addItem({
|
|
4817
|
-
command:
|
|
5215
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT,
|
|
4818
5216
|
category: 'Mito AI'
|
|
4819
5217
|
});
|
|
4820
5218
|
}
|
|
@@ -4832,10 +5230,11 @@ async function previewNotebookAsStreamlit(app, notebookTracker, appDeployService
|
|
|
4832
5230
|
await notebookPanel.context.save();
|
|
4833
5231
|
const notebookPath = notebookPanel.context.path;
|
|
4834
5232
|
const notebookName = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PathExt.basename(notebookPath, '.ipynb');
|
|
4835
|
-
let globalNotificationId;
|
|
4836
5233
|
try {
|
|
4837
|
-
const
|
|
4838
|
-
|
|
5234
|
+
const previewData = await (0,_utils__WEBPACK_IMPORTED_MODULE_7__.startStreamlitPreviewAndNotify)(notebookPath);
|
|
5235
|
+
if (previewData === undefined) {
|
|
5236
|
+
return;
|
|
5237
|
+
}
|
|
4839
5238
|
// Create iframe widget
|
|
4840
5239
|
// TODO: Instead of having this widget creation code in the previewNotebookAsStreamlit function,
|
|
4841
5240
|
// I wonder if we can make it part of the StreamlitPreviewPlugin. What we want is the following:
|
|
@@ -4846,35 +5245,47 @@ async function previewNotebookAsStreamlit(app, notebookTracker, appDeployService
|
|
|
4846
5245
|
const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content: iframeWidget });
|
|
4847
5246
|
widget.title.label = `App Preview (${notebookName})`;
|
|
4848
5247
|
widget.title.closable = true;
|
|
4849
|
-
|
|
4850
|
-
|
|
5248
|
+
/* ******************************************************
|
|
5249
|
+
* Create Streamlit App Toolbar Buttons
|
|
5250
|
+
****************************************************** */
|
|
5251
|
+
const editAppButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
4851
5252
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
4852
5253
|
onClick: () => {
|
|
4853
|
-
|
|
5254
|
+
showUpdateAppDropdown(editAppButton.node, notebookPath);
|
|
4854
5255
|
},
|
|
4855
|
-
tooltip: '
|
|
4856
|
-
label: '
|
|
4857
|
-
icon:
|
|
5256
|
+
tooltip: 'Edit Streamlit App',
|
|
5257
|
+
label: 'Edit App',
|
|
5258
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_12__.EditLabIcon,
|
|
5259
|
+
iconClass: 'mito-ai-deploy-icon'
|
|
5260
|
+
});
|
|
5261
|
+
const recreateAppButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5262
|
+
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5263
|
+
onClick: async () => {
|
|
5264
|
+
await showRecreateAppConfirmation(notebookPath);
|
|
5265
|
+
},
|
|
5266
|
+
tooltip: 'Recreate new App from scratch based on the current state of the notebook',
|
|
5267
|
+
label: 'Recreate App',
|
|
5268
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_12__.ResetCircleLabIcon,
|
|
4858
5269
|
iconClass: 'mito-ai-deploy-icon'
|
|
4859
5270
|
});
|
|
4860
|
-
|
|
4861
|
-
const refreshButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5271
|
+
const deployButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
4862
5272
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
4863
5273
|
onClick: () => {
|
|
4864
|
-
void (0,
|
|
5274
|
+
void (0,_AppDeploy_DeployStreamlitApp__WEBPACK_IMPORTED_MODULE_13__.deployStreamlitApp)(notebookTracker, appDeployService, appManagerService);
|
|
4865
5275
|
},
|
|
4866
|
-
tooltip: '
|
|
4867
|
-
label: '
|
|
4868
|
-
icon:
|
|
5276
|
+
tooltip: 'Deploy Streamlit App',
|
|
5277
|
+
label: 'Deploy App',
|
|
5278
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_12__.DeployLabIcon,
|
|
4869
5279
|
iconClass: 'mito-ai-deploy-icon'
|
|
4870
5280
|
});
|
|
4871
5281
|
// Insert the button into the toolbar
|
|
4872
|
-
widget.toolbar.insertAfter('spacer', '
|
|
4873
|
-
widget.toolbar.insertAfter('
|
|
5282
|
+
widget.toolbar.insertAfter('spacer', 'edit-app-button', editAppButton);
|
|
5283
|
+
widget.toolbar.insertAfter('edit-app-button', 'recreate-app-button', recreateAppButton);
|
|
5284
|
+
widget.toolbar.insertAfter('recreate-app-button', 'deploy-app-button', deployButton);
|
|
4874
5285
|
// Handle widget disposal
|
|
4875
5286
|
widget.disposed.connect(() => {
|
|
4876
5287
|
console.log('Widget disposed, stopping preview');
|
|
4877
|
-
void (0,
|
|
5288
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_14__.stopStreamlitPreview)(previewData.id);
|
|
4878
5289
|
});
|
|
4879
5290
|
// Add widget to main area with split-right mode
|
|
4880
5291
|
app.shell.add(widget, 'main', {
|
|
@@ -4884,20 +5295,59 @@ async function previewNotebookAsStreamlit(app, notebookTracker, appDeployService
|
|
|
4884
5295
|
}
|
|
4885
5296
|
catch (error) {
|
|
4886
5297
|
console.error('Error starting streamlit preview:', error);
|
|
4887
|
-
// Update notification to error
|
|
4888
|
-
if (globalNotificationId) {
|
|
4889
|
-
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.update({
|
|
4890
|
-
id: globalNotificationId,
|
|
4891
|
-
message: `Failed to start preview: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
4892
|
-
type: 'error',
|
|
4893
|
-
autoClose: false
|
|
4894
|
-
});
|
|
4895
|
-
}
|
|
4896
5298
|
}
|
|
4897
5299
|
}
|
|
4898
5300
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StreamlitPreviewPlugin);
|
|
4899
5301
|
|
|
4900
5302
|
|
|
5303
|
+
/***/ }),
|
|
5304
|
+
|
|
5305
|
+
/***/ "./lib/Extensions/AppPreview/UpdateAppDropdown.js":
|
|
5306
|
+
/*!********************************************************!*\
|
|
5307
|
+
!*** ./lib/Extensions/AppPreview/UpdateAppDropdown.js ***!
|
|
5308
|
+
\********************************************************/
|
|
5309
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5310
|
+
|
|
5311
|
+
__webpack_require__.r(__webpack_exports__);
|
|
5312
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5313
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5314
|
+
/* harmony export */ });
|
|
5315
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5316
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5317
|
+
/* harmony import */ var _style_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/EditAppDropdown.css */ "./style/EditAppDropdown.css");
|
|
5318
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
5319
|
+
/*
|
|
5320
|
+
* Copyright (c) Saga Inc.
|
|
5321
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5322
|
+
*/
|
|
5323
|
+
|
|
5324
|
+
|
|
5325
|
+
|
|
5326
|
+
const UpdateAppDropdown = ({ onSubmit, onClose }) => {
|
|
5327
|
+
const [message, setMessage] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
|
|
5328
|
+
const handleSubmit = () => {
|
|
5329
|
+
if (message.trim()) {
|
|
5330
|
+
onSubmit(message);
|
|
5331
|
+
onClose();
|
|
5332
|
+
}
|
|
5333
|
+
};
|
|
5334
|
+
const handleKeyDown = (e) => {
|
|
5335
|
+
if (e.key === 'Escape') {
|
|
5336
|
+
onClose();
|
|
5337
|
+
}
|
|
5338
|
+
};
|
|
5339
|
+
const disabled = message.trim() === '';
|
|
5340
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown", onKeyDown: handleKeyDown },
|
|
5341
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown-content" },
|
|
5342
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { htmlFor: "update-description", className: "update-app-dropdown-label" }, "How would you like to modify the app?"),
|
|
5343
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { id: "update-description", value: message, onChange: (e) => setMessage(e.target.value), placeholder: "Describe your changes (e.g., Change the title, Remove a plot, etc.)", className: "update-app-dropdown-textarea", autoFocus: true }),
|
|
5344
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown-buttons" },
|
|
5345
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: onClose, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_2__.classNames)("update-app-dropdown-button", "update-app-dropdown-button-cancel") }, "Cancel"),
|
|
5346
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: handleSubmit, disabled: disabled, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_2__.classNames)('update-app-dropdown-button', 'update-app-dropdown-button-submit', { 'disabled': disabled }) }, "Submit")))));
|
|
5347
|
+
};
|
|
5348
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UpdateAppDropdown);
|
|
5349
|
+
|
|
5350
|
+
|
|
4901
5351
|
/***/ }),
|
|
4902
5352
|
|
|
4903
5353
|
/***/ "./lib/Extensions/AppPreview/utils.js":
|
|
@@ -4919,17 +5369,29 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4919
5369
|
*/
|
|
4920
5370
|
|
|
4921
5371
|
|
|
4922
|
-
const startStreamlitPreviewAndNotify = async (notebookPath, force_recreate = false) => {
|
|
4923
|
-
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit(
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
5372
|
+
const startStreamlitPreviewAndNotify = async (notebookPath, force_recreate = false, edit_prompt = '', start_notification_message = 'Building App Preview...', success_notification_message = 'Streamlit preview started successfully!') => {
|
|
5373
|
+
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit(start_notification_message, 'in-progress', { autoClose: false });
|
|
5374
|
+
try {
|
|
5375
|
+
const previewData = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__.startStreamlitPreview)(notebookPath, force_recreate, edit_prompt);
|
|
5376
|
+
// Update notification to success
|
|
5377
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
5378
|
+
id: notificationId,
|
|
5379
|
+
message: success_notification_message,
|
|
5380
|
+
type: 'success',
|
|
5381
|
+
autoClose: 5 * 1000
|
|
5382
|
+
});
|
|
5383
|
+
return previewData;
|
|
5384
|
+
}
|
|
5385
|
+
catch (error) {
|
|
5386
|
+
// Display error notification
|
|
5387
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
5388
|
+
id: notificationId,
|
|
5389
|
+
message: "Failed to start app preview: " + String(error),
|
|
5390
|
+
type: 'error',
|
|
5391
|
+
autoClose: 5 * 1000
|
|
5392
|
+
});
|
|
5393
|
+
return undefined;
|
|
5394
|
+
}
|
|
4933
5395
|
};
|
|
4934
5396
|
|
|
4935
5397
|
|
|
@@ -5576,11 +6038,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5576
6038
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5577
6039
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
5578
6040
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__);
|
|
5579
|
-
/* harmony import */ var
|
|
6041
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
5580
6042
|
/* harmony import */ var _style_NotebookFooter_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/NotebookFooter.css */ "./style/NotebookFooter.css");
|
|
5581
|
-
/* harmony import */ var
|
|
5582
|
-
/* harmony import */ var
|
|
5583
|
-
/* harmony import */ var
|
|
6043
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
6044
|
+
/* harmony import */ var _icons_NotebookFooter_CodeIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../icons/NotebookFooter/CodeIcon */ "./lib/icons/NotebookFooter/CodeIcon.js");
|
|
6045
|
+
/* harmony import */ var _icons_NotebookFooter_TextIcon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../icons/NotebookFooter/TextIcon */ "./lib/icons/NotebookFooter/TextIcon.js");
|
|
6046
|
+
/* harmony import */ var _utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/userSignupEvents */ "./lib/utils/userSignupEvents.js");
|
|
6047
|
+
/* harmony import */ var _utils_userSignupState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/userSignupState */ "./lib/utils/userSignupState.js");
|
|
5584
6048
|
/*
|
|
5585
6049
|
* Copyright (c) Saga Inc.
|
|
5586
6050
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -5593,16 +6057,48 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5593
6057
|
|
|
5594
6058
|
|
|
5595
6059
|
|
|
6060
|
+
|
|
6061
|
+
|
|
5596
6062
|
const NotebookFooter = ({ notebookTracker, app }) => {
|
|
5597
6063
|
var _a;
|
|
5598
6064
|
const notebook = (_a = notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.content;
|
|
5599
6065
|
const [inputValue, setInputValue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
5600
6066
|
const [isGenerating, setIsGenerating] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
5601
|
-
|
|
5602
|
-
//
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
6067
|
+
const [isSignedUp, setIsSignedUp] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true);
|
|
6068
|
+
// Function to refresh user signup state using the shared helper
|
|
6069
|
+
const refreshUserSignupState = async () => {
|
|
6070
|
+
const signupState = await (0,_utils_userSignupState__WEBPACK_IMPORTED_MODULE_3__.checkUserSignupState)();
|
|
6071
|
+
setIsSignedUp(signupState.isSignedUp);
|
|
6072
|
+
};
|
|
6073
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6074
|
+
void refreshUserSignupState();
|
|
6075
|
+
}, []);
|
|
6076
|
+
// Listen for signup success events from other components
|
|
6077
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6078
|
+
const handleSignupSuccess = () => {
|
|
6079
|
+
void refreshUserSignupState();
|
|
6080
|
+
};
|
|
6081
|
+
_utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__.userSignupEvents.signupSuccess.connect(handleSignupSuccess);
|
|
6082
|
+
// Cleanup the event listener when component unmounts
|
|
6083
|
+
return () => {
|
|
6084
|
+
_utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__.userSignupEvents.signupSuccess.disconnect(handleSignupSuccess);
|
|
6085
|
+
};
|
|
6086
|
+
}, []);
|
|
6087
|
+
// If the notebook is not loaded yet, don't render anything
|
|
6088
|
+
if (notebook === undefined || notebook.model === null) {
|
|
6089
|
+
return null;
|
|
6090
|
+
}
|
|
6091
|
+
const getPlaceholder = () => {
|
|
6092
|
+
if (isGenerating) {
|
|
6093
|
+
return 'Generating notebook...';
|
|
6094
|
+
}
|
|
6095
|
+
else if (isSignedUp) {
|
|
6096
|
+
return 'What analysis can I help you with?';
|
|
6097
|
+
}
|
|
6098
|
+
else {
|
|
6099
|
+
return 'Sign up to use Mito AI (see taskpane on the left)';
|
|
6100
|
+
}
|
|
6101
|
+
};
|
|
5606
6102
|
const addCell = (cellType = 'code') => {
|
|
5607
6103
|
if (notebook.widgets.length && notebook.widgets.length > 0) {
|
|
5608
6104
|
notebook.activeCellIndex = notebook.widgets.length - 1;
|
|
@@ -5626,8 +6122,8 @@ const NotebookFooter = ({ notebookTracker, app }) => {
|
|
|
5626
6122
|
if (submittedInput !== '') {
|
|
5627
6123
|
setIsGenerating(true);
|
|
5628
6124
|
setInputValue('');
|
|
5629
|
-
await app.commands.execute(
|
|
5630
|
-
await app.commands.execute(
|
|
6125
|
+
await app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_5__.COMMAND_MITO_AI_OPEN_CHAT, { focusChatInput: false });
|
|
6126
|
+
await app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_5__.COMMAND_MITO_AI_SEND_AGENT_MESSAGE, { input: submittedInput });
|
|
5631
6127
|
setIsGenerating(false);
|
|
5632
6128
|
}
|
|
5633
6129
|
};
|
|
@@ -5661,20 +6157,20 @@ const NotebookFooter = ({ notebookTracker, app }) => {
|
|
|
5661
6157
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "notebook-footer-container" },
|
|
5662
6158
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-container" },
|
|
5663
6159
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `input-wrapper ${isGenerating ? 'generating' : ''}` },
|
|
5664
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-icon-left" }, isGenerating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
5665
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", value: inputValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onKeyPress: handleKeyPress, onFocus: handleInputFocus, onBlur: handleInputBlur, placeholder:
|
|
6160
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-icon-left" }, isGenerating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_6__["default"], null)) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, "\u2726"))),
|
|
6161
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", value: inputValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onKeyPress: handleKeyPress, onFocus: handleInputFocus, onBlur: handleInputBlur, placeholder: getPlaceholder(), className: "prompt-input", autoComplete: "off", spellCheck: false, disabled: isGenerating || !isSignedUp }),
|
|
5666
6162
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-icons-right" },
|
|
5667
6163
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "input-action-button", onClick: handleInputSubmit, onMouseDown: (e) => e.stopPropagation() }, "\u25B6")))),
|
|
5668
6164
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-row" },
|
|
5669
6165
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => addCell('code'), className: "footer-button", onMouseDown: (e) => e.stopPropagation() },
|
|
5670
6166
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-content" },
|
|
5671
6167
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-icon" },
|
|
5672
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
6168
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotebookFooter_CodeIcon__WEBPACK_IMPORTED_MODULE_7__["default"], null)),
|
|
5673
6169
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Python"))),
|
|
5674
6170
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => addCell('markdown'), className: "footer-button", onMouseDown: (e) => e.stopPropagation() },
|
|
5675
6171
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-content" },
|
|
5676
6172
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-icon" },
|
|
5677
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
6173
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotebookFooter_TextIcon__WEBPACK_IMPORTED_MODULE_8__["default"], null)),
|
|
5678
6174
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Text"))))));
|
|
5679
6175
|
};
|
|
5680
6176
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotebookFooter);
|
|
@@ -7985,7 +8481,7 @@ const AttachFileButton = ({ onFileUploaded, notebookTracker }) => {
|
|
|
7985
8481
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { style: { position: 'relative' } },
|
|
7986
8482
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { ref: fileInputRef, type: "file", style: { display: 'none' }, onChange: handleFileSelect, accept: "*" }),
|
|
7987
8483
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_IconButton__WEBPACK_IMPORTED_MODULE_3__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_PaperClipIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null), title: isUploading ? 'Uploading...' : 'Attach File', onClick: handleClick, className: 'icon-button-hover', disabled: isUploading, style: {
|
|
7988
|
-
opacity:
|
|
8484
|
+
...(isUploading && { opacity: 0.5 }),
|
|
7989
8485
|
cursor: isUploading ? 'not-allowed' : 'pointer'
|
|
7990
8486
|
} })));
|
|
7991
8487
|
};
|
|
@@ -9159,8 +9655,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9159
9655
|
/* harmony export */ AppBuilderExcludeCellLabIcon: () => (/* binding */ AppBuilderExcludeCellLabIcon),
|
|
9160
9656
|
/* harmony export */ AppBuilderIncludeCellLabIcon: () => (/* binding */ AppBuilderIncludeCellLabIcon),
|
|
9161
9657
|
/* harmony export */ DeployLabIcon: () => (/* binding */ DeployLabIcon),
|
|
9658
|
+
/* harmony export */ EditLabIcon: () => (/* binding */ EditLabIcon),
|
|
9162
9659
|
/* harmony export */ NucleusLabIcon: () => (/* binding */ NucleusLabIcon),
|
|
9163
9660
|
/* harmony export */ OpenIndicatorLabIcon: () => (/* binding */ OpenIndicatorLabIcon),
|
|
9661
|
+
/* harmony export */ ResetCircleLabIcon: () => (/* binding */ ResetCircleLabIcon),
|
|
9164
9662
|
/* harmony export */ lightBulbLabIcon: () => (/* binding */ lightBulbLabIcon)
|
|
9165
9663
|
/* harmony export */ });
|
|
9166
9664
|
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components");
|
|
@@ -9171,6 +9669,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9171
9669
|
/* harmony import */ var _src_icons_AppBuilderExcludeCellIcon_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../src/icons/AppBuilderExcludeCellIcon.svg */ "./src/icons/AppBuilderExcludeCellIcon.svg");
|
|
9172
9670
|
/* harmony import */ var _src_icons_AppBuilderIncludeCellIcon_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../src/icons/AppBuilderIncludeCellIcon.svg */ "./src/icons/AppBuilderIncludeCellIcon.svg");
|
|
9173
9671
|
/* harmony import */ var _src_icons_App_DeployIcon_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../src/icons/App/DeployIcon.svg */ "./src/icons/App/DeployIcon.svg");
|
|
9672
|
+
/* harmony import */ var _src_icons_PencilIcon_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../src/icons/PencilIcon.svg */ "./src/icons/PencilIcon.svg");
|
|
9673
|
+
/* harmony import */ var _src_icons_ResetCircleIcon_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../src/icons/ResetCircleIcon.svg */ "./src/icons/ResetCircleIcon.svg");
|
|
9174
9674
|
/*
|
|
9175
9675
|
* Copyright (c) Saga Inc.
|
|
9176
9676
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -9182,6 +9682,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9182
9682
|
|
|
9183
9683
|
|
|
9184
9684
|
|
|
9685
|
+
|
|
9686
|
+
|
|
9185
9687
|
const lightBulbLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({
|
|
9186
9688
|
name: 'lightbulb-icon',
|
|
9187
9689
|
svgstr: _src_icons_LightbulbIcon_svg__WEBPACK_IMPORTED_MODULE_1__
|
|
@@ -9206,6 +9708,14 @@ const DeployLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__
|
|
|
9206
9708
|
name: 'deploy-icon',
|
|
9207
9709
|
svgstr: _src_icons_App_DeployIcon_svg__WEBPACK_IMPORTED_MODULE_6__
|
|
9208
9710
|
});
|
|
9711
|
+
const EditLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({
|
|
9712
|
+
name: 'edit-icon',
|
|
9713
|
+
svgstr: _src_icons_PencilIcon_svg__WEBPACK_IMPORTED_MODULE_7__
|
|
9714
|
+
});
|
|
9715
|
+
const ResetCircleLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({
|
|
9716
|
+
name: 'reset-circle-icon',
|
|
9717
|
+
svgstr: _src_icons_ResetCircleIcon_svg__WEBPACK_IMPORTED_MODULE_8__
|
|
9718
|
+
});
|
|
9209
9719
|
|
|
9210
9720
|
|
|
9211
9721
|
/***/ }),
|
|
@@ -9276,12 +9786,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9276
9786
|
|
|
9277
9787
|
__webpack_require__.r(__webpack_exports__);
|
|
9278
9788
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9789
|
+
/* harmony export */ getChatHistoryThread: () => (/* binding */ getChatHistoryThread),
|
|
9790
|
+
/* harmony export */ getChatHistoryThreads: () => (/* binding */ getChatHistoryThreads),
|
|
9279
9791
|
/* harmony export */ getDatabaseConnections: () => (/* binding */ getDatabaseConnections),
|
|
9280
9792
|
/* harmony export */ getRule: () => (/* binding */ getRule),
|
|
9281
9793
|
/* harmony export */ getRules: () => (/* binding */ getRules),
|
|
9282
9794
|
/* harmony export */ getSetting: () => (/* binding */ getSetting),
|
|
9795
|
+
/* harmony export */ getUserKey: () => (/* binding */ getUserKey),
|
|
9283
9796
|
/* harmony export */ logEvent: () => (/* binding */ logEvent),
|
|
9284
9797
|
/* harmony export */ setRule: () => (/* binding */ setRule),
|
|
9798
|
+
/* harmony export */ setUserKey: () => (/* binding */ setUserKey),
|
|
9285
9799
|
/* harmony export */ startStreamlitPreview: () => (/* binding */ startStreamlitPreview),
|
|
9286
9800
|
/* harmony export */ stopStreamlitPreview: () => (/* binding */ stopStreamlitPreview),
|
|
9287
9801
|
/* harmony export */ updateSettings: () => (/* binding */ updateSettings)
|
|
@@ -9291,6 +9805,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9291
9805
|
* Copyright (c) Saga Inc.
|
|
9292
9806
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9293
9807
|
*/
|
|
9808
|
+
|
|
9294
9809
|
/************************************
|
|
9295
9810
|
|
|
9296
9811
|
LOG ENDPOINTS
|
|
@@ -9313,7 +9828,6 @@ const logEvent = async (logEvent, params) => {
|
|
|
9313
9828
|
SETTINGS ENDPOINTS
|
|
9314
9829
|
|
|
9315
9830
|
************************************/
|
|
9316
|
-
|
|
9317
9831
|
const getSetting = async (settingsKey) => {
|
|
9318
9832
|
var _a;
|
|
9319
9833
|
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`settings/${settingsKey}`);
|
|
@@ -9379,10 +9893,14 @@ const getDatabaseConnections = async () => {
|
|
|
9379
9893
|
STREAMLIT PREVIEW ENDPOINTS
|
|
9380
9894
|
|
|
9381
9895
|
************************************/
|
|
9382
|
-
const startStreamlitPreview = async (notebookPath, force_recreate = false) => {
|
|
9896
|
+
const startStreamlitPreview = async (notebookPath, force_recreate = false, edit_prompt = '') => {
|
|
9383
9897
|
const response = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('streamlit-preview', {
|
|
9384
9898
|
method: 'POST',
|
|
9385
|
-
body: JSON.stringify({
|
|
9899
|
+
body: JSON.stringify({
|
|
9900
|
+
notebook_path: notebookPath,
|
|
9901
|
+
force_recreate: force_recreate,
|
|
9902
|
+
edit_prompt: edit_prompt
|
|
9903
|
+
})
|
|
9386
9904
|
});
|
|
9387
9905
|
if (response.error) {
|
|
9388
9906
|
throw new Error(response.error.message);
|
|
@@ -9397,6 +9915,44 @@ const stopStreamlitPreview = async (previewId) => {
|
|
|
9397
9915
|
throw new Error(response.error.message);
|
|
9398
9916
|
}
|
|
9399
9917
|
};
|
|
9918
|
+
/************************************
|
|
9919
|
+
|
|
9920
|
+
USER ENDPOINTS
|
|
9921
|
+
|
|
9922
|
+
************************************/
|
|
9923
|
+
const getUserKey = async (key) => {
|
|
9924
|
+
var _a;
|
|
9925
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`user/${key}`);
|
|
9926
|
+
if (resp.error) {
|
|
9927
|
+
throw new Error(resp.error.message);
|
|
9928
|
+
}
|
|
9929
|
+
return (_a = resp.data) === null || _a === void 0 ? void 0 : _a.value;
|
|
9930
|
+
};
|
|
9931
|
+
const setUserKey = async (key, value) => {
|
|
9932
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`user/${key}`, {
|
|
9933
|
+
method: 'PUT',
|
|
9934
|
+
body: JSON.stringify({ value: value }),
|
|
9935
|
+
});
|
|
9936
|
+
if (resp.error) {
|
|
9937
|
+
throw new Error(resp.error.message);
|
|
9938
|
+
}
|
|
9939
|
+
return resp.data || '';
|
|
9940
|
+
};
|
|
9941
|
+
const getChatHistoryThreads = async () => {
|
|
9942
|
+
var _a;
|
|
9943
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('chat-history/threads');
|
|
9944
|
+
if (resp.error) {
|
|
9945
|
+
throw new Error(resp.error.message);
|
|
9946
|
+
}
|
|
9947
|
+
return ((_a = resp.data) === null || _a === void 0 ? void 0 : _a.threads) || [];
|
|
9948
|
+
};
|
|
9949
|
+
const getChatHistoryThread = async (threadId) => {
|
|
9950
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`chat-history/threads/${threadId}`);
|
|
9951
|
+
if (resp.error) {
|
|
9952
|
+
throw new Error(resp.error.message);
|
|
9953
|
+
}
|
|
9954
|
+
return resp.data;
|
|
9955
|
+
};
|
|
9400
9956
|
|
|
9401
9957
|
|
|
9402
9958
|
/***/ }),
|
|
@@ -9565,7 +10121,7 @@ const acceptAndRunCellUpdate = async (cellUpdate, notebookPanel) => {
|
|
|
9565
10121
|
// gets the most up to date data.
|
|
9566
10122
|
await (0,_sleep__WEBPACK_IMPORTED_MODULE_2__.sleep)(1000);
|
|
9567
10123
|
};
|
|
9568
|
-
const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution,
|
|
10124
|
+
const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef) => {
|
|
9569
10125
|
var _a;
|
|
9570
10126
|
const cell = notebookPanel.content.activeCell;
|
|
9571
10127
|
// Note: If you update the max retries, update the message we display on each failure
|
|
@@ -9576,7 +10132,7 @@ const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMess
|
|
|
9576
10132
|
const MAX_RUN_ALL_CELLS_ATTEMPTS = 2; // Only allow two run_all_cells attempt per error cycle
|
|
9577
10133
|
while ((0,_notebook__WEBPACK_IMPORTED_MODULE_1__.didCellExecutionError)(cell) && attempts < MAX_RETRIES) {
|
|
9578
10134
|
if (!shouldContinueAgentExecution.current) {
|
|
9579
|
-
|
|
10135
|
+
await markAgentForStopping();
|
|
9580
10136
|
return 'interupted';
|
|
9581
10137
|
}
|
|
9582
10138
|
// If the code cell has an error, we need to send the error to the AI
|
|
@@ -10421,8 +10977,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10421
10977
|
* Copyright (c) Saga Inc.
|
|
10422
10978
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
10423
10979
|
*/
|
|
10424
|
-
const CLAUDE_SONNET_DISPLAY_NAME = 'Claude 4 Sonnet';
|
|
10425
|
-
const CLAUDE_SONNET_MODEL_NAME = 'claude-sonnet-4-
|
|
10980
|
+
const CLAUDE_SONNET_DISPLAY_NAME = 'Claude 4.5 Sonnet';
|
|
10981
|
+
const CLAUDE_SONNET_MODEL_NAME = 'claude-sonnet-4-5-20250929';
|
|
10426
10982
|
const GPT_4_1_DISPLAY_NAME = 'GPT 4.1';
|
|
10427
10983
|
const GPT_4_1_MODEL_NAME = 'gpt-4.1';
|
|
10428
10984
|
|
|
@@ -11062,6 +11618,117 @@ const isElectronBasedFrontend = () => {
|
|
|
11062
11618
|
};
|
|
11063
11619
|
|
|
11064
11620
|
|
|
11621
|
+
/***/ }),
|
|
11622
|
+
|
|
11623
|
+
/***/ "./lib/utils/userSignupEvents.js":
|
|
11624
|
+
/*!***************************************!*\
|
|
11625
|
+
!*** ./lib/utils/userSignupEvents.js ***!
|
|
11626
|
+
\***************************************/
|
|
11627
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11628
|
+
|
|
11629
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11630
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11631
|
+
/* harmony export */ userSignupEvents: () => (/* binding */ userSignupEvents)
|
|
11632
|
+
/* harmony export */ });
|
|
11633
|
+
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/signaling */ "webpack/sharing/consume/default/@lumino/signaling");
|
|
11634
|
+
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_0__);
|
|
11635
|
+
/*
|
|
11636
|
+
* Copyright (c) Saga Inc.
|
|
11637
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11638
|
+
*/
|
|
11639
|
+
|
|
11640
|
+
/**
|
|
11641
|
+
* Event emitter for user signup events
|
|
11642
|
+
*/
|
|
11643
|
+
class UserSignupEventEmitter {
|
|
11644
|
+
constructor() {
|
|
11645
|
+
this._signupSuccess = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__.Signal(this);
|
|
11646
|
+
}
|
|
11647
|
+
/**
|
|
11648
|
+
* Signal emitted when a user successfully signs up
|
|
11649
|
+
*/
|
|
11650
|
+
get signupSuccess() {
|
|
11651
|
+
return this._signupSuccess;
|
|
11652
|
+
}
|
|
11653
|
+
/**
|
|
11654
|
+
* Emit a signup success event
|
|
11655
|
+
*/
|
|
11656
|
+
emitSignupSuccess() {
|
|
11657
|
+
this._signupSuccess.emit();
|
|
11658
|
+
}
|
|
11659
|
+
}
|
|
11660
|
+
// Create a singleton instance
|
|
11661
|
+
const userSignupEvents = new UserSignupEventEmitter();
|
|
11662
|
+
|
|
11663
|
+
|
|
11664
|
+
/***/ }),
|
|
11665
|
+
|
|
11666
|
+
/***/ "./lib/utils/userSignupState.js":
|
|
11667
|
+
/*!**************************************!*\
|
|
11668
|
+
!*** ./lib/utils/userSignupState.js ***!
|
|
11669
|
+
\**************************************/
|
|
11670
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11671
|
+
|
|
11672
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11673
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11674
|
+
/* harmony export */ checkUserSignupState: () => (/* binding */ checkUserSignupState)
|
|
11675
|
+
/* harmony export */ });
|
|
11676
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
11677
|
+
/*
|
|
11678
|
+
* Copyright (c) Saga Inc.
|
|
11679
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11680
|
+
*/
|
|
11681
|
+
|
|
11682
|
+
/**
|
|
11683
|
+
* Determines if a user should be considered "signed up" based on:
|
|
11684
|
+
* 1. Having an email address, OR
|
|
11685
|
+
* 2. Having existing chat history threads
|
|
11686
|
+
*
|
|
11687
|
+
* This ensures consistent behavior across all components that need to check
|
|
11688
|
+
* if a user should have access to Mito AI features.
|
|
11689
|
+
*/
|
|
11690
|
+
const checkUserSignupState = async () => {
|
|
11691
|
+
try {
|
|
11692
|
+
// Check if user has an email address
|
|
11693
|
+
const userEmail = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__.getUserKey)('user_email');
|
|
11694
|
+
const hasEmail = userEmail !== "" && userEmail !== undefined;
|
|
11695
|
+
if (hasEmail) {
|
|
11696
|
+
return {
|
|
11697
|
+
isSignedUp: true,
|
|
11698
|
+
hasEmail: true,
|
|
11699
|
+
hasChatHistory: false
|
|
11700
|
+
};
|
|
11701
|
+
}
|
|
11702
|
+
// Check for existing chat history threads
|
|
11703
|
+
const chatThreads = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__.getChatHistoryThreads)();
|
|
11704
|
+
const hasThreads = chatThreads.length > 0;
|
|
11705
|
+
if (!hasThreads) {
|
|
11706
|
+
return {
|
|
11707
|
+
isSignedUp: false,
|
|
11708
|
+
hasEmail: false,
|
|
11709
|
+
hasChatHistory: false
|
|
11710
|
+
};
|
|
11711
|
+
}
|
|
11712
|
+
// Verify the first thread has actual content (not just default empty thread)
|
|
11713
|
+
const firstThread = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__.getChatHistoryThread)(chatThreads[0].thread_id);
|
|
11714
|
+
const hasActualChatHistory = firstThread.display_history.length > 0;
|
|
11715
|
+
return {
|
|
11716
|
+
isSignedUp: hasActualChatHistory,
|
|
11717
|
+
hasEmail: false,
|
|
11718
|
+
hasChatHistory: hasActualChatHistory
|
|
11719
|
+
};
|
|
11720
|
+
}
|
|
11721
|
+
catch (error) {
|
|
11722
|
+
console.error('Failed to check user signup state:', error);
|
|
11723
|
+
return {
|
|
11724
|
+
isSignedUp: false,
|
|
11725
|
+
hasEmail: false,
|
|
11726
|
+
hasChatHistory: false
|
|
11727
|
+
};
|
|
11728
|
+
}
|
|
11729
|
+
};
|
|
11730
|
+
|
|
11731
|
+
|
|
11065
11732
|
/***/ }),
|
|
11066
11733
|
|
|
11067
11734
|
/***/ "./lib/utils/version_check.js":
|
|
@@ -13076,7 +13743,21 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13076
13743
|
|
|
13077
13744
|
.cta-carousel-button {
|
|
13078
13745
|
margin-top: 8px;
|
|
13079
|
-
}
|
|
13746
|
+
}
|
|
13747
|
+
|
|
13748
|
+
.cta-logo-container {
|
|
13749
|
+
margin: 0 auto 8px;
|
|
13750
|
+
display: block;
|
|
13751
|
+
text-align: center;
|
|
13752
|
+
}
|
|
13753
|
+
|
|
13754
|
+
.cta-title {
|
|
13755
|
+
display: block;
|
|
13756
|
+
text-align: center;
|
|
13757
|
+
font-weight: bold;
|
|
13758
|
+
font-size: 20px;
|
|
13759
|
+
margin-bottom: 15px;
|
|
13760
|
+
}`, "",{"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":""}]);
|
|
13080
13761
|
// Exports
|
|
13081
13762
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13082
13763
|
|
|
@@ -13264,6 +13945,10 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13264
13945
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
13265
13946
|
}
|
|
13266
13947
|
|
|
13948
|
+
.chat-input-container.editing {
|
|
13949
|
+
margin-top: 0;
|
|
13950
|
+
}
|
|
13951
|
+
|
|
13267
13952
|
.chat-input-text-area-container {
|
|
13268
13953
|
position: relative;
|
|
13269
13954
|
height: min-content;
|
|
@@ -13275,7 +13960,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13275
13960
|
resize: none;
|
|
13276
13961
|
width: 100%;
|
|
13277
13962
|
padding: 10px;
|
|
13278
|
-
overflow-y:
|
|
13963
|
+
overflow-y: auto;
|
|
13279
13964
|
box-sizing: border-box;
|
|
13280
13965
|
flex-shrink: 0 !important;
|
|
13281
13966
|
background-color: var(--chat-user-message-background-color);
|
|
@@ -13344,7 +14029,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13344
14029
|
|
|
13345
14030
|
.context-button:disabled:hover {
|
|
13346
14031
|
background-color: var(--jp-layout-color2);
|
|
13347
|
-
}`, "",{"version":3,"sources":["webpack://./style/ChatInput.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,gBAAgB;EAChB,SAAS;EACT,cAAc;EACd,gBAAgB;EAChB,2DAA2D;EAC3D;;;iCAG+B;EAC/B,WAAW;EACX,mBAAmB;EACnB,iDAAiD;AACnD;;AAEA;EACE,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,aAAa;EACb,
|
|
14032
|
+
}`, "",{"version":3,"sources":["webpack://./style/ChatInput.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,gBAAgB;EAChB,SAAS;EACT,cAAc;EACd,gBAAgB;EAChB,2DAA2D;EAC3D;;;iCAG+B;EAC/B,WAAW;EACX,mBAAmB;EACnB,iDAAiD;AACnD;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,aAAa;EACb,gBAAgB;EAChB,sBAAsB;EACtB,yBAAyB;EACzB,2DAA2D;EAC3D,eAAe;EACf,gBAAgB;EAChB,qCAAqC;EACrC,gBAAgB;EAChB,iDAAiD;AACnD;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,2BAA2B;EAC3B;;;iCAG+B;AACjC;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,+BAA+B;EAC/B,2BAA2B;AAC7B;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,gBAAgB;EAChB,eAAe;EACf,yCAAyC;EACzC,eAAe;EACf,oCAAoC;EACpC,sCAAsC;AACxC;;AAEA;EACE,yCAAyC;AAC3C;;AAEA,0BAA0B;AAC1B;EACE,YAAY;EACZ,mBAAmB;EACnB,yCAAyC;AAC3C;;AAEA;EACE,YAAY;EACZ,mBAAmB;EACnB,yCAAyC;AAC3C;;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.chat-input-container {\n position: sticky;\n bottom: 0;\n margin: 10px 0;\n margin-top: auto;\n background-color: var(--chat-user-message-background-color);\n box-shadow: \n 0 4px 12px rgba(0, 0, 0, 0.08),\n 0 2px 4px rgba(0, 0, 0, 0.06),\n 0 0 0 1px rgba(0, 0, 0, 0.02);\n width: 100%;\n border-radius: 12px;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.chat-input-container.editing {\n margin-top: 0;\n}\n\n.chat-input-text-area-container {\n position: relative;\n height: min-content;\n}\n\n.chat-input {\n outline: none;\n border: none;\n resize: none;\n width: 100%;\n padding: 10px;\n overflow-y: auto;\n box-sizing: border-box;\n flex-shrink: 0 !important;\n background-color: var(--chat-user-message-background-color);\n font-size: 12px;\n font-weight: 400;\n font-family: var(--jp-ui-font-family);\n line-height: 1.2;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.active-cell-preview-container {\n padding: 10px;\n}\n\n.chat-input-container:focus-within {\n transform: translateY(-1px);\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.12),\n 0 8px 16px rgba(0, 0, 0, 0.08),\n 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n\n.chat-input:focus {\n color: var(--jp-ui-font-color1);\n}\n\n.chat-input::placeholder {\n color: var(--jp-ui-font-color2);\n transition: color 0.2s ease;\n}\n\n.chat-input:focus::placeholder {\n color: var(--jp-ui-font-color3);\n}\n\n.context-button {\n display: flex;\n align-items: center;\n background-color: var(--jp-layout-color2);\n border: 1px solid var(--jp-border-color1);\n border-radius: 3px;\n padding: 4px 8px;\n font-size: 12px;\n height: var(--chat-context-button-height);\n cursor: pointer;\n color: var(--jp-content-font-color1);\n transition: background-color 0.2s ease;\n}\n\n.context-button:hover {\n background-color: var(--jp-layout-color3);\n}\n\n/* Disabled state styles */\n.chat-input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n background-color: var(--jp-layout-color2);\n}\n\n.context-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n background-color: var(--jp-layout-color2);\n}\n\n.context-button:disabled:hover {\n background-color: var(--jp-layout-color2);\n}"],"sourceRoot":""}]);
|
|
13348
14033
|
// Exports
|
|
13349
14034
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13350
14035
|
|
|
@@ -13566,6 +14251,17 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13566
14251
|
container-type: inline-size;
|
|
13567
14252
|
}
|
|
13568
14253
|
|
|
14254
|
+
.chat-taskpane.disabled button:not(.signup-form-container):not(.signup-form-container *):not(.chat-taskpane-header-left):not(.chat-taskpane-header-left *) {
|
|
14255
|
+
opacity: 0.5;
|
|
14256
|
+
pointer-events: none;
|
|
14257
|
+
}
|
|
14258
|
+
|
|
14259
|
+
.chat-taskpane.disabled textarea:not(.signup-form-container):not(.signup-form-container *) {
|
|
14260
|
+
opacity: 0.5;
|
|
14261
|
+
pointer-events: none;
|
|
14262
|
+
cursor: not-allowed;
|
|
14263
|
+
}
|
|
14264
|
+
|
|
13569
14265
|
.suggestions-container {
|
|
13570
14266
|
max-width: 600px;
|
|
13571
14267
|
margin: 0 auto;
|
|
@@ -13758,7 +14454,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13758
14454
|
display: none;
|
|
13759
14455
|
}
|
|
13760
14456
|
}
|
|
13761
|
-
`, "",{"version":3,"sources":["webpack://./style/ChatTaskpane.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,sBAAsB;EACtB,YAAY;EACZ,yDAAyD;EACzD,6BAA6B;EAC7B,WAAW;EACX,sBAAsB;EACtB,kBAAkB;EAClB;;;;KAIG;EACH,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB;;;;GAIC;EACD,2BAA2B;AAC7B;;AAEA;EACE,gBAAgB;EAChB,cAAc;EACd,aAAa;EACb,2BAA2B;AAC7B;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;EACnB,iBAAiB;EACjB,mBAAmB;EACnB,gBAAgB;EAChB,2BAA2B;EAC3B,MAAM;EACN,sCAAsC;EACtC,8CAA8C;EAC9C,kDAAkD;EAClD,UAAU;EACV,wCAAwC;AAC1C;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,SAAS;AACX;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,OAAO;EACP,gBAAgB;EAChB,oBAAoB;EACpB,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,gBAAgB;EAChB,kBAAkB;EAClB,8BAA8B;EAC9B,aAAa;EACb,gCAAgC;EAChC,2BAA2B;EAC3B,iBAAiB;EACjB,kBAAkB;EAClB,cAAc,EAAE,qDAAqD;AACvE;;AAEA;EACE,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,cAAc;AAChB;;AAEA,+CAA+C;AAC/C;EACE;IACE,aAAa;EACf;AACF;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,QAAQ;EACR,mBAAmB;EACnB,2BAA2B;AAC7B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mCAAmC;EACnC,wBAAwB;EACxB,iBAAiB;AACnB;;AAEA;EACE,mCAAmC;EACnC,6CAA6C;AAC/C;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,aAAa;EACb,kBAAkB;EAClB,mBAAmB;EACnB,QAAQ;EACR,uBAAuB;AACzB;;AAEA;EACE,aAAa;EACb,QAAQ;EACR,WAAW;AACb;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,WAAW;EACX,UAAU;AACZ;;AAEA,yCAAyC;AACzC;EACE,aAAa;EACb,iBAAiB;EACjB,gBAAgB;EAChB,QAAQ;EACR,oBAAoB;EACpB,aAAa;EACb,sCAAsC;EACtC,iCAAiC;EACjC,mEAAmE;EACnE,oBAAoB;EACpB,sBAAsB;EACtB,4BAA4B;EAC5B,8BAA8B;AAChC;;AAEA,0CAA0C;AAC1C;EACE,yCAAyC;EACzC,+BAA+B;EAC/B,yCAAyC;EACzC,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,eAAe;EACf,6CAA6C;EAC7C,cAAc;EACd,kCAAkC;EAClC,mBAAmB;EACnB,kBAAkB;EAClB,4CAA4C;EAC5C,gBAAgB;EAChB,6BAA6B;EAC7B,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;AACzB;;AAEA;EACE,yCAAyC;AAC3C;;AAEA,iFAAiF;AACjF;EACE;IACE,aAAa;EACf;AACF","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.chat-taskpane {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--chat-background-color) !important;\n --jp-sidebar-min-width: 350px;\n width: 100%;\n box-sizing: border-box;\n overflow-y: hidden;\n /* \n Don't set padding on top from the taskpane so we can instead\n set the padding on the chat-taskpane-header instead to make \n sure the sticky header covers all of the content behind it. \n */\n padding-top: 0px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 10px;\n /*\n 'container-type: inline-size' enables container queries on this element.\n This allows child elements to use @container rules to react to the width of .chat-taskpane,\n rather than the viewport.\n */\n container-type: inline-size;\n}\n\n.suggestions-container {\n max-width: 600px;\n margin: 0 auto;\n display: flex;\n justify-content: flex-start;\n}\n\n.chat-taskpane-header {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-top: 10px;\n padding-bottom: 5px;\n position: sticky;\n /* Make the header sticky */\n top: 0;\n /* Stick to the top of the container */\n background-color: var(--chat-background-color);\n /* Ensure background color covers content behind */\n z-index: 1;\n /* Ensure it stays above other content */\n}\n\n.chat-taskpane-header-left {\n display: flex;\n gap: 8px;\n}\n\n.chat-taskpane-header-right {\n display: flex;\n gap: 8px;\n}\n\n.chat-taskpane-header-title {\n font-size: 14px;\n font-weight: bold;\n margin: 0;\n}\n\n.chat-taskpane-header-buttons {\n display: flex;\n gap: 8px;\n}\n\n.chat-messages {\n flex: 1;\n overflow-y: auto;\n padding-bottom: 10px;\n display: flex;\n flex-direction: column;\n}\n\n.chat-empty-message {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n min-height: 200px;\n max-height: 100%;\n text-align: center;\n color: var(--muted-text-color);\n padding: 20px;\n /* Add container query support */\n container-type: inline-size;\n user-select: none;\n overflow-y: hidden;\n margin: auto 0; /* This centers it vertically in the flex container */\n}\n\n.chat-empty-message .long-message {\n font-size: 16px;\n line-height: 1.5;\n max-width: 80%;\n margin: 0 auto;\n}\n\n/* Use container query instead of media query */\n@container (max-width: 300px) {\n .chat-empty-message .long-message {\n display: none;\n }\n}\n\n.chat-loading-message {\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n.chat-controls {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.chat-controls-left {\n display: flex;\n gap: 4px;\n align-items: center;\n justify-content: flex-start;\n}\n.chat-controls-left > * {\n margin: 0 !important;\n}\n.submit-button {\n background-color: var(--purple-400);\n color: var(--purple-700);\n padding: 2px 10px;\n}\n\n.submit-button:hover {\n background-color: var(--purple-500);\n transition: background-color 0.2s ease-in-out;\n}\n\n.stop-agent-button {\n margin-top: 8px;\n}\n\n.stop-agent-button-content {\n display: flex;\n text-align: center;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.agent-controls {\n display: flex;\n gap: 8px;\n width: 100%;\n}\n\n.agent-start-button {\n flex: 1;\n}\n\n.agent-cancel-button {\n width: 32px;\n padding: 0;\n}\n\n/* Add suggestion box container styling */\n.chat-suggestions {\n display: flex;\n flex-wrap: nowrap;\n overflow-x: auto;\n gap: 8px;\n padding-bottom: 16px;\n margin: 8px 0;\n /* smooth scrolling on touch devices */\n -webkit-overflow-scrolling: touch;\n /* Mask properties will be applied dynamically through JavaScript */\n mask-size: 100% 100%;\n mask-repeat: no-repeat;\n -webkit-mask-size: 100% 100%;\n -webkit-mask-repeat: no-repeat;\n}\n\n/* Add individual suggestion box styling */\n.suggestion-box {\n background-color: var(--jp-layout-color1);\n color: var(--jp-ui-font-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 16px;\n padding: 6px 12px;\n font-size: 14px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out;\n flex-shrink: 0;\n /* wrap text onto multiple lines */\n white-space: normal;\n text-align: center;\n /* limit width for wrapping into two lines */\n max-width: 140px;\n /* align content vertically */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.suggestion-box:hover {\n background-color: var(--jp-border-color2);\n}\n\n/* Hide the 'Submit' text in the submit button when the chat-taskpane is narrow */\n@container (max-width: 350px) {\n .submit-button .submit-text {\n display: none;\n }\n}\n"],"sourceRoot":""}]);
|
|
14457
|
+
`, "",{"version":3,"sources":["webpack://./style/ChatTaskpane.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,sBAAsB;EACtB,YAAY;EACZ,yDAAyD;EACzD,6BAA6B;EAC7B,WAAW;EACX,sBAAsB;EACtB,kBAAkB;EAClB;;;;KAIG;EACH,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB;;;;GAIC;EACD,2BAA2B;AAC7B;;AAEA;EACE,YAAY;EACZ,oBAAoB;AACtB;;AAEA;EACE,YAAY;EACZ,oBAAoB;EACpB,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,cAAc;EACd,aAAa;EACb,2BAA2B;AAC7B;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;EACnB,iBAAiB;EACjB,mBAAmB;EACnB,gBAAgB;EAChB,2BAA2B;EAC3B,MAAM;EACN,sCAAsC;EACtC,8CAA8C;EAC9C,kDAAkD;EAClD,UAAU;EACV,wCAAwC;AAC1C;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,SAAS;AACX;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,OAAO;EACP,gBAAgB;EAChB,oBAAoB;EACpB,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,gBAAgB;EAChB,kBAAkB;EAClB,8BAA8B;EAC9B,aAAa;EACb,gCAAgC;EAChC,2BAA2B;EAC3B,iBAAiB;EACjB,kBAAkB;EAClB,cAAc,EAAE,qDAAqD;AACvE;;AAEA;EACE,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,cAAc;AAChB;;AAEA,+CAA+C;AAC/C;EACE;IACE,aAAa;EACf;AACF;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,QAAQ;EACR,mBAAmB;EACnB,2BAA2B;AAC7B;AACA;EACE,oBAAoB;AACtB;AACA;EACE,mCAAmC;EACnC,wBAAwB;EACxB,iBAAiB;AACnB;;AAEA;EACE,mCAAmC;EACnC,6CAA6C;AAC/C;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,aAAa;EACb,kBAAkB;EAClB,mBAAmB;EACnB,QAAQ;EACR,uBAAuB;AACzB;;AAEA;EACE,aAAa;EACb,QAAQ;EACR,WAAW;AACb;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,WAAW;EACX,UAAU;AACZ;;AAEA,yCAAyC;AACzC;EACE,aAAa;EACb,iBAAiB;EACjB,gBAAgB;EAChB,QAAQ;EACR,oBAAoB;EACpB,aAAa;EACb,sCAAsC;EACtC,iCAAiC;EACjC,mEAAmE;EACnE,oBAAoB;EACpB,sBAAsB;EACtB,4BAA4B;EAC5B,8BAA8B;AAChC;;AAEA,0CAA0C;AAC1C;EACE,yCAAyC;EACzC,+BAA+B;EAC/B,yCAAyC;EACzC,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,eAAe;EACf,6CAA6C;EAC7C,cAAc;EACd,kCAAkC;EAClC,mBAAmB;EACnB,kBAAkB;EAClB,4CAA4C;EAC5C,gBAAgB;EAChB,6BAA6B;EAC7B,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;AACzB;;AAEA;EACE,yCAAyC;AAC3C;;AAEA,iFAAiF;AACjF;EACE;IACE,aAAa;EACf;AACF","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.chat-taskpane {\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--chat-background-color) !important;\n --jp-sidebar-min-width: 350px;\n width: 100%;\n box-sizing: border-box;\n overflow-y: hidden;\n /* \n Don't set padding on top from the taskpane so we can instead\n set the padding on the chat-taskpane-header instead to make \n sure the sticky header covers all of the content behind it. \n */\n padding-top: 0px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 10px;\n /*\n 'container-type: inline-size' enables container queries on this element.\n This allows child elements to use @container rules to react to the width of .chat-taskpane,\n rather than the viewport.\n */\n container-type: inline-size;\n}\n\n.chat-taskpane.disabled button:not(.signup-form-container):not(.signup-form-container *):not(.chat-taskpane-header-left):not(.chat-taskpane-header-left *) {\n opacity: 0.5;\n pointer-events: none;\n}\n\n.chat-taskpane.disabled textarea:not(.signup-form-container):not(.signup-form-container *) {\n opacity: 0.5;\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.suggestions-container {\n max-width: 600px;\n margin: 0 auto;\n display: flex;\n justify-content: flex-start;\n}\n\n.chat-taskpane-header {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-top: 10px;\n padding-bottom: 5px;\n position: sticky;\n /* Make the header sticky */\n top: 0;\n /* Stick to the top of the container */\n background-color: var(--chat-background-color);\n /* Ensure background color covers content behind */\n z-index: 1;\n /* Ensure it stays above other content */\n}\n\n.chat-taskpane-header-left {\n display: flex;\n gap: 8px;\n}\n\n.chat-taskpane-header-right {\n display: flex;\n gap: 8px;\n}\n\n.chat-taskpane-header-title {\n font-size: 14px;\n font-weight: bold;\n margin: 0;\n}\n\n.chat-taskpane-header-buttons {\n display: flex;\n gap: 8px;\n}\n\n.chat-messages {\n flex: 1;\n overflow-y: auto;\n padding-bottom: 10px;\n display: flex;\n flex-direction: column;\n}\n\n.chat-empty-message {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: auto;\n min-height: 200px;\n max-height: 100%;\n text-align: center;\n color: var(--muted-text-color);\n padding: 20px;\n /* Add container query support */\n container-type: inline-size;\n user-select: none;\n overflow-y: hidden;\n margin: auto 0; /* This centers it vertically in the flex container */\n}\n\n.chat-empty-message .long-message {\n font-size: 16px;\n line-height: 1.5;\n max-width: 80%;\n margin: 0 auto;\n}\n\n/* Use container query instead of media query */\n@container (max-width: 300px) {\n .chat-empty-message .long-message {\n display: none;\n }\n}\n\n.chat-loading-message {\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n.chat-controls {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.chat-controls-left {\n display: flex;\n gap: 4px;\n align-items: center;\n justify-content: flex-start;\n}\n.chat-controls-left > * {\n margin: 0 !important;\n}\n.submit-button {\n background-color: var(--purple-400);\n color: var(--purple-700);\n padding: 2px 10px;\n}\n\n.submit-button:hover {\n background-color: var(--purple-500);\n transition: background-color 0.2s ease-in-out;\n}\n\n.stop-agent-button {\n margin-top: 8px;\n}\n\n.stop-agent-button-content {\n display: flex;\n text-align: center;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n.agent-controls {\n display: flex;\n gap: 8px;\n width: 100%;\n}\n\n.agent-start-button {\n flex: 1;\n}\n\n.agent-cancel-button {\n width: 32px;\n padding: 0;\n}\n\n/* Add suggestion box container styling */\n.chat-suggestions {\n display: flex;\n flex-wrap: nowrap;\n overflow-x: auto;\n gap: 8px;\n padding-bottom: 16px;\n margin: 8px 0;\n /* smooth scrolling on touch devices */\n -webkit-overflow-scrolling: touch;\n /* Mask properties will be applied dynamically through JavaScript */\n mask-size: 100% 100%;\n mask-repeat: no-repeat;\n -webkit-mask-size: 100% 100%;\n -webkit-mask-repeat: no-repeat;\n}\n\n/* Add individual suggestion box styling */\n.suggestion-box {\n background-color: var(--jp-layout-color1);\n color: var(--jp-ui-font-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 16px;\n padding: 6px 12px;\n font-size: 14px;\n cursor: pointer;\n transition: background-color 0.2s ease-in-out;\n flex-shrink: 0;\n /* wrap text onto multiple lines */\n white-space: normal;\n text-align: center;\n /* limit width for wrapping into two lines */\n max-width: 140px;\n /* align content vertically */\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.suggestion-box:hover {\n background-color: var(--jp-border-color2);\n}\n\n/* Hide the 'Submit' text in the submit button when the chat-taskpane is narrow */\n@container (max-width: 350px) {\n .submit-button .submit-text {\n display: none;\n }\n}\n"],"sourceRoot":""}]);
|
|
13762
14458
|
// Exports
|
|
13763
14459
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13764
14460
|
|
|
@@ -14452,6 +15148,111 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14452
15148
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
14453
15149
|
|
|
14454
15150
|
|
|
15151
|
+
/***/ }),
|
|
15152
|
+
|
|
15153
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/EditAppDropdown.css":
|
|
15154
|
+
/*!*************************************************************************!*\
|
|
15155
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/EditAppDropdown.css ***!
|
|
15156
|
+
\*************************************************************************/
|
|
15157
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
15158
|
+
|
|
15159
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15160
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15161
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15162
|
+
/* harmony export */ });
|
|
15163
|
+
/* 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");
|
|
15164
|
+
/* 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__);
|
|
15165
|
+
/* 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");
|
|
15166
|
+
/* 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__);
|
|
15167
|
+
// Imports
|
|
15168
|
+
|
|
15169
|
+
|
|
15170
|
+
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()));
|
|
15171
|
+
// Module
|
|
15172
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
15173
|
+
* Copyright (c) Saga Inc.
|
|
15174
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
15175
|
+
*/
|
|
15176
|
+
|
|
15177
|
+
/* UpdateAppDropdown Styles */
|
|
15178
|
+
|
|
15179
|
+
.update-app-dropdown {
|
|
15180
|
+
position: absolute;
|
|
15181
|
+
top: 100%;
|
|
15182
|
+
left: 0;
|
|
15183
|
+
z-index: 1000;
|
|
15184
|
+
background-color: var(--jp-layout-color1);
|
|
15185
|
+
border: 1px solid var(--jp-border-color1);
|
|
15186
|
+
border-radius: 3px;
|
|
15187
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
15188
|
+
min-width: 300px;
|
|
15189
|
+
max-width: 500px;
|
|
15190
|
+
}
|
|
15191
|
+
|
|
15192
|
+
.update-app-dropdown-content {
|
|
15193
|
+
padding: 12px;
|
|
15194
|
+
}
|
|
15195
|
+
|
|
15196
|
+
.update-app-dropdown-label {
|
|
15197
|
+
display: block;
|
|
15198
|
+
margin-bottom: 8px;
|
|
15199
|
+
font-weight: 500;
|
|
15200
|
+
color: var(--jp-ui-font-color1);
|
|
15201
|
+
font-size: var(--jp-ui-font-size1);
|
|
15202
|
+
}
|
|
15203
|
+
|
|
15204
|
+
.update-app-dropdown-textarea {
|
|
15205
|
+
width: 100%;
|
|
15206
|
+
min-height: 100px;
|
|
15207
|
+
padding: 8px;
|
|
15208
|
+
border: 1px solid var(--jp-border-color1);
|
|
15209
|
+
border-radius: 3px;
|
|
15210
|
+
font-family: var(--jp-ui-font-family);
|
|
15211
|
+
font-size: var(--jp-ui-font-size1);
|
|
15212
|
+
resize: vertical;
|
|
15213
|
+
box-sizing: border-box;
|
|
15214
|
+
background-color: var(--jp-input-background);
|
|
15215
|
+
color: var(--jp-ui-font-color1);
|
|
15216
|
+
}
|
|
15217
|
+
|
|
15218
|
+
.update-app-dropdown-buttons {
|
|
15219
|
+
display: flex;
|
|
15220
|
+
justify-content: flex-end;
|
|
15221
|
+
gap: 8px;
|
|
15222
|
+
margin-top: 12px;
|
|
15223
|
+
}
|
|
15224
|
+
|
|
15225
|
+
.update-app-dropdown-button {
|
|
15226
|
+
padding: 4px 8px;
|
|
15227
|
+
border: none;
|
|
15228
|
+
border-radius: 3px;
|
|
15229
|
+
cursor: pointer;
|
|
15230
|
+
font-family: var(--jp-ui-font-family);
|
|
15231
|
+
font-size: var(--jp-ui-font-size0);
|
|
15232
|
+
}
|
|
15233
|
+
|
|
15234
|
+
.update-app-dropdown-button-cancel {
|
|
15235
|
+
background-color: var(--jp-layout-color2);
|
|
15236
|
+
color: var(--jp-ui-font-color1);
|
|
15237
|
+
}
|
|
15238
|
+
|
|
15239
|
+
.update-app-dropdown-button-submit {
|
|
15240
|
+
|
|
15241
|
+
background-color: var(--purple-300);
|
|
15242
|
+
color: var(--purple-700);
|
|
15243
|
+
cursor: pointer;
|
|
15244
|
+
}
|
|
15245
|
+
|
|
15246
|
+
.update-app-dropdown-button-submit.disabled {
|
|
15247
|
+
background-color: var(--jp-layout-color2);
|
|
15248
|
+
color: var(--jp-ui-font-color2);
|
|
15249
|
+
cursor: not-allowed;
|
|
15250
|
+
}
|
|
15251
|
+
`, "",{"version":3,"sources":["webpack://./style/EditAppDropdown.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,6BAA6B;;AAE7B;IACI,kBAAkB;IAClB,SAAS;IACT,OAAO;IACP,aAAa;IACb,yCAAyC;IACzC,yCAAyC;IACzC,kBAAkB;IAClB,yCAAyC;IACzC,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,+BAA+B;IAC/B,kCAAkC;AACtC;;AAEA;IACI,WAAW;IACX,iBAAiB;IACjB,YAAY;IACZ,yCAAyC;IACzC,kBAAkB;IAClB,qCAAqC;IACrC,kCAAkC;IAClC,gBAAgB;IAChB,sBAAsB;IACtB,4CAA4C;IAC5C,+BAA+B;AACnC;;AAEA;IACI,aAAa;IACb,yBAAyB;IACzB,QAAQ;IACR,gBAAgB;AACpB;;AAEA;IACI,gBAAgB;IAChB,YAAY;IACZ,kBAAkB;IAClB,eAAe;IACf,qCAAqC;IACrC,kCAAkC;AACtC;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;AACnC;;AAEA;;IAEI,mCAAmC;IACnC,wBAAwB;IACxB,eAAe;AACnB;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;IAC/B,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/* UpdateAppDropdown Styles */\n\n.update-app-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color1);\n border-radius: 3px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n min-width: 300px;\n max-width: 500px;\n}\n\n.update-app-dropdown-content {\n padding: 12px;\n}\n\n.update-app-dropdown-label {\n display: block;\n margin-bottom: 8px;\n font-weight: 500;\n color: var(--jp-ui-font-color1);\n font-size: var(--jp-ui-font-size1);\n}\n\n.update-app-dropdown-textarea {\n width: 100%;\n min-height: 100px;\n padding: 8px;\n border: 1px solid var(--jp-border-color1);\n border-radius: 3px;\n font-family: var(--jp-ui-font-family);\n font-size: var(--jp-ui-font-size1);\n resize: vertical;\n box-sizing: border-box;\n background-color: var(--jp-input-background);\n color: var(--jp-ui-font-color1);\n}\n\n.update-app-dropdown-buttons {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 12px;\n}\n\n.update-app-dropdown-button {\n padding: 4px 8px;\n border: none;\n border-radius: 3px;\n cursor: pointer;\n font-family: var(--jp-ui-font-family);\n font-size: var(--jp-ui-font-size0);\n}\n\n.update-app-dropdown-button-cancel {\n background-color: var(--jp-layout-color2);\n color: var(--jp-ui-font-color1);\n}\n\n.update-app-dropdown-button-submit {\n \n background-color: var(--purple-300);\n color: var(--purple-700);\n cursor: pointer;\n}\n\n.update-app-dropdown-button-submit.disabled {\n background-color: var(--jp-layout-color2);\n color: var(--jp-ui-font-color2);\n cursor: not-allowed;\n}\n"],"sourceRoot":""}]);
|
|
15252
|
+
// Exports
|
|
15253
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
15254
|
+
|
|
15255
|
+
|
|
14455
15256
|
/***/ }),
|
|
14456
15257
|
|
|
14457
15258
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ErrorFixupToolUI.css":
|
|
@@ -14619,10 +15420,10 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14619
15420
|
|
|
14620
15421
|
/***/ }),
|
|
14621
15422
|
|
|
14622
|
-
/***/ "./node_modules/css-loader/dist/cjs.js!./style/
|
|
14623
|
-
|
|
14624
|
-
!*** ./node_modules/css-loader/dist/cjs.js!./style/
|
|
14625
|
-
|
|
15423
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/FilesSelector.css":
|
|
15424
|
+
/*!***********************************************************************!*\
|
|
15425
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/FilesSelector.css ***!
|
|
15426
|
+
\***********************************************************************/
|
|
14626
15427
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
14627
15428
|
|
|
14628
15429
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14643,36 +15444,172 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14643
15444
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
14644
15445
|
*/
|
|
14645
15446
|
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
background-color: transparent;
|
|
14652
|
-
border: none;
|
|
14653
|
-
cursor: pointer;
|
|
14654
|
-
position: relative;
|
|
15447
|
+
|
|
15448
|
+
.file-list {
|
|
15449
|
+
list-style: none;
|
|
15450
|
+
padding-left: 0;
|
|
15451
|
+
margin: 0;
|
|
14655
15452
|
}
|
|
14656
15453
|
|
|
14657
|
-
.
|
|
14658
|
-
|
|
15454
|
+
.file-list li {
|
|
15455
|
+
margin-bottom: 6px;
|
|
14659
15456
|
}
|
|
14660
15457
|
|
|
14661
|
-
.
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
width: 8px;
|
|
14666
|
-
height: 8px;
|
|
14667
|
-
border-radius: 50%;
|
|
14668
|
-
border: 1px solid white;
|
|
15458
|
+
.modal-footer {
|
|
15459
|
+
margin-top: 16px;
|
|
15460
|
+
display: flex;
|
|
15461
|
+
justify-content: flex-end;
|
|
14669
15462
|
}
|
|
14670
15463
|
|
|
14671
|
-
.
|
|
14672
|
-
|
|
15464
|
+
.files-selector-submit-button {
|
|
15465
|
+
margin-top: 8px;
|
|
15466
|
+
background-color: var(--purple-400) !important;
|
|
15467
|
+
color: var(--purple-700) !important;
|
|
15468
|
+
border: none !important;
|
|
15469
|
+
border-radius: 4px !important;
|
|
15470
|
+
font-weight: 500 !important;
|
|
15471
|
+
padding: 8px 16px !important;
|
|
15472
|
+
width: 100% !important;
|
|
15473
|
+
max-width: 100% !important;
|
|
15474
|
+
box-sizing: border-box !important;
|
|
14673
15475
|
}
|
|
14674
15476
|
|
|
14675
|
-
.
|
|
15477
|
+
.files-selector-submit-button:hover {
|
|
15478
|
+
background-color: var(--purple-500) !important;
|
|
15479
|
+
}
|
|
15480
|
+
|
|
15481
|
+
.file-list input[type="checkbox"],
|
|
15482
|
+
.select-all input[type="checkbox"]{
|
|
15483
|
+
transform: scale(1.3);
|
|
15484
|
+
margin-right: 6px;
|
|
15485
|
+
accent-color: var(--purple-500);
|
|
15486
|
+
}
|
|
15487
|
+
|
|
15488
|
+
.file-list svg {
|
|
15489
|
+
color: grey;
|
|
15490
|
+
margin-right: 4px;
|
|
15491
|
+
vertical-align: middle;
|
|
15492
|
+
}
|
|
15493
|
+
|
|
15494
|
+
.select-all label {
|
|
15495
|
+
font-weight: 500;
|
|
15496
|
+
display: flex;
|
|
15497
|
+
align-items: center;
|
|
15498
|
+
gap: 6px;
|
|
15499
|
+
}
|
|
15500
|
+
|
|
15501
|
+
/* Modal header */
|
|
15502
|
+
.modal-header {
|
|
15503
|
+
display: flex;
|
|
15504
|
+
align-items: center;
|
|
15505
|
+
justify-content: space-between;
|
|
15506
|
+
gap: 8px;
|
|
15507
|
+
margin-bottom: 1px;
|
|
15508
|
+
}
|
|
15509
|
+
|
|
15510
|
+
.modal-title {
|
|
15511
|
+
margin: 0;
|
|
15512
|
+
font-size: 1.2rem;
|
|
15513
|
+
}
|
|
15514
|
+
|
|
15515
|
+
|
|
15516
|
+
.modal-subtext {
|
|
15517
|
+
font-size: 0.7rem;
|
|
15518
|
+
color: #555;
|
|
15519
|
+
margin: 0;
|
|
15520
|
+
font-style: italic;
|
|
15521
|
+
}
|
|
15522
|
+
|
|
15523
|
+
.modal-subheader{
|
|
15524
|
+
margin-bottom: 7px;
|
|
15525
|
+
}
|
|
15526
|
+
|
|
15527
|
+
/* Checkbox label for spacing */
|
|
15528
|
+
.checkbox-label {
|
|
15529
|
+
display: flex;
|
|
15530
|
+
align-items: center;
|
|
15531
|
+
gap: 6px;
|
|
15532
|
+
}
|
|
15533
|
+
|
|
15534
|
+
/* Scrollable file list */
|
|
15535
|
+
.file-list-scrollable {
|
|
15536
|
+
max-height: 300px;
|
|
15537
|
+
overflow-y: auto;
|
|
15538
|
+
margin-top: 8px;
|
|
15539
|
+
}
|
|
15540
|
+
|
|
15541
|
+
/* File list items */
|
|
15542
|
+
.file-list {
|
|
15543
|
+
list-style: none;
|
|
15544
|
+
padding-left: 0;
|
|
15545
|
+
margin: 0;
|
|
15546
|
+
}
|
|
15547
|
+
|
|
15548
|
+
/* Select all section */
|
|
15549
|
+
.files-selector-select-all {
|
|
15550
|
+
margin-bottom: 8px;
|
|
15551
|
+
}
|
|
15552
|
+
`, "",{"version":3,"sources":["webpack://./style/FilesSelector.css"],"names":[],"mappings":"AAAA;;;EAGE;;;AAGF;EACE,gBAAgB;EAChB,eAAe;EACf,SAAS;AACX;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;EAChB,aAAa;EACb,yBAAyB;AAC3B;;AAEA;EACE,eAAe;EACf,8CAA8C;EAC9C,mCAAmC;EACnC,uBAAuB;EACvB,6BAA6B;EAC7B,2BAA2B;EAC3B,4BAA4B;EAC5B,sBAAsB;EACtB,0BAA0B;EAC1B,iCAAiC;AACnC;;AAEA;EACE,8CAA8C;AAChD;;AAEA;;EAEE,qBAAqB;EACrB,iBAAiB;EACjB,+BAA+B;AACjC;;AAEA;EACE,WAAW;EACX,iBAAiB;EACjB,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,QAAQ;AACV;;AAEA,iBAAiB;AACjB;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,QAAQ;EACR,kBAAkB;AACpB;;AAEA;EACE,SAAS;EACT,iBAAiB;AACnB;;;AAGA;EACE,iBAAiB;EACjB,WAAW;EACX,SAAS;EACT,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA,+BAA+B;AAC/B;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;AACV;;AAEA,yBAAyB;AACzB;EACE,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;AACjB;;AAEA,oBAAoB;AACpB;EACE,gBAAgB;EAChB,eAAe;EACf,SAAS;AACX;;AAEA,uBAAuB;AACvB;EACE,kBAAkB;AACpB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n\n.file-list {\n list-style: none;\n padding-left: 0;\n margin: 0;\n}\n\n.file-list li {\n margin-bottom: 6px;\n}\n\n.modal-footer {\n margin-top: 16px;\n display: flex;\n justify-content: flex-end;\n}\n\n.files-selector-submit-button {\n margin-top: 8px;\n background-color: var(--purple-400) !important;\n color: var(--purple-700) !important;\n border: none !important;\n border-radius: 4px !important;\n font-weight: 500 !important;\n padding: 8px 16px !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n}\n\n.files-selector-submit-button:hover {\n background-color: var(--purple-500) !important;\n}\n\n.file-list input[type=\"checkbox\"],\n.select-all input[type=\"checkbox\"]{\n transform: scale(1.3);\n margin-right: 6px;\n accent-color: var(--purple-500);\n}\n\n.file-list svg {\n color: grey;\n margin-right: 4px;\n vertical-align: middle;\n}\n\n.select-all label {\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Modal header */\n.modal-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 1px;\n}\n\n.modal-title {\n margin: 0;\n font-size: 1.2rem;\n}\n\n\n.modal-subtext {\n font-size: 0.7rem;\n color: #555;\n margin: 0;\n font-style: italic;\n}\n\n.modal-subheader{\n margin-bottom: 7px;\n}\n\n/* Checkbox label for spacing */\n.checkbox-label {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Scrollable file list */\n.file-list-scrollable {\n max-height: 300px;\n overflow-y: auto;\n margin-top: 8px;\n}\n\n/* File list items */\n.file-list {\n list-style: none;\n padding-left: 0;\n margin: 0;\n}\n\n/* Select all section */\n.files-selector-select-all {\n margin-bottom: 8px;\n}\n"],"sourceRoot":""}]);
|
|
15553
|
+
// Exports
|
|
15554
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
15555
|
+
|
|
15556
|
+
|
|
15557
|
+
/***/ }),
|
|
15558
|
+
|
|
15559
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/IconButton.css":
|
|
15560
|
+
/*!********************************************************************!*\
|
|
15561
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/IconButton.css ***!
|
|
15562
|
+
\********************************************************************/
|
|
15563
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
15564
|
+
|
|
15565
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15566
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15567
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15568
|
+
/* harmony export */ });
|
|
15569
|
+
/* 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");
|
|
15570
|
+
/* 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__);
|
|
15571
|
+
/* 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");
|
|
15572
|
+
/* 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__);
|
|
15573
|
+
// Imports
|
|
15574
|
+
|
|
15575
|
+
|
|
15576
|
+
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()));
|
|
15577
|
+
// Module
|
|
15578
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
15579
|
+
* Copyright (c) Saga Inc.
|
|
15580
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
15581
|
+
*/
|
|
15582
|
+
|
|
15583
|
+
.icon-button {
|
|
15584
|
+
display: flex;
|
|
15585
|
+
align-items: center;
|
|
15586
|
+
text-align: center;
|
|
15587
|
+
justify-content: center;
|
|
15588
|
+
background-color: transparent;
|
|
15589
|
+
border: none;
|
|
15590
|
+
cursor: pointer;
|
|
15591
|
+
position: relative;
|
|
15592
|
+
}
|
|
15593
|
+
|
|
15594
|
+
.icon-button-hover:hover {
|
|
15595
|
+
background-color: var(--jp-layout-color3);
|
|
15596
|
+
}
|
|
15597
|
+
|
|
15598
|
+
.notification-dot {
|
|
15599
|
+
position: absolute;
|
|
15600
|
+
top: -1px;
|
|
15601
|
+
right: 1px;
|
|
15602
|
+
width: 8px;
|
|
15603
|
+
height: 8px;
|
|
15604
|
+
border-radius: 50%;
|
|
15605
|
+
border: 1px solid white;
|
|
15606
|
+
}
|
|
15607
|
+
|
|
15608
|
+
.notification-dot-success {
|
|
15609
|
+
background-color: var(--green-600);
|
|
15610
|
+
}
|
|
15611
|
+
|
|
15612
|
+
.notification-dot-warning {
|
|
14676
15613
|
background-color: var(--yellow-600);
|
|
14677
15614
|
}`, "",{"version":3,"sources":["webpack://./style/IconButton.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,mBAAmB;EACnB,kBAAkB;EAClB,uBAAuB;EACvB,6BAA6B;EAC7B,YAAY;EACZ,eAAe;EACf,kBAAkB;AACpB;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,uBAAuB;AACzB;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,mCAAmC;AACrC","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.icon-button {\n display: flex;\n align-items: center;\n text-align: center;\n justify-content: center;\n background-color: transparent;\n border: none;\n cursor: pointer;\n position: relative;\n}\n\n.icon-button-hover:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.notification-dot {\n position: absolute;\n top: -1px;\n right: 1px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n border: 1px solid white;\n}\n\n.notification-dot-success {\n background-color: var(--green-600);\n}\n\n.notification-dot-warning {\n background-color: var(--yellow-600);\n}"],"sourceRoot":""}]);
|
|
14678
15615
|
// Exports
|
|
@@ -16005,6 +16942,107 @@ a {
|
|
|
16005
16942
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16006
16943
|
|
|
16007
16944
|
|
|
16945
|
+
/***/ }),
|
|
16946
|
+
|
|
16947
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/SignUpForm.css":
|
|
16948
|
+
/*!********************************************************************!*\
|
|
16949
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/SignUpForm.css ***!
|
|
16950
|
+
\********************************************************************/
|
|
16951
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
16952
|
+
|
|
16953
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16954
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16955
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16956
|
+
/* harmony export */ });
|
|
16957
|
+
/* 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");
|
|
16958
|
+
/* 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__);
|
|
16959
|
+
/* 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");
|
|
16960
|
+
/* 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__);
|
|
16961
|
+
// Imports
|
|
16962
|
+
|
|
16963
|
+
|
|
16964
|
+
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()));
|
|
16965
|
+
// Module
|
|
16966
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
16967
|
+
* Copyright (c) Saga Inc.
|
|
16968
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
16969
|
+
*/
|
|
16970
|
+
|
|
16971
|
+
.signup-form-header {
|
|
16972
|
+
display: block;
|
|
16973
|
+
text-align: center;
|
|
16974
|
+
font-weight: bold;
|
|
16975
|
+
font-size: 20px;
|
|
16976
|
+
margin-bottom: 15px;
|
|
16977
|
+
color: var(--jp-ui-font-color0);
|
|
16978
|
+
}
|
|
16979
|
+
|
|
16980
|
+
.signup-form-header-logo {
|
|
16981
|
+
margin: 0 auto 8px;
|
|
16982
|
+
display: block;
|
|
16983
|
+
text-align: center;
|
|
16984
|
+
}
|
|
16985
|
+
|
|
16986
|
+
.signup-form-message {
|
|
16987
|
+
font-size: 14px;
|
|
16988
|
+
color: var(--jp-ui-font-color1);
|
|
16989
|
+
}
|
|
16990
|
+
|
|
16991
|
+
/* Form container to control layout */
|
|
16992
|
+
.signup-form-container form {
|
|
16993
|
+
display: flex;
|
|
16994
|
+
flex-wrap: wrap;
|
|
16995
|
+
gap: 8px;
|
|
16996
|
+
align-items: flex-start;
|
|
16997
|
+
}
|
|
16998
|
+
|
|
16999
|
+
.signup-form-input {
|
|
17000
|
+
padding: 8px 12px;
|
|
17001
|
+
border: 1px solid var(--jp-border-color1);
|
|
17002
|
+
border-radius: var(--jp-border-radius);
|
|
17003
|
+
flex: 2;
|
|
17004
|
+
min-width: 200px;
|
|
17005
|
+
margin-bottom: 0;
|
|
17006
|
+
height: 36px;
|
|
17007
|
+
box-sizing: border-box;
|
|
17008
|
+
}
|
|
17009
|
+
|
|
17010
|
+
.signup-form-input:focus {
|
|
17011
|
+
border-color: var(--purple-600);
|
|
17012
|
+
outline: none;
|
|
17013
|
+
}
|
|
17014
|
+
|
|
17015
|
+
.signup-form-button {
|
|
17016
|
+
height: 36px;
|
|
17017
|
+
box-sizing: border-box;
|
|
17018
|
+
background-color: var(--purple-700);
|
|
17019
|
+
color: white;
|
|
17020
|
+
flex: 1;
|
|
17021
|
+
}
|
|
17022
|
+
|
|
17023
|
+
.signup-form-button:hover {
|
|
17024
|
+
background-color: var(--purple-600);
|
|
17025
|
+
}
|
|
17026
|
+
|
|
17027
|
+
/* When the form wraps, make button full width */
|
|
17028
|
+
@media (max-width: 300px) {
|
|
17029
|
+
.signup-form-container form {
|
|
17030
|
+
flex-direction: column;
|
|
17031
|
+
}
|
|
17032
|
+
|
|
17033
|
+
.signup-form-input {
|
|
17034
|
+
width: 100%;
|
|
17035
|
+
min-width: unset;
|
|
17036
|
+
}
|
|
17037
|
+
|
|
17038
|
+
.signup-form-button {
|
|
17039
|
+
width: 100%;
|
|
17040
|
+
}
|
|
17041
|
+
}`, "",{"version":3,"sources":["webpack://./style/SignUpForm.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,+BAA+B;AACnC;;AAEA;IACI,kBAAkB;IAClB,cAAc;IACd,kBAAkB;AACtB;;AAEA;IACI,eAAe;IACf,+BAA+B;AACnC;;AAEA,qCAAqC;AACrC;IACI,aAAa;IACb,eAAe;IACf,QAAQ;IACR,uBAAuB;AAC3B;;AAEA;IACI,iBAAiB;IACjB,yCAAyC;IACzC,sCAAsC;IACtC,OAAO;IACP,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,sBAAsB;AAC1B;;AAEA;IACI,+BAA+B;IAC/B,aAAa;AACjB;;AAEA;IACI,YAAY;IACZ,sBAAsB;IACtB,mCAAmC;IACnC,YAAY;IACZ,OAAO;AACX;;AAEA;IACI,mCAAmC;AACvC;;AAEA,gDAAgD;AAChD;IACI;QACI,sBAAsB;IAC1B;;IAEA;QACI,WAAW;QACX,gBAAgB;IACpB;;IAEA;QACI,WAAW;IACf;AACJ","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.signup-form-header {\n display: block;\n text-align: center;\n font-weight: bold;\n font-size: 20px;\n margin-bottom: 15px;\n color: var(--jp-ui-font-color0);\n}\n\n.signup-form-header-logo {\n margin: 0 auto 8px;\n display: block;\n text-align: center;\n}\n\n.signup-form-message {\n font-size: 14px;\n color: var(--jp-ui-font-color1);\n}\n\n/* Form container to control layout */\n.signup-form-container form {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: flex-start;\n}\n\n.signup-form-input {\n padding: 8px 12px;\n border: 1px solid var(--jp-border-color1);\n border-radius: var(--jp-border-radius);\n flex: 2;\n min-width: 200px;\n margin-bottom: 0;\n height: 36px;\n box-sizing: border-box;\n}\n\n.signup-form-input:focus {\n border-color: var(--purple-600);\n outline: none;\n}\n\n.signup-form-button {\n height: 36px;\n box-sizing: border-box;\n background-color: var(--purple-700);\n color: white;\n flex: 1;\n}\n\n.signup-form-button:hover {\n background-color: var(--purple-600);\n}\n\n/* When the form wraps, make button full width */\n@media (max-width: 300px) {\n .signup-form-container form {\n flex-direction: column;\n }\n \n .signup-form-input {\n width: 100%;\n min-width: unset;\n }\n \n .signup-form-button {\n width: 100%;\n }\n}"],"sourceRoot":""}]);
|
|
17042
|
+
// Exports
|
|
17043
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17044
|
+
|
|
17045
|
+
|
|
16008
17046
|
/***/ }),
|
|
16009
17047
|
|
|
16010
17048
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/StreamlitPreviewPlugin.css":
|
|
@@ -16413,6 +17451,26 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"5\" viewBox=
|
|
|
16413
17451
|
|
|
16414
17452
|
/***/ }),
|
|
16415
17453
|
|
|
17454
|
+
/***/ "./src/icons/PencilIcon.svg":
|
|
17455
|
+
/*!**********************************!*\
|
|
17456
|
+
!*** ./src/icons/PencilIcon.svg ***!
|
|
17457
|
+
\**********************************/
|
|
17458
|
+
/***/ ((module) => {
|
|
17459
|
+
|
|
17460
|
+
module.exports = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill='currentColor'>\n <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\" />\n </g>\n</svg>";
|
|
17461
|
+
|
|
17462
|
+
/***/ }),
|
|
17463
|
+
|
|
17464
|
+
/***/ "./src/icons/ResetCircleIcon.svg":
|
|
17465
|
+
/*!***************************************!*\
|
|
17466
|
+
!*** ./src/icons/ResetCircleIcon.svg ***!
|
|
17467
|
+
\***************************************/
|
|
17468
|
+
/***/ ((module) => {
|
|
17469
|
+
|
|
17470
|
+
module.exports = "<svg width=\"33\" height=\"33\" viewBox=\"0 0 33 33\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"currentColor\">\n <path d=\"M27.8204 5.193C24.7983 2.1709 20.7805 0.506836 16.5068 0.506836C7.78625 0.506836 0.506836 7.78625 0.506836 16.5068C0.506836 25.2274 7.78625 32.5068 16.5068 32.5068C25.2274 32.5068 32.5068 25.2274 32.5068 16.5068C32.5068 12.2332 30.8426 8.2151 27.8207 5.19329L27.8204 5.193ZM23.627 21.5962L21.7553 17.7403L23.4737 16.9062L24.3955 18.8053L24.4401 18.6209C24.608 17.9267 24.6932 17.2155 24.6932 16.5068C24.6932 11.6336 20.7854 7.66893 15.9819 7.66893C11.1788 7.66893 7.27066 11.6336 7.27066 16.5068C7.27066 21.3572 11.1414 25.3073 15.9137 25.3444V27.2546C10.0885 27.217 5.36066 22.41 5.36066 16.5067C5.36066 10.5804 10.1253 5.75855 15.9819 5.75855C21.8385 5.75855 26.6032 10.5801 26.6032 16.5067C26.6032 17.2903 26.5175 18.0775 26.3484 18.8468L26.315 18.999L27.9027 18.0676L28.8693 19.7151L24.9693 22.003C24.3869 22.4896 23.6689 21.9597 23.6268 21.5962L23.627 21.5962Z\"/>\n </g>\n</svg>\n";
|
|
17471
|
+
|
|
17472
|
+
/***/ }),
|
|
17473
|
+
|
|
16416
17474
|
/***/ "./style/AgentComponentHeader.css":
|
|
16417
17475
|
/*!****************************************!*\
|
|
16418
17476
|
!*** ./style/AgentComponentHeader.css ***!
|
|
@@ -17275,6 +18333,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
17275
18333
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_DropdownMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_DropdownMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_DropdownMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
17276
18334
|
|
|
17277
18335
|
|
|
18336
|
+
/***/ }),
|
|
18337
|
+
|
|
18338
|
+
/***/ "./style/EditAppDropdown.css":
|
|
18339
|
+
/*!***********************************!*\
|
|
18340
|
+
!*** ./style/EditAppDropdown.css ***!
|
|
18341
|
+
\***********************************/
|
|
18342
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18343
|
+
|
|
18344
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18345
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18346
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18347
|
+
/* harmony export */ });
|
|
18348
|
+
/* 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");
|
|
18349
|
+
/* 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__);
|
|
18350
|
+
/* 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");
|
|
18351
|
+
/* 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__);
|
|
18352
|
+
/* 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");
|
|
18353
|
+
/* 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__);
|
|
18354
|
+
/* 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");
|
|
18355
|
+
/* 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__);
|
|
18356
|
+
/* 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");
|
|
18357
|
+
/* 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__);
|
|
18358
|
+
/* 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");
|
|
18359
|
+
/* 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__);
|
|
18360
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./EditAppDropdown.css */ "./node_modules/css-loader/dist/cjs.js!./style/EditAppDropdown.css");
|
|
18361
|
+
|
|
18362
|
+
|
|
18363
|
+
|
|
18364
|
+
|
|
18365
|
+
|
|
18366
|
+
|
|
18367
|
+
|
|
18368
|
+
|
|
18369
|
+
|
|
18370
|
+
|
|
18371
|
+
|
|
18372
|
+
var options = {};
|
|
18373
|
+
|
|
18374
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
18375
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
18376
|
+
|
|
18377
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
18378
|
+
|
|
18379
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
18380
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
18381
|
+
|
|
18382
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
18383
|
+
|
|
18384
|
+
|
|
18385
|
+
|
|
18386
|
+
|
|
18387
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
18388
|
+
|
|
18389
|
+
|
|
17278
18390
|
/***/ }),
|
|
17279
18391
|
|
|
17280
18392
|
/***/ "./style/ErrorFixupToolUI.css":
|
|
@@ -17383,6 +18495,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
17383
18495
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ErrorMimeRendererPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_ErrorMimeRendererPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_ErrorMimeRendererPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
17384
18496
|
|
|
17385
18497
|
|
|
18498
|
+
/***/ }),
|
|
18499
|
+
|
|
18500
|
+
/***/ "./style/FilesSelector.css":
|
|
18501
|
+
/*!*********************************!*\
|
|
18502
|
+
!*** ./style/FilesSelector.css ***!
|
|
18503
|
+
\*********************************/
|
|
18504
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18505
|
+
|
|
18506
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18507
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18508
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18509
|
+
/* harmony export */ });
|
|
18510
|
+
/* 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");
|
|
18511
|
+
/* 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__);
|
|
18512
|
+
/* 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");
|
|
18513
|
+
/* 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__);
|
|
18514
|
+
/* 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");
|
|
18515
|
+
/* 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__);
|
|
18516
|
+
/* 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");
|
|
18517
|
+
/* 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__);
|
|
18518
|
+
/* 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");
|
|
18519
|
+
/* 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__);
|
|
18520
|
+
/* 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");
|
|
18521
|
+
/* 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__);
|
|
18522
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_FilesSelector_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./FilesSelector.css */ "./node_modules/css-loader/dist/cjs.js!./style/FilesSelector.css");
|
|
18523
|
+
|
|
18524
|
+
|
|
18525
|
+
|
|
18526
|
+
|
|
18527
|
+
|
|
18528
|
+
|
|
18529
|
+
|
|
18530
|
+
|
|
18531
|
+
|
|
18532
|
+
|
|
18533
|
+
|
|
18534
|
+
var options = {};
|
|
18535
|
+
|
|
18536
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
18537
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
18538
|
+
|
|
18539
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
18540
|
+
|
|
18541
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
18542
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
18543
|
+
|
|
18544
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_FilesSelector_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
18545
|
+
|
|
18546
|
+
|
|
18547
|
+
|
|
18548
|
+
|
|
18549
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_FilesSelector_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_FilesSelector_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_FilesSelector_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
18550
|
+
|
|
18551
|
+
|
|
17386
18552
|
/***/ }),
|
|
17387
18553
|
|
|
17388
18554
|
/***/ "./style/IconButton.css":
|
|
@@ -17977,6 +19143,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
17977
19143
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_SettingsWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_SettingsWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_SettingsWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
17978
19144
|
|
|
17979
19145
|
|
|
19146
|
+
/***/ }),
|
|
19147
|
+
|
|
19148
|
+
/***/ "./style/SignUpForm.css":
|
|
19149
|
+
/*!******************************!*\
|
|
19150
|
+
!*** ./style/SignUpForm.css ***!
|
|
19151
|
+
\******************************/
|
|
19152
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
19153
|
+
|
|
19154
|
+
__webpack_require__.r(__webpack_exports__);
|
|
19155
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19156
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19157
|
+
/* harmony export */ });
|
|
19158
|
+
/* 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");
|
|
19159
|
+
/* 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__);
|
|
19160
|
+
/* 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");
|
|
19161
|
+
/* 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__);
|
|
19162
|
+
/* 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");
|
|
19163
|
+
/* 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__);
|
|
19164
|
+
/* 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");
|
|
19165
|
+
/* 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__);
|
|
19166
|
+
/* 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");
|
|
19167
|
+
/* 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__);
|
|
19168
|
+
/* 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");
|
|
19169
|
+
/* 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__);
|
|
19170
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_SignUpForm_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./SignUpForm.css */ "./node_modules/css-loader/dist/cjs.js!./style/SignUpForm.css");
|
|
19171
|
+
|
|
19172
|
+
|
|
19173
|
+
|
|
19174
|
+
|
|
19175
|
+
|
|
19176
|
+
|
|
19177
|
+
|
|
19178
|
+
|
|
19179
|
+
|
|
19180
|
+
|
|
19181
|
+
|
|
19182
|
+
var options = {};
|
|
19183
|
+
|
|
19184
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
19185
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
19186
|
+
|
|
19187
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
19188
|
+
|
|
19189
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
19190
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
19191
|
+
|
|
19192
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_SignUpForm_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
19193
|
+
|
|
19194
|
+
|
|
19195
|
+
|
|
19196
|
+
|
|
19197
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_SignUpForm_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_SignUpForm_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_SignUpForm_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
19198
|
+
|
|
19199
|
+
|
|
17980
19200
|
/***/ }),
|
|
17981
19201
|
|
|
17982
19202
|
/***/ "./style/StreamlitPreviewPlugin.css":
|
|
@@ -18250,4 +19470,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
18250
19470
|
/***/ })
|
|
18251
19471
|
|
|
18252
19472
|
}]);
|
|
18253
|
-
//# sourceMappingURL=lib_index_js.
|
|
19473
|
+
//# sourceMappingURL=lib_index_js.20f12766ecd3d430568e.js.map
|