mito-ai 0.1.45__py3-none-any.whl → 0.1.47__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mito-ai might be problematic. Click here for more details.
- mito_ai/__init__.py +10 -1
- mito_ai/_version.py +1 -1
- mito_ai/anthropic_client.py +90 -5
- mito_ai/app_deploy/handlers.py +97 -77
- mito_ai/app_deploy/models.py +16 -12
- mito_ai/chat_history/handlers.py +63 -0
- mito_ai/chat_history/urls.py +32 -0
- mito_ai/completions/handlers.py +18 -20
- mito_ai/completions/models.py +4 -1
- mito_ai/completions/prompt_builders/agent_execution_prompt.py +6 -1
- mito_ai/completions/prompt_builders/agent_system_message.py +63 -4
- mito_ai/completions/prompt_builders/chat_system_message.py +4 -0
- mito_ai/completions/prompt_builders/prompt_constants.py +1 -0
- mito_ai/completions/prompt_builders/utils.py +14 -0
- mito_ai/constants.py +3 -0
- mito_ai/path_utils.py +56 -0
- mito_ai/streamlit_conversion/agent_utils.py +27 -106
- mito_ai/streamlit_conversion/prompts/prompt_constants.py +166 -53
- mito_ai/streamlit_conversion/prompts/streamlit_app_creation_prompt.py +2 -1
- mito_ai/streamlit_conversion/prompts/streamlit_error_correction_prompt.py +3 -3
- mito_ai/streamlit_conversion/prompts/streamlit_finish_todo_prompt.py +4 -3
- mito_ai/streamlit_conversion/{streamlit_system_prompt.py → prompts/streamlit_system_prompt.py} +1 -0
- mito_ai/streamlit_conversion/prompts/update_existing_app_prompt.py +50 -0
- mito_ai/streamlit_conversion/search_replace_utils.py +93 -0
- mito_ai/streamlit_conversion/streamlit_agent_handler.py +103 -119
- mito_ai/streamlit_conversion/streamlit_utils.py +18 -68
- mito_ai/streamlit_conversion/validate_streamlit_app.py +78 -96
- mito_ai/streamlit_preview/handlers.py +44 -85
- mito_ai/streamlit_preview/manager.py +6 -6
- mito_ai/streamlit_preview/utils.py +19 -18
- mito_ai/tests/chat_history/test_chat_history.py +211 -0
- mito_ai/tests/message_history/test_message_history_utils.py +43 -19
- mito_ai/tests/providers/test_anthropic_client.py +178 -6
- mito_ai/tests/streamlit_conversion/test_apply_search_replace.py +226 -0
- mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +87 -114
- mito_ai/tests/streamlit_conversion/test_streamlit_utils.py +42 -45
- mito_ai/tests/streamlit_conversion/test_validate_streamlit_app.py +20 -14
- mito_ai/tests/streamlit_preview/test_streamlit_preview_handler.py +13 -16
- mito_ai/tests/streamlit_preview/test_streamlit_preview_manager.py +22 -26
- mito_ai/tests/user/__init__.py +2 -0
- mito_ai/tests/user/test_user.py +120 -0
- mito_ai/user/handlers.py +45 -0
- mito_ai/user/urls.py +21 -0
- mito_ai/utils/anthropic_utils.py +8 -6
- mito_ai/utils/create.py +17 -1
- mito_ai/utils/error_classes.py +42 -0
- mito_ai/utils/message_history_utils.py +7 -4
- mito_ai/utils/telemetry_utils.py +79 -11
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +1 -1
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
- mito_ai-0.1.45.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.0c3368195d954d2ed033.js → mito_ai-0.1.47.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.2db61d2b629817845901.js +2126 -363
- mito_ai-0.1.47.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.2db61d2b629817845901.js.map +1 -0
- mito_ai-0.1.45.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.684f82575fcc2e3b350c.js → mito_ai-0.1.47.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.e22c6cd4e56c32116daa.js +9 -9
- mito_ai-0.1.45.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.684f82575fcc2e3b350c.js.map → mito_ai-0.1.47.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.e22c6cd4e56c32116daa.js.map +1 -1
- {mito_ai-0.1.45.dist-info → mito_ai-0.1.47.dist-info}/METADATA +1 -1
- {mito_ai-0.1.45.dist-info → mito_ai-0.1.47.dist-info}/RECORD +81 -69
- mito_ai-0.1.45.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.0c3368195d954d2ed033.js.map +0 -1
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.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.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.45.data → mito_ai-0.1.47.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.45.dist-info → mito_ai-0.1.47.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.45.dist-info → mito_ai-0.1.47.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.45.dist-info → mito_ai-0.1.47.dist-info}/licenses/LICENSE +0 -0
|
@@ -17,15 +17,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17
17
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
18
18
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
19
19
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_2__);
|
|
20
|
-
/* harmony import */ var
|
|
20
|
+
/* harmony import */ var _ChatWidget__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ChatWidget */ "./lib/Extensions/AiChat/ChatWidget.js");
|
|
21
21
|
/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/rendermime */ "webpack/sharing/consume/default/@jupyterlab/rendermime");
|
|
22
22
|
/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3__);
|
|
23
|
-
/* harmony import */ var
|
|
24
|
-
/* harmony import */ var
|
|
23
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
24
|
+
/* harmony import */ var _token__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./token */ "./lib/Extensions/AiChat/token.js");
|
|
25
25
|
/* harmony import */ var _ContextManager_ContextManagerPlugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ContextManager/ContextManagerPlugin */ "./lib/Extensions/ContextManager/ContextManagerPlugin.js");
|
|
26
|
+
/* harmony import */ var _AppPreview_StreamlitPreviewPlugin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../AppPreview/StreamlitPreviewPlugin */ "./lib/Extensions/AppPreview/StreamlitPreviewPlugin.js");
|
|
26
27
|
/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/settingregistry */ "webpack/sharing/consume/default/@jupyterlab/settingregistry");
|
|
27
28
|
/* harmony import */ var _jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__);
|
|
28
|
-
/* harmony import */ var
|
|
29
|
+
/* harmony import */ var _jupyterSettingsManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./jupyterSettingsManager */ "./lib/Extensions/AiChat/jupyterSettingsManager.js");
|
|
29
30
|
/* harmony import */ var _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @jupyterlab/docmanager */ "webpack/sharing/consume/default/@jupyterlab/docmanager");
|
|
30
31
|
/* harmony import */ var _jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5__);
|
|
31
32
|
/*
|
|
@@ -43,6 +44,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
|
|
47
|
+
|
|
46
48
|
// The Widget Rank determins where the ChatIcon is displayed
|
|
47
49
|
// in the left hand toolbar
|
|
48
50
|
const WIDGET_RANK = 2000;
|
|
@@ -59,22 +61,23 @@ const AiChatPlugin = {
|
|
|
59
61
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette,
|
|
60
62
|
_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3__.IRenderMimeRegistry,
|
|
61
63
|
_ContextManager_ContextManagerPlugin__WEBPACK_IMPORTED_MODULE_6__.IContextManager,
|
|
64
|
+
_AppPreview_StreamlitPreviewPlugin__WEBPACK_IMPORTED_MODULE_7__.IStreamlitPreviewManager,
|
|
62
65
|
_jupyterlab_settingregistry__WEBPACK_IMPORTED_MODULE_4__.ISettingRegistry,
|
|
63
66
|
_jupyterlab_docmanager__WEBPACK_IMPORTED_MODULE_5__.IDocumentManager
|
|
64
67
|
],
|
|
65
68
|
optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__.ILayoutRestorer],
|
|
66
|
-
provides:
|
|
67
|
-
activate: (app, labShell, notebookTracker, palette, rendermime, contextManager, settingRegistry, documentManager, restorer) => {
|
|
69
|
+
provides: _token__WEBPACK_IMPORTED_MODULE_8__.IChatTracker,
|
|
70
|
+
activate: (app, labShell, notebookTracker, palette, rendermime, contextManager, streamlitPreviewManager, settingRegistry, documentManager, restorer) => {
|
|
68
71
|
// Define a widget creator function,
|
|
69
72
|
// then call it to make a new widget
|
|
70
73
|
const newWidget = () => {
|
|
71
74
|
// Create a blank content widget inside of a MainAreaWidget
|
|
72
|
-
const chatWidget = (0,
|
|
75
|
+
const chatWidget = (0,_ChatWidget__WEBPACK_IMPORTED_MODULE_9__.buildChatWidget)(app, notebookTracker, rendermime, contextManager, streamlitPreviewManager);
|
|
73
76
|
return chatWidget;
|
|
74
77
|
};
|
|
75
78
|
let widget = newWidget();
|
|
76
79
|
// Add an application command
|
|
77
|
-
app.commands.addCommand(
|
|
80
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_10__.COMMAND_MITO_AI_OPEN_CHAT, {
|
|
78
81
|
label: 'Your friendly Python Expert chat bot',
|
|
79
82
|
execute: (args) => {
|
|
80
83
|
// In order for the widget to be accessible, the widget must be:
|
|
@@ -108,14 +111,14 @@ const AiChatPlugin = {
|
|
|
108
111
|
}
|
|
109
112
|
});
|
|
110
113
|
app.commands.addKeyBinding({
|
|
111
|
-
command:
|
|
114
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_10__.COMMAND_MITO_AI_OPEN_CHAT,
|
|
112
115
|
keys: ['Accel E'],
|
|
113
116
|
selector: 'body'
|
|
114
117
|
});
|
|
115
118
|
app.shell.add(widget, 'left', { rank: WIDGET_RANK });
|
|
116
119
|
// Add the command to the palette.
|
|
117
120
|
palette.addItem({
|
|
118
|
-
command:
|
|
121
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_10__.COMMAND_MITO_AI_OPEN_CHAT,
|
|
119
122
|
category: 'AI Chat'
|
|
120
123
|
});
|
|
121
124
|
// Track and restore the widget state
|
|
@@ -139,8 +142,8 @@ const AiChatPlugin = {
|
|
|
139
142
|
labShell.activateById(widget.id);
|
|
140
143
|
});
|
|
141
144
|
// Update jupyter settings to work best with mito-ai
|
|
142
|
-
void (0,
|
|
143
|
-
void (0,
|
|
145
|
+
void (0,_jupyterSettingsManager__WEBPACK_IMPORTED_MODULE_11__.setRenameUntitledFileOnSave)(settingRegistry, documentManager);
|
|
146
|
+
void (0,_jupyterSettingsManager__WEBPACK_IMPORTED_MODULE_11__.setDefaultWindowingMode)(settingRegistry);
|
|
144
147
|
// By returning a tracker token, we can require the token in other
|
|
145
148
|
// plugins. This allows us to force plugin load order. For example,
|
|
146
149
|
// we can ensure that the COMMAND_MITO_AI_OPEN_CHAT is created
|
|
@@ -166,6 +169,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
166
169
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
167
170
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
168
171
|
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
172
|
+
/* harmony import */ var _icons_MitoLogo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icons/MitoLogo */ "./lib/icons/MitoLogo.js");
|
|
169
173
|
/* harmony import */ var _style_CTACarousel_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/CTACarousel.css */ "./style/CTACarousel.css");
|
|
170
174
|
/*
|
|
171
175
|
* Copyright (c) Saga Inc.
|
|
@@ -174,6 +178,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
174
178
|
|
|
175
179
|
|
|
176
180
|
|
|
181
|
+
|
|
177
182
|
const CTACarousel = ({ app }) => {
|
|
178
183
|
const [currentIndex, setCurrentIndex] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
179
184
|
// Define messages inside component to access app prop
|
|
@@ -182,7 +187,7 @@ const CTACarousel = ({ app }) => {
|
|
|
182
187
|
content: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null,
|
|
183
188
|
"Generate more than just Python code. Talk to your database, no SQL required.",
|
|
184
189
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", null),
|
|
185
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-gray cta-carousel-button", onClick: () => app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_2__.
|
|
190
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-gray cta-carousel-button", onClick: () => app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_2__.COMMAND_MITO_AI_SETTINGS_DATABASE), "data-testid": "cta-carousel-button" },
|
|
186
191
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("b", null, "\uFF0B Add Database"))))
|
|
187
192
|
},
|
|
188
193
|
{
|
|
@@ -194,6 +199,9 @@ const CTACarousel = ({ app }) => {
|
|
|
194
199
|
];
|
|
195
200
|
const currentMessage = CTACAROUSEL_MESSAGES[Math.min(currentIndex, CTACAROUSEL_MESSAGES.length - 1)].content;
|
|
196
201
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-carousel" },
|
|
202
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-logo-container" },
|
|
203
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_MitoLogo__WEBPACK_IMPORTED_MODULE_3__["default"], { width: "60", height: "30" })),
|
|
204
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "cta-title" }, "Data Copilot"),
|
|
197
205
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-carousel-container" },
|
|
198
206
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "cta-message", "data-testid": "cta-message" }, currentMessage)),
|
|
199
207
|
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" }))))));
|
|
@@ -237,7 +245,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
237
245
|
Whenever, the chatHistoryManager is updated, it should automatically send a message to the AI.
|
|
238
246
|
*/
|
|
239
247
|
class ChatHistoryManager {
|
|
240
|
-
constructor(contextManager, notebookTracker, initialHistory) {
|
|
248
|
+
constructor(contextManager, notebookTracker, app, streamlitPreviewManager, initialHistory) {
|
|
241
249
|
this._allAssumptions = new Set();
|
|
242
250
|
this.getLastAIMessageIndex = () => {
|
|
243
251
|
// We assume that assistant messages are always separated by user messages.
|
|
@@ -266,9 +274,17 @@ class ChatHistoryManager {
|
|
|
266
274
|
this.contextManager = contextManager;
|
|
267
275
|
// Save the notebook tracker
|
|
268
276
|
this.notebookTracker = notebookTracker;
|
|
277
|
+
// Save the app
|
|
278
|
+
this.app = app;
|
|
279
|
+
// Save the streamlit preview service
|
|
280
|
+
this.streamlitPreviewManager = streamlitPreviewManager;
|
|
269
281
|
// Initialize assumptions from existing history
|
|
270
282
|
this.initializeAssumptionsFromHistory();
|
|
271
283
|
}
|
|
284
|
+
checkIfStreamlitAppIsOpen() {
|
|
285
|
+
// Use the service to check if there's an active preview
|
|
286
|
+
return this.streamlitPreviewManager.hasActivePreview();
|
|
287
|
+
}
|
|
272
288
|
initializeAssumptionsFromHistory() {
|
|
273
289
|
this._allAssumptions.clear();
|
|
274
290
|
this.displayOptimizedChatHistory.forEach(item => {
|
|
@@ -298,7 +314,7 @@ class ChatHistoryManager {
|
|
|
298
314
|
};
|
|
299
315
|
}
|
|
300
316
|
createDuplicateChatHistoryManager() {
|
|
301
|
-
const duplicateManager = new ChatHistoryManager(this.contextManager, this.notebookTracker, this.displayOptimizedChatHistory);
|
|
317
|
+
const duplicateManager = new ChatHistoryManager(this.contextManager, this.notebookTracker, this.app, this.streamlitPreviewManager, this.displayOptimizedChatHistory);
|
|
302
318
|
// Copy the assumptions set to the duplicate
|
|
303
319
|
duplicateManager._allAssumptions = new Set(this._allAssumptions);
|
|
304
320
|
return duplicateManager;
|
|
@@ -341,6 +357,7 @@ class ChatHistoryManager {
|
|
|
341
357
|
addAgentExecutionMessage(activeThreadId, notebookPanel, input, additionalContext) {
|
|
342
358
|
const aiOptimizedCells = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.getAIOptimizedCellsInNotebookPanel)(notebookPanel);
|
|
343
359
|
const notebookContext = this.contextManager.getNotebookContext(notebookPanel.id);
|
|
360
|
+
const streamlitAppIsOpen = this.checkIfStreamlitAppIsOpen();
|
|
344
361
|
const agentExecutionMetadata = {
|
|
345
362
|
promptType: 'agent:execution',
|
|
346
363
|
variables: (notebookContext === null || notebookContext === void 0 ? void 0 : notebookContext.variables) || [],
|
|
@@ -349,7 +366,8 @@ class ChatHistoryManager {
|
|
|
349
366
|
input: input || '',
|
|
350
367
|
threadId: activeThreadId,
|
|
351
368
|
isChromeBrowser: (0,_utils_user__WEBPACK_IMPORTED_MODULE_2__.isChromeBasedBrowser)(),
|
|
352
|
-
additionalContext: additionalContext
|
|
369
|
+
additionalContext: additionalContext,
|
|
370
|
+
streamlitAppIsOpen: streamlitAppIsOpen
|
|
353
371
|
};
|
|
354
372
|
// We use this function in two ways:
|
|
355
373
|
// 1. When the user sends the original agent:execution message to start the agent
|
|
@@ -1027,7 +1045,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1027
1045
|
|
|
1028
1046
|
|
|
1029
1047
|
|
|
1030
|
-
const ChatInput = ({ app, initialContent,
|
|
1048
|
+
const ChatInput = ({ app, initialContent, onSave, onCancel, isEditing, contextManager, notebookTracker, agentModeEnabled = false, agentExecutionStatus = 'idle', operatingSystem = 'mac', displayOptimizedChatHistoryLength = 0, agentTargetNotebookPanelRef, isSignedUp = true, }) => {
|
|
1031
1049
|
var _a;
|
|
1032
1050
|
const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialContent);
|
|
1033
1051
|
const textAreaRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
|
|
@@ -1242,6 +1260,30 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1242
1260
|
];
|
|
1243
1261
|
return expandedVariables;
|
|
1244
1262
|
};
|
|
1263
|
+
const getPlaceholderText = () => {
|
|
1264
|
+
var _a;
|
|
1265
|
+
if (!isSignedUp && displayOptimizedChatHistoryLength === 0) {
|
|
1266
|
+
return 'Sign up above to use Mito AI';
|
|
1267
|
+
}
|
|
1268
|
+
else if (agentExecutionStatus === 'working') {
|
|
1269
|
+
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()}`;
|
|
1270
|
+
}
|
|
1271
|
+
else if (agentExecutionStatus === 'stopping') {
|
|
1272
|
+
return 'Agent is stopping...';
|
|
1273
|
+
}
|
|
1274
|
+
else if (agentModeEnabled) {
|
|
1275
|
+
return 'Ask agent to do anything';
|
|
1276
|
+
}
|
|
1277
|
+
else if (isEditing) {
|
|
1278
|
+
return 'Edit your message';
|
|
1279
|
+
}
|
|
1280
|
+
else if (displayOptimizedChatHistoryLength < 2) {
|
|
1281
|
+
return `Ask question (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`;
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
return `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`;
|
|
1285
|
+
}
|
|
1286
|
+
};
|
|
1245
1287
|
// Automatically add active cell context when in Chat mode and there's active cell code
|
|
1246
1288
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
1247
1289
|
if (!agentModeEnabled) {
|
|
@@ -1276,7 +1318,7 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1276
1318
|
} }, "\uFF20 Add Context"),
|
|
1277
1319
|
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 })))),
|
|
1278
1320
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'chat-input-text-area-container' },
|
|
1279
|
-
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:
|
|
1321
|
+
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) => {
|
|
1280
1322
|
// If dropdown is visible, only handle escape to close it
|
|
1281
1323
|
if (isDropdownVisible) {
|
|
1282
1324
|
if (e.key === 'Escape') {
|
|
@@ -1345,6 +1387,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1345
1387
|
/* harmony import */ var _components_AgentComponents_AssumptionToolUI__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../components/AgentComponents/AssumptionToolUI */ "./lib/components/AgentComponents/AssumptionToolUI.js");
|
|
1346
1388
|
/* harmony import */ var _components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../components/SelectedContextContainer */ "./lib/components/SelectedContextContainer.js");
|
|
1347
1389
|
/* harmony import */ var _components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../components/AgentComponents/RunAllCellsToolUI */ "./lib/components/AgentComponents/RunAllCellsToolUI.js");
|
|
1390
|
+
/* harmony import */ var _components_AgentComponents_CreateStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../components/AgentComponents/CreateStreamlitAppToolUI */ "./lib/components/AgentComponents/CreateStreamlitAppToolUI.js");
|
|
1391
|
+
/* harmony import */ var _components_AgentComponents_EditStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../components/AgentComponents/EditStreamlitAppToolUI */ "./lib/components/AgentComponents/EditStreamlitAppToolUI.js");
|
|
1348
1392
|
/*
|
|
1349
1393
|
* Copyright (c) Saga Inc.
|
|
1350
1394
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -1367,6 +1411,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1367
1411
|
|
|
1368
1412
|
|
|
1369
1413
|
|
|
1414
|
+
|
|
1415
|
+
|
|
1370
1416
|
|
|
1371
1417
|
|
|
1372
1418
|
const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mitoAIConnectionError, mitoAIConnectionErrorType, notebookTracker, renderMimeRegistry, isLastAiMessage, isLastMessage, operatingSystem, previewAICode, acceptAICode, rejectAICode, onUpdateMessage, contextManager, codeReviewStatus, setNextSteps, agentModeEnabled, additionalContext, }) => {
|
|
@@ -1399,7 +1445,7 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1399
1445
|
setNextSteps(agentResponse.next_steps);
|
|
1400
1446
|
}
|
|
1401
1447
|
if (isEditing) {
|
|
1402
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(),
|
|
1448
|
+
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 }));
|
|
1403
1449
|
}
|
|
1404
1450
|
if (mitoAIConnectionError) {
|
|
1405
1451
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message") },
|
|
@@ -1462,7 +1508,11 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1462
1508
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'get_cell_output' &&
|
|
1463
1509
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_GetCellOutputToolUI__WEBPACK_IMPORTED_MODULE_18__["default"], null),
|
|
1464
1510
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'run_all_cells' && agentModeEnabled &&
|
|
1465
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_19__["default"], null)
|
|
1511
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_19__["default"], null),
|
|
1512
|
+
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'create_streamlit_app' && agentModeEnabled &&
|
|
1513
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_CreateStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_20__["default"], { isRunning: isLastMessage }),
|
|
1514
|
+
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'edit_streamlit_app' && agentModeEnabled &&
|
|
1515
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_EditStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_21__["default"], { isRunning: isLastMessage })));
|
|
1466
1516
|
};
|
|
1467
1517
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatMessage);
|
|
1468
1518
|
|
|
@@ -1897,7 +1947,7 @@ const DEFAULT_SUGGESTION_OPTIONS = [
|
|
|
1897
1947
|
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"
|
|
1898
1948
|
}
|
|
1899
1949
|
];
|
|
1900
|
-
const ScrollableSuggestions = ({ onSelectSuggestion }) => {
|
|
1950
|
+
const ScrollableSuggestions = ({ onSelectSuggestion, }) => {
|
|
1901
1951
|
const suggestionsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
1902
1952
|
// Apply the scroll mask to the suggestions container when it mounts, updates, or is scrolled
|
|
1903
1953
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
@@ -1998,43 +2048,47 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1998
2048
|
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);
|
|
1999
2049
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
2000
2050
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);
|
|
2001
|
-
/* harmony import */ var
|
|
2002
|
-
/* harmony import */ var
|
|
2003
|
-
/* harmony import */ var
|
|
2004
|
-
/* harmony import */ var
|
|
2005
|
-
/* harmony import */ var
|
|
2051
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
2052
|
+
/* harmony import */ var _components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../components/AgentComponents/ErrorFixupToolUI */ "./lib/components/AgentComponents/ErrorFixupToolUI.js");
|
|
2053
|
+
/* harmony import */ var _components_DropdownMenu__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../components/DropdownMenu */ "./lib/components/DropdownMenu.js");
|
|
2054
|
+
/* harmony import */ var _components_IconButton__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/IconButton */ "./lib/components/IconButton.js");
|
|
2055
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
2006
2056
|
/* harmony import */ var _components_ModelSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/ModelSelector */ "./lib/components/ModelSelector.js");
|
|
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
|
|
2021
|
-
/* harmony import */ var
|
|
2057
|
+
/* harmony import */ var _components_NextStepsPills__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../components/NextStepsPills */ "./lib/components/NextStepsPills.js");
|
|
2058
|
+
/* harmony import */ var _components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../components/TextAndIconButton */ "./lib/components/TextAndIconButton.js");
|
|
2059
|
+
/* harmony import */ var _components_ToggleButton__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../components/ToggleButton */ "./lib/components/ToggleButton.js");
|
|
2060
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
2061
|
+
/* harmony import */ var _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../icons/UndoIcon */ "./lib/icons/UndoIcon.js");
|
|
2062
|
+
/* harmony import */ var _utils_agentActions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/agentActions */ "./lib/utils/agentActions.js");
|
|
2063
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
2064
|
+
/* harmony import */ var _utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/blacklistedWords */ "./lib/utils/blacklistedWords.js");
|
|
2065
|
+
/* harmony import */ var _utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/checkpoint */ "./lib/utils/checkpoint.js");
|
|
2066
|
+
/* harmony import */ var _utils_chatHistory__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../utils/chatHistory */ "./lib/utils/chatHistory.js");
|
|
2067
|
+
/* harmony import */ var _utils_codeDiff__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../utils/codeDiff */ "./lib/utils/codeDiff.js");
|
|
2068
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../utils/notebook */ "./lib/utils/notebook.js");
|
|
2069
|
+
/* harmony import */ var _utils_cellOutput__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/cellOutput */ "./lib/utils/cellOutput.js");
|
|
2070
|
+
/* harmony import */ var _utils_scroll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../utils/scroll */ "./lib/utils/scroll.js");
|
|
2071
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../utils/strings */ "./lib/utils/strings.js");
|
|
2022
2072
|
/* harmony import */ var _utils_waitForNotebookReady__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/waitForNotebookReady */ "./lib/utils/waitForNotebookReady.js");
|
|
2023
|
-
/* harmony import */ var
|
|
2024
|
-
/* harmony import */ var
|
|
2025
|
-
/* harmony import */ var
|
|
2026
|
-
/* harmony import */ var
|
|
2027
|
-
/* harmony import */ var
|
|
2073
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AiChat/utils.js");
|
|
2074
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
2075
|
+
/* harmony import */ var _utils_userSignupState__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/userSignupState */ "./lib/utils/userSignupState.js");
|
|
2076
|
+
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
2077
|
+
/* harmony import */ var _SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../SettingsManager/profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
2078
|
+
/* harmony import */ var _CTACarousel__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./CTACarousel */ "./lib/Extensions/AiChat/CTACarousel.js");
|
|
2079
|
+
/* harmony import */ var _UsageBadge__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./UsageBadge */ "./lib/Extensions/AiChat/UsageBadge.js");
|
|
2080
|
+
/* harmony import */ var _SignUpForm__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./SignUpForm */ "./lib/Extensions/AiChat/SignUpForm.js");
|
|
2081
|
+
/* harmony import */ var _CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CodeDiffDisplay */ "./lib/Extensions/AiChat/CodeDiffDisplay.js");
|
|
2028
2082
|
/* harmony import */ var _FirstMessage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FirstMessage */ "./lib/Extensions/AiChat/FirstMessage.js");
|
|
2029
|
-
/* harmony import */ var
|
|
2030
|
-
/* harmony import */ var
|
|
2031
|
-
/* harmony import */ var
|
|
2032
|
-
/* harmony import */ var
|
|
2083
|
+
/* harmony import */ var _ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./ChatMessage/ChatInput */ "./lib/Extensions/AiChat/ChatMessage/ChatInput.js");
|
|
2084
|
+
/* harmony import */ var _ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ChatMessage/ChatMessage */ "./lib/Extensions/AiChat/ChatMessage/ChatMessage.js");
|
|
2085
|
+
/* harmony import */ var _ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./ChatMessage/RevertQuestionnaire */ "./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js");
|
|
2086
|
+
/* harmony import */ var _ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./ChatMessage/ScrollableSuggestions */ "./lib/Extensions/AiChat/ChatMessage/ScrollableSuggestions.js");
|
|
2033
2087
|
/* harmony import */ var _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ChatHistoryManager */ "./lib/Extensions/AiChat/ChatHistoryManager.js");
|
|
2034
2088
|
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
2035
2089
|
/* harmony import */ var _style_ChatTaskpane_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/ChatTaskpane.css */ "./style/ChatTaskpane.css");
|
|
2036
2090
|
/* harmony import */ var _style_TextButton_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../style/TextButton.css */ "./style/TextButton.css");
|
|
2037
|
-
/* harmony import */ var
|
|
2091
|
+
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
2038
2092
|
/*
|
|
2039
2093
|
* Copyright (c) Saga Inc.
|
|
2040
2094
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -2059,7 +2113,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2059
2113
|
// Internal imports - Icons
|
|
2060
2114
|
|
|
2061
2115
|
|
|
2062
|
-
|
|
2063
2116
|
// Internal imports - Utils
|
|
2064
2117
|
|
|
2065
2118
|
|
|
@@ -2074,6 +2127,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2074
2127
|
|
|
2075
2128
|
|
|
2076
2129
|
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
|
|
2077
2133
|
// Internal imports - Chat components
|
|
2078
2134
|
|
|
2079
2135
|
|
|
@@ -2083,19 +2139,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2083
2139
|
|
|
2084
2140
|
|
|
2085
2141
|
|
|
2142
|
+
|
|
2143
|
+
|
|
2086
2144
|
// Styles
|
|
2087
2145
|
|
|
2088
2146
|
|
|
2089
2147
|
|
|
2090
2148
|
|
|
2091
2149
|
const AGENT_EXECUTION_DEPTH_LIMIT = 20;
|
|
2092
|
-
const getDefaultChatHistoryManager = (notebookTracker, contextManager) => {
|
|
2093
|
-
const chatHistoryManager = new _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__.ChatHistoryManager(contextManager, notebookTracker);
|
|
2150
|
+
const getDefaultChatHistoryManager = (notebookTracker, contextManager, app, streamlitPreviewManager) => {
|
|
2151
|
+
const chatHistoryManager = new _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__.ChatHistoryManager(contextManager, notebookTracker, app, streamlitPreviewManager);
|
|
2094
2152
|
return chatHistoryManager;
|
|
2095
2153
|
};
|
|
2096
|
-
const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app, operatingSystem, websocketClient, }) => {
|
|
2097
|
-
|
|
2098
|
-
const [chatHistoryManager, setChatHistoryManager] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(() => getDefaultChatHistoryManager(notebookTracker, contextManager));
|
|
2154
|
+
const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, streamlitPreviewManager, app, operatingSystem, websocketClient, }) => {
|
|
2155
|
+
const [isSignedUp, setIsSignedUp] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
|
|
2156
|
+
const [chatHistoryManager, setChatHistoryManager] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(() => getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager));
|
|
2099
2157
|
const chatHistoryManagerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(chatHistoryManager);
|
|
2100
2158
|
const [loadingAIResponse, setLoadingAIResponse] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
2101
2159
|
// Store the original cell before diff so that we can revert to it if the user rejects the AI's code
|
|
@@ -2133,6 +2191,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2133
2191
|
// we don't need to handle the undefined case everywhere, we just default to an empty string knowing that
|
|
2134
2192
|
// it will always be set to a valid thread id before it is used.
|
|
2135
2193
|
const activeThreadIdRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)('');
|
|
2194
|
+
// Ref to trigger refresh of the usage badge
|
|
2195
|
+
const usageBadgeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
2136
2196
|
/*
|
|
2137
2197
|
Three possible states:
|
|
2138
2198
|
1. working: the agent is working on the task
|
|
@@ -2198,7 +2258,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2198
2258
|
};
|
|
2199
2259
|
const chatHistoryResponse = await websocketClient.sendMessage(fetchHistoryCompletionRequest);
|
|
2200
2260
|
// Create a fresh ChatHistoryManager and add the initial messages
|
|
2201
|
-
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager);
|
|
2261
|
+
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager);
|
|
2202
2262
|
// Each thread only contains agent or chat messages. For now, we enforce this by clearing the chat
|
|
2203
2263
|
// when the user switches mode. When the user reloads a chat, we want to put them back into the same
|
|
2204
2264
|
// chat mode so that we use the correct system message and preserve this one-type of message invariant.
|
|
@@ -2268,7 +2328,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2268
2328
|
// Enable follow mode when starting a new chat
|
|
2269
2329
|
setAutoScrollFollowMode(true);
|
|
2270
2330
|
// Reset frontend chat history
|
|
2271
|
-
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager);
|
|
2331
|
+
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager);
|
|
2272
2332
|
setChatHistoryManager(newChatHistoryManager);
|
|
2273
2333
|
// Notify the backend to request a new chat thread and get its ID
|
|
2274
2334
|
try {
|
|
@@ -2288,6 +2348,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2288
2348
|
}
|
|
2289
2349
|
return newChatHistoryManager;
|
|
2290
2350
|
};
|
|
2351
|
+
// Main initialization effect - runs once on mount
|
|
2291
2352
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
2292
2353
|
const initializeChatHistory = async () => {
|
|
2293
2354
|
try {
|
|
@@ -2330,12 +2391,14 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2330
2391
|
}
|
|
2331
2392
|
}
|
|
2332
2393
|
catch (error) {
|
|
2333
|
-
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager);
|
|
2394
|
+
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager);
|
|
2334
2395
|
addAIMessageFromResponseAndUpdateState(error.title ? error.title : `${error}`, 'chat', newChatHistoryManager, false);
|
|
2335
2396
|
addAIMessageFromResponseAndUpdateState(error.hint ? error.hint : `${error}`, 'chat', newChatHistoryManager, true);
|
|
2336
2397
|
}
|
|
2337
2398
|
};
|
|
2399
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_11__.logEvent)('opened_ai_chat_taskpane');
|
|
2338
2400
|
void initializeChatHistory();
|
|
2401
|
+
void refreshUserSignupState(); // Get user signup state when the component first mounts
|
|
2339
2402
|
}, [websocketClient]);
|
|
2340
2403
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
2341
2404
|
/*
|
|
@@ -2360,10 +2423,15 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2360
2423
|
*/
|
|
2361
2424
|
chatHistoryManagerRef.current = chatHistoryManager;
|
|
2362
2425
|
}, [chatHistoryManager]);
|
|
2426
|
+
// Function to refresh user signup state using the shared helper
|
|
2427
|
+
const refreshUserSignupState = async () => {
|
|
2428
|
+
const signupState = await (0,_utils_userSignupState__WEBPACK_IMPORTED_MODULE_12__.checkUserSignupState)();
|
|
2429
|
+
setIsSignedUp(signupState.isSignedUp);
|
|
2430
|
+
};
|
|
2363
2431
|
// Scroll to bottom whenever chat history updates, but only if in follow mode
|
|
2364
2432
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
2365
2433
|
if (autoScrollFollowMode) {
|
|
2366
|
-
(0,
|
|
2434
|
+
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_13__.scrollToDiv)(chatMessagesRef);
|
|
2367
2435
|
}
|
|
2368
2436
|
}, [chatHistoryManager.getDisplayOptimizedHistory().length, chatHistoryManager, autoScrollFollowMode]);
|
|
2369
2437
|
// Add scroll event handler to detect manual scrolling
|
|
@@ -2485,7 +2553,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2485
2553
|
if (messageIndex !== undefined) {
|
|
2486
2554
|
agentExecutionMetadata.index = messageIndex;
|
|
2487
2555
|
}
|
|
2488
|
-
agentExecutionMetadata.base64EncodedActiveCellOutput = await (0,
|
|
2556
|
+
agentExecutionMetadata.base64EncodedActiveCellOutput = await (0,_utils__WEBPACK_IMPORTED_MODULE_14__.getBase64EncodedCellOutputInNotebook)(agentTargetNotebookPanel, sendCellIDOutput);
|
|
2489
2557
|
setChatHistoryManager(newChatHistoryManager);
|
|
2490
2558
|
setLoadingAIResponse(true);
|
|
2491
2559
|
// Step 2: Send the message to the AI
|
|
@@ -2521,7 +2589,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2521
2589
|
// Add the active cell output to the metadata afterwards setting the chatHistoryManager so that
|
|
2522
2590
|
// we don't have to wait on turning the output into a base64 image before we can add the user's message
|
|
2523
2591
|
// to the chat.
|
|
2524
|
-
const activeCellOutput = await (0,
|
|
2592
|
+
const activeCellOutput = await (0,_utils_cellOutput__WEBPACK_IMPORTED_MODULE_15__.getActiveCellOutput)(notebookTracker);
|
|
2525
2593
|
if (activeCellOutput !== undefined) {
|
|
2526
2594
|
chatMessageMetadata.base64EncodedActiveCellOutput = activeCellOutput;
|
|
2527
2595
|
}
|
|
@@ -2549,7 +2617,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2549
2617
|
const abortController = new AbortController();
|
|
2550
2618
|
activeRequestControllerRef.current = abortController;
|
|
2551
2619
|
// Capture the completion request for debugging
|
|
2552
|
-
(0,
|
|
2620
|
+
(0,_SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_16__.captureCompletionRequest)(completionRequest);
|
|
2553
2621
|
if (completionRequest.stream) {
|
|
2554
2622
|
// Reset the streaming response and set streaming state
|
|
2555
2623
|
streamingContentRef.current = '';
|
|
@@ -2677,6 +2745,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2677
2745
|
if (activeRequestControllerRef.current === abortController) {
|
|
2678
2746
|
activeRequestControllerRef.current = null;
|
|
2679
2747
|
}
|
|
2748
|
+
// Refresh the usage badge to reflect updated usage count
|
|
2749
|
+
if (usageBadgeRef.current) {
|
|
2750
|
+
void usageBadgeRef.current.refresh();
|
|
2751
|
+
}
|
|
2680
2752
|
return true;
|
|
2681
2753
|
};
|
|
2682
2754
|
const addAIMessageFromResponseAndUpdateState = (messageContent, promptType, chatHistoryManager, mitoAIConnectionError = false, mitoAIConnectionErrorType = null) => {
|
|
@@ -2699,9 +2771,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2699
2771
|
activeRequestControllerRef.current.abort();
|
|
2700
2772
|
activeRequestControllerRef.current = null;
|
|
2701
2773
|
}
|
|
2702
|
-
// Add feedback message based on reason
|
|
2703
2774
|
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2704
|
-
addAIMessageFromResponseAndUpdateState("Agent stopped by user.", 'chat',
|
|
2775
|
+
addAIMessageFromResponseAndUpdateState("Agent stopped by user.", 'chat', // TODO: This probably should not be type 'chat' because that is reserved for a chat thread!
|
|
2776
|
+
newChatHistoryManager);
|
|
2705
2777
|
// Send stop message to backend
|
|
2706
2778
|
await websocketClient.sendMessage({
|
|
2707
2779
|
type: "stop_agent",
|
|
@@ -2717,7 +2789,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2717
2789
|
};
|
|
2718
2790
|
const startAgentExecution = async (input, messageIndex, additionalContext) => {
|
|
2719
2791
|
agentTargetNotebookPanelRef.current = notebookTracker.currentWidget;
|
|
2720
|
-
await (0,
|
|
2792
|
+
await (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__.createCheckpoint)(app, setHasCheckpoint);
|
|
2721
2793
|
setAgentExecutionStatus('working');
|
|
2722
2794
|
// Enable follow mode when user starts agent execution
|
|
2723
2795
|
setAutoScrollFollowMode(true);
|
|
@@ -2726,6 +2798,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2726
2798
|
let isAgentFinished = false;
|
|
2727
2799
|
let agentExecutionDepth = 1;
|
|
2728
2800
|
let sendCellIDOutput = undefined;
|
|
2801
|
+
// Sometimes its useful to send extra information back to the agent. For example,
|
|
2802
|
+
// if the agent tries to create a streamlit app and it errors, we want to let the
|
|
2803
|
+
// orchestrator agent know about the issue.
|
|
2804
|
+
// TODO: Ideally this would be a different type of message that does not show up
|
|
2805
|
+
// as a user message in the chat taskpane, but this is the only mechanism we have
|
|
2806
|
+
// right now.
|
|
2807
|
+
let messageToShareWithAgent = undefined;
|
|
2729
2808
|
// Loop through each message in the plan and send it to the AI
|
|
2730
2809
|
while (!isAgentFinished && agentExecutionDepth <= AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
2731
2810
|
// Check if we should continue execution
|
|
@@ -2739,9 +2818,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2739
2818
|
await sendAgentExecutionMessage(input, messageIndex, undefined, additionalContext);
|
|
2740
2819
|
}
|
|
2741
2820
|
else {
|
|
2742
|
-
await sendAgentExecutionMessage('', undefined, sendCellIDOutput);
|
|
2821
|
+
await sendAgentExecutionMessage(messageToShareWithAgent || '', undefined, sendCellIDOutput);
|
|
2743
2822
|
// Reset flag back to false until the agent requests the active cell output again
|
|
2744
2823
|
sendCellIDOutput = undefined;
|
|
2824
|
+
messageToShareWithAgent = undefined;
|
|
2745
2825
|
}
|
|
2746
2826
|
// Iterate the agent execution depth
|
|
2747
2827
|
agentExecutionDepth++;
|
|
@@ -2749,9 +2829,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2749
2829
|
const aiDisplayOptimizedChatItem = chatHistoryManagerRef.current.getLastAIDisplayOptimizedChatItem();
|
|
2750
2830
|
// # TODO: Make this is a helper function so we can also use it in the auto error fixup!
|
|
2751
2831
|
if (aiDisplayOptimizedChatItem) {
|
|
2752
|
-
const aiGeneratedCode = (0,
|
|
2832
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.getCodeBlockFromMessage)(aiDisplayOptimizedChatItem.message);
|
|
2753
2833
|
if (aiGeneratedCode) {
|
|
2754
|
-
const securityCheck = (0,
|
|
2834
|
+
const securityCheck = (0,_utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_19__.checkForBlacklistedWords)(aiGeneratedCode);
|
|
2755
2835
|
if (!securityCheck.safe) {
|
|
2756
2836
|
console.error('Security Warning:', securityCheck.reason);
|
|
2757
2837
|
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);
|
|
@@ -2785,10 +2865,16 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2785
2865
|
isAgentFinished = true;
|
|
2786
2866
|
break;
|
|
2787
2867
|
}
|
|
2868
|
+
// TODO: If we created a validated type in the agent response validation function, then we woulnd't need to do these checks
|
|
2869
|
+
if (agentResponse.type === 'edit_streamlit_app' && (agentResponse.edit_streamlit_app_prompt === undefined || agentResponse.edit_streamlit_app_prompt === null)) {
|
|
2870
|
+
await markAgentForStopping();
|
|
2871
|
+
isAgentFinished = true;
|
|
2872
|
+
break;
|
|
2873
|
+
}
|
|
2788
2874
|
if (agentResponse.type === 'cell_update' && agentResponse.cell_update) {
|
|
2789
2875
|
// Run the code and handle any errors
|
|
2790
|
-
await (0,
|
|
2791
|
-
const status = await (0,
|
|
2876
|
+
await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.acceptAndRunCellUpdate)(agentResponse.cell_update, agentTargetNotebookPanelRef.current);
|
|
2877
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.retryIfExecutionError)(agentTargetNotebookPanelRef.current, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef);
|
|
2792
2878
|
if (status === 'interupted') {
|
|
2793
2879
|
break;
|
|
2794
2880
|
}
|
|
@@ -2808,12 +2894,12 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2808
2894
|
sendCellIDOutput = agentResponse.get_cell_output_cell_id;
|
|
2809
2895
|
}
|
|
2810
2896
|
if (agentResponse.type === 'run_all_cells') {
|
|
2811
|
-
const result = await (0,
|
|
2897
|
+
const result = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.runAllCells)(app, agentTargetNotebookPanelRef.current);
|
|
2812
2898
|
// If run_all_cells resulted in an error, handle it through the error fixup process
|
|
2813
2899
|
if (!result.success && result.errorMessage && result.errorCellId) {
|
|
2814
2900
|
// Set the error cell as active so the error retry logic can work with it
|
|
2815
|
-
(0,
|
|
2816
|
-
const status = await (0,
|
|
2901
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.setActiveCellByIDInNotebookPanel)(agentTargetNotebookPanelRef.current, result.errorCellId);
|
|
2902
|
+
const status = await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.retryIfExecutionError)(agentTargetNotebookPanelRef.current, app, sendAgentSmartDebugMessage, shouldContinueAgentExecution, markAgentForStopping, chatHistoryManagerRef);
|
|
2817
2903
|
if (status === 'interupted') {
|
|
2818
2904
|
break;
|
|
2819
2905
|
}
|
|
@@ -2823,6 +2909,28 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2823
2909
|
}
|
|
2824
2910
|
}
|
|
2825
2911
|
}
|
|
2912
|
+
if (agentResponse.type === 'create_streamlit_app') {
|
|
2913
|
+
// Create new preview using the service
|
|
2914
|
+
const streamlitPreviewResponse = await streamlitPreviewManager.openAppPreview(app, agentTargetNotebookPanelRef.current);
|
|
2915
|
+
if (streamlitPreviewResponse.type === 'error') {
|
|
2916
|
+
messageToShareWithAgent = streamlitPreviewResponse.message;
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
if (agentResponse.type === 'edit_streamlit_app' && agentResponse.edit_streamlit_app_prompt) {
|
|
2920
|
+
// Ensure there is an active preview to edit
|
|
2921
|
+
if (!streamlitPreviewManager.hasActivePreview()) {
|
|
2922
|
+
const streamlitPreviewResponse = await streamlitPreviewManager.openAppPreview(app, agentTargetNotebookPanelRef.current);
|
|
2923
|
+
if (streamlitPreviewResponse.type === 'error') {
|
|
2924
|
+
messageToShareWithAgent = streamlitPreviewResponse.message;
|
|
2925
|
+
continue;
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
// Edit the existing preview
|
|
2929
|
+
const streamlitPreviewResponse = await streamlitPreviewManager.editExistingPreview(agentResponse.edit_streamlit_app_prompt, agentTargetNotebookPanelRef.current);
|
|
2930
|
+
if (streamlitPreviewResponse.type === 'error') {
|
|
2931
|
+
messageToShareWithAgent = streamlitPreviewResponse.message;
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2826
2934
|
}
|
|
2827
2935
|
if (agentExecutionDepth > AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
2828
2936
|
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);
|
|
@@ -2834,33 +2942,33 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2834
2942
|
if (!aiMessage) {
|
|
2835
2943
|
return;
|
|
2836
2944
|
}
|
|
2837
|
-
const updateCellCode = (0,
|
|
2945
|
+
const updateCellCode = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.getCellCodeByID)(notebookTracker, updateCellID);
|
|
2838
2946
|
if (updateCellID === undefined || updateCellCode === undefined) {
|
|
2839
2947
|
return;
|
|
2840
2948
|
}
|
|
2841
2949
|
// Extract the code from the AI's message and then calculate the code diffs
|
|
2842
|
-
const aiGeneratedCode = (0,
|
|
2843
|
-
const aiGeneratedCodeCleaned = (0,
|
|
2844
|
-
const { unifiedCodeString, unifiedDiffs } = (0,
|
|
2950
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.getCodeBlockFromMessage)(aiMessage);
|
|
2951
|
+
const aiGeneratedCodeCleaned = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.removeMarkdownCodeFormatting)(aiGeneratedCode || '');
|
|
2952
|
+
const { unifiedCodeString, unifiedDiffs } = (0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_22__.getCodeDiffsAndUnifiedCodeString)(updateCellCode, aiGeneratedCodeCleaned);
|
|
2845
2953
|
// Store the code cell ID where we write the code diffs so that we can
|
|
2846
2954
|
// accept or reject the code diffs to the correct cell
|
|
2847
2955
|
cellStateBeforeDiff.current = { codeCellID: updateCellID, code: updateCellCode };
|
|
2848
2956
|
// Temporarily write the unified code string to the active cell so we can display
|
|
2849
2957
|
// the code diffs to the user
|
|
2850
|
-
(0,
|
|
2958
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.writeCodeToCellByID)(notebookTracker, unifiedCodeString, updateCellID);
|
|
2851
2959
|
updateCodeCellsExtensions(unifiedDiffs);
|
|
2852
2960
|
// Briefly highlight the code cell to draw the user's attention to it
|
|
2853
|
-
(0,
|
|
2961
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.highlightCodeCell)(notebookTracker, updateCellID);
|
|
2854
2962
|
};
|
|
2855
2963
|
const displayOptimizedChatHistory = chatHistoryManager.getDisplayOptimizedHistory();
|
|
2856
2964
|
const previewAICodeToActiveCell = () => {
|
|
2857
2965
|
setCodeReviewStatus('codeCellPreview');
|
|
2858
|
-
const activeCellID = (0,
|
|
2966
|
+
const activeCellID = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.getActiveCellID)(notebookTracker);
|
|
2859
2967
|
const lastAIDisplayMessage = chatHistoryManagerRef.current.getLastAIDisplayOptimizedChatItem();
|
|
2860
2968
|
if (activeCellID === undefined || lastAIDisplayMessage === undefined) {
|
|
2861
2969
|
return;
|
|
2862
2970
|
}
|
|
2863
|
-
(0,
|
|
2971
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.scrollToCell)(notebookTracker.currentWidget, activeCellID, undefined, 'end');
|
|
2864
2972
|
updateCodeDiffStripes(lastAIDisplayMessage.message, activeCellID);
|
|
2865
2973
|
updateCellToolbarButtons();
|
|
2866
2974
|
};
|
|
@@ -2870,7 +2978,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2870
2978
|
if (!lastAIMessage || !cellStateBeforeDiff.current) {
|
|
2871
2979
|
return;
|
|
2872
2980
|
}
|
|
2873
|
-
const aiGeneratedCode = (0,
|
|
2981
|
+
const aiGeneratedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_18__.getCodeBlockFromMessage)(lastAIMessage.message);
|
|
2874
2982
|
if (!aiGeneratedCode) {
|
|
2875
2983
|
return;
|
|
2876
2984
|
}
|
|
@@ -2879,10 +2987,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2879
2987
|
// Write to the cell that has the code diffs
|
|
2880
2988
|
writeCodeToCellAndTurnOffDiffs(aiGeneratedCode, targetCellID);
|
|
2881
2989
|
// Focus on the active cell after the code is written
|
|
2882
|
-
const targetCell = (0,
|
|
2990
|
+
const targetCell = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.getCellByID)(notebookTracker, targetCellID);
|
|
2883
2991
|
if (targetCell) {
|
|
2884
2992
|
// Make the target cell the active cell
|
|
2885
|
-
(0,
|
|
2993
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.setActiveCellByID)(notebookTracker, targetCellID);
|
|
2886
2994
|
// Focus on the active cell
|
|
2887
2995
|
targetCell.activate();
|
|
2888
2996
|
}
|
|
@@ -2908,7 +3016,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2908
3016
|
updateCodeCellsExtensions(undefined);
|
|
2909
3017
|
cellStateBeforeDiff.current = undefined;
|
|
2910
3018
|
if (codeCellID !== undefined) {
|
|
2911
|
-
(0,
|
|
3019
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_21__.writeCodeToCellByID)(notebookTracker, code, codeCellID);
|
|
2912
3020
|
updateCellToolbarButtons();
|
|
2913
3021
|
}
|
|
2914
3022
|
};
|
|
@@ -2919,17 +3027,17 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2919
3027
|
the first time we create the chat. Registering the command when it is already created causes
|
|
2920
3028
|
errors.
|
|
2921
3029
|
*/
|
|
2922
|
-
app.commands.addCommand(
|
|
3030
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_PREVIEW_LATEST_CODE, {
|
|
2923
3031
|
execute: () => {
|
|
2924
3032
|
previewAICodeToActiveCell();
|
|
2925
3033
|
}
|
|
2926
3034
|
});
|
|
2927
|
-
app.commands.addCommand(
|
|
3035
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_APPLY_LATEST_CODE, {
|
|
2928
3036
|
execute: () => {
|
|
2929
3037
|
acceptAICode();
|
|
2930
3038
|
}
|
|
2931
3039
|
});
|
|
2932
|
-
app.commands.addCommand(
|
|
3040
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_REJECT_LATEST_CODE, {
|
|
2933
3041
|
execute: () => {
|
|
2934
3042
|
rejectAICode();
|
|
2935
3043
|
}
|
|
@@ -2938,19 +3046,19 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2938
3046
|
Add a new command to the JupyterLab command registry that sends the current chat message.
|
|
2939
3047
|
We use this to automatically send the message when the user adds an error to the chat.
|
|
2940
3048
|
*/
|
|
2941
|
-
app.commands.addCommand(
|
|
3049
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_SEND_DEBUG_ERROR_MESSAGE, {
|
|
2942
3050
|
execute: async (args) => {
|
|
2943
3051
|
if (args === null || args === void 0 ? void 0 : args.input) {
|
|
2944
3052
|
await sendSmartDebugMessage(args.input.toString());
|
|
2945
3053
|
}
|
|
2946
3054
|
}
|
|
2947
3055
|
});
|
|
2948
|
-
app.commands.addCommand(
|
|
3056
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_SEND_EXPLAIN_CODE_MESSAGE, {
|
|
2949
3057
|
execute: async () => {
|
|
2950
3058
|
await sendExplainCodeMessage();
|
|
2951
3059
|
}
|
|
2952
3060
|
});
|
|
2953
|
-
app.commands.addCommand(
|
|
3061
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_SEND_AGENT_MESSAGE, {
|
|
2954
3062
|
execute: async (args) => {
|
|
2955
3063
|
if (args === null || args === void 0 ? void 0 : args.input) {
|
|
2956
3064
|
// If its not already in agent mode, start a new chat in agent mode
|
|
@@ -2967,7 +3075,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2967
3075
|
/*
|
|
2968
3076
|
Register the code cell toolbar buttons for accepting and rejecting code.
|
|
2969
3077
|
*/
|
|
2970
|
-
app.commands.addCommand(
|
|
3078
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE, {
|
|
2971
3079
|
label: `Accept ${operatingSystem === 'mac' ? '⌘Y' : 'Ctrl+Y'}`,
|
|
2972
3080
|
className: 'text-button-mito-ai button-base button-green',
|
|
2973
3081
|
caption: 'Accept Code',
|
|
@@ -2985,7 +3093,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2985
3093
|
}
|
|
2986
3094
|
}
|
|
2987
3095
|
});
|
|
2988
|
-
app.commands.addCommand(
|
|
3096
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE, {
|
|
2989
3097
|
label: `Reject ${operatingSystem === 'mac' ? '⌘U' : 'Ctrl+U'}`,
|
|
2990
3098
|
className: 'text-button-mito-ai button-base button-red',
|
|
2991
3099
|
caption: 'Reject Code',
|
|
@@ -3006,13 +3114,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3006
3114
|
// Register keyboard shortcuts
|
|
3007
3115
|
const accelYDisposable = app.commands.addKeyBinding({
|
|
3008
3116
|
command: codeReviewStatus === 'chatPreview' ?
|
|
3009
|
-
|
|
3010
|
-
|
|
3117
|
+
_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_PREVIEW_LATEST_CODE :
|
|
3118
|
+
_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_APPLY_LATEST_CODE,
|
|
3011
3119
|
keys: ['Accel Y'],
|
|
3012
3120
|
selector: 'body',
|
|
3013
3121
|
});
|
|
3014
3122
|
const accelDDisposable = app.commands.addKeyBinding({
|
|
3015
|
-
command:
|
|
3123
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_REJECT_LATEST_CODE,
|
|
3016
3124
|
keys: ['Accel U'],
|
|
3017
3125
|
selector: 'body',
|
|
3018
3126
|
preventDefault: true,
|
|
@@ -3029,8 +3137,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3029
3137
|
// Without this, the user needs to take some action, like switching to a different cell
|
|
3030
3138
|
// and then switching back in order for the Jupyter to re-evaluate if it should
|
|
3031
3139
|
// show the toolbar buttons.
|
|
3032
|
-
app.commands.notifyCommandChanged(
|
|
3033
|
-
app.commands.notifyCommandChanged(
|
|
3140
|
+
app.commands.notifyCommandChanged(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE);
|
|
3141
|
+
app.commands.notifyCommandChanged(_commands__WEBPACK_IMPORTED_MODULE_23__.COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE);
|
|
3034
3142
|
};
|
|
3035
3143
|
const codeDiffStripesCompartments = react__WEBPACK_IMPORTED_MODULE_1___default().useRef(new Map());
|
|
3036
3144
|
// Function to update the extensions of code cells
|
|
@@ -3058,13 +3166,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3058
3166
|
codeDiffStripesCompartments.current.set(cellId, compartment);
|
|
3059
3167
|
// Apply the initial configuration
|
|
3060
3168
|
editorView.dispatch({
|
|
3061
|
-
effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.StateEffect.appendConfig.of(compartment.of(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,
|
|
3169
|
+
effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.StateEffect.appendConfig.of(compartment.of(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,_CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__.codeDiffStripesExtension)({ unifiedDiffLines: unifiedDiffLines }) : [])),
|
|
3062
3170
|
});
|
|
3063
3171
|
}
|
|
3064
3172
|
else {
|
|
3065
3173
|
// Reconfigure the compartment
|
|
3066
3174
|
editorView.dispatch({
|
|
3067
|
-
effects: compartment.reconfigure(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,
|
|
3175
|
+
effects: compartment.reconfigure(unifiedDiffLines !== undefined && isActiveCodeCell ? (0,_CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__.codeDiffStripesExtension)({ unifiedDiffLines: unifiedDiffLines }) : []),
|
|
3068
3176
|
});
|
|
3069
3177
|
}
|
|
3070
3178
|
}
|
|
@@ -3079,7 +3187,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3079
3187
|
// In agent mode, we group consecutive error messages together.
|
|
3080
3188
|
// In chat mode, we display messages individually as they were sent
|
|
3081
3189
|
if (agentModeEnabled) {
|
|
3082
|
-
processedDisplayOptimizedChatHistory = (0,
|
|
3190
|
+
processedDisplayOptimizedChatHistory = (0,_utils_chatHistory__WEBPACK_IMPORTED_MODULE_25__.processChatHistoryForErrorGrouping)(chatHistoryManager.getDisplayOptimizedHistory());
|
|
3083
3191
|
}
|
|
3084
3192
|
else {
|
|
3085
3193
|
processedDisplayOptimizedChatHistory = chatHistoryManager.getDisplayOptimizedHistory();
|
|
@@ -3088,19 +3196,22 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3088
3196
|
const isGroupedErrorMessages = (item) => {
|
|
3089
3197
|
return Array.isArray(item);
|
|
3090
3198
|
};
|
|
3091
|
-
return (
|
|
3199
|
+
return (
|
|
3200
|
+
// We disable the chat taskpane if the user is not signed up AND there are no chat history items
|
|
3201
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_26__.classNames)('chat-taskpane', { 'disabled': !(isSignedUp || displayOptimizedChatHistory.length > 0) }) },
|
|
3092
3202
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header" },
|
|
3093
3203
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-left" },
|
|
3094
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3095
|
-
void app.commands.execute(
|
|
3096
|
-
} })
|
|
3204
|
+
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: () => {
|
|
3205
|
+
void app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_28__.COMMAND_MITO_AI_SETTINGS);
|
|
3206
|
+
} }),
|
|
3207
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_UsageBadge__WEBPACK_IMPORTED_MODULE_29__["default"], { app: app, ref: usageBadgeRef })),
|
|
3097
3208
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-right" },
|
|
3098
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3099
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3209
|
+
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(); } }),
|
|
3210
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_DropdownMenu__WEBPACK_IMPORTED_MODULE_30__["default"], { trigger: react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "icon-button", title: "Chat Threads", onClick: fetchChatThreads },
|
|
3100
3211
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.historyIcon.react, null)), items: chatThreads.length > 0
|
|
3101
3212
|
? chatThreads.map(thread => ({
|
|
3102
3213
|
label: thread.name,
|
|
3103
|
-
primaryIcon: activeThreadIdRef.current === thread.thread_id ?
|
|
3214
|
+
primaryIcon: activeThreadIdRef.current === thread.thread_id ? _icons__WEBPACK_IMPORTED_MODULE_31__.OpenIndicatorLabIcon.react : undefined,
|
|
3104
3215
|
onClick: () => fetchChatHistoryAndSetActiveThread(thread.thread_id),
|
|
3105
3216
|
secondaryActions: [
|
|
3106
3217
|
{
|
|
@@ -3117,38 +3228,36 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3117
3228
|
}], alignment: "right" }))),
|
|
3118
3229
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-messages", ref: chatMessagesRef },
|
|
3119
3230
|
displayOptimizedChatHistory.length === 0 &&
|
|
3120
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-empty-message" },
|
|
3121
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("
|
|
3122
|
-
|
|
3123
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", { style: { display: 'block', textAlign: 'center', fontWeight: 'bold', fontSize: '20px', marginBottom: '15px' } }, "Data Copilot"),
|
|
3124
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_CTACarousel__WEBPACK_IMPORTED_MODULE_29__["default"], { app: app })),
|
|
3231
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-empty-message" }, isSignedUp === false
|
|
3232
|
+
? react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_SignUpForm__WEBPACK_IMPORTED_MODULE_32__["default"], { onSignUpSuccess: refreshUserSignupState })
|
|
3233
|
+
: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_CTACarousel__WEBPACK_IMPORTED_MODULE_33__["default"], { app: app })),
|
|
3125
3234
|
processedDisplayOptimizedChatHistory.map((displayOptimizedChat, index) => {
|
|
3126
3235
|
if (isGroupedErrorMessages(displayOptimizedChat)) {
|
|
3127
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3236
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_34__["default"], { key: index, messages: displayOptimizedChat, renderMimeRegistry: renderMimeRegistry }));
|
|
3128
3237
|
}
|
|
3129
3238
|
else {
|
|
3130
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3239
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_35__["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 }));
|
|
3131
3240
|
}
|
|
3132
3241
|
}).filter(message => message !== null),
|
|
3133
3242
|
loadingAIResponse &&
|
|
3134
3243
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-loading-message" },
|
|
3135
3244
|
"Thinking ",
|
|
3136
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3245
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_36__["default"], null)),
|
|
3137
3246
|
hasCheckpoint &&
|
|
3138
3247
|
agentModeEnabled &&
|
|
3139
3248
|
agentExecutionStatus === 'idle' &&
|
|
3140
3249
|
displayOptimizedChatHistory.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
3141
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3142
|
-
void (0,
|
|
3250
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_37__["default"], { text: "Revert changes", icon: _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_38__["default"], title: "Revert changes", onClick: () => {
|
|
3251
|
+
void (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__.restoreCheckpoint)(app, notebookTracker, setHasCheckpoint);
|
|
3143
3252
|
setDisplayedNextStepsIfAvailable(false);
|
|
3144
3253
|
setHasCheckpoint(false);
|
|
3145
3254
|
setShowRevertQuestionnaire(true);
|
|
3146
|
-
(0,
|
|
3255
|
+
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_13__.scrollToDiv)(chatMessagesRef);
|
|
3147
3256
|
}, variant: "gray", width: "fit-contents", iconPosition: "left" }),
|
|
3148
3257
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("p", { className: "text-muted text-sm" }, "Undo the most recent changes made by the agent"))),
|
|
3149
|
-
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3258
|
+
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_39__["default"], { onDestroy: () => setShowRevertQuestionnaire(false), getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager }))),
|
|
3150
3259
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "suggestions-container" },
|
|
3151
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3260
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_40__["default"], { onSelectSuggestion: (prompt) => {
|
|
3152
3261
|
if (agentModeEnabled) {
|
|
3153
3262
|
void startAgentExecution(prompt);
|
|
3154
3263
|
}
|
|
@@ -3157,15 +3266,11 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3157
3266
|
}
|
|
3158
3267
|
} }))),
|
|
3159
3268
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: `connected-input-container ${nextSteps.length > 0 ? 'has-next-steps' : ''}` },
|
|
3160
|
-
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3161
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3162
|
-
agentExecutionStatus === 'stopping' ? 'Agent is stopping...' :
|
|
3163
|
-
agentModeEnabled ? 'Ask agent to do anything' :
|
|
3164
|
-
displayOptimizedChatHistory.length < 2 ? `Ask question (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`
|
|
3165
|
-
: `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`, onSave: agentModeEnabled ? startAgentExecution : sendChatInputMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecutionStatus })),
|
|
3269
|
+
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_NextStepsPills__WEBPACK_IMPORTED_MODULE_41__["default"], { nextSteps: nextSteps, onSelectNextStep: agentModeEnabled ? startAgentExecution : sendChatInputMessage, displayedNextStepsIfAvailable: displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable })),
|
|
3270
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_42__["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 })),
|
|
3166
3271
|
agentExecutionStatus !== 'working' && agentExecutionStatus !== 'stopping' && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls" },
|
|
3167
3272
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls-left" },
|
|
3168
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3273
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_ToggleButton__WEBPACK_IMPORTED_MODULE_43__["default"], { leftText: "Chat", leftTooltip: "Chat mode suggests an edit to the active cell and let's you decide to accept or reject it.", rightText: "Agent", rightTooltip: "Agent mode writes and executes code until it's finished your request.", isLeftSelected: !agentModeEnabled, onChange: async (isLeftSelected) => {
|
|
3169
3274
|
await startNewChat(); // TODO: delete thread instead of starting new chat
|
|
3170
3275
|
setAgentModeEnabled(!isLeftSelected);
|
|
3171
3276
|
// Clear agent checkpoint when switching modes
|
|
@@ -3201,7 +3306,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3201
3306
|
" \u23CE"))),
|
|
3202
3307
|
(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" },
|
|
3203
3308
|
"Stopping",
|
|
3204
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3309
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_44__["default"], null),
|
|
3205
3310
|
" ")) : ('Stop Agent')))));
|
|
3206
3311
|
};
|
|
3207
3312
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatTaskpane);
|
|
@@ -3290,7 +3395,7 @@ class ChatWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.React
|
|
|
3290
3395
|
super.dispose();
|
|
3291
3396
|
}
|
|
3292
3397
|
render() {
|
|
3293
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatTaskpane__WEBPACK_IMPORTED_MODULE_6__["default"], { app: this.options.app, notebookTracker: this.options.notebookTracker, renderMimeRegistry: this.options.renderMimeRegistry, contextManager: this.options.contextManager, operatingSystem: this.options.operatingSystem, websocketClient: this.websocketClient }));
|
|
3398
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatTaskpane__WEBPACK_IMPORTED_MODULE_6__["default"], { app: this.options.app, notebookTracker: this.options.notebookTracker, renderMimeRegistry: this.options.renderMimeRegistry, contextManager: this.options.contextManager, streamlitPreviewManager: this.options.streamlitPreviewManager, operatingSystem: this.options.operatingSystem, websocketClient: this.websocketClient }));
|
|
3294
3399
|
}
|
|
3295
3400
|
onMessage(client, message) {
|
|
3296
3401
|
switch (message.type) {
|
|
@@ -3303,7 +3408,7 @@ class ChatWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.React
|
|
|
3303
3408
|
}
|
|
3304
3409
|
}
|
|
3305
3410
|
}
|
|
3306
|
-
function buildChatWidget(app, notebookTracker, renderMimeRegistry, contextManager) {
|
|
3411
|
+
function buildChatWidget(app, notebookTracker, renderMimeRegistry, contextManager, streamlitPreviewManager) {
|
|
3307
3412
|
// Get the operating system here so we don't have to do it each time the chat changes.
|
|
3308
3413
|
// The operating system won't change, duh.
|
|
3309
3414
|
const operatingSystem = (0,_utils_user__WEBPACK_IMPORTED_MODULE_7__.getOperatingSystem)();
|
|
@@ -3312,6 +3417,7 @@ function buildChatWidget(app, notebookTracker, renderMimeRegistry, contextManage
|
|
|
3312
3417
|
notebookTracker,
|
|
3313
3418
|
renderMimeRegistry,
|
|
3314
3419
|
contextManager,
|
|
3420
|
+
streamlitPreviewManager: streamlitPreviewManager,
|
|
3315
3421
|
operatingSystem
|
|
3316
3422
|
});
|
|
3317
3423
|
chatWidget.id = 'mito_ai';
|
|
@@ -3475,6 +3581,147 @@ const getFirstMessageFromCookie = () => {
|
|
|
3475
3581
|
};
|
|
3476
3582
|
|
|
3477
3583
|
|
|
3584
|
+
/***/ }),
|
|
3585
|
+
|
|
3586
|
+
/***/ "./lib/Extensions/AiChat/SignUpForm.js":
|
|
3587
|
+
/*!*********************************************!*\
|
|
3588
|
+
!*** ./lib/Extensions/AiChat/SignUpForm.js ***!
|
|
3589
|
+
\*********************************************/
|
|
3590
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3591
|
+
|
|
3592
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3593
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3594
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3595
|
+
/* harmony export */ });
|
|
3596
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
3597
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3598
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
3599
|
+
/* harmony import */ var _icons_MitoLogo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../icons/MitoLogo */ "./lib/icons/MitoLogo.js");
|
|
3600
|
+
/* harmony import */ var _utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/userSignupEvents */ "./lib/utils/userSignupEvents.js");
|
|
3601
|
+
/* harmony import */ var _style_SignUpForm_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/SignUpForm.css */ "./style/SignUpForm.css");
|
|
3602
|
+
/*
|
|
3603
|
+
* Copyright (c) Saga Inc.
|
|
3604
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
3605
|
+
*/
|
|
3606
|
+
|
|
3607
|
+
|
|
3608
|
+
|
|
3609
|
+
|
|
3610
|
+
|
|
3611
|
+
const SignUpForm = ({ onSignUpSuccess }) => {
|
|
3612
|
+
const [email, setEmail] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
3613
|
+
const handleSubmit = async (e) => {
|
|
3614
|
+
e.preventDefault();
|
|
3615
|
+
try {
|
|
3616
|
+
await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.setUserKey)('user_email', email);
|
|
3617
|
+
onSignUpSuccess === null || onSignUpSuccess === void 0 ? void 0 : onSignUpSuccess();
|
|
3618
|
+
// Emit signup success event for other components to listen to
|
|
3619
|
+
_utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_3__.userSignupEvents.emitSignupSuccess();
|
|
3620
|
+
}
|
|
3621
|
+
catch (error) {
|
|
3622
|
+
console.error('Failed to set user email:', error);
|
|
3623
|
+
}
|
|
3624
|
+
};
|
|
3625
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "signup-form-container" },
|
|
3626
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "signup-form-header-logo" },
|
|
3627
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_MitoLogo__WEBPACK_IMPORTED_MODULE_4__["default"], { width: "60", height: "30" })),
|
|
3628
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "signup-form-header" }, "Sign Up for Mito"),
|
|
3629
|
+
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."),
|
|
3630
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("form", { onSubmit: handleSubmit, style: { marginTop: '15px' } },
|
|
3631
|
+
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 }),
|
|
3632
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "submit", className: "button-base signup-form-button" }, "Sign Up"))));
|
|
3633
|
+
};
|
|
3634
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SignUpForm);
|
|
3635
|
+
|
|
3636
|
+
|
|
3637
|
+
/***/ }),
|
|
3638
|
+
|
|
3639
|
+
/***/ "./lib/Extensions/AiChat/UsageBadge.js":
|
|
3640
|
+
/*!*********************************************!*\
|
|
3641
|
+
!*** ./lib/Extensions/AiChat/UsageBadge.js ***!
|
|
3642
|
+
\*********************************************/
|
|
3643
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3644
|
+
|
|
3645
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3646
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3647
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
3648
|
+
/* harmony export */ });
|
|
3649
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
3650
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3651
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
3652
|
+
/* harmony import */ var _style_UsageBadge_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/UsageBadge.css */ "./style/UsageBadge.css");
|
|
3653
|
+
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
3654
|
+
/*
|
|
3655
|
+
* Copyright (c) Saga Inc.
|
|
3656
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
3657
|
+
*/
|
|
3658
|
+
|
|
3659
|
+
|
|
3660
|
+
|
|
3661
|
+
|
|
3662
|
+
const MAX_FREE_USAGE = 150;
|
|
3663
|
+
const SVG_SIZE = 16;
|
|
3664
|
+
const CIRCLE_RADIUS = 5.5;
|
|
3665
|
+
const CIRCLE_CENTER = SVG_SIZE / 2; // Center x and y coordinates
|
|
3666
|
+
const UsageBadge = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(({ app }, ref) => {
|
|
3667
|
+
const [isPro, setIsPro] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
3668
|
+
const [usageCount, setUsageCount] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
3669
|
+
const getAiMitoApiNumUsages = async () => {
|
|
3670
|
+
const usageCount = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.getUserKey)('ai_mito_api_num_usages');
|
|
3671
|
+
return usageCount ? parseInt(usageCount) : 0;
|
|
3672
|
+
};
|
|
3673
|
+
const fetchIsPro = async () => {
|
|
3674
|
+
const isPro = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.getUserKey)('is_pro');
|
|
3675
|
+
setIsPro(isPro === 'True');
|
|
3676
|
+
};
|
|
3677
|
+
const fetchUsageCount = async () => {
|
|
3678
|
+
const count = await getAiMitoApiNumUsages();
|
|
3679
|
+
setUsageCount(count);
|
|
3680
|
+
};
|
|
3681
|
+
// Expose refresh method to parent component
|
|
3682
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, () => ({
|
|
3683
|
+
refresh: async () => {
|
|
3684
|
+
await Promise.all([fetchIsPro(), fetchUsageCount()]);
|
|
3685
|
+
}
|
|
3686
|
+
}));
|
|
3687
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
3688
|
+
void fetchIsPro();
|
|
3689
|
+
void fetchUsageCount();
|
|
3690
|
+
}, []);
|
|
3691
|
+
// Calculate progress
|
|
3692
|
+
const percentage = Math.min((usageCount / MAX_FREE_USAGE) * 100, 100);
|
|
3693
|
+
const circumference = 2 * Math.PI * CIRCLE_RADIUS;
|
|
3694
|
+
const strokeDashoffset = circumference - (percentage / 100) * circumference;
|
|
3695
|
+
// Determine color based on usage - green to red
|
|
3696
|
+
const getColor = () => {
|
|
3697
|
+
if (percentage < 50)
|
|
3698
|
+
return 'var(--green-600)';
|
|
3699
|
+
if (percentage < 80)
|
|
3700
|
+
return 'var(--yellow-600)';
|
|
3701
|
+
return 'var(--red-500)';
|
|
3702
|
+
};
|
|
3703
|
+
if (isPro) {
|
|
3704
|
+
// If the user is pro, don't show the usage badge
|
|
3705
|
+
return null;
|
|
3706
|
+
}
|
|
3707
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "usage-badge", onClick: () => {
|
|
3708
|
+
void app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_3__.COMMAND_MITO_AI_SETTINGS_SUBSCRIPTION);
|
|
3709
|
+
}, title: `${usageCount}/${MAX_FREE_USAGE} free AI messages used` },
|
|
3710
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { className: "usage-badge-svg", width: SVG_SIZE, height: SVG_SIZE },
|
|
3711
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { className: "usage-badge-circle-background", cx: CIRCLE_CENTER, cy: CIRCLE_CENTER, r: CIRCLE_RADIUS }),
|
|
3712
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { className: "usage-badge-circle-progress", style: {
|
|
3713
|
+
stroke: getColor(),
|
|
3714
|
+
strokeDasharray: circumference,
|
|
3715
|
+
strokeDashoffset: strokeDashoffset,
|
|
3716
|
+
}, cx: CIRCLE_CENTER, cy: CIRCLE_CENTER, r: CIRCLE_RADIUS })),
|
|
3717
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "usage-badge-text" }, usageCount >= MAX_FREE_USAGE
|
|
3718
|
+
? 'Upgrade to Pro'
|
|
3719
|
+
: `${usageCount}/${MAX_FREE_USAGE}`)));
|
|
3720
|
+
});
|
|
3721
|
+
UsageBadge.displayName = 'UsageBadge';
|
|
3722
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UsageBadge);
|
|
3723
|
+
|
|
3724
|
+
|
|
3478
3725
|
/***/ }),
|
|
3479
3726
|
|
|
3480
3727
|
/***/ "./lib/Extensions/AiChat/jupyterSettingsManager.js":
|
|
@@ -3619,7 +3866,7 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
3619
3866
|
// Create a copy to avoid mutating the original
|
|
3620
3867
|
const correctedResponse = { ...agentResponse };
|
|
3621
3868
|
// Ensure type is valid. Default to finished_task if not valid.
|
|
3622
|
-
const validTypes = ['cell_update', 'get_cell_output', 'run_all_cells', 'finished_task'];
|
|
3869
|
+
const validTypes = ['cell_update', 'get_cell_output', 'run_all_cells', 'finished_task', 'create_streamlit_app', 'edit_streamlit_app'];
|
|
3623
3870
|
correctedResponse.type = (correctedResponse.type && validTypes.includes(correctedResponse.type))
|
|
3624
3871
|
? correctedResponse.type
|
|
3625
3872
|
: 'finished_task';
|
|
@@ -3640,6 +3887,9 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
3640
3887
|
// No empty strings in the assumptions
|
|
3641
3888
|
correctedResponse.analysis_assumptions = (_a = correctedResponse.analysis_assumptions) === null || _a === void 0 ? void 0 : _a.filter(assumption => assumption.trim() !== '');
|
|
3642
3889
|
}
|
|
3890
|
+
// Correct edit_streamlit_app_prompt - ensure it's a string when present
|
|
3891
|
+
const editStreamlitAppPromptType = typeof correctedResponse.edit_streamlit_app_prompt;
|
|
3892
|
+
correctedResponse.edit_streamlit_app_prompt = editStreamlitAppPromptType === 'string' ? correctedResponse.edit_streamlit_app_prompt : undefined;
|
|
3643
3893
|
// For now we don't validate the cell_update object itself, as this is more complex and has
|
|
3644
3894
|
// not caused issues thus far.
|
|
3645
3895
|
return correctedResponse;
|
|
@@ -3984,7 +4234,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3984
4234
|
This function generates the requirements.txt file needed to host the streamlit app,
|
|
3985
4235
|
and deploys it!
|
|
3986
4236
|
*/
|
|
3987
|
-
const deployStreamlitApp = async (
|
|
4237
|
+
const deployStreamlitApp = async (notebookPanel, appDeployService, appManagerService) => {
|
|
3988
4238
|
let selectedFiles = [];
|
|
3989
4239
|
let jwtToken = await (0,_auth__WEBPACK_IMPORTED_MODULE_2__.getJWTToken)();
|
|
3990
4240
|
if (!jwtToken) {
|
|
@@ -4008,19 +4258,14 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
4008
4258
|
return; // Exit early if authentication was cancelled
|
|
4009
4259
|
}
|
|
4010
4260
|
}
|
|
4011
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
4012
|
-
if (!notebookPanel) {
|
|
4013
|
-
console.error('No notebook is currently active');
|
|
4014
|
-
return;
|
|
4015
|
-
}
|
|
4016
4261
|
const notebookPath = notebookPanel.context.path;
|
|
4017
4262
|
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit('Step 1/7: Gathering requirements...', 'in-progress', {
|
|
4018
4263
|
autoClose: false
|
|
4019
4264
|
});
|
|
4020
4265
|
// Build the requirements.txt file
|
|
4021
|
-
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_4__.generateRequirementsTxt)(
|
|
4266
|
+
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_4__.generateRequirementsTxt)(notebookPanel);
|
|
4022
4267
|
// Save the files to the current directory
|
|
4023
|
-
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_5__.saveFileWithKernel)(
|
|
4268
|
+
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_5__.saveFileWithKernel)(notebookPanel, './requirements.txt', requirementsContent);
|
|
4024
4269
|
try {
|
|
4025
4270
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.dismiss(notificationId);
|
|
4026
4271
|
selectedFiles = await (0,_FilesSelectorUtils__WEBPACK_IMPORTED_MODULE_6__.fileSelectorPopup)(notebookPath);
|
|
@@ -4037,16 +4282,25 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
4037
4282
|
console.log("Sending request to deploy the app");
|
|
4038
4283
|
// Use the JWT token that was already obtained or refreshed above
|
|
4039
4284
|
const response = await appDeployService.client.sendMessage({
|
|
4040
|
-
type: '
|
|
4285
|
+
type: 'deploy_app',
|
|
4041
4286
|
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.UUID.uuid4(),
|
|
4042
4287
|
notebook_path: notebookPath,
|
|
4043
4288
|
jwt_token: jwtToken,
|
|
4044
4289
|
selected_files: selectedFiles
|
|
4045
4290
|
});
|
|
4046
4291
|
if (response.error) {
|
|
4292
|
+
const errorMsg = response.error;
|
|
4293
|
+
console.group('Deploy App Error:');
|
|
4294
|
+
console.error('Type:', errorMsg.error_type);
|
|
4295
|
+
console.error('Title:', errorMsg.message);
|
|
4296
|
+
console.error('Hint:', errorMsg.hint);
|
|
4297
|
+
let displayMessage = String(errorMsg.message);
|
|
4298
|
+
if (errorMsg.hint) {
|
|
4299
|
+
displayMessage = displayMessage + "\n" + "Hint:" + String(errorMsg.hint);
|
|
4300
|
+
}
|
|
4047
4301
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
4048
4302
|
id: newNotificationId,
|
|
4049
|
-
message:
|
|
4303
|
+
message: displayMessage,
|
|
4050
4304
|
type: 'error',
|
|
4051
4305
|
autoClose: false
|
|
4052
4306
|
});
|
|
@@ -4058,8 +4312,14 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
4058
4312
|
}
|
|
4059
4313
|
}
|
|
4060
4314
|
catch (error) {
|
|
4061
|
-
// TODO:
|
|
4315
|
+
// TODO: In the future, remove this if we dont see any connection errors that need to be caught
|
|
4062
4316
|
console.error("Error deploying app:", error);
|
|
4317
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
4318
|
+
id: newNotificationId,
|
|
4319
|
+
message: String(error),
|
|
4320
|
+
type: 'error',
|
|
4321
|
+
autoClose: false
|
|
4322
|
+
});
|
|
4063
4323
|
}
|
|
4064
4324
|
};
|
|
4065
4325
|
|
|
@@ -4421,12 +4681,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4421
4681
|
* Copyright (c) Saga Inc.
|
|
4422
4682
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4423
4683
|
*/
|
|
4424
|
-
const saveFileWithKernel = async (
|
|
4425
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
4426
|
-
if (!notebookPanel) {
|
|
4427
|
-
console.error('No notebook is currently active');
|
|
4428
|
-
return;
|
|
4429
|
-
}
|
|
4684
|
+
const saveFileWithKernel = async (notebookPanel, filePath, fileContent) => {
|
|
4430
4685
|
try {
|
|
4431
4686
|
// Use the kernel to execute Python code
|
|
4432
4687
|
const session = notebookPanel.sessionContext.session;
|
|
@@ -4490,12 +4745,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4490
4745
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4491
4746
|
*/
|
|
4492
4747
|
// Function to generate requirements.txt content using the kernel with pipreqs
|
|
4493
|
-
const generateRequirementsTxt = async (
|
|
4494
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
4495
|
-
if (!notebookPanel) {
|
|
4496
|
-
console.error('No notebook is currently active');
|
|
4497
|
-
return '';
|
|
4498
|
-
}
|
|
4748
|
+
const generateRequirementsTxt = async (notebookPanel) => {
|
|
4499
4749
|
// Initialize with fallback requirements in case kernel execution fails
|
|
4500
4750
|
let requirementsContent = 'streamlit>=1.28.0';
|
|
4501
4751
|
try {
|
|
@@ -4982,6 +5232,7 @@ const ManageAppsPlugin = {
|
|
|
4982
5232
|
|
|
4983
5233
|
__webpack_require__.r(__webpack_exports__);
|
|
4984
5234
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5235
|
+
/* harmony export */ IStreamlitPreviewManager: () => (/* binding */ IStreamlitPreviewManager),
|
|
4985
5236
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4986
5237
|
/* harmony export */ });
|
|
4987
5238
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
@@ -4992,14 +5243,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4992
5243
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
4993
5244
|
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
|
|
4994
5245
|
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_3__);
|
|
4995
|
-
/* harmony import */ var
|
|
4996
|
-
/* harmony import */ var
|
|
4997
|
-
/* harmony import */ var
|
|
4998
|
-
/* harmony import */ var
|
|
4999
|
-
/* harmony import */ var
|
|
5000
|
-
/* harmony import */ var
|
|
5001
|
-
/* harmony import */ var
|
|
5002
|
-
/* harmony import */ var
|
|
5246
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
5247
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__);
|
|
5248
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
5249
|
+
/* harmony import */ var _AppDeploy_DeployStreamlitApp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../AppDeploy/DeployStreamlitApp */ "./lib/Extensions/AppDeploy/DeployStreamlitApp.js");
|
|
5250
|
+
/* harmony import */ var _AppDeploy_AppDeployPlugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../AppDeploy/AppDeployPlugin */ "./lib/Extensions/AppDeploy/AppDeployPlugin.js");
|
|
5251
|
+
/* harmony import */ var _AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../AppManager/ManageAppsPlugin */ "./lib/Extensions/AppManager/ManageAppsPlugin.js");
|
|
5252
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
5253
|
+
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
5254
|
+
/* harmony import */ var _style_StreamlitPreviewPlugin_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/StreamlitPreviewPlugin.css */ "./style/StreamlitPreviewPlugin.css");
|
|
5255
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AppPreview/utils.js");
|
|
5256
|
+
/* harmony import */ var _UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UpdateAppDropdown */ "./lib/Extensions/AppPreview/UpdateAppDropdown.js");
|
|
5003
5257
|
/*
|
|
5004
5258
|
* Copyright (c) Saga Inc.
|
|
5005
5259
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -5018,6 +5272,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5018
5272
|
|
|
5019
5273
|
|
|
5020
5274
|
|
|
5275
|
+
|
|
5276
|
+
/**
|
|
5277
|
+
* The token for the StreamlitPreview service.
|
|
5278
|
+
*/
|
|
5279
|
+
const IStreamlitPreviewManager = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.Token('mito-ai:IStreamlitPreviewManager', 'Token for the StreamlitPreview service that manages app previews');
|
|
5021
5280
|
/**
|
|
5022
5281
|
* Simple HTML widget for displaying iframe content.
|
|
5023
5282
|
*/
|
|
@@ -5040,150 +5299,344 @@ class IFrameWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {
|
|
|
5040
5299
|
}
|
|
5041
5300
|
}
|
|
5042
5301
|
/**
|
|
5043
|
-
*
|
|
5302
|
+
* Manages Streamlit app previews with a single-preview policy.
|
|
5303
|
+
* Ensures only one preview can be open at a time.
|
|
5044
5304
|
*/
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5305
|
+
class StreamlitAppPreviewManager {
|
|
5306
|
+
constructor(appDeployService, appManagerService) {
|
|
5307
|
+
this.currentPreview = null;
|
|
5308
|
+
this.appDeployService = appDeployService;
|
|
5309
|
+
this.appManagerService = appManagerService;
|
|
5310
|
+
}
|
|
5311
|
+
/**
|
|
5312
|
+
* Create a new Streamlit app preview, replacing any existing preview.
|
|
5313
|
+
*/
|
|
5314
|
+
async openAppPreview(app, notebookPanel) {
|
|
5315
|
+
// Close existing preview if any
|
|
5316
|
+
this.closeCurrentPreview();
|
|
5317
|
+
// First save the notebook to ensure the app is up to date
|
|
5318
|
+
await notebookPanel.context.save();
|
|
5319
|
+
const notebookPath = notebookPanel.context.path;
|
|
5320
|
+
const streamlitPreviewResponse = await (0,_utils__WEBPACK_IMPORTED_MODULE_6__.startStreamlitPreviewAndNotify)(notebookPath);
|
|
5321
|
+
if (streamlitPreviewResponse.type === 'error') {
|
|
5322
|
+
return streamlitPreviewResponse;
|
|
5323
|
+
}
|
|
5324
|
+
// Create the new preview widget
|
|
5325
|
+
const widget = this.createPreviewWidget(app, notebookPanel, this.appDeployService, this.appManagerService, streamlitPreviewResponse);
|
|
5326
|
+
// Store current preview info
|
|
5327
|
+
this.currentPreview = widget;
|
|
5328
|
+
// Add widget to main area with split-right mode
|
|
5329
|
+
app.shell.add(widget, 'main', {
|
|
5330
|
+
mode: 'split-right',
|
|
5331
|
+
ref: notebookPanel.id
|
|
5063
5332
|
});
|
|
5333
|
+
return streamlitPreviewResponse;
|
|
5064
5334
|
}
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
async
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5335
|
+
/**
|
|
5336
|
+
* Edit the existing Streamlit app preview by updating the app.py file.
|
|
5337
|
+
* The preview will auto-refresh due to --server.runOnSave in manager.py
|
|
5338
|
+
*/
|
|
5339
|
+
async editExistingPreview(editPrompt, notebookPanel) {
|
|
5340
|
+
if (!this.currentPreview) {
|
|
5341
|
+
throw new Error('No active preview to edit');
|
|
5342
|
+
}
|
|
5343
|
+
// First save the notebook to ensure the app is able
|
|
5344
|
+
// to read the most up to date version of the notebook.
|
|
5345
|
+
// Because we are parsing the notebook on the backend by reading
|
|
5346
|
+
// the file system, it only sees the last saved version of the notebook.
|
|
5347
|
+
await notebookPanel.context.save();
|
|
5348
|
+
// Update the app with the edit prompt
|
|
5349
|
+
const streamlitPreviewResponse = await (0,_utils__WEBPACK_IMPORTED_MODULE_6__.startStreamlitPreviewAndNotify)(notebookPanel.context.path, true, // force_recreate
|
|
5350
|
+
editPrompt, 'Editing Streamlit app...', 'Streamlit app updated successfully!');
|
|
5351
|
+
return streamlitPreviewResponse;
|
|
5074
5352
|
}
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5353
|
+
/**
|
|
5354
|
+
* Close the current preview if one exists.
|
|
5355
|
+
*/
|
|
5356
|
+
closeCurrentPreview() {
|
|
5357
|
+
if (this.currentPreview) {
|
|
5358
|
+
console.log('Closing current preview');
|
|
5359
|
+
this.currentPreview.dispose();
|
|
5360
|
+
this.currentPreview = null;
|
|
5361
|
+
}
|
|
5362
|
+
}
|
|
5363
|
+
/**
|
|
5364
|
+
* Check if there's an active preview.
|
|
5365
|
+
*/
|
|
5366
|
+
hasActivePreview() {
|
|
5367
|
+
return this.currentPreview !== null;
|
|
5368
|
+
}
|
|
5369
|
+
/**
|
|
5370
|
+
* Get the current preview widget.
|
|
5371
|
+
*/
|
|
5372
|
+
getCurrentPreview() {
|
|
5373
|
+
return this.currentPreview;
|
|
5374
|
+
}
|
|
5375
|
+
/**
|
|
5376
|
+
* Create a new preview widget with toolbar buttons.
|
|
5377
|
+
*/
|
|
5378
|
+
createPreviewWidget(app, notebookPanel, appDeployService, appManagerService, previewData) {
|
|
5088
5379
|
const iframeWidget = new IFrameWidget(previewData.url);
|
|
5380
|
+
// Log that the preview is open
|
|
5381
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_7__.logEvent)('opened_streamlit_app_preview');
|
|
5089
5382
|
// Create main area widget
|
|
5090
5383
|
const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content: iframeWidget });
|
|
5384
|
+
const notebookPath = notebookPanel.context.path;
|
|
5385
|
+
const notebookName = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PathExt.basename(notebookPath, '.ipynb');
|
|
5091
5386
|
widget.title.label = `App Preview (${notebookName})`;
|
|
5092
5387
|
widget.title.closable = true;
|
|
5093
|
-
//
|
|
5094
|
-
const
|
|
5388
|
+
// Create toolbar buttons
|
|
5389
|
+
const editAppButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5095
5390
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5096
5391
|
onClick: () => {
|
|
5097
|
-
|
|
5392
|
+
(0,_UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__.showUpdateAppDropdown)(editAppButton.node, notebookPanel);
|
|
5098
5393
|
},
|
|
5099
|
-
tooltip: '
|
|
5100
|
-
label: '
|
|
5101
|
-
icon:
|
|
5394
|
+
tooltip: 'Edit Streamlit App',
|
|
5395
|
+
label: 'Edit App',
|
|
5396
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_9__.EditLabIcon,
|
|
5397
|
+
iconClass: 'mito-ai-deploy-icon'
|
|
5398
|
+
});
|
|
5399
|
+
const recreateAppButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5400
|
+
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5401
|
+
onClick: async () => {
|
|
5402
|
+
await (0,_utils__WEBPACK_IMPORTED_MODULE_6__.showRecreateAppConfirmation)(notebookPath);
|
|
5403
|
+
},
|
|
5404
|
+
tooltip: 'Recreate new App from scratch based on the current state of the notebook',
|
|
5405
|
+
label: 'Recreate App',
|
|
5406
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_9__.ResetCircleLabIcon,
|
|
5102
5407
|
iconClass: 'mito-ai-deploy-icon'
|
|
5103
5408
|
});
|
|
5104
|
-
|
|
5105
|
-
const refreshButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5409
|
+
const deployButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5106
5410
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5107
5411
|
onClick: () => {
|
|
5108
|
-
void (0,
|
|
5412
|
+
void (0,_AppDeploy_DeployStreamlitApp__WEBPACK_IMPORTED_MODULE_10__.deployStreamlitApp)(notebookPanel, appDeployService, appManagerService);
|
|
5109
5413
|
},
|
|
5110
|
-
tooltip: '
|
|
5111
|
-
label: '
|
|
5112
|
-
icon:
|
|
5414
|
+
tooltip: 'Deploy Streamlit App',
|
|
5415
|
+
label: 'Deploy App',
|
|
5416
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_9__.DeployLabIcon,
|
|
5113
5417
|
iconClass: 'mito-ai-deploy-icon'
|
|
5114
5418
|
});
|
|
5115
|
-
// Insert the
|
|
5116
|
-
widget.toolbar.insertAfter('spacer', '
|
|
5117
|
-
widget.toolbar.insertAfter('
|
|
5419
|
+
// Insert the buttons into the toolbar
|
|
5420
|
+
widget.toolbar.insertAfter('spacer', 'edit-app-button', editAppButton);
|
|
5421
|
+
widget.toolbar.insertAfter('edit-app-button', 'recreate-app-button', recreateAppButton);
|
|
5422
|
+
if (app.commands.hasCommand(_commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_BETA_MODE_ENABLED)) {
|
|
5423
|
+
widget.toolbar.insertAfter('recreate-app-button', 'deploy-app-button', deployButton);
|
|
5424
|
+
}
|
|
5118
5425
|
// Handle widget disposal
|
|
5119
5426
|
widget.disposed.connect(() => {
|
|
5120
5427
|
console.log('Widget disposed, stopping preview');
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5428
|
+
if (previewData) {
|
|
5429
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_7__.stopStreamlitPreview)(previewData.id);
|
|
5430
|
+
}
|
|
5431
|
+
// Clear our reference when the widget is disposed
|
|
5432
|
+
if (this.currentPreview === widget) {
|
|
5433
|
+
this.currentPreview = null;
|
|
5434
|
+
}
|
|
5127
5435
|
});
|
|
5128
|
-
|
|
5129
|
-
catch (error) {
|
|
5130
|
-
console.error('Error starting streamlit preview:', error);
|
|
5131
|
-
// Update notification to error
|
|
5132
|
-
if (globalNotificationId) {
|
|
5133
|
-
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.update({
|
|
5134
|
-
id: globalNotificationId,
|
|
5135
|
-
message: `Failed to start preview: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
5136
|
-
type: 'error',
|
|
5137
|
-
autoClose: false
|
|
5138
|
-
});
|
|
5139
|
-
}
|
|
5436
|
+
return widget;
|
|
5140
5437
|
}
|
|
5141
5438
|
}
|
|
5439
|
+
/**
|
|
5440
|
+
* The streamlit preview plugin.
|
|
5441
|
+
*/
|
|
5442
|
+
const StreamlitPreviewPlugin = {
|
|
5443
|
+
id: 'mito-ai:streamlit-preview',
|
|
5444
|
+
autoStart: true,
|
|
5445
|
+
requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__.INotebookTracker, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette, _AppDeploy_AppDeployPlugin__WEBPACK_IMPORTED_MODULE_12__.IAppDeployService, _AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_13__.IAppManagerService],
|
|
5446
|
+
provides: IStreamlitPreviewManager,
|
|
5447
|
+
activate: (app, notebookTracker, palette, appDeployService, appManagerService) => {
|
|
5448
|
+
console.log('mito-ai: StreamlitPreviewPlugin activated');
|
|
5449
|
+
// Create the service instance
|
|
5450
|
+
const streamlitPreviewManager = new StreamlitAppPreviewManager(appDeployService, appManagerService);
|
|
5451
|
+
// Add command to command palette
|
|
5452
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT, {
|
|
5453
|
+
label: 'Preview as Streamlit',
|
|
5454
|
+
caption: 'Convert current notebook to Streamlit app and preview it',
|
|
5455
|
+
execute: async () => {
|
|
5456
|
+
// Instead of using the notebook tracker, we could pass the notebook panel directly, but this button
|
|
5457
|
+
// is only used in the notebook toolbar, so its okay.
|
|
5458
|
+
if (notebookTracker.currentWidget) {
|
|
5459
|
+
await streamlitPreviewManager.openAppPreview(app, notebookTracker.currentWidget);
|
|
5460
|
+
}
|
|
5461
|
+
else {
|
|
5462
|
+
console.error('No notebook is currently active');
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
});
|
|
5466
|
+
// Add to command palette
|
|
5467
|
+
palette.addItem({
|
|
5468
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT,
|
|
5469
|
+
category: 'Mito AI'
|
|
5470
|
+
});
|
|
5471
|
+
// Return the service so other plugins can use it
|
|
5472
|
+
return streamlitPreviewManager;
|
|
5473
|
+
}
|
|
5474
|
+
};
|
|
5142
5475
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StreamlitPreviewPlugin);
|
|
5143
5476
|
|
|
5144
5477
|
|
|
5145
5478
|
/***/ }),
|
|
5146
5479
|
|
|
5147
|
-
/***/ "./lib/Extensions/AppPreview/
|
|
5148
|
-
|
|
5149
|
-
!*** ./lib/Extensions/AppPreview/
|
|
5150
|
-
|
|
5480
|
+
/***/ "./lib/Extensions/AppPreview/UpdateAppDropdown.js":
|
|
5481
|
+
/*!********************************************************!*\
|
|
5482
|
+
!*** ./lib/Extensions/AppPreview/UpdateAppDropdown.js ***!
|
|
5483
|
+
\********************************************************/
|
|
5151
5484
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5152
5485
|
|
|
5153
5486
|
__webpack_require__.r(__webpack_exports__);
|
|
5154
5487
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5155
|
-
/* harmony export */
|
|
5488
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
5489
|
+
/* harmony export */ showUpdateAppDropdown: () => (/* binding */ showUpdateAppDropdown)
|
|
5156
5490
|
/* harmony export */ });
|
|
5157
|
-
/* harmony import */ var
|
|
5158
|
-
/* harmony import */ var
|
|
5159
|
-
/* harmony import */ var
|
|
5491
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5492
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5493
|
+
/* harmony import */ var _style_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/EditAppDropdown.css */ "./style/EditAppDropdown.css");
|
|
5494
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
5495
|
+
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
|
|
5496
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/AppPreview/utils.js");
|
|
5160
5497
|
/*
|
|
5161
5498
|
* Copyright (c) Saga Inc.
|
|
5162
5499
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5163
5500
|
*/
|
|
5164
5501
|
|
|
5165
5502
|
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5503
|
+
|
|
5504
|
+
|
|
5505
|
+
|
|
5506
|
+
/**
|
|
5507
|
+
* Show the update app dropdown.
|
|
5508
|
+
*/
|
|
5509
|
+
const showUpdateAppDropdown = (buttonElement, notebookPanel) => {
|
|
5510
|
+
// Remove any existing dropdown
|
|
5511
|
+
const existingDropdown = document.querySelector('.update-app-dropdown');
|
|
5512
|
+
if (existingDropdown) {
|
|
5513
|
+
existingDropdown.remove();
|
|
5514
|
+
}
|
|
5515
|
+
const notebookPath = notebookPanel.context.path;
|
|
5516
|
+
// Create dropdown container
|
|
5517
|
+
const dropdownContainer = document.createElement('div');
|
|
5518
|
+
dropdownContainer.className = 'update-app-dropdown';
|
|
5519
|
+
// Position the dropdown below the button
|
|
5520
|
+
const buttonRect = buttonElement.getBoundingClientRect();
|
|
5521
|
+
dropdownContainer.style.top = `${buttonRect.bottom + 4}px`;
|
|
5522
|
+
dropdownContainer.style.left = `${buttonRect.left}px`;
|
|
5523
|
+
// Add to document
|
|
5524
|
+
document.body.appendChild(dropdownContainer);
|
|
5525
|
+
// Render the React component
|
|
5526
|
+
(0,react_dom_client__WEBPACK_IMPORTED_MODULE_2__.createRoot)(dropdownContainer).render(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(UpdateAppDropdown, { onSubmit: async (message) => {
|
|
5527
|
+
// Save the notebook first to ensure app reads up to date version
|
|
5528
|
+
await notebookPanel.context.save();
|
|
5529
|
+
await (0,_utils__WEBPACK_IMPORTED_MODULE_3__.startStreamlitPreviewAndNotify)(notebookPath, true, message, 'Updating app...', 'App updated successfully!');
|
|
5530
|
+
dropdownContainer.remove();
|
|
5531
|
+
}, onClose: () => {
|
|
5532
|
+
dropdownContainer.remove();
|
|
5533
|
+
} }));
|
|
5534
|
+
// Close dropdown when clicking outside
|
|
5535
|
+
const handleClickOutside = (event) => {
|
|
5536
|
+
if (!dropdownContainer.contains(event.target) &&
|
|
5537
|
+
!buttonElement.contains(event.target)) {
|
|
5538
|
+
dropdownContainer.remove();
|
|
5539
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
5540
|
+
}
|
|
5541
|
+
};
|
|
5542
|
+
// Add click outside listener after a small delay to avoid immediate closure
|
|
5543
|
+
setTimeout(() => {
|
|
5544
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
5545
|
+
}, 100);
|
|
5546
|
+
};
|
|
5547
|
+
const UpdateAppDropdown = ({ onSubmit, onClose }) => {
|
|
5548
|
+
const [message, setMessage] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
|
|
5549
|
+
const handleSubmit = () => {
|
|
5550
|
+
if (message.trim()) {
|
|
5551
|
+
onSubmit(message);
|
|
5552
|
+
onClose();
|
|
5553
|
+
}
|
|
5554
|
+
};
|
|
5555
|
+
const handleKeyDown = (e) => {
|
|
5556
|
+
if (e.key === 'Escape') {
|
|
5557
|
+
onClose();
|
|
5558
|
+
}
|
|
5559
|
+
};
|
|
5560
|
+
const disabled = message.trim() === '';
|
|
5561
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown", onKeyDown: handleKeyDown },
|
|
5562
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown-content" },
|
|
5563
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { htmlFor: "update-description", className: "update-app-dropdown-label" }, "How would you like to modify the app?"),
|
|
5564
|
+
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 }),
|
|
5565
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown-buttons" },
|
|
5566
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: onClose, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_4__.classNames)("update-app-dropdown-button", "update-app-dropdown-button-cancel") }, "Cancel"),
|
|
5567
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: handleSubmit, disabled: disabled, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_4__.classNames)('update-app-dropdown-button', 'update-app-dropdown-button-submit', { 'disabled': disabled }) }, "Submit")))));
|
|
5177
5568
|
};
|
|
5569
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UpdateAppDropdown);
|
|
5178
5570
|
|
|
5179
5571
|
|
|
5180
5572
|
/***/ }),
|
|
5181
5573
|
|
|
5182
|
-
/***/ "./lib/Extensions/
|
|
5183
|
-
|
|
5184
|
-
!*** ./lib/Extensions/
|
|
5185
|
-
|
|
5186
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5574
|
+
/***/ "./lib/Extensions/AppPreview/utils.js":
|
|
5575
|
+
/*!********************************************!*\
|
|
5576
|
+
!*** ./lib/Extensions/AppPreview/utils.js ***!
|
|
5577
|
+
\********************************************/
|
|
5578
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5579
|
+
|
|
5580
|
+
__webpack_require__.r(__webpack_exports__);
|
|
5581
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5582
|
+
/* harmony export */ showRecreateAppConfirmation: () => (/* binding */ showRecreateAppConfirmation),
|
|
5583
|
+
/* harmony export */ startStreamlitPreviewAndNotify: () => (/* binding */ startStreamlitPreviewAndNotify)
|
|
5584
|
+
/* harmony export */ });
|
|
5585
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
5586
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
5587
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);
|
|
5588
|
+
/*
|
|
5589
|
+
* Copyright (c) Saga Inc.
|
|
5590
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5591
|
+
*/
|
|
5592
|
+
|
|
5593
|
+
|
|
5594
|
+
const startStreamlitPreviewAndNotify = async (notebookPath, force_recreate = false, edit_prompt = '', start_notification_message = 'Building App Preview...', success_notification_message = 'Streamlit preview started successfully!') => {
|
|
5595
|
+
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit(start_notification_message, 'in-progress', { autoClose: false });
|
|
5596
|
+
const previewData = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__.startStreamlitPreview)(notebookPath, force_recreate, edit_prompt);
|
|
5597
|
+
if (previewData.type === 'success') {
|
|
5598
|
+
// Update notification to success
|
|
5599
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
5600
|
+
id: notificationId,
|
|
5601
|
+
message: success_notification_message,
|
|
5602
|
+
type: 'success',
|
|
5603
|
+
autoClose: 5 * 1000
|
|
5604
|
+
});
|
|
5605
|
+
}
|
|
5606
|
+
else {
|
|
5607
|
+
// Display error notification
|
|
5608
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
5609
|
+
id: notificationId,
|
|
5610
|
+
message: "Failed to start app preview: " + String(previewData.message),
|
|
5611
|
+
type: 'error',
|
|
5612
|
+
autoClose: 5 * 1000
|
|
5613
|
+
});
|
|
5614
|
+
}
|
|
5615
|
+
return previewData;
|
|
5616
|
+
};
|
|
5617
|
+
async function showRecreateAppConfirmation(notebookPath) {
|
|
5618
|
+
const result = await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({
|
|
5619
|
+
title: 'Recreate App',
|
|
5620
|
+
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?',
|
|
5621
|
+
buttons: [
|
|
5622
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton({ label: 'Cancel' }),
|
|
5623
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.warnButton({ label: 'Recreate App' })
|
|
5624
|
+
],
|
|
5625
|
+
defaultButton: 1
|
|
5626
|
+
});
|
|
5627
|
+
if (result.button.accept) {
|
|
5628
|
+
void startStreamlitPreviewAndNotify(notebookPath, true, undefined, 'Recreating app from scratch...', 'App recreated successfully!');
|
|
5629
|
+
}
|
|
5630
|
+
}
|
|
5631
|
+
|
|
5632
|
+
|
|
5633
|
+
/***/ }),
|
|
5634
|
+
|
|
5635
|
+
/***/ "./lib/Extensions/ContextManager/ContextManagerPlugin.js":
|
|
5636
|
+
/*!***************************************************************!*\
|
|
5637
|
+
!*** ./lib/Extensions/ContextManager/ContextManagerPlugin.js ***!
|
|
5638
|
+
\***************************************************************/
|
|
5639
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5187
5640
|
|
|
5188
5641
|
__webpack_require__.r(__webpack_exports__);
|
|
5189
5642
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -5820,11 +6273,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5820
6273
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5821
6274
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
5822
6275
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__);
|
|
5823
|
-
/* harmony import */ var
|
|
6276
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
5824
6277
|
/* harmony import */ var _style_NotebookFooter_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/NotebookFooter.css */ "./style/NotebookFooter.css");
|
|
5825
|
-
/* harmony import */ var
|
|
5826
|
-
/* harmony import */ var
|
|
5827
|
-
/* harmony import */ var
|
|
6278
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
6279
|
+
/* harmony import */ var _icons_NotebookFooter_CodeIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../icons/NotebookFooter/CodeIcon */ "./lib/icons/NotebookFooter/CodeIcon.js");
|
|
6280
|
+
/* harmony import */ var _icons_NotebookFooter_TextIcon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../icons/NotebookFooter/TextIcon */ "./lib/icons/NotebookFooter/TextIcon.js");
|
|
6281
|
+
/* harmony import */ var _utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/userSignupEvents */ "./lib/utils/userSignupEvents.js");
|
|
6282
|
+
/* harmony import */ var _utils_userSignupState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/userSignupState */ "./lib/utils/userSignupState.js");
|
|
5828
6283
|
/*
|
|
5829
6284
|
* Copyright (c) Saga Inc.
|
|
5830
6285
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -5837,16 +6292,48 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5837
6292
|
|
|
5838
6293
|
|
|
5839
6294
|
|
|
6295
|
+
|
|
6296
|
+
|
|
5840
6297
|
const NotebookFooter = ({ notebookTracker, app }) => {
|
|
5841
6298
|
var _a;
|
|
5842
6299
|
const notebook = (_a = notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.content;
|
|
5843
6300
|
const [inputValue, setInputValue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
5844
6301
|
const [isGenerating, setIsGenerating] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
6302
|
+
const [isSignedUp, setIsSignedUp] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true);
|
|
6303
|
+
// Function to refresh user signup state using the shared helper
|
|
6304
|
+
const refreshUserSignupState = async () => {
|
|
6305
|
+
const signupState = await (0,_utils_userSignupState__WEBPACK_IMPORTED_MODULE_3__.checkUserSignupState)();
|
|
6306
|
+
setIsSignedUp(signupState.isSignedUp);
|
|
6307
|
+
};
|
|
6308
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6309
|
+
void refreshUserSignupState();
|
|
6310
|
+
}, []);
|
|
6311
|
+
// Listen for signup success events from other components
|
|
6312
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6313
|
+
const handleSignupSuccess = () => {
|
|
6314
|
+
void refreshUserSignupState();
|
|
6315
|
+
};
|
|
6316
|
+
_utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__.userSignupEvents.signupSuccess.connect(handleSignupSuccess);
|
|
6317
|
+
// Cleanup the event listener when component unmounts
|
|
6318
|
+
return () => {
|
|
6319
|
+
_utils_userSignupEvents__WEBPACK_IMPORTED_MODULE_4__.userSignupEvents.signupSuccess.disconnect(handleSignupSuccess);
|
|
6320
|
+
};
|
|
6321
|
+
}, []);
|
|
5845
6322
|
// If the notebook is not loaded yet, don't render anything
|
|
5846
|
-
// This must come after the useEffects
|
|
5847
6323
|
if (notebook === undefined || notebook.model === null) {
|
|
5848
6324
|
return null;
|
|
5849
6325
|
}
|
|
6326
|
+
const getPlaceholder = () => {
|
|
6327
|
+
if (isGenerating) {
|
|
6328
|
+
return 'Generating notebook...';
|
|
6329
|
+
}
|
|
6330
|
+
else if (isSignedUp) {
|
|
6331
|
+
return 'What analysis can I help you with?';
|
|
6332
|
+
}
|
|
6333
|
+
else {
|
|
6334
|
+
return 'Sign up to use Mito AI (see taskpane on the left)';
|
|
6335
|
+
}
|
|
6336
|
+
};
|
|
5850
6337
|
const addCell = (cellType = 'code') => {
|
|
5851
6338
|
if (notebook.widgets.length && notebook.widgets.length > 0) {
|
|
5852
6339
|
notebook.activeCellIndex = notebook.widgets.length - 1;
|
|
@@ -5870,8 +6357,8 @@ const NotebookFooter = ({ notebookTracker, app }) => {
|
|
|
5870
6357
|
if (submittedInput !== '') {
|
|
5871
6358
|
setIsGenerating(true);
|
|
5872
6359
|
setInputValue('');
|
|
5873
|
-
await app.commands.execute(
|
|
5874
|
-
await app.commands.execute(
|
|
6360
|
+
await app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_5__.COMMAND_MITO_AI_OPEN_CHAT, { focusChatInput: false });
|
|
6361
|
+
await app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_5__.COMMAND_MITO_AI_SEND_AGENT_MESSAGE, { input: submittedInput });
|
|
5875
6362
|
setIsGenerating(false);
|
|
5876
6363
|
}
|
|
5877
6364
|
};
|
|
@@ -5905,20 +6392,20 @@ const NotebookFooter = ({ notebookTracker, app }) => {
|
|
|
5905
6392
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "notebook-footer-container" },
|
|
5906
6393
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-container" },
|
|
5907
6394
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `input-wrapper ${isGenerating ? 'generating' : ''}` },
|
|
5908
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-icon-left" }, isGenerating ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
5909
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", value: inputValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onKeyPress: handleKeyPress, onFocus: handleInputFocus, onBlur: handleInputBlur, placeholder:
|
|
6395
|
+
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"))),
|
|
6396
|
+
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 }),
|
|
5910
6397
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "input-icons-right" },
|
|
5911
6398
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "input-action-button", onClick: handleInputSubmit, onMouseDown: (e) => e.stopPropagation() }, "\u25B6")))),
|
|
5912
6399
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-row" },
|
|
5913
6400
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => addCell('code'), className: "footer-button", onMouseDown: (e) => e.stopPropagation() },
|
|
5914
6401
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-content" },
|
|
5915
6402
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-icon" },
|
|
5916
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
6403
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotebookFooter_CodeIcon__WEBPACK_IMPORTED_MODULE_7__["default"], null)),
|
|
5917
6404
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Python"))),
|
|
5918
6405
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => addCell('markdown'), className: "footer-button", onMouseDown: (e) => e.stopPropagation() },
|
|
5919
6406
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-content" },
|
|
5920
6407
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "button-icon" },
|
|
5921
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
6408
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotebookFooter_TextIcon__WEBPACK_IMPORTED_MODULE_8__["default"], null)),
|
|
5922
6409
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "button-label" }, "Text"))))));
|
|
5923
6410
|
};
|
|
5924
6411
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotebookFooter);
|
|
@@ -6001,6 +6488,8 @@ const NotebookFooterPlugin = {
|
|
|
6001
6488
|
__webpack_require__.r(__webpack_exports__);
|
|
6002
6489
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6003
6490
|
/* harmony export */ COMMAND_MITO_AI_SETTINGS: () => (/* binding */ COMMAND_MITO_AI_SETTINGS),
|
|
6491
|
+
/* harmony export */ COMMAND_MITO_AI_SETTINGS_DATABASE: () => (/* binding */ COMMAND_MITO_AI_SETTINGS_DATABASE),
|
|
6492
|
+
/* harmony export */ COMMAND_MITO_AI_SETTINGS_SUBSCRIPTION: () => (/* binding */ COMMAND_MITO_AI_SETTINGS_SUBSCRIPTION),
|
|
6004
6493
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6005
6494
|
/* harmony export */ });
|
|
6006
6495
|
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/application */ "webpack/sharing/consume/default/@jupyterlab/application");
|
|
@@ -6018,6 +6507,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6018
6507
|
|
|
6019
6508
|
|
|
6020
6509
|
const COMMAND_MITO_AI_SETTINGS = 'mito-ai:open-settings';
|
|
6510
|
+
const COMMAND_MITO_AI_SETTINGS_SUBSCRIPTION = 'mito-ai:open-settings-subscription';
|
|
6511
|
+
const COMMAND_MITO_AI_SETTINGS_DATABASE = 'mito-ai:open-settings-database';
|
|
6021
6512
|
/**
|
|
6022
6513
|
* Initialization data for the mito settings extension.
|
|
6023
6514
|
*/
|
|
@@ -6031,8 +6522,8 @@ const SettingsManagerPlugin = {
|
|
|
6031
6522
|
};
|
|
6032
6523
|
function _activate(app, palette, contextManager, restorer) {
|
|
6033
6524
|
// Create a widget creator function
|
|
6034
|
-
const newWidget = () => {
|
|
6035
|
-
const content = new _SettingsWidget__WEBPACK_IMPORTED_MODULE_3__.SettingsWidget(contextManager);
|
|
6525
|
+
const newWidget = (initialTab) => {
|
|
6526
|
+
const content = new _SettingsWidget__WEBPACK_IMPORTED_MODULE_3__.SettingsWidget(contextManager, initialTab);
|
|
6036
6527
|
const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content });
|
|
6037
6528
|
widget.id = 'mito-ai-settings';
|
|
6038
6529
|
widget.title.label = 'Mito AI Settings';
|
|
@@ -6040,24 +6531,33 @@ function _activate(app, palette, contextManager, restorer) {
|
|
|
6040
6531
|
return widget;
|
|
6041
6532
|
};
|
|
6042
6533
|
let widget = newWidget();
|
|
6534
|
+
// Track and restore the widget state
|
|
6535
|
+
const tracker = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.WidgetTracker({
|
|
6536
|
+
namespace: widget.id
|
|
6537
|
+
});
|
|
6538
|
+
// Reusable function to open settings with a specific tab
|
|
6539
|
+
const openSettingsWithTab = (initialTab) => {
|
|
6540
|
+
// Dispose the old widget and create a new one with the specified tab
|
|
6541
|
+
if (widget && !widget.isDisposed) {
|
|
6542
|
+
widget.dispose();
|
|
6543
|
+
}
|
|
6544
|
+
widget = newWidget(initialTab);
|
|
6545
|
+
// Add the widget to the tracker
|
|
6546
|
+
if (!tracker.has(widget)) {
|
|
6547
|
+
void tracker.add(widget);
|
|
6548
|
+
}
|
|
6549
|
+
// Add the widget to the app
|
|
6550
|
+
if (!widget.isAttached) {
|
|
6551
|
+
void app.shell.add(widget, 'main');
|
|
6552
|
+
}
|
|
6553
|
+
// Activate the widget
|
|
6554
|
+
app.shell.activateById(widget.id);
|
|
6555
|
+
};
|
|
6043
6556
|
// Add an application command
|
|
6044
6557
|
app.commands.addCommand(COMMAND_MITO_AI_SETTINGS, {
|
|
6045
6558
|
label: 'Mito AI Settings',
|
|
6046
6559
|
execute: () => {
|
|
6047
|
-
|
|
6048
|
-
if (!widget || widget.isDisposed) {
|
|
6049
|
-
widget = newWidget();
|
|
6050
|
-
}
|
|
6051
|
-
// Add the widget to the tracker if not already there
|
|
6052
|
-
if (!tracker.has(widget)) {
|
|
6053
|
-
void tracker.add(widget);
|
|
6054
|
-
}
|
|
6055
|
-
// Add the widget to the app if not already attached
|
|
6056
|
-
if (!widget.isAttached) {
|
|
6057
|
-
void app.shell.add(widget, 'main');
|
|
6058
|
-
}
|
|
6059
|
-
// Activate the widget
|
|
6060
|
-
app.shell.activateById(widget.id);
|
|
6560
|
+
openSettingsWithTab();
|
|
6061
6561
|
}
|
|
6062
6562
|
});
|
|
6063
6563
|
// Add the command to the palette
|
|
@@ -6065,9 +6565,19 @@ function _activate(app, palette, contextManager, restorer) {
|
|
|
6065
6565
|
command: COMMAND_MITO_AI_SETTINGS,
|
|
6066
6566
|
category: 'Mito AI'
|
|
6067
6567
|
});
|
|
6068
|
-
//
|
|
6069
|
-
|
|
6070
|
-
|
|
6568
|
+
// Add a command to open settings with the subscription tab
|
|
6569
|
+
app.commands.addCommand(COMMAND_MITO_AI_SETTINGS_SUBSCRIPTION, {
|
|
6570
|
+
label: 'Mito AI Settings: Subscription',
|
|
6571
|
+
execute: () => {
|
|
6572
|
+
openSettingsWithTab('subscription');
|
|
6573
|
+
}
|
|
6574
|
+
});
|
|
6575
|
+
// Add a command to open setting with the database tab
|
|
6576
|
+
app.commands.addCommand(COMMAND_MITO_AI_SETTINGS_DATABASE, {
|
|
6577
|
+
label: 'Mito AI Settings: Database',
|
|
6578
|
+
execute: () => {
|
|
6579
|
+
openSettingsWithTab('database');
|
|
6580
|
+
}
|
|
6071
6581
|
});
|
|
6072
6582
|
if (!tracker.has(widget)) {
|
|
6073
6583
|
void tracker.add(widget);
|
|
@@ -6096,11 +6606,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6096
6606
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6097
6607
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
6098
6608
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
6099
|
-
/* harmony import */ var
|
|
6100
|
-
/* harmony import */ var
|
|
6101
|
-
/* harmony import */ var
|
|
6102
|
-
/* harmony import */ var
|
|
6103
|
-
/* harmony import */ var
|
|
6609
|
+
/* harmony import */ var _database_DatabasePage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./database/DatabasePage */ "./lib/Extensions/SettingsManager/database/DatabasePage.js");
|
|
6610
|
+
/* harmony import */ var _support_SupportPage__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./support/SupportPage */ "./lib/Extensions/SettingsManager/support/SupportPage.js");
|
|
6611
|
+
/* harmony import */ var _general_GeneralPage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./general/GeneralPage */ "./lib/Extensions/SettingsManager/general/GeneralPage.js");
|
|
6612
|
+
/* harmony import */ var _rules_RulesPage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./rules/RulesPage */ "./lib/Extensions/SettingsManager/rules/RulesPage.js");
|
|
6613
|
+
/* harmony import */ var _profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
6614
|
+
/* harmony import */ var _subscription_SubscriptionPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./subscription/SubscriptionPage */ "./lib/Extensions/SettingsManager/subscription/SubscriptionPage.js");
|
|
6104
6615
|
/* harmony import */ var _style_SettingsWidget_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/SettingsWidget.css */ "./style/SettingsWidget.css");
|
|
6105
6616
|
/*
|
|
6106
6617
|
* Copyright (c) Saga Inc.
|
|
@@ -6114,30 +6625,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6114
6625
|
|
|
6115
6626
|
|
|
6116
6627
|
|
|
6628
|
+
|
|
6117
6629
|
const TABS_CONFIG = (contextManager) => ({
|
|
6118
|
-
database: {
|
|
6119
|
-
label: 'Database',
|
|
6120
|
-
component: _database_DatabasePage__WEBPACK_IMPORTED_MODULE_3__.DatabasePage
|
|
6121
|
-
},
|
|
6122
6630
|
general: {
|
|
6123
6631
|
label: 'General',
|
|
6124
|
-
component:
|
|
6632
|
+
component: _general_GeneralPage__WEBPACK_IMPORTED_MODULE_3__.GeneralPage
|
|
6633
|
+
},
|
|
6634
|
+
subscription: {
|
|
6635
|
+
label: 'Subscription',
|
|
6636
|
+
component: _subscription_SubscriptionPage__WEBPACK_IMPORTED_MODULE_4__.SubscriptionPage
|
|
6637
|
+
},
|
|
6638
|
+
database: {
|
|
6639
|
+
label: 'Database',
|
|
6640
|
+
component: _database_DatabasePage__WEBPACK_IMPORTED_MODULE_5__.DatabasePage
|
|
6125
6641
|
},
|
|
6126
6642
|
rules: {
|
|
6127
6643
|
label: 'Rules',
|
|
6128
|
-
component:
|
|
6644
|
+
component: _rules_RulesPage__WEBPACK_IMPORTED_MODULE_6__.RulesPage
|
|
6129
6645
|
},
|
|
6130
6646
|
profiler: {
|
|
6131
6647
|
label: 'Profiler',
|
|
6132
|
-
component: () => react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
6648
|
+
component: () => react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_7__.ProfilerPage, { contextManager: contextManager })
|
|
6133
6649
|
},
|
|
6134
6650
|
support: {
|
|
6135
6651
|
label: 'Support',
|
|
6136
|
-
component:
|
|
6652
|
+
component: _support_SupportPage__WEBPACK_IMPORTED_MODULE_8__.SupportPage
|
|
6137
6653
|
},
|
|
6138
6654
|
});
|
|
6139
|
-
const App = ({ contextManager }) => {
|
|
6140
|
-
const [activeTab, setActiveTab] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(
|
|
6655
|
+
const App = ({ contextManager, initialTab = 'general' }) => {
|
|
6656
|
+
const [activeTab, setActiveTab] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialTab);
|
|
6141
6657
|
const tabsConfig = TABS_CONFIG(contextManager);
|
|
6142
6658
|
const renderContent = () => {
|
|
6143
6659
|
const TabComponent = tabsConfig[activeTab].component;
|
|
@@ -6151,13 +6667,14 @@ const App = ({ contextManager }) => {
|
|
|
6151
6667
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-main" }, renderContent()))));
|
|
6152
6668
|
};
|
|
6153
6669
|
class SettingsWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ReactWidget {
|
|
6154
|
-
constructor(contextManager) {
|
|
6670
|
+
constructor(contextManager, initialTab) {
|
|
6155
6671
|
super();
|
|
6156
6672
|
this.contextManager = contextManager;
|
|
6673
|
+
this.initialTab = initialTab;
|
|
6157
6674
|
this.addClass('jp-ReactWidget');
|
|
6158
6675
|
}
|
|
6159
6676
|
render() {
|
|
6160
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(App, { contextManager: this.contextManager });
|
|
6677
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(App, { contextManager: this.contextManager, initialTab: this.initialTab });
|
|
6161
6678
|
}
|
|
6162
6679
|
}
|
|
6163
6680
|
|
|
@@ -7156,6 +7673,177 @@ const RulesPage = () => {
|
|
|
7156
7673
|
};
|
|
7157
7674
|
|
|
7158
7675
|
|
|
7676
|
+
/***/ }),
|
|
7677
|
+
|
|
7678
|
+
/***/ "./lib/Extensions/SettingsManager/subscription/FreeTierCard.js":
|
|
7679
|
+
/*!*********************************************************************!*\
|
|
7680
|
+
!*** ./lib/Extensions/SettingsManager/subscription/FreeTierCard.js ***!
|
|
7681
|
+
\*********************************************************************/
|
|
7682
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7683
|
+
|
|
7684
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7685
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7686
|
+
/* harmony export */ FreeTierCard: () => (/* binding */ FreeTierCard)
|
|
7687
|
+
/* harmony export */ });
|
|
7688
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7689
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7690
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
7691
|
+
/* harmony import */ var _utils_stripe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/stripe */ "./lib/utils/stripe.js");
|
|
7692
|
+
/* harmony import */ var _style_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/SubscriptionPage.css */ "./style/SubscriptionPage.css");
|
|
7693
|
+
/*
|
|
7694
|
+
* Copyright (c) Saga Inc.
|
|
7695
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7696
|
+
*/
|
|
7697
|
+
|
|
7698
|
+
|
|
7699
|
+
|
|
7700
|
+
|
|
7701
|
+
const MAX_FREE_USAGE = 150;
|
|
7702
|
+
const FreeTierCard = () => {
|
|
7703
|
+
const [usageCount, setUsageCount] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
7704
|
+
const [resetDate, setResetDate] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
7705
|
+
const percentage = Math.round((usageCount / MAX_FREE_USAGE) * 100);
|
|
7706
|
+
const remainingUsage = MAX_FREE_USAGE - usageCount;
|
|
7707
|
+
const getAiMitoApiNumUsages = async () => {
|
|
7708
|
+
const usageCount = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.getUserKey)('ai_mito_api_num_usages');
|
|
7709
|
+
return usageCount ? parseInt(usageCount) : 0;
|
|
7710
|
+
};
|
|
7711
|
+
const getNextResetDate = async () => {
|
|
7712
|
+
const lastResetDate = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.getUserKey)('mito_ai_last_reset_date');
|
|
7713
|
+
if (!lastResetDate)
|
|
7714
|
+
return null;
|
|
7715
|
+
// Parse the date and add one month
|
|
7716
|
+
const lastReset = new Date(lastResetDate);
|
|
7717
|
+
const nextReset = new Date(lastReset);
|
|
7718
|
+
nextReset.setMonth(nextReset.getMonth() + 1);
|
|
7719
|
+
// Format the date before returning
|
|
7720
|
+
return nextReset.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' });
|
|
7721
|
+
};
|
|
7722
|
+
// When we first open the page, load the settings from the server
|
|
7723
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7724
|
+
const fetchSettings = async () => {
|
|
7725
|
+
const count = await getAiMitoApiNumUsages();
|
|
7726
|
+
setUsageCount(count);
|
|
7727
|
+
const nextReset = await getNextResetDate();
|
|
7728
|
+
setResetDate(nextReset);
|
|
7729
|
+
};
|
|
7730
|
+
void fetchSettings();
|
|
7731
|
+
}, []);
|
|
7732
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-card" },
|
|
7733
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-card-content" },
|
|
7734
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", { className: "subscription-page-section-title" }, "Free Plan Usage"),
|
|
7735
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-usage-stats" },
|
|
7736
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-usage-count" }, usageCount),
|
|
7737
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-usage-details" },
|
|
7738
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
7739
|
+
"of ",
|
|
7740
|
+
MAX_FREE_USAGE,
|
|
7741
|
+
" messages"),
|
|
7742
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
7743
|
+
"(",
|
|
7744
|
+
percentage,
|
|
7745
|
+
"% used)"))),
|
|
7746
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-progress-bar" },
|
|
7747
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-progress-fill", style: { width: `${Math.min(percentage, 100)}%` } })),
|
|
7748
|
+
remainingUsage > 0 ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "subscription-page-status-message" }, resetDate ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
7749
|
+
"Your free usage resets ",
|
|
7750
|
+
resetDate)) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
7751
|
+
"\u2713 ",
|
|
7752
|
+
remainingUsage,
|
|
7753
|
+
" messages remaining")))) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "subscription-page-status-warning" }, "You have reached your free usage limit. Upgrade to continue using Mito AI."))),
|
|
7754
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "subscription-page-button-container" },
|
|
7755
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("form", { action: _utils_stripe__WEBPACK_IMPORTED_MODULE_3__.STRIPE_PAYMENT_LINK, method: "POST", target: "_blank" },
|
|
7756
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { type: "submit", className: "button-base button-purple subscription-page-button", onClick: () => {
|
|
7757
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.logEvent)('clicked_upgrade_to_pro_from_settings', {
|
|
7758
|
+
usage_count: usageCount,
|
|
7759
|
+
usage_percentage: percentage,
|
|
7760
|
+
});
|
|
7761
|
+
} },
|
|
7762
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("b", null, "Upgrade to Pro"))),
|
|
7763
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", { href: "https://www.trymito.io/plans", target: "_blank", rel: "noopener noreferrer", className: "button-base button-gray subscription-page-button", onClick: () => {
|
|
7764
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.logEvent)('clicked_view_plans_from_settings', {
|
|
7765
|
+
usage_count: usageCount,
|
|
7766
|
+
usage_percentage: percentage,
|
|
7767
|
+
});
|
|
7768
|
+
} },
|
|
7769
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("b", null, "View Plans")))));
|
|
7770
|
+
};
|
|
7771
|
+
|
|
7772
|
+
|
|
7773
|
+
/***/ }),
|
|
7774
|
+
|
|
7775
|
+
/***/ "./lib/Extensions/SettingsManager/subscription/ProCard.js":
|
|
7776
|
+
/*!****************************************************************!*\
|
|
7777
|
+
!*** ./lib/Extensions/SettingsManager/subscription/ProCard.js ***!
|
|
7778
|
+
\****************************************************************/
|
|
7779
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7780
|
+
|
|
7781
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7782
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7783
|
+
/* harmony export */ ProCard: () => (/* binding */ ProCard)
|
|
7784
|
+
/* harmony export */ });
|
|
7785
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7786
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7787
|
+
/* harmony import */ var _style_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/SubscriptionPage.css */ "./style/SubscriptionPage.css");
|
|
7788
|
+
/*
|
|
7789
|
+
* Copyright (c) Saga Inc.
|
|
7790
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7791
|
+
*/
|
|
7792
|
+
|
|
7793
|
+
|
|
7794
|
+
const ProCard = () => {
|
|
7795
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
7796
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "You are subscribed to Mito Pro."),
|
|
7797
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null,
|
|
7798
|
+
"If you have questions about your subscription, please contact us at ",
|
|
7799
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", { href: "mailto:founders@sagacollab.com " }, "founders@sagacollab.com"))));
|
|
7800
|
+
};
|
|
7801
|
+
|
|
7802
|
+
|
|
7803
|
+
/***/ }),
|
|
7804
|
+
|
|
7805
|
+
/***/ "./lib/Extensions/SettingsManager/subscription/SubscriptionPage.js":
|
|
7806
|
+
/*!*************************************************************************!*\
|
|
7807
|
+
!*** ./lib/Extensions/SettingsManager/subscription/SubscriptionPage.js ***!
|
|
7808
|
+
\*************************************************************************/
|
|
7809
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7810
|
+
|
|
7811
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7812
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7813
|
+
/* harmony export */ SubscriptionPage: () => (/* binding */ SubscriptionPage)
|
|
7814
|
+
/* harmony export */ });
|
|
7815
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7816
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7817
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
7818
|
+
/* harmony import */ var _FreeTierCard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FreeTierCard */ "./lib/Extensions/SettingsManager/subscription/FreeTierCard.js");
|
|
7819
|
+
/* harmony import */ var _ProCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ProCard */ "./lib/Extensions/SettingsManager/subscription/ProCard.js");
|
|
7820
|
+
/* harmony import */ var _style_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/SubscriptionPage.css */ "./style/SubscriptionPage.css");
|
|
7821
|
+
/*
|
|
7822
|
+
* Copyright (c) Saga Inc.
|
|
7823
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7824
|
+
*/
|
|
7825
|
+
|
|
7826
|
+
|
|
7827
|
+
|
|
7828
|
+
|
|
7829
|
+
|
|
7830
|
+
const SubscriptionPage = () => {
|
|
7831
|
+
const [isPro, setIsPro] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7832
|
+
// When we first open the page, load the settings from the server
|
|
7833
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7834
|
+
const fetchSettings = async () => {
|
|
7835
|
+
const proStatus = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.getUserKey)('is_pro');
|
|
7836
|
+
setIsPro(proStatus === 'True');
|
|
7837
|
+
};
|
|
7838
|
+
void fetchSettings();
|
|
7839
|
+
}, []);
|
|
7840
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
7841
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-header" },
|
|
7842
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h2", null, "Manage Subscription")),
|
|
7843
|
+
isPro ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ProCard__WEBPACK_IMPORTED_MODULE_3__.ProCard, null) : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_FreeTierCard__WEBPACK_IMPORTED_MODULE_4__.FreeTierCard, null)));
|
|
7844
|
+
};
|
|
7845
|
+
|
|
7846
|
+
|
|
7159
7847
|
/***/ }),
|
|
7160
7848
|
|
|
7161
7849
|
/***/ "./lib/Extensions/SettingsManager/support/SupportPage.js":
|
|
@@ -7276,11 +7964,8 @@ const ToolbarButtonsPlugin = {
|
|
|
7276
7964
|
caption: 'Preview notebook as app and turn on App Mode',
|
|
7277
7965
|
className: 'text-button-mito-ai button-base button-purple button-small',
|
|
7278
7966
|
execute: async () => {
|
|
7279
|
-
void app.commands.execute(
|
|
7967
|
+
void app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_2__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT);
|
|
7280
7968
|
},
|
|
7281
|
-
isVisible: () => {
|
|
7282
|
-
return app.commands.hasCommand(_commands__WEBPACK_IMPORTED_MODULE_2__.COMMAND_MITO_AI_BETA_MODE_ENABLED);
|
|
7283
|
-
}
|
|
7284
7969
|
});
|
|
7285
7970
|
// Check if the beta mode is enabled. After checking, tell Jupyter to
|
|
7286
7971
|
// re-evaluate convert-to-streamlit visibility now that we have had the
|
|
@@ -7881,6 +8566,76 @@ const AssumptionToolUI = ({ assumptions, }) => {
|
|
|
7881
8566
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AssumptionToolUI);
|
|
7882
8567
|
|
|
7883
8568
|
|
|
8569
|
+
/***/ }),
|
|
8570
|
+
|
|
8571
|
+
/***/ "./lib/components/AgentComponents/CreateStreamlitAppToolUI.js":
|
|
8572
|
+
/*!********************************************************************!*\
|
|
8573
|
+
!*** ./lib/components/AgentComponents/CreateStreamlitAppToolUI.js ***!
|
|
8574
|
+
\********************************************************************/
|
|
8575
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8576
|
+
|
|
8577
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8578
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8579
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8580
|
+
/* harmony export */ });
|
|
8581
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8582
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8583
|
+
/* harmony import */ var _ShimmerWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShimmerWrapper */ "./lib/components/AgentComponents/ShimmerWrapper.js");
|
|
8584
|
+
/* harmony import */ var _icons_AppIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icons/AppIcon */ "./lib/icons/AppIcon.js");
|
|
8585
|
+
/* harmony import */ var _style_AgentToolUIComponent_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/AgentToolUIComponent.css */ "./style/AgentToolUIComponent.css");
|
|
8586
|
+
/*
|
|
8587
|
+
* Copyright (c) Saga Inc.
|
|
8588
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8589
|
+
*/
|
|
8590
|
+
|
|
8591
|
+
|
|
8592
|
+
|
|
8593
|
+
|
|
8594
|
+
const CreateStreamlitAppToolUI = ({ isRunning = false }) => {
|
|
8595
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-tool-ui-container" },
|
|
8596
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ShimmerWrapper__WEBPACK_IMPORTED_MODULE_2__["default"], { isActive: isRunning },
|
|
8597
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-tool-ui-content" },
|
|
8598
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_AppIcon__WEBPACK_IMPORTED_MODULE_3__["default"], null),
|
|
8599
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "Creating Streamlit app")))));
|
|
8600
|
+
};
|
|
8601
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CreateStreamlitAppToolUI);
|
|
8602
|
+
|
|
8603
|
+
|
|
8604
|
+
/***/ }),
|
|
8605
|
+
|
|
8606
|
+
/***/ "./lib/components/AgentComponents/EditStreamlitAppToolUI.js":
|
|
8607
|
+
/*!******************************************************************!*\
|
|
8608
|
+
!*** ./lib/components/AgentComponents/EditStreamlitAppToolUI.js ***!
|
|
8609
|
+
\******************************************************************/
|
|
8610
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8611
|
+
|
|
8612
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8613
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8614
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8615
|
+
/* harmony export */ });
|
|
8616
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8617
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8618
|
+
/* harmony import */ var _icons_Pencil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icons/Pencil */ "./lib/icons/Pencil.js");
|
|
8619
|
+
/* harmony import */ var _ShimmerWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShimmerWrapper */ "./lib/components/AgentComponents/ShimmerWrapper.js");
|
|
8620
|
+
/* harmony import */ var _style_AgentToolUIComponent_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/AgentToolUIComponent.css */ "./style/AgentToolUIComponent.css");
|
|
8621
|
+
/*
|
|
8622
|
+
* Copyright (c) Saga Inc.
|
|
8623
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8624
|
+
*/
|
|
8625
|
+
|
|
8626
|
+
|
|
8627
|
+
|
|
8628
|
+
|
|
8629
|
+
const EditStreamlitAppToolUI = ({ isRunning = false }) => {
|
|
8630
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-tool-ui-container" },
|
|
8631
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ShimmerWrapper__WEBPACK_IMPORTED_MODULE_2__["default"], { isActive: isRunning },
|
|
8632
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-tool-ui-content" },
|
|
8633
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_Pencil__WEBPACK_IMPORTED_MODULE_3__["default"], null),
|
|
8634
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "Editing Streamlit app")))));
|
|
8635
|
+
};
|
|
8636
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (EditStreamlitAppToolUI);
|
|
8637
|
+
|
|
8638
|
+
|
|
7884
8639
|
/***/ }),
|
|
7885
8640
|
|
|
7886
8641
|
/***/ "./lib/components/AgentComponents/ErrorFixupToolUI.js":
|
|
@@ -8032,6 +8787,36 @@ const RunAllCellsToolUI = ({ inErrorFixup }) => {
|
|
|
8032
8787
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RunAllCellsToolUI);
|
|
8033
8788
|
|
|
8034
8789
|
|
|
8790
|
+
/***/ }),
|
|
8791
|
+
|
|
8792
|
+
/***/ "./lib/components/AgentComponents/ShimmerWrapper.js":
|
|
8793
|
+
/*!**********************************************************!*\
|
|
8794
|
+
!*** ./lib/components/AgentComponents/ShimmerWrapper.js ***!
|
|
8795
|
+
\**********************************************************/
|
|
8796
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8797
|
+
|
|
8798
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8799
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8800
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8801
|
+
/* harmony export */ });
|
|
8802
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8803
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8804
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
8805
|
+
/* harmony import */ var _style_ShimmerWrapper_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/ShimmerWrapper.css */ "./style/ShimmerWrapper.css");
|
|
8806
|
+
/*
|
|
8807
|
+
* Copyright (c) Saga Inc.
|
|
8808
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8809
|
+
*/
|
|
8810
|
+
|
|
8811
|
+
|
|
8812
|
+
|
|
8813
|
+
const ShimmerWrapper = ({ children, isActive = false, className = '' }) => {
|
|
8814
|
+
const shimmerClass = isActive ? 'shimmer-wrapper' : '';
|
|
8815
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_2__.classNames)(shimmerClass, className) }, children));
|
|
8816
|
+
};
|
|
8817
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ShimmerWrapper);
|
|
8818
|
+
|
|
8819
|
+
|
|
8035
8820
|
/***/ }),
|
|
8036
8821
|
|
|
8037
8822
|
/***/ "./lib/components/AttachFileButton.js":
|
|
@@ -8229,7 +9014,7 @@ const AttachFileButton = ({ onFileUploaded, notebookTracker }) => {
|
|
|
8229
9014
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { style: { position: 'relative' } },
|
|
8230
9015
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { ref: fileInputRef, type: "file", style: { display: 'none' }, onChange: handleFileSelect, accept: "*" }),
|
|
8231
9016
|
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: {
|
|
8232
|
-
opacity:
|
|
9017
|
+
...(isUploading && { opacity: 0.5 }),
|
|
8233
9018
|
cursor: isUploading ? 'not-allowed' : 'pointer'
|
|
8234
9019
|
} })));
|
|
8235
9020
|
};
|
|
@@ -8283,7 +9068,7 @@ const DatabaseButton = ({ app }) => {
|
|
|
8283
9068
|
return Object.keys(databaseConnections).length > 0 ? 'success' : 'warning';
|
|
8284
9069
|
};
|
|
8285
9070
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_IconButton__WEBPACK_IMPORTED_MODULE_2__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_DatabaseOutlineIcon__WEBPACK_IMPORTED_MODULE_3__["default"], null), title: 'Add Database', onClick: () => {
|
|
8286
|
-
void app.commands.execute(_Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_4__.
|
|
9071
|
+
void app.commands.execute(_Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_4__.COMMAND_MITO_AI_SETTINGS_DATABASE);
|
|
8287
9072
|
setIsIconVisible(false);
|
|
8288
9073
|
}, notificationDotType: getNotificationDotType(), className: 'icon-button-hover', style: {
|
|
8289
9074
|
height: 'var(--chat-context-button-height)'
|
|
@@ -8920,10 +9705,10 @@ const AlertIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElem
|
|
|
8920
9705
|
|
|
8921
9706
|
/***/ }),
|
|
8922
9707
|
|
|
8923
|
-
/***/ "./lib/icons/
|
|
8924
|
-
|
|
8925
|
-
!*** ./lib/icons/
|
|
8926
|
-
|
|
9708
|
+
/***/ "./lib/icons/AppIcon.js":
|
|
9709
|
+
/*!******************************!*\
|
|
9710
|
+
!*** ./lib/icons/AppIcon.js ***!
|
|
9711
|
+
\******************************/
|
|
8927
9712
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8928
9713
|
|
|
8929
9714
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -8937,10 +9722,40 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8937
9722
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8938
9723
|
*/
|
|
8939
9724
|
|
|
8940
|
-
const
|
|
8941
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
8942
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
8943
|
-
|
|
9725
|
+
const AppIcon = () => {
|
|
9726
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor" },
|
|
9727
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "2", y: "2", width: "12", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "1", fill: "none" }),
|
|
9728
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "4", y: "4", width: "3", height: "3", fill: "currentColor" }),
|
|
9729
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "9", y: "4", width: "3", height: "3", fill: "currentColor" }),
|
|
9730
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "4", y: "9", width: "3", height: "3", fill: "currentColor" }),
|
|
9731
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "9", y: "9", width: "3", height: "3", fill: "currentColor" })));
|
|
9732
|
+
};
|
|
9733
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AppIcon);
|
|
9734
|
+
|
|
9735
|
+
|
|
9736
|
+
/***/ }),
|
|
9737
|
+
|
|
9738
|
+
/***/ "./lib/icons/CodeIcon.js":
|
|
9739
|
+
/*!*******************************!*\
|
|
9740
|
+
!*** ./lib/icons/CodeIcon.js ***!
|
|
9741
|
+
\*******************************/
|
|
9742
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9743
|
+
|
|
9744
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9745
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9746
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9747
|
+
/* harmony export */ });
|
|
9748
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
9749
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9750
|
+
/*
|
|
9751
|
+
* Copyright (c) Saga Inc.
|
|
9752
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9753
|
+
*/
|
|
9754
|
+
|
|
9755
|
+
const CodeIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "14", height: "14", viewBox: "0 0 20 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
9756
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { fill: "currentColor" },
|
|
9757
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M12.3162 0.0513449C12.8027 0.213518 13.0817 0.713391 12.9792 1.20347L12.9487 1.31624L8.94868 13.3162C8.77403 13.8402 8.20773 14.1233 7.68378 13.9487C7.19726 13.7865 6.91835 13.2866 7.02082 12.7966L7.05134 12.6838L11.0513 0.683791C11.226 0.159848 11.7923 -0.123303 12.3162 0.0513449ZM5.79999 3.40001C6.10587 3.80785 6.05312 4.37331 5.69568 4.71852L5.59998 4.8L2.667 7.00001L5.59998 9.20003C6.00782 9.50591 6.1155 10.0635 5.86902 10.495L5.79999 10.6C5.49411 11.0079 4.9365 11.1155 4.50501 10.869L4.40003 10.8L0.40003 7.8C-0.0977483 7.42667 -0.130987 6.7049 0.30042 6.28511L0.40003 6.20003L4.40003 3.20003C4.84186 2.86866 5.46862 2.95818 5.79999 3.40001ZM15.495 3.131L15.6 3.20003L19.6 6.20003C20.0978 6.57336 20.131 7.29513 19.6996 7.71492L19.6 7.8L15.6 10.8C15.1582 11.1314 14.5314 11.0418 14.2 10.6C13.8941 10.1922 13.9469 9.62672 14.3043 9.28151L14.4 9.20003L17.333 7.00001L14.4 4.8C13.9922 4.49412 13.8845 3.93654 14.131 3.50505L14.2 3.40001C14.5059 2.99217 15.0635 2.88452 15.495 3.131Z" }))));
|
|
9758
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CodeIcon);
|
|
8944
9759
|
|
|
8945
9760
|
|
|
8946
9761
|
/***/ }),
|
|
@@ -9403,8 +10218,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9403
10218
|
/* harmony export */ AppBuilderExcludeCellLabIcon: () => (/* binding */ AppBuilderExcludeCellLabIcon),
|
|
9404
10219
|
/* harmony export */ AppBuilderIncludeCellLabIcon: () => (/* binding */ AppBuilderIncludeCellLabIcon),
|
|
9405
10220
|
/* harmony export */ DeployLabIcon: () => (/* binding */ DeployLabIcon),
|
|
10221
|
+
/* harmony export */ EditLabIcon: () => (/* binding */ EditLabIcon),
|
|
9406
10222
|
/* harmony export */ NucleusLabIcon: () => (/* binding */ NucleusLabIcon),
|
|
9407
10223
|
/* harmony export */ OpenIndicatorLabIcon: () => (/* binding */ OpenIndicatorLabIcon),
|
|
10224
|
+
/* harmony export */ ResetCircleLabIcon: () => (/* binding */ ResetCircleLabIcon),
|
|
9408
10225
|
/* harmony export */ lightBulbLabIcon: () => (/* binding */ lightBulbLabIcon)
|
|
9409
10226
|
/* harmony export */ });
|
|
9410
10227
|
/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/ui-components */ "webpack/sharing/consume/default/@jupyterlab/ui-components");
|
|
@@ -9415,6 +10232,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9415
10232
|
/* harmony import */ var _src_icons_AppBuilderExcludeCellIcon_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../src/icons/AppBuilderExcludeCellIcon.svg */ "./src/icons/AppBuilderExcludeCellIcon.svg");
|
|
9416
10233
|
/* harmony import */ var _src_icons_AppBuilderIncludeCellIcon_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../src/icons/AppBuilderIncludeCellIcon.svg */ "./src/icons/AppBuilderIncludeCellIcon.svg");
|
|
9417
10234
|
/* harmony import */ var _src_icons_App_DeployIcon_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../src/icons/App/DeployIcon.svg */ "./src/icons/App/DeployIcon.svg");
|
|
10235
|
+
/* harmony import */ var _src_icons_PencilIcon_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../src/icons/PencilIcon.svg */ "./src/icons/PencilIcon.svg");
|
|
10236
|
+
/* harmony import */ var _src_icons_ResetCircleIcon_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../src/icons/ResetCircleIcon.svg */ "./src/icons/ResetCircleIcon.svg");
|
|
9418
10237
|
/*
|
|
9419
10238
|
* Copyright (c) Saga Inc.
|
|
9420
10239
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -9426,6 +10245,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9426
10245
|
|
|
9427
10246
|
|
|
9428
10247
|
|
|
10248
|
+
|
|
10249
|
+
|
|
9429
10250
|
const lightBulbLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({
|
|
9430
10251
|
name: 'lightbulb-icon',
|
|
9431
10252
|
svgstr: _src_icons_LightbulbIcon_svg__WEBPACK_IMPORTED_MODULE_1__
|
|
@@ -9450,6 +10271,14 @@ const DeployLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__
|
|
|
9450
10271
|
name: 'deploy-icon',
|
|
9451
10272
|
svgstr: _src_icons_App_DeployIcon_svg__WEBPACK_IMPORTED_MODULE_6__
|
|
9452
10273
|
});
|
|
10274
|
+
const EditLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({
|
|
10275
|
+
name: 'edit-icon',
|
|
10276
|
+
svgstr: _src_icons_PencilIcon_svg__WEBPACK_IMPORTED_MODULE_7__
|
|
10277
|
+
});
|
|
10278
|
+
const ResetCircleLabIcon = new _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_0__.LabIcon({
|
|
10279
|
+
name: 'reset-circle-icon',
|
|
10280
|
+
svgstr: _src_icons_ResetCircleIcon_svg__WEBPACK_IMPORTED_MODULE_8__
|
|
10281
|
+
});
|
|
9453
10282
|
|
|
9454
10283
|
|
|
9455
10284
|
/***/ }),
|
|
@@ -9520,12 +10349,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9520
10349
|
|
|
9521
10350
|
__webpack_require__.r(__webpack_exports__);
|
|
9522
10351
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10352
|
+
/* harmony export */ getChatHistoryThread: () => (/* binding */ getChatHistoryThread),
|
|
10353
|
+
/* harmony export */ getChatHistoryThreads: () => (/* binding */ getChatHistoryThreads),
|
|
9523
10354
|
/* harmony export */ getDatabaseConnections: () => (/* binding */ getDatabaseConnections),
|
|
9524
10355
|
/* harmony export */ getRule: () => (/* binding */ getRule),
|
|
9525
10356
|
/* harmony export */ getRules: () => (/* binding */ getRules),
|
|
9526
10357
|
/* harmony export */ getSetting: () => (/* binding */ getSetting),
|
|
10358
|
+
/* harmony export */ getUserKey: () => (/* binding */ getUserKey),
|
|
9527
10359
|
/* harmony export */ logEvent: () => (/* binding */ logEvent),
|
|
9528
10360
|
/* harmony export */ setRule: () => (/* binding */ setRule),
|
|
10361
|
+
/* harmony export */ setUserKey: () => (/* binding */ setUserKey),
|
|
9529
10362
|
/* harmony export */ startStreamlitPreview: () => (/* binding */ startStreamlitPreview),
|
|
9530
10363
|
/* harmony export */ stopStreamlitPreview: () => (/* binding */ stopStreamlitPreview),
|
|
9531
10364
|
/* harmony export */ updateSettings: () => (/* binding */ updateSettings)
|
|
@@ -9535,6 +10368,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9535
10368
|
* Copyright (c) Saga Inc.
|
|
9536
10369
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9537
10370
|
*/
|
|
10371
|
+
|
|
9538
10372
|
/************************************
|
|
9539
10373
|
|
|
9540
10374
|
LOG ENDPOINTS
|
|
@@ -9557,7 +10391,6 @@ const logEvent = async (logEvent, params) => {
|
|
|
9557
10391
|
SETTINGS ENDPOINTS
|
|
9558
10392
|
|
|
9559
10393
|
************************************/
|
|
9560
|
-
|
|
9561
10394
|
const getSetting = async (settingsKey) => {
|
|
9562
10395
|
var _a;
|
|
9563
10396
|
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`settings/${settingsKey}`);
|
|
@@ -9623,13 +10456,21 @@ const getDatabaseConnections = async () => {
|
|
|
9623
10456
|
STREAMLIT PREVIEW ENDPOINTS
|
|
9624
10457
|
|
|
9625
10458
|
************************************/
|
|
9626
|
-
const startStreamlitPreview = async (notebookPath, force_recreate = false) => {
|
|
10459
|
+
const startStreamlitPreview = async (notebookPath, force_recreate = false, edit_prompt = '') => {
|
|
9627
10460
|
const response = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('streamlit-preview', {
|
|
9628
10461
|
method: 'POST',
|
|
9629
|
-
body: JSON.stringify({
|
|
10462
|
+
body: JSON.stringify({
|
|
10463
|
+
notebook_path: notebookPath,
|
|
10464
|
+
force_recreate: force_recreate,
|
|
10465
|
+
edit_prompt: edit_prompt
|
|
10466
|
+
})
|
|
9630
10467
|
});
|
|
9631
10468
|
if (response.error) {
|
|
9632
|
-
|
|
10469
|
+
const streamlitPreviewReponseError = {
|
|
10470
|
+
type: 'error',
|
|
10471
|
+
message: response.error.message
|
|
10472
|
+
};
|
|
10473
|
+
return streamlitPreviewReponseError;
|
|
9633
10474
|
}
|
|
9634
10475
|
return response.data;
|
|
9635
10476
|
};
|
|
@@ -9641,6 +10482,44 @@ const stopStreamlitPreview = async (previewId) => {
|
|
|
9641
10482
|
throw new Error(response.error.message);
|
|
9642
10483
|
}
|
|
9643
10484
|
};
|
|
10485
|
+
/************************************
|
|
10486
|
+
|
|
10487
|
+
USER ENDPOINTS
|
|
10488
|
+
|
|
10489
|
+
************************************/
|
|
10490
|
+
const getUserKey = async (key) => {
|
|
10491
|
+
var _a;
|
|
10492
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`user/${key}`);
|
|
10493
|
+
if (resp.error) {
|
|
10494
|
+
throw new Error(resp.error.message);
|
|
10495
|
+
}
|
|
10496
|
+
return (_a = resp.data) === null || _a === void 0 ? void 0 : _a.value;
|
|
10497
|
+
};
|
|
10498
|
+
const setUserKey = async (key, value) => {
|
|
10499
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`user/${key}`, {
|
|
10500
|
+
method: 'PUT',
|
|
10501
|
+
body: JSON.stringify({ value: value }),
|
|
10502
|
+
});
|
|
10503
|
+
if (resp.error) {
|
|
10504
|
+
throw new Error(resp.error.message);
|
|
10505
|
+
}
|
|
10506
|
+
return resp.data || '';
|
|
10507
|
+
};
|
|
10508
|
+
const getChatHistoryThreads = async () => {
|
|
10509
|
+
var _a;
|
|
10510
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('chat-history/threads');
|
|
10511
|
+
if (resp.error) {
|
|
10512
|
+
throw new Error(resp.error.message);
|
|
10513
|
+
}
|
|
10514
|
+
return ((_a = resp.data) === null || _a === void 0 ? void 0 : _a.threads) || [];
|
|
10515
|
+
};
|
|
10516
|
+
const getChatHistoryThread = async (threadId) => {
|
|
10517
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`chat-history/threads/${threadId}`);
|
|
10518
|
+
if (resp.error) {
|
|
10519
|
+
throw new Error(resp.error.message);
|
|
10520
|
+
}
|
|
10521
|
+
return resp.data;
|
|
10522
|
+
};
|
|
9644
10523
|
|
|
9645
10524
|
|
|
9646
10525
|
/***/ }),
|
|
@@ -11306,6 +12185,117 @@ const isElectronBasedFrontend = () => {
|
|
|
11306
12185
|
};
|
|
11307
12186
|
|
|
11308
12187
|
|
|
12188
|
+
/***/ }),
|
|
12189
|
+
|
|
12190
|
+
/***/ "./lib/utils/userSignupEvents.js":
|
|
12191
|
+
/*!***************************************!*\
|
|
12192
|
+
!*** ./lib/utils/userSignupEvents.js ***!
|
|
12193
|
+
\***************************************/
|
|
12194
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12195
|
+
|
|
12196
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12197
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12198
|
+
/* harmony export */ userSignupEvents: () => (/* binding */ userSignupEvents)
|
|
12199
|
+
/* harmony export */ });
|
|
12200
|
+
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/signaling */ "webpack/sharing/consume/default/@lumino/signaling");
|
|
12201
|
+
/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_0__);
|
|
12202
|
+
/*
|
|
12203
|
+
* Copyright (c) Saga Inc.
|
|
12204
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12205
|
+
*/
|
|
12206
|
+
|
|
12207
|
+
/**
|
|
12208
|
+
* Event emitter for user signup events
|
|
12209
|
+
*/
|
|
12210
|
+
class UserSignupEventEmitter {
|
|
12211
|
+
constructor() {
|
|
12212
|
+
this._signupSuccess = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__.Signal(this);
|
|
12213
|
+
}
|
|
12214
|
+
/**
|
|
12215
|
+
* Signal emitted when a user successfully signs up
|
|
12216
|
+
*/
|
|
12217
|
+
get signupSuccess() {
|
|
12218
|
+
return this._signupSuccess;
|
|
12219
|
+
}
|
|
12220
|
+
/**
|
|
12221
|
+
* Emit a signup success event
|
|
12222
|
+
*/
|
|
12223
|
+
emitSignupSuccess() {
|
|
12224
|
+
this._signupSuccess.emit();
|
|
12225
|
+
}
|
|
12226
|
+
}
|
|
12227
|
+
// Create a singleton instance
|
|
12228
|
+
const userSignupEvents = new UserSignupEventEmitter();
|
|
12229
|
+
|
|
12230
|
+
|
|
12231
|
+
/***/ }),
|
|
12232
|
+
|
|
12233
|
+
/***/ "./lib/utils/userSignupState.js":
|
|
12234
|
+
/*!**************************************!*\
|
|
12235
|
+
!*** ./lib/utils/userSignupState.js ***!
|
|
12236
|
+
\**************************************/
|
|
12237
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12238
|
+
|
|
12239
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12240
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12241
|
+
/* harmony export */ checkUserSignupState: () => (/* binding */ checkUserSignupState)
|
|
12242
|
+
/* harmony export */ });
|
|
12243
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
12244
|
+
/*
|
|
12245
|
+
* Copyright (c) Saga Inc.
|
|
12246
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12247
|
+
*/
|
|
12248
|
+
|
|
12249
|
+
/**
|
|
12250
|
+
* Determines if a user should be considered "signed up" based on:
|
|
12251
|
+
* 1. Having an email address, OR
|
|
12252
|
+
* 2. Having existing chat history threads
|
|
12253
|
+
*
|
|
12254
|
+
* This ensures consistent behavior across all components that need to check
|
|
12255
|
+
* if a user should have access to Mito AI features.
|
|
12256
|
+
*/
|
|
12257
|
+
const checkUserSignupState = async () => {
|
|
12258
|
+
try {
|
|
12259
|
+
// Check if user has an email address
|
|
12260
|
+
const userEmail = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__.getUserKey)('user_email');
|
|
12261
|
+
const hasEmail = userEmail !== "" && userEmail !== undefined;
|
|
12262
|
+
if (hasEmail) {
|
|
12263
|
+
return {
|
|
12264
|
+
isSignedUp: true,
|
|
12265
|
+
hasEmail: true,
|
|
12266
|
+
hasChatHistory: false
|
|
12267
|
+
};
|
|
12268
|
+
}
|
|
12269
|
+
// Check for existing chat history threads
|
|
12270
|
+
const chatThreads = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__.getChatHistoryThreads)();
|
|
12271
|
+
const hasThreads = chatThreads.length > 0;
|
|
12272
|
+
if (!hasThreads) {
|
|
12273
|
+
return {
|
|
12274
|
+
isSignedUp: false,
|
|
12275
|
+
hasEmail: false,
|
|
12276
|
+
hasChatHistory: false
|
|
12277
|
+
};
|
|
12278
|
+
}
|
|
12279
|
+
// Verify the first thread has actual content (not just default empty thread)
|
|
12280
|
+
const firstThread = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_0__.getChatHistoryThread)(chatThreads[0].thread_id);
|
|
12281
|
+
const hasActualChatHistory = firstThread.display_history.length > 0;
|
|
12282
|
+
return {
|
|
12283
|
+
isSignedUp: hasActualChatHistory,
|
|
12284
|
+
hasEmail: false,
|
|
12285
|
+
hasChatHistory: hasActualChatHistory
|
|
12286
|
+
};
|
|
12287
|
+
}
|
|
12288
|
+
catch (error) {
|
|
12289
|
+
console.error('Failed to check user signup state:', error);
|
|
12290
|
+
return {
|
|
12291
|
+
isSignedUp: false,
|
|
12292
|
+
hasEmail: false,
|
|
12293
|
+
hasChatHistory: false
|
|
12294
|
+
};
|
|
12295
|
+
}
|
|
12296
|
+
};
|
|
12297
|
+
|
|
12298
|
+
|
|
11309
12299
|
/***/ }),
|
|
11310
12300
|
|
|
11311
12301
|
/***/ "./lib/utils/version_check.js":
|
|
@@ -11949,10 +12939,10 @@ class AppDeployWebsocketClient extends _BaseWebsocketClient__WEBPACK_IMPORTED_MO
|
|
|
11949
12939
|
if (message.error) {
|
|
11950
12940
|
this._stream.emit({
|
|
11951
12941
|
type: 'chunk',
|
|
11952
|
-
chunk: { content: message.error.hint || message.error.
|
|
12942
|
+
chunk: { content: message.error.hint || message.error.message || "An error occurred" },
|
|
11953
12943
|
done: true,
|
|
11954
12944
|
parent_id: message.parent_id,
|
|
11955
|
-
error: message.error
|
|
12945
|
+
error: message.error.message
|
|
11956
12946
|
});
|
|
11957
12947
|
}
|
|
11958
12948
|
// This will get triggered when streaming and there is an error message.
|
|
@@ -12313,8 +13303,9 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
12313
13303
|
display: flex;
|
|
12314
13304
|
align-items: center;
|
|
12315
13305
|
gap: 10px;
|
|
12316
|
-
}
|
|
12317
|
-
|
|
13306
|
+
}
|
|
13307
|
+
|
|
13308
|
+
`, "",{"version":3,"sources":["webpack://./style/AgentToolUIComponent.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,sBAAsB;IACtB,6BAA6B;IAC7B,aAAa;IACb,+BAA+B;AACnC;;AAEA;IACI,cAAc;IACd,kBAAkB;IAClB,oDAAoD;AACxD;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,SAAS;AACb","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.agent-tool-ui-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: start;\n background-color: transparent;\n padding: 10px;\n color: var(--jp-ui-font-color2);\n}\n\n.agent-tool-ui-container:not(.agent-tool-ui-error-fixup) {\n margin: 10px 0;\n border-radius: 5px;\n border: 1px solid var(--jp-cell-editor-border-color);\n}\n\n.agent-tool-ui-container:not(.agent-tool-ui-error-fixup) .agent-tool-ui-content {\n margin-left: 5px;\n}\n\n.agent-tool-ui-content {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n"],"sourceRoot":""}]);
|
|
12318
13309
|
// Exports
|
|
12319
13310
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
12320
13311
|
|
|
@@ -13320,7 +14311,21 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13320
14311
|
|
|
13321
14312
|
.cta-carousel-button {
|
|
13322
14313
|
margin-top: 8px;
|
|
13323
|
-
}
|
|
14314
|
+
}
|
|
14315
|
+
|
|
14316
|
+
.cta-logo-container {
|
|
14317
|
+
margin: 0 auto 8px;
|
|
14318
|
+
display: block;
|
|
14319
|
+
text-align: center;
|
|
14320
|
+
}
|
|
14321
|
+
|
|
14322
|
+
.cta-title {
|
|
14323
|
+
display: block;
|
|
14324
|
+
text-align: center;
|
|
14325
|
+
font-weight: bold;
|
|
14326
|
+
font-size: 20px;
|
|
14327
|
+
margin-bottom: 15px;
|
|
14328
|
+
}`, "",{"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":""}]);
|
|
13324
14329
|
// Exports
|
|
13325
14330
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13326
14331
|
|
|
@@ -13814,6 +14819,17 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13814
14819
|
container-type: inline-size;
|
|
13815
14820
|
}
|
|
13816
14821
|
|
|
14822
|
+
.chat-taskpane.disabled button:not(.signup-form-container):not(.signup-form-container *):not(.chat-taskpane-header-left):not(.chat-taskpane-header-left *) {
|
|
14823
|
+
opacity: 0.5;
|
|
14824
|
+
pointer-events: none;
|
|
14825
|
+
}
|
|
14826
|
+
|
|
14827
|
+
.chat-taskpane.disabled textarea:not(.signup-form-container):not(.signup-form-container *) {
|
|
14828
|
+
opacity: 0.5;
|
|
14829
|
+
pointer-events: none;
|
|
14830
|
+
cursor: not-allowed;
|
|
14831
|
+
}
|
|
14832
|
+
|
|
13817
14833
|
.suggestions-container {
|
|
13818
14834
|
max-width: 600px;
|
|
13819
14835
|
margin: 0 auto;
|
|
@@ -14006,7 +15022,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14006
15022
|
display: none;
|
|
14007
15023
|
}
|
|
14008
15024
|
}
|
|
14009
|
-
`, "",{"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":""}]);
|
|
15025
|
+
`, "",{"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":""}]);
|
|
14010
15026
|
// Exports
|
|
14011
15027
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
14012
15028
|
|
|
@@ -14700,6 +15716,111 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14700
15716
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
14701
15717
|
|
|
14702
15718
|
|
|
15719
|
+
/***/ }),
|
|
15720
|
+
|
|
15721
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/EditAppDropdown.css":
|
|
15722
|
+
/*!*************************************************************************!*\
|
|
15723
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/EditAppDropdown.css ***!
|
|
15724
|
+
\*************************************************************************/
|
|
15725
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
15726
|
+
|
|
15727
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15728
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15729
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15730
|
+
/* harmony export */ });
|
|
15731
|
+
/* 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");
|
|
15732
|
+
/* 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__);
|
|
15733
|
+
/* 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");
|
|
15734
|
+
/* 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__);
|
|
15735
|
+
// Imports
|
|
15736
|
+
|
|
15737
|
+
|
|
15738
|
+
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()));
|
|
15739
|
+
// Module
|
|
15740
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
15741
|
+
* Copyright (c) Saga Inc.
|
|
15742
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
15743
|
+
*/
|
|
15744
|
+
|
|
15745
|
+
/* UpdateAppDropdown Styles */
|
|
15746
|
+
|
|
15747
|
+
.update-app-dropdown {
|
|
15748
|
+
position: absolute;
|
|
15749
|
+
top: 100%;
|
|
15750
|
+
left: 0;
|
|
15751
|
+
z-index: 1000;
|
|
15752
|
+
background-color: var(--jp-layout-color1);
|
|
15753
|
+
border: 1px solid var(--jp-border-color1);
|
|
15754
|
+
border-radius: 3px;
|
|
15755
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
15756
|
+
min-width: 300px;
|
|
15757
|
+
max-width: 500px;
|
|
15758
|
+
}
|
|
15759
|
+
|
|
15760
|
+
.update-app-dropdown-content {
|
|
15761
|
+
padding: 12px;
|
|
15762
|
+
}
|
|
15763
|
+
|
|
15764
|
+
.update-app-dropdown-label {
|
|
15765
|
+
display: block;
|
|
15766
|
+
margin-bottom: 8px;
|
|
15767
|
+
font-weight: 500;
|
|
15768
|
+
color: var(--jp-ui-font-color1);
|
|
15769
|
+
font-size: var(--jp-ui-font-size1);
|
|
15770
|
+
}
|
|
15771
|
+
|
|
15772
|
+
.update-app-dropdown-textarea {
|
|
15773
|
+
width: 100%;
|
|
15774
|
+
min-height: 100px;
|
|
15775
|
+
padding: 8px;
|
|
15776
|
+
border: 1px solid var(--jp-border-color1);
|
|
15777
|
+
border-radius: 3px;
|
|
15778
|
+
font-family: var(--jp-ui-font-family);
|
|
15779
|
+
font-size: var(--jp-ui-font-size1);
|
|
15780
|
+
resize: vertical;
|
|
15781
|
+
box-sizing: border-box;
|
|
15782
|
+
background-color: var(--jp-input-background);
|
|
15783
|
+
color: var(--jp-ui-font-color1);
|
|
15784
|
+
}
|
|
15785
|
+
|
|
15786
|
+
.update-app-dropdown-buttons {
|
|
15787
|
+
display: flex;
|
|
15788
|
+
justify-content: flex-end;
|
|
15789
|
+
gap: 8px;
|
|
15790
|
+
margin-top: 12px;
|
|
15791
|
+
}
|
|
15792
|
+
|
|
15793
|
+
.update-app-dropdown-button {
|
|
15794
|
+
padding: 4px 8px;
|
|
15795
|
+
border: none;
|
|
15796
|
+
border-radius: 3px;
|
|
15797
|
+
cursor: pointer;
|
|
15798
|
+
font-family: var(--jp-ui-font-family);
|
|
15799
|
+
font-size: var(--jp-ui-font-size0);
|
|
15800
|
+
}
|
|
15801
|
+
|
|
15802
|
+
.update-app-dropdown-button-cancel {
|
|
15803
|
+
background-color: var(--jp-layout-color2);
|
|
15804
|
+
color: var(--jp-ui-font-color1);
|
|
15805
|
+
}
|
|
15806
|
+
|
|
15807
|
+
.update-app-dropdown-button-submit {
|
|
15808
|
+
|
|
15809
|
+
background-color: var(--purple-300);
|
|
15810
|
+
color: var(--purple-700);
|
|
15811
|
+
cursor: pointer;
|
|
15812
|
+
}
|
|
15813
|
+
|
|
15814
|
+
.update-app-dropdown-button-submit.disabled {
|
|
15815
|
+
background-color: var(--jp-layout-color2);
|
|
15816
|
+
color: var(--jp-ui-font-color2);
|
|
15817
|
+
cursor: not-allowed;
|
|
15818
|
+
}
|
|
15819
|
+
`, "",{"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":""}]);
|
|
15820
|
+
// Exports
|
|
15821
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
15822
|
+
|
|
15823
|
+
|
|
14703
15824
|
/***/ }),
|
|
14704
15825
|
|
|
14705
15826
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ErrorFixupToolUI.css":
|
|
@@ -14926,7 +16047,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14926
16047
|
}
|
|
14927
16048
|
|
|
14928
16049
|
.file-list input[type="checkbox"],
|
|
14929
|
-
.select-all input[type="checkbox"]{
|
|
16050
|
+
.files-selector-select-all input[type="checkbox"]{
|
|
14930
16051
|
transform: scale(1.3);
|
|
14931
16052
|
margin-right: 6px;
|
|
14932
16053
|
accent-color: var(--purple-500);
|
|
@@ -14996,7 +16117,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14996
16117
|
.files-selector-select-all {
|
|
14997
16118
|
margin-bottom: 8px;
|
|
14998
16119
|
}
|
|
14999
|
-
`, "",{"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":""}]);
|
|
16120
|
+
`, "",{"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.files-selector-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":""}]);
|
|
15000
16121
|
// Exports
|
|
15001
16122
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
15002
16123
|
|
|
@@ -16391,10 +17512,10 @@ a {
|
|
|
16391
17512
|
|
|
16392
17513
|
/***/ }),
|
|
16393
17514
|
|
|
16394
|
-
/***/ "./node_modules/css-loader/dist/cjs.js!./style/
|
|
16395
|
-
|
|
16396
|
-
!*** ./node_modules/css-loader/dist/cjs.js!./style/
|
|
16397
|
-
|
|
17515
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ShimmerWrapper.css":
|
|
17516
|
+
/*!************************************************************************!*\
|
|
17517
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/ShimmerWrapper.css ***!
|
|
17518
|
+
\************************************************************************/
|
|
16398
17519
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
16399
17520
|
|
|
16400
17521
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -16415,28 +17536,197 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16415
17536
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
16416
17537
|
*/
|
|
16417
17538
|
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
|
|
16422
|
-
padding: 4px 8px !important;
|
|
16423
|
-
color: var(--jp-ui-font-color1) !important;
|
|
16424
|
-
background-color: var(--jp-layout-color2) !important;
|
|
17539
|
+
/* Shimmer skeleton effect for loading states */
|
|
17540
|
+
.shimmer-wrapper {
|
|
17541
|
+
position: relative;
|
|
17542
|
+
overflow: hidden;
|
|
16425
17543
|
}
|
|
16426
17544
|
|
|
16427
|
-
.
|
|
16428
|
-
|
|
17545
|
+
.shimmer-wrapper::before {
|
|
17546
|
+
content: '';
|
|
17547
|
+
position: absolute;
|
|
17548
|
+
top: 0;
|
|
17549
|
+
left: -100%;
|
|
17550
|
+
width: 100%;
|
|
17551
|
+
height: 100%;
|
|
17552
|
+
background: linear-gradient(
|
|
17553
|
+
90deg,
|
|
17554
|
+
transparent,
|
|
17555
|
+
var(--chat-background-color),
|
|
17556
|
+
transparent
|
|
17557
|
+
);
|
|
17558
|
+
animation: shimmer 1.5s ease-in-out infinite;
|
|
17559
|
+
z-index: 10;
|
|
17560
|
+
pointer-events: none;
|
|
16429
17561
|
}
|
|
16430
17562
|
|
|
16431
|
-
.
|
|
16432
|
-
|
|
16433
|
-
|
|
16434
|
-
height: 10px !important;
|
|
16435
|
-
width: 10px !important;
|
|
16436
|
-
font-size: 12px !important;
|
|
17563
|
+
.shimmer-wrapper > * {
|
|
17564
|
+
position: relative;
|
|
17565
|
+
z-index: 1;
|
|
16437
17566
|
}
|
|
16438
17567
|
|
|
16439
|
-
|
|
17568
|
+
@keyframes shimmer {
|
|
17569
|
+
0% {
|
|
17570
|
+
left: -100%;
|
|
17571
|
+
}
|
|
17572
|
+
100% {
|
|
17573
|
+
left: 100%;
|
|
17574
|
+
}
|
|
17575
|
+
}
|
|
17576
|
+
`, "",{"version":3,"sources":["webpack://./style/ShimmerWrapper.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,+CAA+C;AAC/C;IACI,kBAAkB;IAClB,gBAAgB;AACpB;;AAEA;IACI,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,WAAW;IACX,WAAW;IACX,YAAY;IACZ;;;;;KAKC;IACD,4CAA4C;IAC5C,WAAW;IACX,oBAAoB;AACxB;;AAEA;IACI,kBAAkB;IAClB,UAAU;AACd;;AAEA;IACI;QACI,WAAW;IACf;IACA;QACI,UAAU;IACd;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/* Shimmer skeleton effect for loading states */\n.shimmer-wrapper {\n position: relative;\n overflow: hidden;\n}\n\n.shimmer-wrapper::before {\n content: '';\n position: absolute;\n top: 0;\n left: -100%;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n transparent,\n var(--chat-background-color),\n transparent\n );\n animation: shimmer 1.5s ease-in-out infinite;\n z-index: 10;\n pointer-events: none;\n}\n\n.shimmer-wrapper > * {\n position: relative;\n z-index: 1;\n}\n\n@keyframes shimmer {\n 0% {\n left: -100%;\n }\n 100% {\n left: 100%;\n }\n}\n"],"sourceRoot":""}]);
|
|
17577
|
+
// Exports
|
|
17578
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17579
|
+
|
|
17580
|
+
|
|
17581
|
+
/***/ }),
|
|
17582
|
+
|
|
17583
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/SignUpForm.css":
|
|
17584
|
+
/*!********************************************************************!*\
|
|
17585
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/SignUpForm.css ***!
|
|
17586
|
+
\********************************************************************/
|
|
17587
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
17588
|
+
|
|
17589
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17590
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17591
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17592
|
+
/* harmony export */ });
|
|
17593
|
+
/* 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");
|
|
17594
|
+
/* 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__);
|
|
17595
|
+
/* 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");
|
|
17596
|
+
/* 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__);
|
|
17597
|
+
// Imports
|
|
17598
|
+
|
|
17599
|
+
|
|
17600
|
+
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()));
|
|
17601
|
+
// Module
|
|
17602
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
17603
|
+
* Copyright (c) Saga Inc.
|
|
17604
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
17605
|
+
*/
|
|
17606
|
+
|
|
17607
|
+
.signup-form-header {
|
|
17608
|
+
display: block;
|
|
17609
|
+
text-align: center;
|
|
17610
|
+
font-weight: bold;
|
|
17611
|
+
font-size: 20px;
|
|
17612
|
+
margin-bottom: 15px;
|
|
17613
|
+
color: var(--jp-ui-font-color0);
|
|
17614
|
+
}
|
|
17615
|
+
|
|
17616
|
+
.signup-form-header-logo {
|
|
17617
|
+
margin: 0 auto 8px;
|
|
17618
|
+
display: block;
|
|
17619
|
+
text-align: center;
|
|
17620
|
+
}
|
|
17621
|
+
|
|
17622
|
+
.signup-form-message {
|
|
17623
|
+
font-size: 14px;
|
|
17624
|
+
color: var(--jp-ui-font-color1);
|
|
17625
|
+
}
|
|
17626
|
+
|
|
17627
|
+
/* Form container to control layout */
|
|
17628
|
+
.signup-form-container form {
|
|
17629
|
+
display: flex;
|
|
17630
|
+
flex-wrap: wrap;
|
|
17631
|
+
gap: 8px;
|
|
17632
|
+
align-items: flex-start;
|
|
17633
|
+
}
|
|
17634
|
+
|
|
17635
|
+
.signup-form-input {
|
|
17636
|
+
padding: 8px 12px;
|
|
17637
|
+
border: 1px solid var(--jp-border-color1);
|
|
17638
|
+
border-radius: var(--jp-border-radius);
|
|
17639
|
+
flex: 2;
|
|
17640
|
+
min-width: 200px;
|
|
17641
|
+
margin-bottom: 0;
|
|
17642
|
+
height: 36px;
|
|
17643
|
+
box-sizing: border-box;
|
|
17644
|
+
}
|
|
17645
|
+
|
|
17646
|
+
.signup-form-input:focus {
|
|
17647
|
+
border-color: var(--purple-600);
|
|
17648
|
+
outline: none;
|
|
17649
|
+
}
|
|
17650
|
+
|
|
17651
|
+
.signup-form-button {
|
|
17652
|
+
height: 36px;
|
|
17653
|
+
box-sizing: border-box;
|
|
17654
|
+
background-color: var(--purple-700);
|
|
17655
|
+
color: white;
|
|
17656
|
+
flex: 1;
|
|
17657
|
+
}
|
|
17658
|
+
|
|
17659
|
+
.signup-form-button:hover {
|
|
17660
|
+
background-color: var(--purple-600);
|
|
17661
|
+
}
|
|
17662
|
+
|
|
17663
|
+
/* When the form wraps, make button full width */
|
|
17664
|
+
@media (max-width: 300px) {
|
|
17665
|
+
.signup-form-container form {
|
|
17666
|
+
flex-direction: column;
|
|
17667
|
+
}
|
|
17668
|
+
|
|
17669
|
+
.signup-form-input {
|
|
17670
|
+
width: 100%;
|
|
17671
|
+
min-width: unset;
|
|
17672
|
+
}
|
|
17673
|
+
|
|
17674
|
+
.signup-form-button {
|
|
17675
|
+
width: 100%;
|
|
17676
|
+
}
|
|
17677
|
+
}`, "",{"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":""}]);
|
|
17678
|
+
// Exports
|
|
17679
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17680
|
+
|
|
17681
|
+
|
|
17682
|
+
/***/ }),
|
|
17683
|
+
|
|
17684
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/StreamlitPreviewPlugin.css":
|
|
17685
|
+
/*!********************************************************************************!*\
|
|
17686
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/StreamlitPreviewPlugin.css ***!
|
|
17687
|
+
\********************************************************************************/
|
|
17688
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
17689
|
+
|
|
17690
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17691
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17692
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17693
|
+
/* harmony export */ });
|
|
17694
|
+
/* 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");
|
|
17695
|
+
/* 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__);
|
|
17696
|
+
/* 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");
|
|
17697
|
+
/* 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__);
|
|
17698
|
+
// Imports
|
|
17699
|
+
|
|
17700
|
+
|
|
17701
|
+
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()));
|
|
17702
|
+
// Module
|
|
17703
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
17704
|
+
* Copyright (c) Saga Inc.
|
|
17705
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
17706
|
+
*/
|
|
17707
|
+
|
|
17708
|
+
.mito-deploy-button {
|
|
17709
|
+
display: flex !important;
|
|
17710
|
+
align-items: center !important;
|
|
17711
|
+
gap: 6px !important;
|
|
17712
|
+
padding: 4px 8px !important;
|
|
17713
|
+
color: var(--jp-ui-font-color1) !important;
|
|
17714
|
+
background-color: var(--jp-layout-color2) !important;
|
|
17715
|
+
}
|
|
17716
|
+
|
|
17717
|
+
.mito-deploy-button:hover {
|
|
17718
|
+
background-color: var(--jp-layout-color3) !important;
|
|
17719
|
+
}
|
|
17720
|
+
|
|
17721
|
+
.mito-deploy-button .mito-ai-deploy-icon {
|
|
17722
|
+
display: flex !important;
|
|
17723
|
+
align-items: center !important;
|
|
17724
|
+
height: 10px !important;
|
|
17725
|
+
width: 10px !important;
|
|
17726
|
+
font-size: 12px !important;
|
|
17727
|
+
}
|
|
17728
|
+
|
|
17729
|
+
.mito-deploy-button::slotted(svg),
|
|
16440
17730
|
.mito-deploy-button svg {
|
|
16441
17731
|
width: 12px !important;
|
|
16442
17732
|
height: 12px !important;
|
|
@@ -16448,6 +17738,118 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16448
17738
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16449
17739
|
|
|
16450
17740
|
|
|
17741
|
+
/***/ }),
|
|
17742
|
+
|
|
17743
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/SubscriptionPage.css":
|
|
17744
|
+
/*!**************************************************************************!*\
|
|
17745
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/SubscriptionPage.css ***!
|
|
17746
|
+
\**************************************************************************/
|
|
17747
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
17748
|
+
|
|
17749
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17750
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17751
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17752
|
+
/* harmony export */ });
|
|
17753
|
+
/* 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");
|
|
17754
|
+
/* 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__);
|
|
17755
|
+
/* 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");
|
|
17756
|
+
/* 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__);
|
|
17757
|
+
// Imports
|
|
17758
|
+
|
|
17759
|
+
|
|
17760
|
+
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()));
|
|
17761
|
+
// Module
|
|
17762
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
17763
|
+
* Copyright (c) Saga Inc.
|
|
17764
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
17765
|
+
*/
|
|
17766
|
+
|
|
17767
|
+
/* Subscription Page Styles */
|
|
17768
|
+
|
|
17769
|
+
.subscription-page-card {
|
|
17770
|
+
background: var(--jp-layout-color1);
|
|
17771
|
+
border: 1px solid var(--jp-border-color2);
|
|
17772
|
+
border-radius: 8px;
|
|
17773
|
+
padding: 24px;
|
|
17774
|
+
margin-bottom: 20px;
|
|
17775
|
+
}
|
|
17776
|
+
|
|
17777
|
+
.subscription-page-card-content {
|
|
17778
|
+
margin-bottom: 20px;
|
|
17779
|
+
}
|
|
17780
|
+
|
|
17781
|
+
.subscription-page-section-title {
|
|
17782
|
+
margin: 0 0 16px 0;
|
|
17783
|
+
font-size: 16px;
|
|
17784
|
+
font-weight: 600;
|
|
17785
|
+
}
|
|
17786
|
+
|
|
17787
|
+
.subscription-page-usage-stats {
|
|
17788
|
+
display: flex;
|
|
17789
|
+
align-items: center;
|
|
17790
|
+
gap: 12px;
|
|
17791
|
+
margin-bottom: 16px;
|
|
17792
|
+
}
|
|
17793
|
+
|
|
17794
|
+
.subscription-page-usage-count {
|
|
17795
|
+
font-size: 32px;
|
|
17796
|
+
font-weight: 700;
|
|
17797
|
+
color: var(--purple-600);
|
|
17798
|
+
}
|
|
17799
|
+
|
|
17800
|
+
.subscription-page-usage-details {
|
|
17801
|
+
font-size: 14px;
|
|
17802
|
+
color: var(--jp-ui-font-color2);
|
|
17803
|
+
}
|
|
17804
|
+
|
|
17805
|
+
.subscription-page-progress-bar {
|
|
17806
|
+
width: 100%;
|
|
17807
|
+
height: 8px;
|
|
17808
|
+
background-color: var(--jp-layout-color2);
|
|
17809
|
+
border-radius: 4px;
|
|
17810
|
+
overflow: hidden;
|
|
17811
|
+
margin-bottom: 12px;
|
|
17812
|
+
}
|
|
17813
|
+
|
|
17814
|
+
.subscription-page-progress-fill {
|
|
17815
|
+
height: 100%;
|
|
17816
|
+
background-color: var(--purple-600);
|
|
17817
|
+
transition: width 0.3s ease;
|
|
17818
|
+
}
|
|
17819
|
+
|
|
17820
|
+
.subscription-page-status-message {
|
|
17821
|
+
margin: 0;
|
|
17822
|
+
font-size: 14px;
|
|
17823
|
+
font-weight: 500;
|
|
17824
|
+
color: var(--jp-ui-font-color1);
|
|
17825
|
+
}
|
|
17826
|
+
|
|
17827
|
+
.subscription-page-status-warning {
|
|
17828
|
+
font-size: 14px;
|
|
17829
|
+
color: var(--red-500);
|
|
17830
|
+
font-weight: 600;
|
|
17831
|
+
}
|
|
17832
|
+
|
|
17833
|
+
.subscription-page-button-container {
|
|
17834
|
+
display: flex;
|
|
17835
|
+
gap: 12px;
|
|
17836
|
+
}
|
|
17837
|
+
|
|
17838
|
+
.subscription-page-button-container form {
|
|
17839
|
+
flex: 1;
|
|
17840
|
+
margin: 0;
|
|
17841
|
+
}
|
|
17842
|
+
|
|
17843
|
+
.subscription-page-button {
|
|
17844
|
+
text-decoration: none;
|
|
17845
|
+
text-align: center;
|
|
17846
|
+
flex: 1;
|
|
17847
|
+
width: 100%;
|
|
17848
|
+
}`, "",{"version":3,"sources":["webpack://./style/SubscriptionPage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,6BAA6B;;AAE7B;IACI,mCAAmC;IACnC,yCAAyC;IACzC,kBAAkB;IAClB,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,kBAAkB;IAClB,eAAe;IACf,gBAAgB;AACpB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,mBAAmB;AACvB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,wBAAwB;AAC5B;;AAEA;IACI,eAAe;IACf,+BAA+B;AACnC;;AAEA;IACI,WAAW;IACX,WAAW;IACX,yCAAyC;IACzC,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;AACvB;;AAEA;IACI,YAAY;IACZ,mCAAmC;IACnC,2BAA2B;AAC/B;;AAEA;IACI,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,+BAA+B;AACnC;;AAEA;IACI,eAAe;IACf,qBAAqB;IACrB,gBAAgB;AACpB;;AAEA;IACI,aAAa;IACb,SAAS;AACb;;AAEA;IACI,OAAO;IACP,SAAS;AACb;;AAEA;IACI,qBAAqB;IACrB,kBAAkB;IAClB,OAAO;IACP,WAAW;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/* Subscription Page Styles */\n\n.subscription-page-card {\n background: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 8px;\n padding: 24px;\n margin-bottom: 20px;\n}\n\n.subscription-page-card-content {\n margin-bottom: 20px;\n}\n\n.subscription-page-section-title {\n margin: 0 0 16px 0;\n font-size: 16px;\n font-weight: 600;\n}\n\n.subscription-page-usage-stats {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 16px;\n}\n\n.subscription-page-usage-count {\n font-size: 32px;\n font-weight: 700;\n color: var(--purple-600);\n}\n\n.subscription-page-usage-details {\n font-size: 14px;\n color: var(--jp-ui-font-color2);\n}\n\n.subscription-page-progress-bar {\n width: 100%;\n height: 8px;\n background-color: var(--jp-layout-color2);\n border-radius: 4px;\n overflow: hidden;\n margin-bottom: 12px;\n}\n\n.subscription-page-progress-fill {\n height: 100%;\n background-color: var(--purple-600);\n transition: width 0.3s ease;\n}\n\n.subscription-page-status-message {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n color: var(--jp-ui-font-color1);\n}\n\n.subscription-page-status-warning {\n font-size: 14px;\n color: var(--red-500);\n font-weight: 600;\n}\n\n.subscription-page-button-container {\n display: flex;\n gap: 12px;\n}\n\n.subscription-page-button-container form {\n flex: 1;\n margin: 0;\n}\n\n.subscription-page-button {\n text-decoration: none;\n text-align: center;\n flex: 1;\n width: 100%;\n}"],"sourceRoot":""}]);
|
|
17849
|
+
// Exports
|
|
17850
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17851
|
+
|
|
17852
|
+
|
|
16451
17853
|
/***/ }),
|
|
16452
17854
|
|
|
16453
17855
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/TextAndIconButton.css":
|
|
@@ -16620,6 +18022,77 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16620
18022
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16621
18023
|
|
|
16622
18024
|
|
|
18025
|
+
/***/ }),
|
|
18026
|
+
|
|
18027
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/UsageBadge.css":
|
|
18028
|
+
/*!********************************************************************!*\
|
|
18029
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/UsageBadge.css ***!
|
|
18030
|
+
\********************************************************************/
|
|
18031
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
18032
|
+
|
|
18033
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18034
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18035
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18036
|
+
/* harmony export */ });
|
|
18037
|
+
/* 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");
|
|
18038
|
+
/* 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__);
|
|
18039
|
+
/* 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");
|
|
18040
|
+
/* 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__);
|
|
18041
|
+
// Imports
|
|
18042
|
+
|
|
18043
|
+
|
|
18044
|
+
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()));
|
|
18045
|
+
// Module
|
|
18046
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
18047
|
+
* Copyright (c) Saga Inc.
|
|
18048
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
18049
|
+
*/
|
|
18050
|
+
|
|
18051
|
+
.usage-badge {
|
|
18052
|
+
position: relative;
|
|
18053
|
+
display: inline-flex;
|
|
18054
|
+
align-items: center;
|
|
18055
|
+
gap: 6px;
|
|
18056
|
+
padding: 2px 8px 2px 4px;
|
|
18057
|
+
background-color: var(--jp-layout-color2);
|
|
18058
|
+
border-radius: 12px;
|
|
18059
|
+
cursor: pointer;
|
|
18060
|
+
transition: background-color 0.2s ease;
|
|
18061
|
+
margin-bottom: 4px;
|
|
18062
|
+
}
|
|
18063
|
+
|
|
18064
|
+
.usage-badge:hover {
|
|
18065
|
+
background-color: var(--jp-layout-color3);
|
|
18066
|
+
}
|
|
18067
|
+
|
|
18068
|
+
.usage-badge-svg {
|
|
18069
|
+
transform: rotate(-90deg);
|
|
18070
|
+
flex-shrink: 0;
|
|
18071
|
+
}
|
|
18072
|
+
|
|
18073
|
+
.usage-badge-text {
|
|
18074
|
+
font-size: 11px;
|
|
18075
|
+
color: var(--jp-ui-font-color2);
|
|
18076
|
+
white-space: nowrap;
|
|
18077
|
+
line-height: 1;
|
|
18078
|
+
}
|
|
18079
|
+
|
|
18080
|
+
.usage-badge-circle-background {
|
|
18081
|
+
fill: none;
|
|
18082
|
+
stroke: var(--jp-layout-color3);
|
|
18083
|
+
stroke-width: 3.5;
|
|
18084
|
+
}
|
|
18085
|
+
|
|
18086
|
+
.usage-badge-circle-progress {
|
|
18087
|
+
fill: none;
|
|
18088
|
+
stroke-width: 3.5;
|
|
18089
|
+
stroke-linecap: round;
|
|
18090
|
+
transition: stroke-dashoffset 0.5s ease;
|
|
18091
|
+
}`, "",{"version":3,"sources":["webpack://./style/UsageBadge.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,QAAQ;IACR,wBAAwB;IACxB,yCAAyC;IACzC,mBAAmB;IACnB,eAAe;IACf,sCAAsC;IACtC,kBAAkB;AACtB;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,yBAAyB;IACzB,cAAc;AAClB;;AAEA;IACI,eAAe;IACf,+BAA+B;IAC/B,mBAAmB;IACnB,cAAc;AAClB;;AAEA;IACI,UAAU;IACV,+BAA+B;IAC/B,iBAAiB;AACrB;;AAEA;IACI,UAAU;IACV,iBAAiB;IACjB,qBAAqB;IACrB,uCAAuC;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.usage-badge {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 8px 2px 4px;\n background-color: var(--jp-layout-color2);\n border-radius: 12px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n margin-bottom: 4px;\n}\n\n.usage-badge:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.usage-badge-svg {\n transform: rotate(-90deg);\n flex-shrink: 0;\n}\n\n.usage-badge-text {\n font-size: 11px;\n color: var(--jp-ui-font-color2);\n white-space: nowrap;\n line-height: 1;\n}\n\n.usage-badge-circle-background {\n fill: none;\n stroke: var(--jp-layout-color3);\n stroke-width: 3.5;\n}\n\n.usage-badge-circle-progress {\n fill: none;\n stroke-width: 3.5;\n stroke-linecap: round;\n transition: stroke-dashoffset 0.5s ease;\n}"],"sourceRoot":""}]);
|
|
18092
|
+
// Exports
|
|
18093
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
18094
|
+
|
|
18095
|
+
|
|
16623
18096
|
/***/ }),
|
|
16624
18097
|
|
|
16625
18098
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/button.css":
|
|
@@ -16783,17 +18256,37 @@ module.exports = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"1200p
|
|
|
16783
18256
|
\***********************************/
|
|
16784
18257
|
/***/ ((module) => {
|
|
16785
18258
|
|
|
16786
|
-
module.exports = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"currentColor\">\n <path d=\"M18.5775 2.50569L17.3933 1.85818C17.3684 1.84329 17.3461 1.82344 17.3337 1.79616L16.6832 0.61281C16.5715 0.404416 16.353 0 16.1171 0C15.8788 0 15.6628 0.404416 15.5485 0.61281L14.9005 1.79616C14.8856 1.82344 14.8658 1.84329 14.8385 1.85818L13.6542 2.50569C13.4456 2.61981 13.0087 2.83564 13.0087 3.07381C13.0087 3.30949 13.4456 3.52781 13.6542 3.64193L14.8385 4.28944C14.8658 4.30184 14.8856 4.32417 14.9005 4.34898L15.5485 5.53232C15.6628 5.74072 15.8788 6.16746 16.1171 6.16746C16.353 6.16746 16.5715 5.74072 16.6832 5.53232L17.3337 4.34898C17.3461 4.32417 17.3684 4.30184 17.3933 4.28944L18.5775 3.64193C18.7861 3.52781 19.2306 3.30949 19.2306 3.07381C19.2306 2.83564 18.7861 2.61981 18.5775 2.50569Z\"/>\n <path d=\"M15.4932 9.95234L12.2462 8.17563C12.1781 8.13478 12.1168 8.08032 12.0828 8.00544L10.2993 4.75843C9.99295 4.18661 9.3939 3.07692 8.7472 3.07692C8.0937 3.07692 7.50145 4.18661 7.18832 4.75843L5.4116 8.00544C5.37075 8.08032 5.3163 8.13478 5.24141 8.17563L1.9944 9.95234C1.42258 10.2655 0.224487 10.8577 0.224487 11.5112C0.224487 12.1579 1.42258 12.757 1.9944 13.0701L5.24141 14.8468C5.3163 14.8809 5.37075 14.9421 5.4116 15.0102L7.18832 18.2572C7.50145 18.829 8.0937 20 8.7472 20C9.3939 20 9.99295 18.829 10.2993 18.2572L12.0828 15.0102C12.1168 14.9421 12.1781 14.8809 12.2462 14.8468L15.4932 13.0701C16.065 12.757 17.2837 12.1579 17.2837 11.5112C17.2837 10.8577 16.065 10.2655 15.4932 9.95234Z\"/>\n </g>\n</svg>";
|
|
18259
|
+
module.exports = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"currentColor\">\n <path d=\"M18.5775 2.50569L17.3933 1.85818C17.3684 1.84329 17.3461 1.82344 17.3337 1.79616L16.6832 0.61281C16.5715 0.404416 16.353 0 16.1171 0C15.8788 0 15.6628 0.404416 15.5485 0.61281L14.9005 1.79616C14.8856 1.82344 14.8658 1.84329 14.8385 1.85818L13.6542 2.50569C13.4456 2.61981 13.0087 2.83564 13.0087 3.07381C13.0087 3.30949 13.4456 3.52781 13.6542 3.64193L14.8385 4.28944C14.8658 4.30184 14.8856 4.32417 14.9005 4.34898L15.5485 5.53232C15.6628 5.74072 15.8788 6.16746 16.1171 6.16746C16.353 6.16746 16.5715 5.74072 16.6832 5.53232L17.3337 4.34898C17.3461 4.32417 17.3684 4.30184 17.3933 4.28944L18.5775 3.64193C18.7861 3.52781 19.2306 3.30949 19.2306 3.07381C19.2306 2.83564 18.7861 2.61981 18.5775 2.50569Z\"/>\n <path d=\"M15.4932 9.95234L12.2462 8.17563C12.1781 8.13478 12.1168 8.08032 12.0828 8.00544L10.2993 4.75843C9.99295 4.18661 9.3939 3.07692 8.7472 3.07692C8.0937 3.07692 7.50145 4.18661 7.18832 4.75843L5.4116 8.00544C5.37075 8.08032 5.3163 8.13478 5.24141 8.17563L1.9944 9.95234C1.42258 10.2655 0.224487 10.8577 0.224487 11.5112C0.224487 12.1579 1.42258 12.757 1.9944 13.0701L5.24141 14.8468C5.3163 14.8809 5.37075 14.9421 5.4116 15.0102L7.18832 18.2572C7.50145 18.829 8.0937 20 8.7472 20C9.3939 20 9.99295 18.829 10.2993 18.2572L12.0828 15.0102C12.1168 14.9421 12.1781 14.8809 12.2462 14.8468L15.4932 13.0701C16.065 12.757 17.2837 12.1579 17.2837 11.5112C17.2837 10.8577 16.065 10.2655 15.4932 9.95234Z\"/>\n </g>\n</svg>";
|
|
18260
|
+
|
|
18261
|
+
/***/ }),
|
|
18262
|
+
|
|
18263
|
+
/***/ "./src/icons/OpenIndicatorIcon.svg":
|
|
18264
|
+
/*!*****************************************!*\
|
|
18265
|
+
!*** ./src/icons/OpenIndicatorIcon.svg ***!
|
|
18266
|
+
\*****************************************/
|
|
18267
|
+
/***/ ((module) => {
|
|
18268
|
+
|
|
18269
|
+
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"5\" viewBox=\"0 0 24 24\">\n <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"green\" className=\"jp-icon3 jp-icon-selectable\"/>\n</svg>";
|
|
18270
|
+
|
|
18271
|
+
/***/ }),
|
|
18272
|
+
|
|
18273
|
+
/***/ "./src/icons/PencilIcon.svg":
|
|
18274
|
+
/*!**********************************!*\
|
|
18275
|
+
!*** ./src/icons/PencilIcon.svg ***!
|
|
18276
|
+
\**********************************/
|
|
18277
|
+
/***/ ((module) => {
|
|
18278
|
+
|
|
18279
|
+
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>";
|
|
16787
18280
|
|
|
16788
18281
|
/***/ }),
|
|
16789
18282
|
|
|
16790
|
-
/***/ "./src/icons/
|
|
16791
|
-
|
|
16792
|
-
!*** ./src/icons/
|
|
16793
|
-
|
|
18283
|
+
/***/ "./src/icons/ResetCircleIcon.svg":
|
|
18284
|
+
/*!***************************************!*\
|
|
18285
|
+
!*** ./src/icons/ResetCircleIcon.svg ***!
|
|
18286
|
+
\***************************************/
|
|
16794
18287
|
/***/ ((module) => {
|
|
16795
18288
|
|
|
16796
|
-
module.exports = "<svg
|
|
18289
|
+
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";
|
|
16797
18290
|
|
|
16798
18291
|
/***/ }),
|
|
16799
18292
|
|
|
@@ -17659,6 +19152,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
17659
19152
|
/* 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);
|
|
17660
19153
|
|
|
17661
19154
|
|
|
19155
|
+
/***/ }),
|
|
19156
|
+
|
|
19157
|
+
/***/ "./style/EditAppDropdown.css":
|
|
19158
|
+
/*!***********************************!*\
|
|
19159
|
+
!*** ./style/EditAppDropdown.css ***!
|
|
19160
|
+
\***********************************/
|
|
19161
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
19162
|
+
|
|
19163
|
+
__webpack_require__.r(__webpack_exports__);
|
|
19164
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19165
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19166
|
+
/* harmony export */ });
|
|
19167
|
+
/* 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");
|
|
19168
|
+
/* 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__);
|
|
19169
|
+
/* 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");
|
|
19170
|
+
/* 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__);
|
|
19171
|
+
/* 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");
|
|
19172
|
+
/* 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__);
|
|
19173
|
+
/* 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");
|
|
19174
|
+
/* 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__);
|
|
19175
|
+
/* 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");
|
|
19176
|
+
/* 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__);
|
|
19177
|
+
/* 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");
|
|
19178
|
+
/* 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__);
|
|
19179
|
+
/* 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");
|
|
19180
|
+
|
|
19181
|
+
|
|
19182
|
+
|
|
19183
|
+
|
|
19184
|
+
|
|
19185
|
+
|
|
19186
|
+
|
|
19187
|
+
|
|
19188
|
+
|
|
19189
|
+
|
|
19190
|
+
|
|
19191
|
+
var options = {};
|
|
19192
|
+
|
|
19193
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
19194
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
19195
|
+
|
|
19196
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
19197
|
+
|
|
19198
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
19199
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
19200
|
+
|
|
19201
|
+
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);
|
|
19202
|
+
|
|
19203
|
+
|
|
19204
|
+
|
|
19205
|
+
|
|
19206
|
+
/* 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);
|
|
19207
|
+
|
|
19208
|
+
|
|
17662
19209
|
/***/ }),
|
|
17663
19210
|
|
|
17664
19211
|
/***/ "./style/ErrorFixupToolUI.css":
|
|
@@ -18415,6 +19962,114 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
18415
19962
|
/* 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);
|
|
18416
19963
|
|
|
18417
19964
|
|
|
19965
|
+
/***/ }),
|
|
19966
|
+
|
|
19967
|
+
/***/ "./style/ShimmerWrapper.css":
|
|
19968
|
+
/*!**********************************!*\
|
|
19969
|
+
!*** ./style/ShimmerWrapper.css ***!
|
|
19970
|
+
\**********************************/
|
|
19971
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
19972
|
+
|
|
19973
|
+
__webpack_require__.r(__webpack_exports__);
|
|
19974
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19975
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19976
|
+
/* harmony export */ });
|
|
19977
|
+
/* 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");
|
|
19978
|
+
/* 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__);
|
|
19979
|
+
/* 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");
|
|
19980
|
+
/* 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__);
|
|
19981
|
+
/* 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");
|
|
19982
|
+
/* 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__);
|
|
19983
|
+
/* 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");
|
|
19984
|
+
/* 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__);
|
|
19985
|
+
/* 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");
|
|
19986
|
+
/* 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__);
|
|
19987
|
+
/* 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");
|
|
19988
|
+
/* 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__);
|
|
19989
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ShimmerWrapper_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./ShimmerWrapper.css */ "./node_modules/css-loader/dist/cjs.js!./style/ShimmerWrapper.css");
|
|
19990
|
+
|
|
19991
|
+
|
|
19992
|
+
|
|
19993
|
+
|
|
19994
|
+
|
|
19995
|
+
|
|
19996
|
+
|
|
19997
|
+
|
|
19998
|
+
|
|
19999
|
+
|
|
20000
|
+
|
|
20001
|
+
var options = {};
|
|
20002
|
+
|
|
20003
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
20004
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
20005
|
+
|
|
20006
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
20007
|
+
|
|
20008
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
20009
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
20010
|
+
|
|
20011
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_ShimmerWrapper_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
20012
|
+
|
|
20013
|
+
|
|
20014
|
+
|
|
20015
|
+
|
|
20016
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ShimmerWrapper_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_ShimmerWrapper_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_ShimmerWrapper_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
20017
|
+
|
|
20018
|
+
|
|
20019
|
+
/***/ }),
|
|
20020
|
+
|
|
20021
|
+
/***/ "./style/SignUpForm.css":
|
|
20022
|
+
/*!******************************!*\
|
|
20023
|
+
!*** ./style/SignUpForm.css ***!
|
|
20024
|
+
\******************************/
|
|
20025
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20026
|
+
|
|
20027
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20028
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20029
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20030
|
+
/* harmony export */ });
|
|
20031
|
+
/* 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");
|
|
20032
|
+
/* 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__);
|
|
20033
|
+
/* 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");
|
|
20034
|
+
/* 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__);
|
|
20035
|
+
/* 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");
|
|
20036
|
+
/* 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__);
|
|
20037
|
+
/* 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");
|
|
20038
|
+
/* 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__);
|
|
20039
|
+
/* 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");
|
|
20040
|
+
/* 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__);
|
|
20041
|
+
/* 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");
|
|
20042
|
+
/* 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__);
|
|
20043
|
+
/* 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");
|
|
20044
|
+
|
|
20045
|
+
|
|
20046
|
+
|
|
20047
|
+
|
|
20048
|
+
|
|
20049
|
+
|
|
20050
|
+
|
|
20051
|
+
|
|
20052
|
+
|
|
20053
|
+
|
|
20054
|
+
|
|
20055
|
+
var options = {};
|
|
20056
|
+
|
|
20057
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
20058
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
20059
|
+
|
|
20060
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
20061
|
+
|
|
20062
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
20063
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
20064
|
+
|
|
20065
|
+
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);
|
|
20066
|
+
|
|
20067
|
+
|
|
20068
|
+
|
|
20069
|
+
|
|
20070
|
+
/* 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);
|
|
20071
|
+
|
|
20072
|
+
|
|
18418
20073
|
/***/ }),
|
|
18419
20074
|
|
|
18420
20075
|
/***/ "./style/StreamlitPreviewPlugin.css":
|
|
@@ -18469,6 +20124,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
18469
20124
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_StreamlitPreviewPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_StreamlitPreviewPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_StreamlitPreviewPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
18470
20125
|
|
|
18471
20126
|
|
|
20127
|
+
/***/ }),
|
|
20128
|
+
|
|
20129
|
+
/***/ "./style/SubscriptionPage.css":
|
|
20130
|
+
/*!************************************!*\
|
|
20131
|
+
!*** ./style/SubscriptionPage.css ***!
|
|
20132
|
+
\************************************/
|
|
20133
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20134
|
+
|
|
20135
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20136
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20137
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20138
|
+
/* harmony export */ });
|
|
20139
|
+
/* 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");
|
|
20140
|
+
/* 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__);
|
|
20141
|
+
/* 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");
|
|
20142
|
+
/* 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__);
|
|
20143
|
+
/* 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");
|
|
20144
|
+
/* 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__);
|
|
20145
|
+
/* 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");
|
|
20146
|
+
/* 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__);
|
|
20147
|
+
/* 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");
|
|
20148
|
+
/* 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__);
|
|
20149
|
+
/* 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");
|
|
20150
|
+
/* 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__);
|
|
20151
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./SubscriptionPage.css */ "./node_modules/css-loader/dist/cjs.js!./style/SubscriptionPage.css");
|
|
20152
|
+
|
|
20153
|
+
|
|
20154
|
+
|
|
20155
|
+
|
|
20156
|
+
|
|
20157
|
+
|
|
20158
|
+
|
|
20159
|
+
|
|
20160
|
+
|
|
20161
|
+
|
|
20162
|
+
|
|
20163
|
+
var options = {};
|
|
20164
|
+
|
|
20165
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
20166
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
20167
|
+
|
|
20168
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
20169
|
+
|
|
20170
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
20171
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
20172
|
+
|
|
20173
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
20174
|
+
|
|
20175
|
+
|
|
20176
|
+
|
|
20177
|
+
|
|
20178
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_SubscriptionPage_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
20179
|
+
|
|
20180
|
+
|
|
18472
20181
|
/***/ }),
|
|
18473
20182
|
|
|
18474
20183
|
/***/ "./style/TextAndIconButton.css":
|
|
@@ -18631,6 +20340,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
18631
20340
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ToggleButton_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_ToggleButton_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_ToggleButton_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
18632
20341
|
|
|
18633
20342
|
|
|
20343
|
+
/***/ }),
|
|
20344
|
+
|
|
20345
|
+
/***/ "./style/UsageBadge.css":
|
|
20346
|
+
/*!******************************!*\
|
|
20347
|
+
!*** ./style/UsageBadge.css ***!
|
|
20348
|
+
\******************************/
|
|
20349
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20350
|
+
|
|
20351
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20352
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20353
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20354
|
+
/* harmony export */ });
|
|
20355
|
+
/* 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");
|
|
20356
|
+
/* 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__);
|
|
20357
|
+
/* 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");
|
|
20358
|
+
/* 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__);
|
|
20359
|
+
/* 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");
|
|
20360
|
+
/* 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__);
|
|
20361
|
+
/* 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");
|
|
20362
|
+
/* 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__);
|
|
20363
|
+
/* 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");
|
|
20364
|
+
/* 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__);
|
|
20365
|
+
/* 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");
|
|
20366
|
+
/* 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__);
|
|
20367
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_UsageBadge_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./UsageBadge.css */ "./node_modules/css-loader/dist/cjs.js!./style/UsageBadge.css");
|
|
20368
|
+
|
|
20369
|
+
|
|
20370
|
+
|
|
20371
|
+
|
|
20372
|
+
|
|
20373
|
+
|
|
20374
|
+
|
|
20375
|
+
|
|
20376
|
+
|
|
20377
|
+
|
|
20378
|
+
|
|
20379
|
+
var options = {};
|
|
20380
|
+
|
|
20381
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
20382
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
20383
|
+
|
|
20384
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
20385
|
+
|
|
20386
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
20387
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
20388
|
+
|
|
20389
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_UsageBadge_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
20390
|
+
|
|
20391
|
+
|
|
20392
|
+
|
|
20393
|
+
|
|
20394
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_UsageBadge_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_UsageBadge_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_UsageBadge_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
20395
|
+
|
|
20396
|
+
|
|
18634
20397
|
/***/ }),
|
|
18635
20398
|
|
|
18636
20399
|
/***/ "./style/button.css":
|
|
@@ -18688,4 +20451,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
18688
20451
|
/***/ })
|
|
18689
20452
|
|
|
18690
20453
|
}]);
|
|
18691
|
-
//# sourceMappingURL=lib_index_js.
|
|
20454
|
+
//# sourceMappingURL=lib_index_js.2db61d2b629817845901.js.map
|