mito-ai 0.1.46__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/_version.py +1 -1
- mito_ai/app_deploy/handlers.py +97 -77
- mito_ai/app_deploy/models.py +16 -12
- 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/path_utils.py +56 -0
- mito_ai/streamlit_conversion/agent_utils.py +4 -201
- mito_ai/streamlit_conversion/prompts/prompt_constants.py +142 -152
- mito_ai/streamlit_conversion/prompts/streamlit_error_correction_prompt.py +3 -3
- mito_ai/streamlit_conversion/prompts/streamlit_finish_todo_prompt.py +2 -2
- mito_ai/streamlit_conversion/prompts/update_existing_app_prompt.py +2 -2
- mito_ai/streamlit_conversion/search_replace_utils.py +93 -0
- mito_ai/streamlit_conversion/streamlit_agent_handler.py +29 -39
- mito_ai/streamlit_conversion/streamlit_utils.py +11 -64
- mito_ai/streamlit_conversion/validate_streamlit_app.py +5 -18
- mito_ai/streamlit_preview/handlers.py +44 -84
- mito_ai/streamlit_preview/manager.py +6 -6
- mito_ai/streamlit_preview/utils.py +16 -19
- mito_ai/tests/streamlit_conversion/test_apply_search_replace.py +226 -0
- mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +29 -53
- mito_ai/tests/streamlit_conversion/test_streamlit_utils.py +26 -29
- mito_ai/tests/streamlit_conversion/test_validate_streamlit_app.py +6 -3
- mito_ai/tests/streamlit_preview/test_streamlit_preview_handler.py +12 -15
- mito_ai/tests/streamlit_preview/test_streamlit_preview_manager.py +22 -26
- mito_ai/user/handlers.py +15 -3
- mito_ai/utils/create.py +17 -1
- mito_ai/utils/error_classes.py +42 -0
- mito_ai/utils/message_history_utils.py +3 -1
- mito_ai/utils/telemetry_utils.py +75 -10
- {mito_ai-0.1.46.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +1 -1
- {mito_ai-0.1.46.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.46.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.46.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.20f12766ecd3d430568e.js → mito_ai-0.1.47.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.2db61d2b629817845901.js +1274 -293
- 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.46.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.54126ab6511271265443.js → mito_ai-0.1.47.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.e22c6cd4e56c32116daa.js +7 -7
- mito_ai-0.1.46.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.54126ab6511271265443.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.46.dist-info → mito_ai-0.1.47.dist-info}/METADATA +1 -1
- {mito_ai-0.1.46.dist-info → mito_ai-0.1.47.dist-info}/RECORD +67 -65
- mito_ai/tests/streamlit_conversion/test_apply_patch_to_text.py +0 -368
- mito_ai/tests/streamlit_conversion/test_fix_diff_headers.py +0 -533
- mito_ai-0.1.46.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.20f12766ecd3d430568e.js.map +0 -1
- /mito_ai/streamlit_conversion/{streamlit_system_prompt.py → prompts/streamlit_system_prompt.py} +0 -0
- {mito_ai-0.1.46.data → mito_ai-0.1.47.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.46.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.46.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.46.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.46.data → mito_ai-0.1.47.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.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.46.dist-info → mito_ai-0.1.47.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.46.dist-info → mito_ai-0.1.47.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.46.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
|
|
@@ -184,7 +187,7 @@ const CTACarousel = ({ app }) => {
|
|
|
184
187
|
content: (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null,
|
|
185
188
|
"Generate more than just Python code. Talk to your database, no SQL required.",
|
|
186
189
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", null),
|
|
187
|
-
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" },
|
|
188
191
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("b", null, "\uFF0B Add Database"))))
|
|
189
192
|
},
|
|
190
193
|
{
|
|
@@ -242,7 +245,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
242
245
|
Whenever, the chatHistoryManager is updated, it should automatically send a message to the AI.
|
|
243
246
|
*/
|
|
244
247
|
class ChatHistoryManager {
|
|
245
|
-
constructor(contextManager, notebookTracker, initialHistory) {
|
|
248
|
+
constructor(contextManager, notebookTracker, app, streamlitPreviewManager, initialHistory) {
|
|
246
249
|
this._allAssumptions = new Set();
|
|
247
250
|
this.getLastAIMessageIndex = () => {
|
|
248
251
|
// We assume that assistant messages are always separated by user messages.
|
|
@@ -271,9 +274,17 @@ class ChatHistoryManager {
|
|
|
271
274
|
this.contextManager = contextManager;
|
|
272
275
|
// Save the notebook tracker
|
|
273
276
|
this.notebookTracker = notebookTracker;
|
|
277
|
+
// Save the app
|
|
278
|
+
this.app = app;
|
|
279
|
+
// Save the streamlit preview service
|
|
280
|
+
this.streamlitPreviewManager = streamlitPreviewManager;
|
|
274
281
|
// Initialize assumptions from existing history
|
|
275
282
|
this.initializeAssumptionsFromHistory();
|
|
276
283
|
}
|
|
284
|
+
checkIfStreamlitAppIsOpen() {
|
|
285
|
+
// Use the service to check if there's an active preview
|
|
286
|
+
return this.streamlitPreviewManager.hasActivePreview();
|
|
287
|
+
}
|
|
277
288
|
initializeAssumptionsFromHistory() {
|
|
278
289
|
this._allAssumptions.clear();
|
|
279
290
|
this.displayOptimizedChatHistory.forEach(item => {
|
|
@@ -303,7 +314,7 @@ class ChatHistoryManager {
|
|
|
303
314
|
};
|
|
304
315
|
}
|
|
305
316
|
createDuplicateChatHistoryManager() {
|
|
306
|
-
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);
|
|
307
318
|
// Copy the assumptions set to the duplicate
|
|
308
319
|
duplicateManager._allAssumptions = new Set(this._allAssumptions);
|
|
309
320
|
return duplicateManager;
|
|
@@ -346,6 +357,7 @@ class ChatHistoryManager {
|
|
|
346
357
|
addAgentExecutionMessage(activeThreadId, notebookPanel, input, additionalContext) {
|
|
347
358
|
const aiOptimizedCells = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.getAIOptimizedCellsInNotebookPanel)(notebookPanel);
|
|
348
359
|
const notebookContext = this.contextManager.getNotebookContext(notebookPanel.id);
|
|
360
|
+
const streamlitAppIsOpen = this.checkIfStreamlitAppIsOpen();
|
|
349
361
|
const agentExecutionMetadata = {
|
|
350
362
|
promptType: 'agent:execution',
|
|
351
363
|
variables: (notebookContext === null || notebookContext === void 0 ? void 0 : notebookContext.variables) || [],
|
|
@@ -354,7 +366,8 @@ class ChatHistoryManager {
|
|
|
354
366
|
input: input || '',
|
|
355
367
|
threadId: activeThreadId,
|
|
356
368
|
isChromeBrowser: (0,_utils_user__WEBPACK_IMPORTED_MODULE_2__.isChromeBasedBrowser)(),
|
|
357
|
-
additionalContext: additionalContext
|
|
369
|
+
additionalContext: additionalContext,
|
|
370
|
+
streamlitAppIsOpen: streamlitAppIsOpen
|
|
358
371
|
};
|
|
359
372
|
// We use this function in two ways:
|
|
360
373
|
// 1. When the user sends the original agent:execution message to start the agent
|
|
@@ -1374,6 +1387,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1374
1387
|
/* harmony import */ var _components_AgentComponents_AssumptionToolUI__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../components/AgentComponents/AssumptionToolUI */ "./lib/components/AgentComponents/AssumptionToolUI.js");
|
|
1375
1388
|
/* harmony import */ var _components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../components/SelectedContextContainer */ "./lib/components/SelectedContextContainer.js");
|
|
1376
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");
|
|
1377
1392
|
/*
|
|
1378
1393
|
* Copyright (c) Saga Inc.
|
|
1379
1394
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -1396,6 +1411,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1396
1411
|
|
|
1397
1412
|
|
|
1398
1413
|
|
|
1414
|
+
|
|
1415
|
+
|
|
1399
1416
|
|
|
1400
1417
|
|
|
1401
1418
|
const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mitoAIConnectionError, mitoAIConnectionErrorType, notebookTracker, renderMimeRegistry, isLastAiMessage, isLastMessage, operatingSystem, previewAICode, acceptAICode, rejectAICode, onUpdateMessage, contextManager, codeReviewStatus, setNextSteps, agentModeEnabled, additionalContext, }) => {
|
|
@@ -1491,7 +1508,11 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1491
1508
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'get_cell_output' &&
|
|
1492
1509
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_GetCellOutputToolUI__WEBPACK_IMPORTED_MODULE_18__["default"], null),
|
|
1493
1510
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'run_all_cells' && agentModeEnabled &&
|
|
1494
|
-
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 })));
|
|
1495
1516
|
};
|
|
1496
1517
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatMessage);
|
|
1497
1518
|
|
|
@@ -2028,16 +2049,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2028
2049
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
2029
2050
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);
|
|
2030
2051
|
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
2031
|
-
/* harmony import */ var
|
|
2032
|
-
/* harmony import */ var
|
|
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");
|
|
2033
2054
|
/* harmony import */ var _components_IconButton__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/IconButton */ "./lib/components/IconButton.js");
|
|
2034
|
-
/* harmony import */ var
|
|
2055
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
2035
2056
|
/* harmony import */ var _components_ModelSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/ModelSelector */ "./lib/components/ModelSelector.js");
|
|
2036
|
-
/* harmony import */ var
|
|
2037
|
-
/* harmony import */ var
|
|
2038
|
-
/* harmony import */ var
|
|
2039
|
-
/* harmony import */ var
|
|
2040
|
-
/* 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");
|
|
2041
2062
|
/* harmony import */ var _utils_agentActions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/agentActions */ "./lib/utils/agentActions.js");
|
|
2042
2063
|
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
2043
2064
|
/* harmony import */ var _utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/blacklistedWords */ "./lib/utils/blacklistedWords.js");
|
|
@@ -2054,19 +2075,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2054
2075
|
/* harmony import */ var _utils_userSignupState__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/userSignupState */ "./lib/utils/userSignupState.js");
|
|
2055
2076
|
/* harmony import */ var _SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
2056
2077
|
/* harmony import */ var _SettingsManager_profiler_ProfilerPage__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../SettingsManager/profiler/ProfilerPage */ "./lib/Extensions/SettingsManager/profiler/ProfilerPage.js");
|
|
2057
|
-
/* harmony import */ var
|
|
2058
|
-
/* harmony import */ var
|
|
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");
|
|
2059
2081
|
/* harmony import */ var _CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./CodeDiffDisplay */ "./lib/Extensions/AiChat/CodeDiffDisplay.js");
|
|
2060
2082
|
/* harmony import */ var _FirstMessage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FirstMessage */ "./lib/Extensions/AiChat/FirstMessage.js");
|
|
2061
|
-
/* harmony import */ var
|
|
2062
|
-
/* harmony import */ var
|
|
2063
|
-
/* harmony import */ var
|
|
2064
|
-
/* 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");
|
|
2065
2087
|
/* harmony import */ var _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ChatHistoryManager */ "./lib/Extensions/AiChat/ChatHistoryManager.js");
|
|
2066
2088
|
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
2067
2089
|
/* harmony import */ var _style_ChatTaskpane_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/ChatTaskpane.css */ "./style/ChatTaskpane.css");
|
|
2068
2090
|
/* harmony import */ var _style_TextButton_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../style/TextButton.css */ "./style/TextButton.css");
|
|
2069
|
-
/* harmony import */ var
|
|
2091
|
+
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
2070
2092
|
/*
|
|
2071
2093
|
* Copyright (c) Saga Inc.
|
|
2072
2094
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -2118,19 +2140,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2118
2140
|
|
|
2119
2141
|
|
|
2120
2142
|
|
|
2143
|
+
|
|
2121
2144
|
// Styles
|
|
2122
2145
|
|
|
2123
2146
|
|
|
2124
2147
|
|
|
2125
2148
|
|
|
2126
2149
|
const AGENT_EXECUTION_DEPTH_LIMIT = 20;
|
|
2127
|
-
const getDefaultChatHistoryManager = (notebookTracker, contextManager) => {
|
|
2128
|
-
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);
|
|
2129
2152
|
return chatHistoryManager;
|
|
2130
2153
|
};
|
|
2131
|
-
const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app, operatingSystem, websocketClient, }) => {
|
|
2154
|
+
const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, streamlitPreviewManager, app, operatingSystem, websocketClient, }) => {
|
|
2132
2155
|
const [isSignedUp, setIsSignedUp] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
|
|
2133
|
-
const [chatHistoryManager, setChatHistoryManager] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(() => getDefaultChatHistoryManager(notebookTracker, contextManager));
|
|
2156
|
+
const [chatHistoryManager, setChatHistoryManager] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(() => getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager));
|
|
2134
2157
|
const chatHistoryManagerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(chatHistoryManager);
|
|
2135
2158
|
const [loadingAIResponse, setLoadingAIResponse] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
2136
2159
|
// Store the original cell before diff so that we can revert to it if the user rejects the AI's code
|
|
@@ -2168,6 +2191,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2168
2191
|
// we don't need to handle the undefined case everywhere, we just default to an empty string knowing that
|
|
2169
2192
|
// it will always be set to a valid thread id before it is used.
|
|
2170
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);
|
|
2171
2196
|
/*
|
|
2172
2197
|
Three possible states:
|
|
2173
2198
|
1. working: the agent is working on the task
|
|
@@ -2233,7 +2258,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2233
2258
|
};
|
|
2234
2259
|
const chatHistoryResponse = await websocketClient.sendMessage(fetchHistoryCompletionRequest);
|
|
2235
2260
|
// Create a fresh ChatHistoryManager and add the initial messages
|
|
2236
|
-
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager);
|
|
2261
|
+
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager);
|
|
2237
2262
|
// Each thread only contains agent or chat messages. For now, we enforce this by clearing the chat
|
|
2238
2263
|
// when the user switches mode. When the user reloads a chat, we want to put them back into the same
|
|
2239
2264
|
// chat mode so that we use the correct system message and preserve this one-type of message invariant.
|
|
@@ -2303,7 +2328,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2303
2328
|
// Enable follow mode when starting a new chat
|
|
2304
2329
|
setAutoScrollFollowMode(true);
|
|
2305
2330
|
// Reset frontend chat history
|
|
2306
|
-
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager);
|
|
2331
|
+
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager);
|
|
2307
2332
|
setChatHistoryManager(newChatHistoryManager);
|
|
2308
2333
|
// Notify the backend to request a new chat thread and get its ID
|
|
2309
2334
|
try {
|
|
@@ -2366,7 +2391,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2366
2391
|
}
|
|
2367
2392
|
}
|
|
2368
2393
|
catch (error) {
|
|
2369
|
-
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager);
|
|
2394
|
+
const newChatHistoryManager = getDefaultChatHistoryManager(notebookTracker, contextManager, app, streamlitPreviewManager);
|
|
2370
2395
|
addAIMessageFromResponseAndUpdateState(error.title ? error.title : `${error}`, 'chat', newChatHistoryManager, false);
|
|
2371
2396
|
addAIMessageFromResponseAndUpdateState(error.hint ? error.hint : `${error}`, 'chat', newChatHistoryManager, true);
|
|
2372
2397
|
}
|
|
@@ -2720,6 +2745,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2720
2745
|
if (activeRequestControllerRef.current === abortController) {
|
|
2721
2746
|
activeRequestControllerRef.current = null;
|
|
2722
2747
|
}
|
|
2748
|
+
// Refresh the usage badge to reflect updated usage count
|
|
2749
|
+
if (usageBadgeRef.current) {
|
|
2750
|
+
void usageBadgeRef.current.refresh();
|
|
2751
|
+
}
|
|
2723
2752
|
return true;
|
|
2724
2753
|
};
|
|
2725
2754
|
const addAIMessageFromResponseAndUpdateState = (messageContent, promptType, chatHistoryManager, mitoAIConnectionError = false, mitoAIConnectionErrorType = null) => {
|
|
@@ -2742,9 +2771,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2742
2771
|
activeRequestControllerRef.current.abort();
|
|
2743
2772
|
activeRequestControllerRef.current = null;
|
|
2744
2773
|
}
|
|
2745
|
-
// Add feedback message based on reason
|
|
2746
2774
|
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2747
|
-
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);
|
|
2748
2777
|
// Send stop message to backend
|
|
2749
2778
|
await websocketClient.sendMessage({
|
|
2750
2779
|
type: "stop_agent",
|
|
@@ -2769,6 +2798,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2769
2798
|
let isAgentFinished = false;
|
|
2770
2799
|
let agentExecutionDepth = 1;
|
|
2771
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;
|
|
2772
2808
|
// Loop through each message in the plan and send it to the AI
|
|
2773
2809
|
while (!isAgentFinished && agentExecutionDepth <= AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
2774
2810
|
// Check if we should continue execution
|
|
@@ -2782,9 +2818,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2782
2818
|
await sendAgentExecutionMessage(input, messageIndex, undefined, additionalContext);
|
|
2783
2819
|
}
|
|
2784
2820
|
else {
|
|
2785
|
-
await sendAgentExecutionMessage('', undefined, sendCellIDOutput);
|
|
2821
|
+
await sendAgentExecutionMessage(messageToShareWithAgent || '', undefined, sendCellIDOutput);
|
|
2786
2822
|
// Reset flag back to false until the agent requests the active cell output again
|
|
2787
2823
|
sendCellIDOutput = undefined;
|
|
2824
|
+
messageToShareWithAgent = undefined;
|
|
2788
2825
|
}
|
|
2789
2826
|
// Iterate the agent execution depth
|
|
2790
2827
|
agentExecutionDepth++;
|
|
@@ -2828,6 +2865,12 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2828
2865
|
isAgentFinished = true;
|
|
2829
2866
|
break;
|
|
2830
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
|
+
}
|
|
2831
2874
|
if (agentResponse.type === 'cell_update' && agentResponse.cell_update) {
|
|
2832
2875
|
// Run the code and handle any errors
|
|
2833
2876
|
await (0,_utils_agentActions__WEBPACK_IMPORTED_MODULE_20__.acceptAndRunCellUpdate)(agentResponse.cell_update, agentTargetNotebookPanelRef.current);
|
|
@@ -2866,6 +2909,28 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2866
2909
|
}
|
|
2867
2910
|
}
|
|
2868
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
|
+
}
|
|
2869
2934
|
}
|
|
2870
2935
|
if (agentExecutionDepth > AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
2871
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);
|
|
@@ -3138,14 +3203,15 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3138
3203
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-left" },
|
|
3139
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: () => {
|
|
3140
3205
|
void app.commands.execute(_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_28__.COMMAND_MITO_AI_SETTINGS);
|
|
3141
|
-
} })
|
|
3206
|
+
} }),
|
|
3207
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_UsageBadge__WEBPACK_IMPORTED_MODULE_29__["default"], { app: app, ref: usageBadgeRef })),
|
|
3142
3208
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-taskpane-header-right" },
|
|
3143
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(); } }),
|
|
3144
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
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 },
|
|
3145
3211
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.historyIcon.react, null)), items: chatThreads.length > 0
|
|
3146
3212
|
? chatThreads.map(thread => ({
|
|
3147
3213
|
label: thread.name,
|
|
3148
|
-
primaryIcon: activeThreadIdRef.current === thread.thread_id ?
|
|
3214
|
+
primaryIcon: activeThreadIdRef.current === thread.thread_id ? _icons__WEBPACK_IMPORTED_MODULE_31__.OpenIndicatorLabIcon.react : undefined,
|
|
3149
3215
|
onClick: () => fetchChatHistoryAndSetActiveThread(thread.thread_id),
|
|
3150
3216
|
secondaryActions: [
|
|
3151
3217
|
{
|
|
@@ -3163,25 +3229,25 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3163
3229
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-messages", ref: chatMessagesRef },
|
|
3164
3230
|
displayOptimizedChatHistory.length === 0 &&
|
|
3165
3231
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-empty-message" }, isSignedUp === false
|
|
3166
|
-
? react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3167
|
-
: react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
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 })),
|
|
3168
3234
|
processedDisplayOptimizedChatHistory.map((displayOptimizedChat, index) => {
|
|
3169
3235
|
if (isGroupedErrorMessages(displayOptimizedChat)) {
|
|
3170
|
-
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 }));
|
|
3171
3237
|
}
|
|
3172
3238
|
else {
|
|
3173
|
-
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 }));
|
|
3174
3240
|
}
|
|
3175
3241
|
}).filter(message => message !== null),
|
|
3176
3242
|
loadingAIResponse &&
|
|
3177
3243
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-loading-message" },
|
|
3178
3244
|
"Thinking ",
|
|
3179
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3245
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_36__["default"], null)),
|
|
3180
3246
|
hasCheckpoint &&
|
|
3181
3247
|
agentModeEnabled &&
|
|
3182
3248
|
agentExecutionStatus === 'idle' &&
|
|
3183
3249
|
displayOptimizedChatHistory.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
3184
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
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: () => {
|
|
3185
3251
|
void (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_17__.restoreCheckpoint)(app, notebookTracker, setHasCheckpoint);
|
|
3186
3252
|
setDisplayedNextStepsIfAvailable(false);
|
|
3187
3253
|
setHasCheckpoint(false);
|
|
@@ -3189,9 +3255,9 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3189
3255
|
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_13__.scrollToDiv)(chatMessagesRef);
|
|
3190
3256
|
}, variant: "gray", width: "fit-contents", iconPosition: "left" }),
|
|
3191
3257
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("p", { className: "text-muted text-sm" }, "Undo the most recent changes made by the agent"))),
|
|
3192
|
-
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 }))),
|
|
3193
3259
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "suggestions-container" },
|
|
3194
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3260
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_40__["default"], { onSelectSuggestion: (prompt) => {
|
|
3195
3261
|
if (agentModeEnabled) {
|
|
3196
3262
|
void startAgentExecution(prompt);
|
|
3197
3263
|
}
|
|
@@ -3200,11 +3266,11 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3200
3266
|
}
|
|
3201
3267
|
} }))),
|
|
3202
3268
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: `connected-input-container ${nextSteps.length > 0 ? 'has-next-steps' : ''}` },
|
|
3203
|
-
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3204
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
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 })),
|
|
3205
3271
|
agentExecutionStatus !== 'working' && agentExecutionStatus !== 'stopping' && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls" },
|
|
3206
3272
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls-left" },
|
|
3207
|
-
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) => {
|
|
3208
3274
|
await startNewChat(); // TODO: delete thread instead of starting new chat
|
|
3209
3275
|
setAgentModeEnabled(!isLeftSelected);
|
|
3210
3276
|
// Clear agent checkpoint when switching modes
|
|
@@ -3240,7 +3306,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
3240
3306
|
" \u23CE"))),
|
|
3241
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" },
|
|
3242
3308
|
"Stopping",
|
|
3243
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
3309
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_44__["default"], null),
|
|
3244
3310
|
" ")) : ('Stop Agent')))));
|
|
3245
3311
|
};
|
|
3246
3312
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatTaskpane);
|
|
@@ -3329,7 +3395,7 @@ class ChatWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.React
|
|
|
3329
3395
|
super.dispose();
|
|
3330
3396
|
}
|
|
3331
3397
|
render() {
|
|
3332
|
-
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 }));
|
|
3333
3399
|
}
|
|
3334
3400
|
onMessage(client, message) {
|
|
3335
3401
|
switch (message.type) {
|
|
@@ -3342,7 +3408,7 @@ class ChatWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.React
|
|
|
3342
3408
|
}
|
|
3343
3409
|
}
|
|
3344
3410
|
}
|
|
3345
|
-
function buildChatWidget(app, notebookTracker, renderMimeRegistry, contextManager) {
|
|
3411
|
+
function buildChatWidget(app, notebookTracker, renderMimeRegistry, contextManager, streamlitPreviewManager) {
|
|
3346
3412
|
// Get the operating system here so we don't have to do it each time the chat changes.
|
|
3347
3413
|
// The operating system won't change, duh.
|
|
3348
3414
|
const operatingSystem = (0,_utils_user__WEBPACK_IMPORTED_MODULE_7__.getOperatingSystem)();
|
|
@@ -3351,6 +3417,7 @@ function buildChatWidget(app, notebookTracker, renderMimeRegistry, contextManage
|
|
|
3351
3417
|
notebookTracker,
|
|
3352
3418
|
renderMimeRegistry,
|
|
3353
3419
|
contextManager,
|
|
3420
|
+
streamlitPreviewManager: streamlitPreviewManager,
|
|
3354
3421
|
operatingSystem
|
|
3355
3422
|
});
|
|
3356
3423
|
chatWidget.id = 'mito_ai';
|
|
@@ -3567,6 +3634,94 @@ const SignUpForm = ({ onSignUpSuccess }) => {
|
|
|
3567
3634
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SignUpForm);
|
|
3568
3635
|
|
|
3569
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
|
+
|
|
3570
3725
|
/***/ }),
|
|
3571
3726
|
|
|
3572
3727
|
/***/ "./lib/Extensions/AiChat/jupyterSettingsManager.js":
|
|
@@ -3711,7 +3866,7 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
3711
3866
|
// Create a copy to avoid mutating the original
|
|
3712
3867
|
const correctedResponse = { ...agentResponse };
|
|
3713
3868
|
// Ensure type is valid. Default to finished_task if not valid.
|
|
3714
|
-
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'];
|
|
3715
3870
|
correctedResponse.type = (correctedResponse.type && validTypes.includes(correctedResponse.type))
|
|
3716
3871
|
? correctedResponse.type
|
|
3717
3872
|
: 'finished_task';
|
|
@@ -3732,6 +3887,9 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
3732
3887
|
// No empty strings in the assumptions
|
|
3733
3888
|
correctedResponse.analysis_assumptions = (_a = correctedResponse.analysis_assumptions) === null || _a === void 0 ? void 0 : _a.filter(assumption => assumption.trim() !== '');
|
|
3734
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;
|
|
3735
3893
|
// For now we don't validate the cell_update object itself, as this is more complex and has
|
|
3736
3894
|
// not caused issues thus far.
|
|
3737
3895
|
return correctedResponse;
|
|
@@ -4076,7 +4234,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4076
4234
|
This function generates the requirements.txt file needed to host the streamlit app,
|
|
4077
4235
|
and deploys it!
|
|
4078
4236
|
*/
|
|
4079
|
-
const deployStreamlitApp = async (
|
|
4237
|
+
const deployStreamlitApp = async (notebookPanel, appDeployService, appManagerService) => {
|
|
4080
4238
|
let selectedFiles = [];
|
|
4081
4239
|
let jwtToken = await (0,_auth__WEBPACK_IMPORTED_MODULE_2__.getJWTToken)();
|
|
4082
4240
|
if (!jwtToken) {
|
|
@@ -4100,19 +4258,14 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
4100
4258
|
return; // Exit early if authentication was cancelled
|
|
4101
4259
|
}
|
|
4102
4260
|
}
|
|
4103
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
4104
|
-
if (!notebookPanel) {
|
|
4105
|
-
console.error('No notebook is currently active');
|
|
4106
|
-
return;
|
|
4107
|
-
}
|
|
4108
4261
|
const notebookPath = notebookPanel.context.path;
|
|
4109
4262
|
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit('Step 1/7: Gathering requirements...', 'in-progress', {
|
|
4110
4263
|
autoClose: false
|
|
4111
4264
|
});
|
|
4112
4265
|
// Build the requirements.txt file
|
|
4113
|
-
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_4__.generateRequirementsTxt)(
|
|
4266
|
+
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_4__.generateRequirementsTxt)(notebookPanel);
|
|
4114
4267
|
// Save the files to the current directory
|
|
4115
|
-
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_5__.saveFileWithKernel)(
|
|
4268
|
+
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_5__.saveFileWithKernel)(notebookPanel, './requirements.txt', requirementsContent);
|
|
4116
4269
|
try {
|
|
4117
4270
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.dismiss(notificationId);
|
|
4118
4271
|
selectedFiles = await (0,_FilesSelectorUtils__WEBPACK_IMPORTED_MODULE_6__.fileSelectorPopup)(notebookPath);
|
|
@@ -4129,16 +4282,25 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
4129
4282
|
console.log("Sending request to deploy the app");
|
|
4130
4283
|
// Use the JWT token that was already obtained or refreshed above
|
|
4131
4284
|
const response = await appDeployService.client.sendMessage({
|
|
4132
|
-
type: '
|
|
4285
|
+
type: 'deploy_app',
|
|
4133
4286
|
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.UUID.uuid4(),
|
|
4134
4287
|
notebook_path: notebookPath,
|
|
4135
4288
|
jwt_token: jwtToken,
|
|
4136
4289
|
selected_files: selectedFiles
|
|
4137
4290
|
});
|
|
4138
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
|
+
}
|
|
4139
4301
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
4140
4302
|
id: newNotificationId,
|
|
4141
|
-
message:
|
|
4303
|
+
message: displayMessage,
|
|
4142
4304
|
type: 'error',
|
|
4143
4305
|
autoClose: false
|
|
4144
4306
|
});
|
|
@@ -4150,8 +4312,14 @@ const deployStreamlitApp = async (notebookTracker, appDeployService, appManagerS
|
|
|
4150
4312
|
}
|
|
4151
4313
|
}
|
|
4152
4314
|
catch (error) {
|
|
4153
|
-
// TODO:
|
|
4315
|
+
// TODO: In the future, remove this if we dont see any connection errors that need to be caught
|
|
4154
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
|
+
});
|
|
4155
4323
|
}
|
|
4156
4324
|
};
|
|
4157
4325
|
|
|
@@ -4513,12 +4681,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4513
4681
|
* Copyright (c) Saga Inc.
|
|
4514
4682
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4515
4683
|
*/
|
|
4516
|
-
const saveFileWithKernel = async (
|
|
4517
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
4518
|
-
if (!notebookPanel) {
|
|
4519
|
-
console.error('No notebook is currently active');
|
|
4520
|
-
return;
|
|
4521
|
-
}
|
|
4684
|
+
const saveFileWithKernel = async (notebookPanel, filePath, fileContent) => {
|
|
4522
4685
|
try {
|
|
4523
4686
|
// Use the kernel to execute Python code
|
|
4524
4687
|
const session = notebookPanel.sessionContext.session;
|
|
@@ -4582,12 +4745,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4582
4745
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4583
4746
|
*/
|
|
4584
4747
|
// Function to generate requirements.txt content using the kernel with pipreqs
|
|
4585
|
-
const generateRequirementsTxt = async (
|
|
4586
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
4587
|
-
if (!notebookPanel) {
|
|
4588
|
-
console.error('No notebook is currently active');
|
|
4589
|
-
return '';
|
|
4590
|
-
}
|
|
4748
|
+
const generateRequirementsTxt = async (notebookPanel) => {
|
|
4591
4749
|
// Initialize with fallback requirements in case kernel execution fails
|
|
4592
4750
|
let requirementsContent = 'streamlit>=1.28.0';
|
|
4593
4751
|
try {
|
|
@@ -5074,6 +5232,7 @@ const ManageAppsPlugin = {
|
|
|
5074
5232
|
|
|
5075
5233
|
__webpack_require__.r(__webpack_exports__);
|
|
5076
5234
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5235
|
+
/* harmony export */ IStreamlitPreviewManager: () => (/* binding */ IStreamlitPreviewManager),
|
|
5077
5236
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5078
5237
|
/* harmony export */ });
|
|
5079
5238
|
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
@@ -5084,18 +5243,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5084
5243
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
5085
5244
|
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
|
|
5086
5245
|
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_3__);
|
|
5087
|
-
/* harmony import */ var
|
|
5088
|
-
/* harmony import */ var
|
|
5089
|
-
/* harmony import */ var
|
|
5090
|
-
/* 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");
|
|
5091
5252
|
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
5092
|
-
/* harmony import */ var
|
|
5093
|
-
/* harmony import */ var
|
|
5094
|
-
/* harmony import */ var
|
|
5095
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5096
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
|
|
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");
|
|
5097
5256
|
/* harmony import */ var _UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UpdateAppDropdown */ "./lib/Extensions/AppPreview/UpdateAppDropdown.js");
|
|
5098
|
-
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
|
|
5099
5257
|
/*
|
|
5100
5258
|
* Copyright (c) Saga Inc.
|
|
5101
5259
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -5115,9 +5273,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5115
5273
|
|
|
5116
5274
|
|
|
5117
5275
|
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
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');
|
|
5121
5280
|
/**
|
|
5122
5281
|
* Simple HTML widget for displaying iframe content.
|
|
5123
5282
|
*/
|
|
@@ -5139,164 +5298,180 @@ class IFrameWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {
|
|
|
5139
5298
|
}
|
|
5140
5299
|
}
|
|
5141
5300
|
}
|
|
5142
|
-
async function showRecreateAppConfirmation(notebookPath) {
|
|
5143
|
-
const result = await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({
|
|
5144
|
-
title: 'Recreate App',
|
|
5145
|
-
body: 'This will recreate the app from scratch, discarding all your current edits. This action cannot be undone. Are you sure you want to continue?',
|
|
5146
|
-
buttons: [
|
|
5147
|
-
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton({ label: 'Cancel' }),
|
|
5148
|
-
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.warnButton({ label: 'Recreate App' })
|
|
5149
|
-
],
|
|
5150
|
-
defaultButton: 1
|
|
5151
|
-
});
|
|
5152
|
-
if (result.button.accept) {
|
|
5153
|
-
void (0,_utils__WEBPACK_IMPORTED_MODULE_7__.startStreamlitPreviewAndNotify)(notebookPath, true, undefined, 'Recreating app from scratch...', 'App recreated successfully!');
|
|
5154
|
-
}
|
|
5155
|
-
}
|
|
5156
5301
|
/**
|
|
5157
|
-
*
|
|
5302
|
+
* Manages Streamlit app previews with a single-preview policy.
|
|
5303
|
+
* Ensures only one preview can be open at a time.
|
|
5158
5304
|
*/
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5305
|
+
class StreamlitAppPreviewManager {
|
|
5306
|
+
constructor(appDeployService, appManagerService) {
|
|
5307
|
+
this.currentPreview = null;
|
|
5308
|
+
this.appDeployService = appDeployService;
|
|
5309
|
+
this.appManagerService = appManagerService;
|
|
5164
5310
|
}
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
(0,react_dom_client__WEBPACK_IMPORTED_MODULE_6__.createRoot)(dropdownContainer).render(react__WEBPACK_IMPORTED_MODULE_5__.createElement(_UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__["default"], { onSubmit: async (message) => {
|
|
5178
|
-
await (0,_utils__WEBPACK_IMPORTED_MODULE_7__.startStreamlitPreviewAndNotify)(notebookPath, true, message, 'Updating app...', 'App updated successfully!');
|
|
5179
|
-
dropdownContainer.remove();
|
|
5180
|
-
}, onClose: () => {
|
|
5181
|
-
dropdownContainer.remove();
|
|
5182
|
-
} }));
|
|
5183
|
-
// Close dropdown when clicking outside
|
|
5184
|
-
const handleClickOutside = (event) => {
|
|
5185
|
-
if (!dropdownContainer.contains(event.target) &&
|
|
5186
|
-
!buttonElement.contains(event.target)) {
|
|
5187
|
-
dropdownContainer.remove();
|
|
5188
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
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;
|
|
5189
5323
|
}
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
*/
|
|
5199
|
-
const StreamlitPreviewPlugin = {
|
|
5200
|
-
id: 'mito-ai:streamlit-preview',
|
|
5201
|
-
autoStart: true,
|
|
5202
|
-
requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__.INotebookTracker, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette, _AppDeploy_AppDeployPlugin__WEBPACK_IMPORTED_MODULE_9__.IAppDeployService, _AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_10__.IAppManagerService],
|
|
5203
|
-
activate: (app, notebookTracker, palette, appDeployService, appManagerService) => {
|
|
5204
|
-
console.log('mito-ai: StreamlitPreviewPlugin activated');
|
|
5205
|
-
// Add command to command palette
|
|
5206
|
-
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT, {
|
|
5207
|
-
label: 'Preview as Streamlit',
|
|
5208
|
-
caption: 'Convert current notebook to Streamlit app and preview it',
|
|
5209
|
-
execute: async () => {
|
|
5210
|
-
await previewNotebookAsStreamlit(app, notebookTracker, appDeployService, appManagerService);
|
|
5211
|
-
}
|
|
5212
|
-
});
|
|
5213
|
-
// Add to command palette
|
|
5214
|
-
palette.addItem({
|
|
5215
|
-
command: _commands__WEBPACK_IMPORTED_MODULE_11__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT,
|
|
5216
|
-
category: 'Mito AI'
|
|
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
|
|
5217
5332
|
});
|
|
5333
|
+
return streamlitPreviewResponse;
|
|
5218
5334
|
}
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
async
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
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;
|
|
5228
5352
|
}
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
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;
|
|
5237
5361
|
}
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
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) {
|
|
5243
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');
|
|
5244
5382
|
// Create main area widget
|
|
5245
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');
|
|
5246
5386
|
widget.title.label = `App Preview (${notebookName})`;
|
|
5247
5387
|
widget.title.closable = true;
|
|
5248
|
-
|
|
5249
|
-
* Create Streamlit App Toolbar Buttons
|
|
5250
|
-
****************************************************** */
|
|
5388
|
+
// Create toolbar buttons
|
|
5251
5389
|
const editAppButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5252
5390
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5253
5391
|
onClick: () => {
|
|
5254
|
-
showUpdateAppDropdown(editAppButton.node,
|
|
5392
|
+
(0,_UpdateAppDropdown__WEBPACK_IMPORTED_MODULE_8__.showUpdateAppDropdown)(editAppButton.node, notebookPanel);
|
|
5255
5393
|
},
|
|
5256
5394
|
tooltip: 'Edit Streamlit App',
|
|
5257
5395
|
label: 'Edit App',
|
|
5258
|
-
icon:
|
|
5396
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_9__.EditLabIcon,
|
|
5259
5397
|
iconClass: 'mito-ai-deploy-icon'
|
|
5260
5398
|
});
|
|
5261
5399
|
const recreateAppButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5262
5400
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5263
5401
|
onClick: async () => {
|
|
5264
|
-
await showRecreateAppConfirmation(notebookPath);
|
|
5402
|
+
await (0,_utils__WEBPACK_IMPORTED_MODULE_6__.showRecreateAppConfirmation)(notebookPath);
|
|
5265
5403
|
},
|
|
5266
5404
|
tooltip: 'Recreate new App from scratch based on the current state of the notebook',
|
|
5267
5405
|
label: 'Recreate App',
|
|
5268
|
-
icon:
|
|
5406
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_9__.ResetCircleLabIcon,
|
|
5269
5407
|
iconClass: 'mito-ai-deploy-icon'
|
|
5270
5408
|
});
|
|
5271
5409
|
const deployButton = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ToolbarButton({
|
|
5272
5410
|
className: 'text-button-mito-ai button-base button-small jp-ToolbarButton mito-deploy-button',
|
|
5273
5411
|
onClick: () => {
|
|
5274
|
-
void (0,
|
|
5412
|
+
void (0,_AppDeploy_DeployStreamlitApp__WEBPACK_IMPORTED_MODULE_10__.deployStreamlitApp)(notebookPanel, appDeployService, appManagerService);
|
|
5275
5413
|
},
|
|
5276
5414
|
tooltip: 'Deploy Streamlit App',
|
|
5277
5415
|
label: 'Deploy App',
|
|
5278
|
-
icon:
|
|
5416
|
+
icon: _icons__WEBPACK_IMPORTED_MODULE_9__.DeployLabIcon,
|
|
5279
5417
|
iconClass: 'mito-ai-deploy-icon'
|
|
5280
5418
|
});
|
|
5281
|
-
// Insert the
|
|
5419
|
+
// Insert the buttons into the toolbar
|
|
5282
5420
|
widget.toolbar.insertAfter('spacer', 'edit-app-button', editAppButton);
|
|
5283
5421
|
widget.toolbar.insertAfter('edit-app-button', 'recreate-app-button', recreateAppButton);
|
|
5284
|
-
|
|
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
|
+
}
|
|
5285
5425
|
// Handle widget disposal
|
|
5286
5426
|
widget.disposed.connect(() => {
|
|
5287
5427
|
console.log('Widget disposed, stopping preview');
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
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
|
+
}
|
|
5294
5435
|
});
|
|
5295
|
-
|
|
5296
|
-
catch (error) {
|
|
5297
|
-
console.error('Error starting streamlit preview:', error);
|
|
5436
|
+
return widget;
|
|
5298
5437
|
}
|
|
5299
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
|
+
};
|
|
5300
5475
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StreamlitPreviewPlugin);
|
|
5301
5476
|
|
|
5302
5477
|
|
|
@@ -5310,12 +5485,15 @@ async function previewNotebookAsStreamlit(app, notebookTracker, appDeployService
|
|
|
5310
5485
|
|
|
5311
5486
|
__webpack_require__.r(__webpack_exports__);
|
|
5312
5487
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5313
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5488
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
5489
|
+
/* harmony export */ showUpdateAppDropdown: () => (/* binding */ showUpdateAppDropdown)
|
|
5314
5490
|
/* harmony export */ });
|
|
5315
5491
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5316
5492
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5317
5493
|
/* harmony import */ var _style_EditAppDropdown_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/EditAppDropdown.css */ "./style/EditAppDropdown.css");
|
|
5318
|
-
/* harmony import */ var
|
|
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");
|
|
5319
5497
|
/*
|
|
5320
5498
|
* Copyright (c) Saga Inc.
|
|
5321
5499
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -5323,6 +5501,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5323
5501
|
|
|
5324
5502
|
|
|
5325
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
|
+
};
|
|
5326
5547
|
const UpdateAppDropdown = ({ onSubmit, onClose }) => {
|
|
5327
5548
|
const [message, setMessage] = react__WEBPACK_IMPORTED_MODULE_0___default().useState('');
|
|
5328
5549
|
const handleSubmit = () => {
|
|
@@ -5342,8 +5563,8 @@ const UpdateAppDropdown = ({ onSubmit, onClose }) => {
|
|
|
5342
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?"),
|
|
5343
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 }),
|
|
5344
5565
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "update-app-dropdown-buttons" },
|
|
5345
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: onClose, className: (0,
|
|
5346
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: handleSubmit, disabled: disabled, className: (0,
|
|
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")))));
|
|
5347
5568
|
};
|
|
5348
5569
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UpdateAppDropdown);
|
|
5349
5570
|
|
|
@@ -5358,6 +5579,7 @@ const UpdateAppDropdown = ({ onSubmit, onClose }) => {
|
|
|
5358
5579
|
|
|
5359
5580
|
__webpack_require__.r(__webpack_exports__);
|
|
5360
5581
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5582
|
+
/* harmony export */ showRecreateAppConfirmation: () => (/* binding */ showRecreateAppConfirmation),
|
|
5361
5583
|
/* harmony export */ startStreamlitPreviewAndNotify: () => (/* binding */ startStreamlitPreviewAndNotify)
|
|
5362
5584
|
/* harmony export */ });
|
|
5363
5585
|
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
@@ -5371,8 +5593,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5371
5593
|
|
|
5372
5594
|
const startStreamlitPreviewAndNotify = async (notebookPath, force_recreate = false, edit_prompt = '', start_notification_message = 'Building App Preview...', success_notification_message = 'Streamlit preview started successfully!') => {
|
|
5373
5595
|
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit(start_notification_message, 'in-progress', { autoClose: false });
|
|
5374
|
-
|
|
5375
|
-
|
|
5596
|
+
const previewData = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__.startStreamlitPreview)(notebookPath, force_recreate, edit_prompt);
|
|
5597
|
+
if (previewData.type === 'success') {
|
|
5376
5598
|
// Update notification to success
|
|
5377
5599
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
5378
5600
|
id: notificationId,
|
|
@@ -5380,19 +5602,32 @@ const startStreamlitPreviewAndNotify = async (notebookPath, force_recreate = fal
|
|
|
5380
5602
|
type: 'success',
|
|
5381
5603
|
autoClose: 5 * 1000
|
|
5382
5604
|
});
|
|
5383
|
-
return previewData;
|
|
5384
5605
|
}
|
|
5385
|
-
|
|
5606
|
+
else {
|
|
5386
5607
|
// Display error notification
|
|
5387
5608
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.update({
|
|
5388
5609
|
id: notificationId,
|
|
5389
|
-
message: "Failed to start app preview: " + String(
|
|
5610
|
+
message: "Failed to start app preview: " + String(previewData.message),
|
|
5390
5611
|
type: 'error',
|
|
5391
5612
|
autoClose: 5 * 1000
|
|
5392
5613
|
});
|
|
5393
|
-
return undefined;
|
|
5394
5614
|
}
|
|
5615
|
+
return previewData;
|
|
5395
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
|
+
}
|
|
5396
5631
|
|
|
5397
5632
|
|
|
5398
5633
|
/***/ }),
|
|
@@ -6253,6 +6488,8 @@ const NotebookFooterPlugin = {
|
|
|
6253
6488
|
__webpack_require__.r(__webpack_exports__);
|
|
6254
6489
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6255
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),
|
|
6256
6493
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6257
6494
|
/* harmony export */ });
|
|
6258
6495
|
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/application */ "webpack/sharing/consume/default/@jupyterlab/application");
|
|
@@ -6270,6 +6507,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6270
6507
|
|
|
6271
6508
|
|
|
6272
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';
|
|
6273
6512
|
/**
|
|
6274
6513
|
* Initialization data for the mito settings extension.
|
|
6275
6514
|
*/
|
|
@@ -6283,8 +6522,8 @@ const SettingsManagerPlugin = {
|
|
|
6283
6522
|
};
|
|
6284
6523
|
function _activate(app, palette, contextManager, restorer) {
|
|
6285
6524
|
// Create a widget creator function
|
|
6286
|
-
const newWidget = () => {
|
|
6287
|
-
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);
|
|
6288
6527
|
const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content });
|
|
6289
6528
|
widget.id = 'mito-ai-settings';
|
|
6290
6529
|
widget.title.label = 'Mito AI Settings';
|
|
@@ -6292,24 +6531,33 @@ function _activate(app, palette, contextManager, restorer) {
|
|
|
6292
6531
|
return widget;
|
|
6293
6532
|
};
|
|
6294
6533
|
let widget = newWidget();
|
|
6295
|
-
//
|
|
6296
|
-
|
|
6297
|
-
|
|
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
|
+
};
|
|
6556
|
+
// Add an application command
|
|
6557
|
+
app.commands.addCommand(COMMAND_MITO_AI_SETTINGS, {
|
|
6558
|
+
label: 'Mito AI Settings',
|
|
6298
6559
|
execute: () => {
|
|
6299
|
-
|
|
6300
|
-
if (!widget || widget.isDisposed) {
|
|
6301
|
-
widget = newWidget();
|
|
6302
|
-
}
|
|
6303
|
-
// Add the widget to the tracker if not already there
|
|
6304
|
-
if (!tracker.has(widget)) {
|
|
6305
|
-
void tracker.add(widget);
|
|
6306
|
-
}
|
|
6307
|
-
// Add the widget to the app if not already attached
|
|
6308
|
-
if (!widget.isAttached) {
|
|
6309
|
-
void app.shell.add(widget, 'main');
|
|
6310
|
-
}
|
|
6311
|
-
// Activate the widget
|
|
6312
|
-
app.shell.activateById(widget.id);
|
|
6560
|
+
openSettingsWithTab();
|
|
6313
6561
|
}
|
|
6314
6562
|
});
|
|
6315
6563
|
// Add the command to the palette
|
|
@@ -6317,9 +6565,19 @@ function _activate(app, palette, contextManager, restorer) {
|
|
|
6317
6565
|
command: COMMAND_MITO_AI_SETTINGS,
|
|
6318
6566
|
category: 'Mito AI'
|
|
6319
6567
|
});
|
|
6320
|
-
//
|
|
6321
|
-
|
|
6322
|
-
|
|
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
|
+
}
|
|
6323
6581
|
});
|
|
6324
6582
|
if (!tracker.has(widget)) {
|
|
6325
6583
|
void tracker.add(widget);
|
|
@@ -6348,11 +6606,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6348
6606
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6349
6607
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
6350
6608
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
6351
|
-
/* harmony import */ var
|
|
6352
|
-
/* harmony import */ var
|
|
6353
|
-
/* harmony import */ var
|
|
6354
|
-
/* harmony import */ var
|
|
6355
|
-
/* 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");
|
|
6356
6615
|
/* harmony import */ var _style_SettingsWidget_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/SettingsWidget.css */ "./style/SettingsWidget.css");
|
|
6357
6616
|
/*
|
|
6358
6617
|
* Copyright (c) Saga Inc.
|
|
@@ -6366,30 +6625,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6366
6625
|
|
|
6367
6626
|
|
|
6368
6627
|
|
|
6628
|
+
|
|
6369
6629
|
const TABS_CONFIG = (contextManager) => ({
|
|
6370
|
-
database: {
|
|
6371
|
-
label: 'Database',
|
|
6372
|
-
component: _database_DatabasePage__WEBPACK_IMPORTED_MODULE_3__.DatabasePage
|
|
6373
|
-
},
|
|
6374
6630
|
general: {
|
|
6375
6631
|
label: 'General',
|
|
6376
|
-
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
|
|
6377
6641
|
},
|
|
6378
6642
|
rules: {
|
|
6379
6643
|
label: 'Rules',
|
|
6380
|
-
component:
|
|
6644
|
+
component: _rules_RulesPage__WEBPACK_IMPORTED_MODULE_6__.RulesPage
|
|
6381
6645
|
},
|
|
6382
6646
|
profiler: {
|
|
6383
6647
|
label: 'Profiler',
|
|
6384
|
-
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 })
|
|
6385
6649
|
},
|
|
6386
6650
|
support: {
|
|
6387
6651
|
label: 'Support',
|
|
6388
|
-
component:
|
|
6652
|
+
component: _support_SupportPage__WEBPACK_IMPORTED_MODULE_8__.SupportPage
|
|
6389
6653
|
},
|
|
6390
6654
|
});
|
|
6391
|
-
const App = ({ contextManager }) => {
|
|
6392
|
-
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);
|
|
6393
6657
|
const tabsConfig = TABS_CONFIG(contextManager);
|
|
6394
6658
|
const renderContent = () => {
|
|
6395
6659
|
const TabComponent = tabsConfig[activeTab].component;
|
|
@@ -6403,13 +6667,14 @@ const App = ({ contextManager }) => {
|
|
|
6403
6667
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-main" }, renderContent()))));
|
|
6404
6668
|
};
|
|
6405
6669
|
class SettingsWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ReactWidget {
|
|
6406
|
-
constructor(contextManager) {
|
|
6670
|
+
constructor(contextManager, initialTab) {
|
|
6407
6671
|
super();
|
|
6408
6672
|
this.contextManager = contextManager;
|
|
6673
|
+
this.initialTab = initialTab;
|
|
6409
6674
|
this.addClass('jp-ReactWidget');
|
|
6410
6675
|
}
|
|
6411
6676
|
render() {
|
|
6412
|
-
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 });
|
|
6413
6678
|
}
|
|
6414
6679
|
}
|
|
6415
6680
|
|
|
@@ -7408,6 +7673,177 @@ const RulesPage = () => {
|
|
|
7408
7673
|
};
|
|
7409
7674
|
|
|
7410
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
|
+
|
|
7411
7847
|
/***/ }),
|
|
7412
7848
|
|
|
7413
7849
|
/***/ "./lib/Extensions/SettingsManager/support/SupportPage.js":
|
|
@@ -7528,11 +7964,8 @@ const ToolbarButtonsPlugin = {
|
|
|
7528
7964
|
caption: 'Preview notebook as app and turn on App Mode',
|
|
7529
7965
|
className: 'text-button-mito-ai button-base button-purple button-small',
|
|
7530
7966
|
execute: async () => {
|
|
7531
|
-
void app.commands.execute(
|
|
7967
|
+
void app.commands.execute(_commands__WEBPACK_IMPORTED_MODULE_2__.COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT);
|
|
7532
7968
|
},
|
|
7533
|
-
isVisible: () => {
|
|
7534
|
-
return app.commands.hasCommand(_commands__WEBPACK_IMPORTED_MODULE_2__.COMMAND_MITO_AI_BETA_MODE_ENABLED);
|
|
7535
|
-
}
|
|
7536
7969
|
});
|
|
7537
7970
|
// Check if the beta mode is enabled. After checking, tell Jupyter to
|
|
7538
7971
|
// re-evaluate convert-to-streamlit visibility now that we have had the
|
|
@@ -8133,6 +8566,76 @@ const AssumptionToolUI = ({ assumptions, }) => {
|
|
|
8133
8566
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AssumptionToolUI);
|
|
8134
8567
|
|
|
8135
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
|
+
|
|
8136
8639
|
/***/ }),
|
|
8137
8640
|
|
|
8138
8641
|
/***/ "./lib/components/AgentComponents/ErrorFixupToolUI.js":
|
|
@@ -8284,6 +8787,36 @@ const RunAllCellsToolUI = ({ inErrorFixup }) => {
|
|
|
8284
8787
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RunAllCellsToolUI);
|
|
8285
8788
|
|
|
8286
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
|
+
|
|
8287
8820
|
/***/ }),
|
|
8288
8821
|
|
|
8289
8822
|
/***/ "./lib/components/AttachFileButton.js":
|
|
@@ -8535,7 +9068,7 @@ const DatabaseButton = ({ app }) => {
|
|
|
8535
9068
|
return Object.keys(databaseConnections).length > 0 ? 'success' : 'warning';
|
|
8536
9069
|
};
|
|
8537
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: () => {
|
|
8538
|
-
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);
|
|
8539
9072
|
setIsIconVisible(false);
|
|
8540
9073
|
}, notificationDotType: getNotificationDotType(), className: 'icon-button-hover', style: {
|
|
8541
9074
|
height: 'var(--chat-context-button-height)'
|
|
@@ -9170,6 +9703,36 @@ const AlertIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElem
|
|
|
9170
9703
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AlertIcon);
|
|
9171
9704
|
|
|
9172
9705
|
|
|
9706
|
+
/***/ }),
|
|
9707
|
+
|
|
9708
|
+
/***/ "./lib/icons/AppIcon.js":
|
|
9709
|
+
/*!******************************!*\
|
|
9710
|
+
!*** ./lib/icons/AppIcon.js ***!
|
|
9711
|
+
\******************************/
|
|
9712
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9713
|
+
|
|
9714
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9715
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9716
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9717
|
+
/* harmony export */ });
|
|
9718
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
9719
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9720
|
+
/*
|
|
9721
|
+
* Copyright (c) Saga Inc.
|
|
9722
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
9723
|
+
*/
|
|
9724
|
+
|
|
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
|
+
|
|
9173
9736
|
/***/ }),
|
|
9174
9737
|
|
|
9175
9738
|
/***/ "./lib/icons/CodeIcon.js":
|
|
@@ -9903,7 +10466,11 @@ const startStreamlitPreview = async (notebookPath, force_recreate = false, edit_
|
|
|
9903
10466
|
})
|
|
9904
10467
|
});
|
|
9905
10468
|
if (response.error) {
|
|
9906
|
-
|
|
10469
|
+
const streamlitPreviewReponseError = {
|
|
10470
|
+
type: 'error',
|
|
10471
|
+
message: response.error.message
|
|
10472
|
+
};
|
|
10473
|
+
return streamlitPreviewReponseError;
|
|
9907
10474
|
}
|
|
9908
10475
|
return response.data;
|
|
9909
10476
|
};
|
|
@@ -12372,10 +12939,10 @@ class AppDeployWebsocketClient extends _BaseWebsocketClient__WEBPACK_IMPORTED_MO
|
|
|
12372
12939
|
if (message.error) {
|
|
12373
12940
|
this._stream.emit({
|
|
12374
12941
|
type: 'chunk',
|
|
12375
|
-
chunk: { content: message.error.hint || message.error.
|
|
12942
|
+
chunk: { content: message.error.hint || message.error.message || "An error occurred" },
|
|
12376
12943
|
done: true,
|
|
12377
12944
|
parent_id: message.parent_id,
|
|
12378
|
-
error: message.error
|
|
12945
|
+
error: message.error.message
|
|
12379
12946
|
});
|
|
12380
12947
|
}
|
|
12381
12948
|
// This will get triggered when streaming and there is an error message.
|
|
@@ -12736,8 +13303,9 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
12736
13303
|
display: flex;
|
|
12737
13304
|
align-items: center;
|
|
12738
13305
|
gap: 10px;
|
|
12739
|
-
}
|
|
12740
|
-
|
|
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":""}]);
|
|
12741
13309
|
// Exports
|
|
12742
13310
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
12743
13311
|
|
|
@@ -15479,7 +16047,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
15479
16047
|
}
|
|
15480
16048
|
|
|
15481
16049
|
.file-list input[type="checkbox"],
|
|
15482
|
-
.select-all input[type="checkbox"]{
|
|
16050
|
+
.files-selector-select-all input[type="checkbox"]{
|
|
15483
16051
|
transform: scale(1.3);
|
|
15484
16052
|
margin-right: 6px;
|
|
15485
16053
|
accent-color: var(--purple-500);
|
|
@@ -15549,7 +16117,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
15549
16117
|
.files-selector-select-all {
|
|
15550
16118
|
margin-bottom: 8px;
|
|
15551
16119
|
}
|
|
15552
|
-
`, "",{"version":3,"sources":["webpack://./style/FilesSelector.css"],"names":[],"mappings":"AAAA;;;EAGE;;;AAGF;EACE,gBAAgB;EAChB,eAAe;EACf,SAAS;AACX;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;EAChB,aAAa;EACb,yBAAyB;AAC3B;;AAEA;EACE,eAAe;EACf,8CAA8C;EAC9C,mCAAmC;EACnC,uBAAuB;EACvB,6BAA6B;EAC7B,2BAA2B;EAC3B,4BAA4B;EAC5B,sBAAsB;EACtB,0BAA0B;EAC1B,iCAAiC;AACnC;;AAEA;EACE,8CAA8C;AAChD;;AAEA;;EAEE,qBAAqB;EACrB,iBAAiB;EACjB,+BAA+B;AACjC;;AAEA;EACE,WAAW;EACX,iBAAiB;EACjB,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;EAChB,aAAa;EACb,mBAAmB;EACnB,QAAQ;AACV;;AAEA,iBAAiB;AACjB;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,QAAQ;EACR,kBAAkB;AACpB;;AAEA;EACE,SAAS;EACT,iBAAiB;AACnB;;;AAGA;EACE,iBAAiB;EACjB,WAAW;EACX,SAAS;EACT,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA,+BAA+B;AAC/B;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;AACV;;AAEA,yBAAyB;AACzB;EACE,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;AACjB;;AAEA,oBAAoB;AACpB;EACE,gBAAgB;EAChB,eAAe;EACf,SAAS;AACX;;AAEA,uBAAuB;AACvB;EACE,kBAAkB;AACpB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n\n.file-list {\n list-style: none;\n padding-left: 0;\n margin: 0;\n}\n\n.file-list li {\n margin-bottom: 6px;\n}\n\n.modal-footer {\n margin-top: 16px;\n display: flex;\n justify-content: flex-end;\n}\n\n.files-selector-submit-button {\n margin-top: 8px;\n background-color: var(--purple-400) !important;\n color: var(--purple-700) !important;\n border: none !important;\n border-radius: 4px !important;\n font-weight: 500 !important;\n padding: 8px 16px !important;\n width: 100% !important;\n max-width: 100% !important;\n box-sizing: border-box !important;\n}\n\n.files-selector-submit-button:hover {\n background-color: var(--purple-500) !important;\n}\n\n.file-list input[type=\"checkbox\"],\n.select-all input[type=\"checkbox\"]{\n transform: scale(1.3);\n margin-right: 6px;\n accent-color: var(--purple-500);\n}\n\n.file-list svg {\n color: grey;\n margin-right: 4px;\n vertical-align: middle;\n}\n\n.select-all label {\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Modal header */\n.modal-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 1px;\n}\n\n.modal-title {\n margin: 0;\n font-size: 1.2rem;\n}\n\n\n.modal-subtext {\n font-size: 0.7rem;\n color: #555;\n margin: 0;\n font-style: italic;\n}\n\n.modal-subheader{\n margin-bottom: 7px;\n}\n\n/* Checkbox label for spacing */\n.checkbox-label {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Scrollable file list */\n.file-list-scrollable {\n max-height: 300px;\n overflow-y: auto;\n margin-top: 8px;\n}\n\n/* File list items */\n.file-list {\n list-style: none;\n padding-left: 0;\n margin: 0;\n}\n\n/* Select all section */\n.files-selector-select-all {\n margin-bottom: 8px;\n}\n"],"sourceRoot":""}]);
|
|
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":""}]);
|
|
15553
16121
|
// Exports
|
|
15554
16122
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
15555
16123
|
|
|
@@ -16944,10 +17512,10 @@ a {
|
|
|
16944
17512
|
|
|
16945
17513
|
/***/ }),
|
|
16946
17514
|
|
|
16947
|
-
/***/ "./node_modules/css-loader/dist/cjs.js!./style/
|
|
16948
|
-
|
|
16949
|
-
!*** ./node_modules/css-loader/dist/cjs.js!./style/
|
|
16950
|
-
|
|
17515
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ShimmerWrapper.css":
|
|
17516
|
+
/*!************************************************************************!*\
|
|
17517
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/ShimmerWrapper.css ***!
|
|
17518
|
+
\************************************************************************/
|
|
16951
17519
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
16952
17520
|
|
|
16953
17521
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -16968,30 +17536,98 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16968
17536
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
16969
17537
|
*/
|
|
16970
17538
|
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
font-size: 20px;
|
|
16976
|
-
margin-bottom: 15px;
|
|
16977
|
-
color: var(--jp-ui-font-color0);
|
|
17539
|
+
/* Shimmer skeleton effect for loading states */
|
|
17540
|
+
.shimmer-wrapper {
|
|
17541
|
+
position: relative;
|
|
17542
|
+
overflow: hidden;
|
|
16978
17543
|
}
|
|
16979
17544
|
|
|
16980
|
-
.
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
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;
|
|
16984
17561
|
}
|
|
16985
17562
|
|
|
16986
|
-
.
|
|
16987
|
-
|
|
16988
|
-
|
|
17563
|
+
.shimmer-wrapper > * {
|
|
17564
|
+
position: relative;
|
|
17565
|
+
z-index: 1;
|
|
16989
17566
|
}
|
|
16990
17567
|
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
|
|
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;
|
|
16995
17631
|
gap: 8px;
|
|
16996
17632
|
align-items: flex-start;
|
|
16997
17633
|
}
|
|
@@ -17102,6 +17738,118 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
17102
17738
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17103
17739
|
|
|
17104
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
|
+
|
|
17105
17853
|
/***/ }),
|
|
17106
17854
|
|
|
17107
17855
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/TextAndIconButton.css":
|
|
@@ -17274,6 +18022,77 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
17274
18022
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17275
18023
|
|
|
17276
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
|
+
|
|
17277
18096
|
/***/ }),
|
|
17278
18097
|
|
|
17279
18098
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/button.css":
|
|
@@ -19143,6 +19962,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
19143
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);
|
|
19144
19963
|
|
|
19145
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
|
+
|
|
19146
20019
|
/***/ }),
|
|
19147
20020
|
|
|
19148
20021
|
/***/ "./style/SignUpForm.css":
|
|
@@ -19251,6 +20124,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
19251
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);
|
|
19252
20125
|
|
|
19253
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
|
+
|
|
19254
20181
|
/***/ }),
|
|
19255
20182
|
|
|
19256
20183
|
/***/ "./style/TextAndIconButton.css":
|
|
@@ -19413,6 +20340,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
19413
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);
|
|
19414
20341
|
|
|
19415
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
|
+
|
|
19416
20397
|
/***/ }),
|
|
19417
20398
|
|
|
19418
20399
|
/***/ "./style/button.css":
|
|
@@ -19470,4 +20451,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
19470
20451
|
/***/ })
|
|
19471
20452
|
|
|
19472
20453
|
}]);
|
|
19473
|
-
//# sourceMappingURL=lib_index_js.
|
|
20454
|
+
//# sourceMappingURL=lib_index_js.2db61d2b629817845901.js.map
|