mito-ai 0.1.37__py3-none-any.whl → 0.1.39__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mito-ai might be problematic. Click here for more details.
- mito_ai/__init__.py +17 -1
- mito_ai/_version.py +1 -1
- mito_ai/app_builder/handlers.py +43 -38
- mito_ai/app_builder/models.py +1 -1
- mito_ai/completions/handlers.py +1 -1
- mito_ai/completions/prompt_builders/agent_system_message.py +18 -45
- mito_ai/completions/prompt_builders/chat_name_prompt.py +6 -6
- mito_ai/log/handlers.py +10 -3
- mito_ai/log/urls.py +3 -3
- mito_ai/openai_client.py +1 -1
- mito_ai/streamlit_conversion/agent_utils.py +116 -0
- mito_ai/streamlit_conversion/prompts/prompt_constants.py +59 -0
- mito_ai/streamlit_conversion/prompts/prompt_utils.py +10 -0
- mito_ai/streamlit_conversion/prompts/streamlit_app_creation_prompt.py +45 -0
- mito_ai/streamlit_conversion/prompts/streamlit_error_correction_prompt.py +28 -0
- mito_ai/streamlit_conversion/prompts/streamlit_finish_todo_prompt.py +44 -0
- mito_ai/streamlit_conversion/streamlit_agent_handler.py +90 -44
- mito_ai/streamlit_conversion/streamlit_system_prompt.py +30 -17
- mito_ai/streamlit_conversion/streamlit_utils.py +48 -8
- mito_ai/streamlit_conversion/validate_streamlit_app.py +116 -0
- mito_ai/streamlit_preview/__init__.py +7 -0
- mito_ai/streamlit_preview/handlers.py +164 -0
- mito_ai/streamlit_preview/manager.py +159 -0
- mito_ai/streamlit_preview/urls.py +22 -0
- mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +166 -78
- mito_ai/tests/streamlit_conversion/test_streamlit_utils.py +4 -5
- mito_ai/tests/streamlit_conversion/test_validate_streamlit_app.py +119 -0
- mito_ai/tests/streamlit_preview/test_streamlit_preview_manager.py +302 -0
- mito_ai/tests/utils/test_anthropic_utils.py +2 -2
- mito_ai/utils/anthropic_utils.py +4 -4
- mito_ai/utils/open_ai_utils.py +0 -4
- mito_ai/utils/telemetry_utils.py +28 -1
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +1 -1
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +6 -1
- mito_ai-0.1.37.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.831f63b48760c7119b9b.js → mito_ai-0.1.39.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.16b532b655cd2906e04a.js +799 -116
- mito_ai-0.1.39.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.16b532b655cd2906e04a.js.map +1 -0
- mito_ai-0.1.37.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.93ecc9bc0edba61535cc.js → mito_ai-0.1.39.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.606207904e6aaa42b1bf.js +5 -5
- mito_ai-0.1.37.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.93ecc9bc0edba61535cc.js.map → mito_ai-0.1.39.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.606207904e6aaa42b1bf.js.map +1 -1
- {mito_ai-0.1.37.dist-info → mito_ai-0.1.39.dist-info}/METADATA +4 -1
- {mito_ai-0.1.37.dist-info → mito_ai-0.1.39.dist-info}/RECORD +53 -42
- mito_ai/streamlit_conversion/validate_and_run_streamlit_code.py +0 -207
- mito_ai/tests/streamlit_conversion/test_validate_and_run_streamlit_code.py +0 -418
- mito_ai-0.1.37.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.831f63b48760c7119b9b.js.map +0 -1
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js.map +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.37.data → mito_ai-0.1.39.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.37.dist-info → mito_ai-0.1.39.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.37.dist-info → mito_ai-0.1.39.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.37.dist-info → mito_ai-0.1.39.dist-info}/licenses/LICENSE +0 -0
|
@@ -235,6 +235,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
235
235
|
*/
|
|
236
236
|
class ChatHistoryManager {
|
|
237
237
|
constructor(contextManager, notebookTracker, initialHistory) {
|
|
238
|
+
this._allAssumptions = new Set();
|
|
238
239
|
this.getLastAIMessageIndex = () => {
|
|
239
240
|
// We assume that assistant messages are always separated by user messages.
|
|
240
241
|
// This allows us to simply find the last assistant message in the history.
|
|
@@ -262,9 +263,37 @@ class ChatHistoryManager {
|
|
|
262
263
|
this.contextManager = contextManager;
|
|
263
264
|
// Save the notebook tracker
|
|
264
265
|
this.notebookTracker = notebookTracker;
|
|
266
|
+
// Initialize assumptions from existing history
|
|
267
|
+
this.initializeAssumptionsFromHistory();
|
|
268
|
+
}
|
|
269
|
+
initializeAssumptionsFromHistory() {
|
|
270
|
+
this._allAssumptions.clear();
|
|
271
|
+
this.displayOptimizedChatHistory.forEach(item => {
|
|
272
|
+
var _a;
|
|
273
|
+
if ((_a = item.agentResponse) === null || _a === void 0 ? void 0 : _a.analysis_assumptions) {
|
|
274
|
+
item.agentResponse.analysis_assumptions.forEach(assumption => {
|
|
275
|
+
this._allAssumptions.add(assumption);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
deduplicateAssumptions(agentResponse) {
|
|
281
|
+
// If there are no assumptions, return the original response
|
|
282
|
+
if ((agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.analysis_assumptions) === undefined || (agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.analysis_assumptions) === null) {
|
|
283
|
+
return agentResponse;
|
|
284
|
+
}
|
|
285
|
+
const newAssumptions = agentResponse.analysis_assumptions.filter(assumption => !this._allAssumptions.has(assumption));
|
|
286
|
+
newAssumptions.forEach(assumption => this._allAssumptions.add(assumption));
|
|
287
|
+
return {
|
|
288
|
+
...agentResponse,
|
|
289
|
+
analysis_assumptions: newAssumptions.length > 0 ? newAssumptions : undefined
|
|
290
|
+
};
|
|
265
291
|
}
|
|
266
292
|
createDuplicateChatHistoryManager() {
|
|
267
|
-
|
|
293
|
+
const duplicateManager = new ChatHistoryManager(this.contextManager, this.notebookTracker, this.displayOptimizedChatHistory);
|
|
294
|
+
// Copy the assumptions set to the duplicate
|
|
295
|
+
duplicateManager._allAssumptions = new Set(this._allAssumptions);
|
|
296
|
+
return duplicateManager;
|
|
268
297
|
}
|
|
269
298
|
getDisplayOptimizedHistory() {
|
|
270
299
|
return this.displayOptimizedChatHistory;
|
|
@@ -456,7 +485,7 @@ class ChatHistoryManager {
|
|
|
456
485
|
message: aiMessage,
|
|
457
486
|
type: 'openai message',
|
|
458
487
|
promptType: 'agent:execution',
|
|
459
|
-
agentResponse: agentResponse
|
|
488
|
+
agentResponse: this.deduplicateAssumptions(agentResponse)
|
|
460
489
|
});
|
|
461
490
|
}
|
|
462
491
|
}
|
|
@@ -877,14 +906,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
877
906
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
878
907
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
879
908
|
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/classNames */ "./lib/utils/classNames.js");
|
|
880
|
-
/* harmony import */ var
|
|
909
|
+
/* harmony import */ var _ChatDropdown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ChatDropdown */ "./lib/Extensions/AiChat/ChatMessage/ChatDropdown.js");
|
|
881
910
|
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
882
|
-
/* harmony import */ var _PythonCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PythonCode */ "./lib/Extensions/AiChat/ChatMessage/PythonCode.js");
|
|
883
911
|
/* harmony import */ var _style_ChatInput_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/ChatInput.css */ "./style/ChatInput.css");
|
|
884
912
|
/* harmony import */ var _style_ChatDropdown_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../style/ChatDropdown.css */ "./style/ChatDropdown.css");
|
|
885
913
|
/* harmony import */ var _hooks_useDebouncedFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../hooks/useDebouncedFunction */ "./lib/hooks/useDebouncedFunction.js");
|
|
886
|
-
/* harmony import */ var
|
|
887
|
-
/* harmony import */ var
|
|
914
|
+
/* harmony import */ var _components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../components/SelectedContextContainer */ "./lib/components/SelectedContextContainer.js");
|
|
915
|
+
/* harmony import */ var _components_DatabaseButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../components/DatabaseButton */ "./lib/components/DatabaseButton.js");
|
|
888
916
|
/*
|
|
889
917
|
* Copyright (c) Saga Inc.
|
|
890
918
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -898,14 +926,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
898
926
|
|
|
899
927
|
|
|
900
928
|
|
|
901
|
-
|
|
902
|
-
const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditing, contextManager, notebookTracker, renderMimeRegistry, displayActiveCellCode = true, agentModeEnabled = false, }) => {
|
|
929
|
+
const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditing, contextManager, notebookTracker, agentModeEnabled = false, agentExecutionStatus = 'idle', }) => {
|
|
903
930
|
var _a;
|
|
904
931
|
const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialContent);
|
|
905
932
|
const [expandedVariables, setExpandedVariables] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
906
933
|
const textAreaRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
|
|
907
|
-
const [isFocused, setIsFocused] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
908
934
|
const [activeCellID, setActiveCellID] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.getActiveCellID)(notebookTracker));
|
|
935
|
+
const activeCellCode = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.getActiveCellCode)(notebookTracker) || '';
|
|
909
936
|
const [isDropdownVisible, setDropdownVisible] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
910
937
|
const [dropdownFilter, setDropdownFilter] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
911
938
|
const [additionalContext, setAdditionalContext] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
@@ -1052,6 +1079,17 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1052
1079
|
setDropdownFilter('');
|
|
1053
1080
|
setIsDropdownFromButton(false);
|
|
1054
1081
|
};
|
|
1082
|
+
const mapAdditionalContext = () => {
|
|
1083
|
+
return additionalContext.map(context => {
|
|
1084
|
+
if (context.type === 'db') {
|
|
1085
|
+
return {
|
|
1086
|
+
type: context.type,
|
|
1087
|
+
value: context.value
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
return context;
|
|
1091
|
+
});
|
|
1092
|
+
};
|
|
1055
1093
|
// Update the expandedVariables arr when the variable manager changes
|
|
1056
1094
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
1057
1095
|
const expandedVariables = [
|
|
@@ -1079,19 +1117,30 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1079
1117
|
];
|
|
1080
1118
|
setExpandedVariables(expandedVariables);
|
|
1081
1119
|
}, [contextManager === null || contextManager === void 0 ? void 0 : contextManager.variables, contextManager === null || contextManager === void 0 ? void 0 : contextManager.files]);
|
|
1082
|
-
//
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1120
|
+
// Automatically add active cell context when in Chat mode and there's active cell code
|
|
1121
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
1122
|
+
if (!agentModeEnabled) {
|
|
1123
|
+
// Check if active cell context is already present
|
|
1124
|
+
const hasActiveCellContext = additionalContext.some(context => context.type === 'active_cell');
|
|
1125
|
+
if (!hasActiveCellContext) {
|
|
1126
|
+
setAdditionalContext(prev => [...prev, {
|
|
1127
|
+
type: 'active_cell',
|
|
1128
|
+
value: 'Active Cell',
|
|
1129
|
+
display: 'Active Cell'
|
|
1130
|
+
}]);
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
else if (agentModeEnabled) {
|
|
1134
|
+
// Remove active cell context when in agent mode
|
|
1135
|
+
const hasActiveCellContext = additionalContext.some(context => context.type === 'active_cell');
|
|
1136
|
+
if (hasActiveCellContext) {
|
|
1137
|
+
setAdditionalContext(prev => prev.filter(context => context.type !== 'active_cell'));
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
}, [agentModeEnabled, additionalContext, activeCellCode]);
|
|
1141
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("chat-input-container") },
|
|
1093
1142
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'context-container' },
|
|
1094
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1143
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_DatabaseButton__WEBPACK_IMPORTED_MODULE_6__["default"], { app: app }),
|
|
1095
1144
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "context-button", onClick: () => {
|
|
1096
1145
|
var _a;
|
|
1097
1146
|
setDropdownVisible(true);
|
|
@@ -1099,9 +1148,9 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1099
1148
|
setIsDropdownFromButton(true);
|
|
1100
1149
|
(_a = textAreaRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1101
1150
|
} }, "\uFF20 Add Context"),
|
|
1102
|
-
additionalContext.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1151
|
+
additionalContext.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_7__["default"], { key: `${context.type}-${context.value}-${index}`, title: context.type === 'db' && context.display ? context.display : context.value, type: context.type, onRemove: () => setAdditionalContext(additionalContext.filter((_, i) => i !== index)), notebookTracker: notebookTracker, activeCellID: activeCellID })))),
|
|
1103
1152
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'chat-input-text-area-container' },
|
|
1104
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textAreaRef, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message", "message-user", 'chat-input', { "agent-mode": agentModeEnabled }), placeholder: placeholder, value: input, onChange: handleInputChange, onKeyDown: (e) => {
|
|
1153
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textAreaRef, className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message", "message-user", 'chat-input', { "agent-mode": agentModeEnabled }), placeholder: placeholder, value: input, disabled: agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping', onChange: handleInputChange, onKeyDown: (e) => {
|
|
1105
1154
|
// If dropdown is visible, only handle escape to close it
|
|
1106
1155
|
if (isDropdownVisible) {
|
|
1107
1156
|
if (e.key === 'Escape') {
|
|
@@ -1115,11 +1164,10 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1115
1164
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
1116
1165
|
e.preventDefault();
|
|
1117
1166
|
adjustHeight(true);
|
|
1118
|
-
onSave(input, undefined,
|
|
1167
|
+
onSave(input, undefined, mapAdditionalContext());
|
|
1119
1168
|
// Reset
|
|
1120
1169
|
setInput('');
|
|
1121
1170
|
setAdditionalContext([]);
|
|
1122
|
-
setIsFocused(false);
|
|
1123
1171
|
}
|
|
1124
1172
|
// Escape key cancels editing
|
|
1125
1173
|
if (e.key === 'Escape') {
|
|
@@ -1129,10 +1177,10 @@ const ChatInput = ({ app, initialContent, placeholder, onSave, onCancel, isEditi
|
|
|
1129
1177
|
}
|
|
1130
1178
|
}
|
|
1131
1179
|
} }),
|
|
1132
|
-
isDropdownVisible && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1180
|
+
isDropdownVisible && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatDropdown__WEBPACK_IMPORTED_MODULE_8__["default"], { options: expandedVariables, onSelect: handleOptionSelect, filterText: dropdownFilter, isDropdownFromButton: isDropdownFromButton, onFilterChange: setDropdownFilter, onClose: handleDropdownClose }))),
|
|
1133
1181
|
isEditing &&
|
|
1134
1182
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "message-edit-buttons" },
|
|
1135
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => onSave(input, undefined,
|
|
1183
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: () => onSave(input, undefined, mapAdditionalContext()) }, "Save"),
|
|
1136
1184
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { onClick: onCancel }, "Cancel"))));
|
|
1137
1185
|
};
|
|
1138
1186
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatInput);
|
|
@@ -1193,7 +1241,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1193
1241
|
|
|
1194
1242
|
|
|
1195
1243
|
|
|
1196
|
-
const ChatMessage = ({ app, message,
|
|
1244
|
+
const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mitoAIConnectionError, mitoAIConnectionErrorType, notebookTracker, renderMimeRegistry, isLastAiMessage, isLastMessage, operatingSystem, previewAICode, acceptAICode, rejectAICode, onUpdateMessage, contextManager, codeReviewStatus, setNextSteps, agentModeEnabled, additionalContext, }) => {
|
|
1197
1245
|
const [isEditing, setIsEditing] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
1198
1246
|
if (message.role !== 'user' && message.role !== 'assistant') {
|
|
1199
1247
|
return null;
|
|
@@ -1204,8 +1252,8 @@ const ChatMessage = ({ app, message, messageType, promptType, agentResponse, mes
|
|
|
1204
1252
|
const handleEditClick = () => {
|
|
1205
1253
|
setIsEditing(true);
|
|
1206
1254
|
};
|
|
1207
|
-
const handleSave = (content, _index,
|
|
1208
|
-
onUpdateMessage(messageIndex, content,
|
|
1255
|
+
const handleSave = (content, _index, additionalContext) => {
|
|
1256
|
+
onUpdateMessage(messageIndex, content, additionalContext);
|
|
1209
1257
|
setIsEditing(false);
|
|
1210
1258
|
};
|
|
1211
1259
|
const handleCancel = () => {
|
|
@@ -1223,7 +1271,7 @@ const ChatMessage = ({ app, message, messageType, promptType, agentResponse, mes
|
|
|
1223
1271
|
setNextSteps(agentResponse.next_steps);
|
|
1224
1272
|
}
|
|
1225
1273
|
if (isEditing) {
|
|
1226
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(), placeholder: "Edit your message", onSave: handleSave, onCancel: handleCancel, isEditing: isEditing, contextManager: contextManager, notebookTracker: notebookTracker,
|
|
1274
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(), placeholder: "Edit your message", onSave: handleSave, onCancel: handleCancel, isEditing: isEditing, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: false }));
|
|
1227
1275
|
}
|
|
1228
1276
|
if (mitoAIConnectionError) {
|
|
1229
1277
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message") },
|
|
@@ -1237,7 +1285,6 @@ const ChatMessage = ({ app, message, messageType, promptType, agentResponse, mes
|
|
|
1237
1285
|
// Users end up applying the code in the middle of streaming and it gets very confusing
|
|
1238
1286
|
// very quickly for users.
|
|
1239
1287
|
let isCodeComplete = false;
|
|
1240
|
-
console.log(messageContentParts);
|
|
1241
1288
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message", { "message-user": message.role === 'user' }, { 'message-assistant-chat': message.role === 'assistant' }) },
|
|
1242
1289
|
messageContentParts.map((messagePart, index) => {
|
|
1243
1290
|
var _a, _b;
|
|
@@ -1257,7 +1304,9 @@ const ChatMessage = ({ app, message, messageType, promptType, agentResponse, mes
|
|
|
1257
1304
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextButton__WEBPACK_IMPORTED_MODULE_13__["default"], { onClick: () => { acceptAICode(); }, text: `Accept code ${operatingSystem === 'mac' ? '⌘Y' : 'Ctrl+Y'}`, title: 'Accept the Ai generated code', variant: 'green', width: 'fit-contents' }),
|
|
1258
1305
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextButton__WEBPACK_IMPORTED_MODULE_13__["default"], { onClick: () => { rejectAICode(); }, text: `Reject code ${operatingSystem === 'mac' ? '⌘U' : 'Ctrl+U'}`, title: 'Reject the Ai generated code and revert to the previous version of the code cell', variant: 'red', width: 'fit-contents' })),
|
|
1259
1306
|
message.role === 'user' && additionalContext && additionalContext.length > 0 &&
|
|
1260
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, additionalContext
|
|
1307
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, additionalContext
|
|
1308
|
+
.filter(context => context.type !== 'active_cell') // Hide active cell context in chat messages
|
|
1309
|
+
.map((context, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_14__["default"], { key: `${context.type}-${context.value}-${index}`, title: `${context.value}`, type: context.type, onRemove: () => { } }))))));
|
|
1261
1310
|
}
|
|
1262
1311
|
else {
|
|
1263
1312
|
// Return null for empty code blocks
|
|
@@ -1633,6 +1682,56 @@ const PythonCode = ({ code, renderMimeRegistry }) => {
|
|
|
1633
1682
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PythonCode);
|
|
1634
1683
|
|
|
1635
1684
|
|
|
1685
|
+
/***/ }),
|
|
1686
|
+
|
|
1687
|
+
/***/ "./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js":
|
|
1688
|
+
/*!******************************************************************!*\
|
|
1689
|
+
!*** ./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js ***!
|
|
1690
|
+
\******************************************************************/
|
|
1691
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1692
|
+
|
|
1693
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1694
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1695
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1696
|
+
/* harmony export */ });
|
|
1697
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
1698
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1699
|
+
/* harmony import */ var _components_TextButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../components/TextButton */ "./lib/components/TextButton.js");
|
|
1700
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
1701
|
+
/* harmony import */ var _style_RevertQuestionnaire_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/RevertQuestionnaire.css */ "./style/RevertQuestionnaire.css");
|
|
1702
|
+
/*
|
|
1703
|
+
* Copyright (c) Saga Inc.
|
|
1704
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
1705
|
+
*/
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
const RevertQuestionnaire = ({ onDestroy, getDuplicateChatHistoryManager, setChatHistoryManager }) => {
|
|
1711
|
+
const CHOICES = [
|
|
1712
|
+
'AI misunderstood me',
|
|
1713
|
+
'Code was buggy/incorrect',
|
|
1714
|
+
'Code was low quality',
|
|
1715
|
+
'I changed my mind about what I wanted'
|
|
1716
|
+
];
|
|
1717
|
+
const handleButtonClick = (choice) => {
|
|
1718
|
+
// Log the event
|
|
1719
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_2__.logEvent)('mito_ai_revert_questionnaire_choice', { 'reason': choice });
|
|
1720
|
+
// Add a message to the chat history
|
|
1721
|
+
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
1722
|
+
newChatHistoryManager.addAIMessageFromResponse("I've reverted all previous changes.", "chat", false);
|
|
1723
|
+
setChatHistoryManager(newChatHistoryManager);
|
|
1724
|
+
// Destroy the component (set showRevertQuestionnaire to false)
|
|
1725
|
+
onDestroy();
|
|
1726
|
+
};
|
|
1727
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'message revert-questionnaire-message' },
|
|
1728
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: 'revert-questionnaire-message-text' }, "What went wrong?"),
|
|
1729
|
+
CHOICES.map((choice) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
1730
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextButton__WEBPACK_IMPORTED_MODULE_3__["default"], { text: choice, onClick: () => handleButtonClick(choice), title: choice, variant: 'gray', width: 'block', textAlign: 'left', className: "revert-questionnaire-button" }))))));
|
|
1731
|
+
};
|
|
1732
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RevertQuestionnaire);
|
|
1733
|
+
|
|
1734
|
+
|
|
1636
1735
|
/***/ }),
|
|
1637
1736
|
|
|
1638
1737
|
/***/ "./lib/Extensions/AiChat/ChatMessage/ScrollableSuggestions.js":
|
|
@@ -1773,12 +1872,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1773
1872
|
/* harmony import */ var _components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../components/AgentComponents/ErrorFixupToolUI */ "./lib/components/AgentComponents/ErrorFixupToolUI.js");
|
|
1774
1873
|
/* harmony import */ var _components_DropdownMenu__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/DropdownMenu */ "./lib/components/DropdownMenu.js");
|
|
1775
1874
|
/* harmony import */ var _components_IconButton__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/IconButton */ "./lib/components/IconButton.js");
|
|
1776
|
-
/* harmony import */ var
|
|
1875
|
+
/* harmony import */ var _components_LoadingCircle__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../components/LoadingCircle */ "./lib/components/LoadingCircle.js");
|
|
1777
1876
|
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
1778
1877
|
/* harmony import */ var _components_ModelSelector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/ModelSelector */ "./lib/components/ModelSelector.js");
|
|
1779
|
-
/* harmony import */ var
|
|
1878
|
+
/* harmony import */ var _components_NextStepsPills__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../components/NextStepsPills */ "./lib/components/NextStepsPills.js");
|
|
1780
1879
|
/* harmony import */ var _components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../components/TextAndIconButton */ "./lib/components/TextAndIconButton.js");
|
|
1781
|
-
/* harmony import */ var
|
|
1880
|
+
/* harmony import */ var _components_ToggleButton__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../components/ToggleButton */ "./lib/components/ToggleButton.js");
|
|
1782
1881
|
/* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../icons */ "./lib/icons/index.js");
|
|
1783
1882
|
/* harmony import */ var _icons_MitoLogo__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../icons/MitoLogo */ "./lib/icons/MitoLogo.js");
|
|
1784
1883
|
/* harmony import */ var _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../icons/UndoIcon */ "./lib/icons/UndoIcon.js");
|
|
@@ -1795,9 +1894,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1795
1894
|
/* harmony import */ var _CTACarousel__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./CTACarousel */ "./lib/Extensions/AiChat/CTACarousel.js");
|
|
1796
1895
|
/* harmony import */ var _CodeDiffDisplay__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./CodeDiffDisplay */ "./lib/Extensions/AiChat/CodeDiffDisplay.js");
|
|
1797
1896
|
/* harmony import */ var _FirstMessage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FirstMessage */ "./lib/Extensions/AiChat/FirstMessage.js");
|
|
1798
|
-
/* harmony import */ var
|
|
1897
|
+
/* harmony import */ var _ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./ChatMessage/ChatInput */ "./lib/Extensions/AiChat/ChatMessage/ChatInput.js");
|
|
1799
1898
|
/* harmony import */ var _ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ChatMessage/ChatMessage */ "./lib/Extensions/AiChat/ChatMessage/ChatMessage.js");
|
|
1800
|
-
/* harmony import */ var
|
|
1899
|
+
/* harmony import */ var _ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./ChatMessage/RevertQuestionnaire */ "./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js");
|
|
1900
|
+
/* harmony import */ var _ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./ChatMessage/ScrollableSuggestions */ "./lib/Extensions/AiChat/ChatMessage/ScrollableSuggestions.js");
|
|
1801
1901
|
/* harmony import */ var _ChatHistoryManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ChatHistoryManager */ "./lib/Extensions/AiChat/ChatHistoryManager.js");
|
|
1802
1902
|
/* harmony import */ var _style_button_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../style/button.css */ "./style/button.css");
|
|
1803
1903
|
/* harmony import */ var _style_ChatTaskpane_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../style/ChatTaskpane.css */ "./style/ChatTaskpane.css");
|
|
@@ -1848,6 +1948,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1848
1948
|
|
|
1849
1949
|
|
|
1850
1950
|
|
|
1951
|
+
|
|
1851
1952
|
// Styles
|
|
1852
1953
|
|
|
1853
1954
|
|
|
@@ -1915,6 +2016,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
1915
2016
|
const [displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
|
|
1916
2017
|
// Track if checkpoint exists for UI updates
|
|
1917
2018
|
const [hasCheckpoint, setHasCheckpoint] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
2019
|
+
// Track if revert questionnaire should be shown
|
|
2020
|
+
const [showRevertQuestionnaire, setShowRevertQuestionnaire] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
|
|
1918
2021
|
const updateModelOnBackend = async (model) => {
|
|
1919
2022
|
try {
|
|
1920
2023
|
await websocketClient.sendMessage({
|
|
@@ -2020,6 +2123,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2020
2123
|
}
|
|
2021
2124
|
// Clear next steps when starting a new chat
|
|
2022
2125
|
setNextSteps([]);
|
|
2126
|
+
// Get rid of the revert questionaire if its open
|
|
2127
|
+
setShowRevertQuestionnaire(false);
|
|
2023
2128
|
// Clear agent checkpoint when starting new chat
|
|
2024
2129
|
setHasCheckpoint(false);
|
|
2025
2130
|
// Enable follow mode when starting a new chat
|
|
@@ -2284,13 +2389,13 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2284
2389
|
// Step 2: Send the message to the AI
|
|
2285
2390
|
await _sendMessageAndSaveResponse(completionRequest, newChatHistoryManager);
|
|
2286
2391
|
};
|
|
2287
|
-
const handleUpdateMessage = async (messageIndex, newContent) => {
|
|
2392
|
+
const handleUpdateMessage = async (messageIndex, newContent, additionalContext) => {
|
|
2288
2393
|
// Then send the new message to replace it
|
|
2289
2394
|
if (agentModeEnabled) {
|
|
2290
|
-
await startAgentExecution(newContent, messageIndex);
|
|
2395
|
+
await startAgentExecution(newContent, messageIndex, additionalContext);
|
|
2291
2396
|
}
|
|
2292
2397
|
else {
|
|
2293
|
-
await sendChatInputMessage(newContent, messageIndex);
|
|
2398
|
+
await sendChatInputMessage(newContent, messageIndex, additionalContext);
|
|
2294
2399
|
}
|
|
2295
2400
|
};
|
|
2296
2401
|
const _sendMessageAndSaveResponse = async (completionRequest, newChatHistoryManager) => {
|
|
@@ -2506,10 +2611,10 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2506
2611
|
break;
|
|
2507
2612
|
}
|
|
2508
2613
|
}
|
|
2509
|
-
if (agentResponse.type === 'get_cell_output') {
|
|
2614
|
+
if (agentResponse.type === 'get_cell_output' && agentResponse.get_cell_output_cell_id !== null && agentResponse.get_cell_output_cell_id !== undefined) {
|
|
2510
2615
|
// Mark that we should send the cell output to the agent
|
|
2511
2616
|
// in the next loop iteration
|
|
2512
|
-
sendCellIDOutput = agentResponse.
|
|
2617
|
+
sendCellIDOutput = agentResponse.get_cell_output_cell_id;
|
|
2513
2618
|
}
|
|
2514
2619
|
}
|
|
2515
2620
|
if (agentExecutionDepth > AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
@@ -2582,6 +2687,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2582
2687
|
*/
|
|
2583
2688
|
rejectAICode();
|
|
2584
2689
|
setNextSteps([]);
|
|
2690
|
+
setShowRevertQuestionnaire(false);
|
|
2585
2691
|
};
|
|
2586
2692
|
const rejectAICode = () => {
|
|
2587
2693
|
if (cellStateBeforeDiff.current === undefined) {
|
|
@@ -2815,7 +2921,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2815
2921
|
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_28__["default"], { key: index, messages: displayOptimizedChat, renderMimeRegistry: renderMimeRegistry }));
|
|
2816
2922
|
}
|
|
2817
2923
|
else {
|
|
2818
|
-
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_29__["default"], { key: index, message: displayOptimizedChat.message, promptType: displayOptimizedChat.promptType,
|
|
2924
|
+
return (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_29__["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 }));
|
|
2819
2925
|
}
|
|
2820
2926
|
}).filter(message => message !== null),
|
|
2821
2927
|
loadingAIResponse &&
|
|
@@ -2826,10 +2932,17 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2826
2932
|
agentModeEnabled &&
|
|
2827
2933
|
agentExecutionStatus === 'idle' &&
|
|
2828
2934
|
displayOptimizedChatHistory.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
2829
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_31__["default"], { text: "Revert changes", icon: _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_32__["default"], title: "Revert changes", onClick: () =>
|
|
2830
|
-
|
|
2935
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_31__["default"], { text: "Revert changes", icon: _icons_UndoIcon__WEBPACK_IMPORTED_MODULE_32__["default"], title: "Revert changes", onClick: () => {
|
|
2936
|
+
void (0,_utils_checkpoint__WEBPACK_IMPORTED_MODULE_14__.restoreCheckpoint)(app, notebookTracker, setHasCheckpoint);
|
|
2937
|
+
setDisplayedNextStepsIfAvailable(false);
|
|
2938
|
+
setHasCheckpoint(false);
|
|
2939
|
+
setShowRevertQuestionnaire(true);
|
|
2940
|
+
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_11__.scrollToDiv)(chatMessagesRef);
|
|
2941
|
+
}, variant: "gray", width: "fit-contents", iconPosition: "left" }),
|
|
2942
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("p", { className: "text-muted text-sm" }, "Undo the most recent changes made by the agent"))),
|
|
2943
|
+
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_33__["default"], { onDestroy: () => setShowRevertQuestionnaire(false), getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager }))),
|
|
2831
2944
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "suggestions-container" },
|
|
2832
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2945
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_34__["default"], { onSelectSuggestion: (prompt) => {
|
|
2833
2946
|
if (agentModeEnabled) {
|
|
2834
2947
|
void startAgentExecution(prompt);
|
|
2835
2948
|
}
|
|
@@ -2838,19 +2951,20 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2838
2951
|
}
|
|
2839
2952
|
} }))),
|
|
2840
2953
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: `connected-input-container ${nextSteps.length > 0 ? 'has-next-steps' : ''}` },
|
|
2841
|
-
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2842
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2954
|
+
nextSteps.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_NextStepsPills__WEBPACK_IMPORTED_MODULE_35__["default"], { nextSteps: nextSteps, onSelectNextStep: agentModeEnabled ? startAgentExecution : sendChatInputMessage, displayedNextStepsIfAvailable: displayedNextStepsIfAvailable, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable })),
|
|
2955
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_ChatMessage_ChatInput__WEBPACK_IMPORTED_MODULE_36__["default"], { app: app, initialContent: '', placeholder: agentExecutionStatus === 'working' ? 'Agent is working...' :
|
|
2843
2956
|
agentExecutionStatus === 'stopping' ? 'Agent is stopping...' :
|
|
2844
2957
|
agentModeEnabled ? 'Ask agent to do anything' :
|
|
2845
2958
|
displayOptimizedChatHistory.length < 2 ? `Ask question (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`
|
|
2846
|
-
: `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`, onSave: agentModeEnabled ? startAgentExecution : sendChatInputMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker,
|
|
2959
|
+
: `Ask followup (${operatingSystem === 'mac' ? '⌘' : 'Ctrl'}E), @ to mention`, onSave: agentModeEnabled ? startAgentExecution : sendChatInputMessage, onCancel: undefined, isEditing: false, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecutionStatus })),
|
|
2847
2960
|
agentExecutionStatus !== 'working' && agentExecutionStatus !== 'stopping' && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls" },
|
|
2848
2961
|
react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "chat-controls-left" },
|
|
2849
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2962
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_ToggleButton__WEBPACK_IMPORTED_MODULE_37__["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) => {
|
|
2850
2963
|
await startNewChat(); // TODO: delete thread instead of starting new chat
|
|
2851
2964
|
setAgentModeEnabled(!isLeftSelected);
|
|
2852
2965
|
// Clear agent checkpoint when switching modes
|
|
2853
2966
|
setHasCheckpoint(false);
|
|
2967
|
+
setShowRevertQuestionnaire(false);
|
|
2854
2968
|
// Focus the chat input directly
|
|
2855
2969
|
const chatInput = document.querySelector('.chat-input');
|
|
2856
2970
|
if (chatInput) {
|
|
@@ -2881,7 +2995,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, app
|
|
|
2881
2995
|
" \u23CE"))),
|
|
2882
2996
|
(agentExecutionStatus === 'working' || agentExecutionStatus === 'stopping') && (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("button", { className: "button-base button-red stop-agent-button", onClick: markAgentForStopping, disabled: agentExecutionStatus === 'stopping', "data-testid": "stop-agent-button" }, agentExecutionStatus === 'stopping' ? (react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "stop-agent-button-content" },
|
|
2883
2997
|
"Stopping",
|
|
2884
|
-
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
|
2998
|
+
react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_LoadingCircle__WEBPACK_IMPORTED_MODULE_38__["default"], null),
|
|
2885
2999
|
" ")) : ('Stop Agent')))));
|
|
2886
3000
|
};
|
|
2887
3001
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatTaskpane);
|
|
@@ -3397,12 +3511,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3397
3511
|
/* harmony export */ });
|
|
3398
3512
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ "webpack/sharing/consume/default/@jupyterlab/coreutils");
|
|
3399
3513
|
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);
|
|
3400
|
-
/* harmony import */ var
|
|
3401
|
-
/* harmony import */ var
|
|
3402
|
-
/* harmony import */ var
|
|
3403
|
-
/* harmony import */ var
|
|
3404
|
-
/* harmony import */ var
|
|
3405
|
-
/* harmony import */ var
|
|
3514
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
3515
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
3516
|
+
/* harmony import */ var _requirementsUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./requirementsUtils */ "./lib/Extensions/AppBuilder/requirementsUtils.js");
|
|
3517
|
+
/* harmony import */ var _fileUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fileUtils */ "./lib/Extensions/AppBuilder/fileUtils.js");
|
|
3518
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
3519
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
3520
|
+
/* harmony import */ var _DeployAppNotification__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DeployAppNotification */ "./lib/Extensions/AppBuilder/DeployAppNotification.js");
|
|
3521
|
+
/* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./auth */ "./lib/Extensions/AppBuilder/auth.js");
|
|
3406
3522
|
/*
|
|
3407
3523
|
* Copyright (c) Saga Inc.
|
|
3408
3524
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -3413,12 +3529,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3413
3529
|
|
|
3414
3530
|
|
|
3415
3531
|
|
|
3532
|
+
|
|
3416
3533
|
/*
|
|
3417
3534
|
This function generates a requirements.txt file that lists the dependencies for the streamlit app
|
|
3418
3535
|
*/
|
|
3419
3536
|
const convertNotebookToStreamlit = async (notebookTracker, appBuilderService) => {
|
|
3420
3537
|
// Check authentication before proceeding with deployment
|
|
3421
|
-
const isAuthenticated = await (0,
|
|
3538
|
+
const isAuthenticated = await (0,_auth__WEBPACK_IMPORTED_MODULE_3__.checkAuthenticationAndRedirect)();
|
|
3422
3539
|
if (!isAuthenticated) {
|
|
3423
3540
|
console.log('User not authenticated, redirected to signup');
|
|
3424
3541
|
return;
|
|
@@ -3430,32 +3547,36 @@ const convertNotebookToStreamlit = async (notebookTracker, appBuilderService) =>
|
|
|
3430
3547
|
}
|
|
3431
3548
|
const notebookPath = notebookPanel.context.path;
|
|
3432
3549
|
const notebookName = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(notebookPath, '.ipynb');
|
|
3433
|
-
// Get full path to folder
|
|
3434
|
-
const pathToFolder = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.dirname(notebookPath);
|
|
3435
3550
|
console.log('Notebook path:', notebookPath);
|
|
3436
3551
|
console.log('Notebook name:', notebookName);
|
|
3437
3552
|
console.log('Current working directory info:', notebookPanel.context);
|
|
3438
3553
|
// Build the requirements.txt file
|
|
3439
3554
|
console.debug("Building requirements.txt file");
|
|
3440
|
-
const requirementsContent = await (0,
|
|
3555
|
+
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_4__.generateRequirementsTxt)(notebookTracker);
|
|
3441
3556
|
// Save the files to the current directory
|
|
3442
|
-
await (0,
|
|
3557
|
+
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_5__.saveFileWithKernel)(notebookTracker, './requirements.txt', requirementsContent);
|
|
3443
3558
|
// After building the files, we need to send a request to the backend to deploy the app
|
|
3444
3559
|
if (appBuilderService) {
|
|
3445
3560
|
try {
|
|
3446
3561
|
console.log("Sending request to deploy the app");
|
|
3447
3562
|
// Get JWT token for authentication
|
|
3448
|
-
const jwtToken = (0,
|
|
3563
|
+
const jwtToken = (0,_auth__WEBPACK_IMPORTED_MODULE_3__.getJWTToken)();
|
|
3449
3564
|
const response = await appBuilderService.client.sendMessage({
|
|
3450
3565
|
type: 'build-app',
|
|
3451
|
-
message_id:
|
|
3566
|
+
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__.UUID.uuid4(),
|
|
3452
3567
|
notebook_path: notebookPath,
|
|
3453
|
-
app_path: pathToFolder,
|
|
3454
3568
|
jwt_token: jwtToken || appBuilderService.client.serverSettings.token
|
|
3455
3569
|
});
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3570
|
+
if (response.error) {
|
|
3571
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit(response.error.title, 'error', {
|
|
3572
|
+
autoClose: false
|
|
3573
|
+
});
|
|
3574
|
+
}
|
|
3575
|
+
else {
|
|
3576
|
+
console.log("App deployment response:", response);
|
|
3577
|
+
const url = response.url;
|
|
3578
|
+
(0,_DeployAppNotification__WEBPACK_IMPORTED_MODULE_6__.deployAppNotification)(url);
|
|
3579
|
+
}
|
|
3459
3580
|
}
|
|
3460
3581
|
catch (error) {
|
|
3461
3582
|
// TODO: Do something with the error
|
|
@@ -3499,11 +3620,23 @@ const client_id = '6ara3u3l8sss738hrhbq1qtiqf';
|
|
|
3499
3620
|
// Change this to domain_dev for dev deployments
|
|
3500
3621
|
const active_domain = domain_dev;
|
|
3501
3622
|
const currentUrl = window.location.href;
|
|
3623
|
+
let redirectUrl;
|
|
3624
|
+
// As of now we only support localhost:8888 because we have only allowed this redirect url on AWS conito
|
|
3625
|
+
// We can modify the redirect to include other ports in the future
|
|
3626
|
+
if (currentUrl.includes('localhost')) {
|
|
3627
|
+
redirectUrl = 'http://localhost:8888/lab';
|
|
3628
|
+
}
|
|
3629
|
+
else if (currentUrl.includes('trymito')) {
|
|
3630
|
+
redirectUrl = 'https://launch.trymito.io';
|
|
3631
|
+
}
|
|
3632
|
+
else {
|
|
3633
|
+
redirectUrl = currentUrl;
|
|
3634
|
+
}
|
|
3502
3635
|
console.log("currentUrl: ", currentUrl);
|
|
3503
3636
|
// AWS Cognito configuration
|
|
3504
3637
|
const COGNITO_CONFIG = {
|
|
3505
|
-
SIGNUP_URL: `${active_domain}/signup?client_id=${client_id}&response_type=code&scope=email+openid+profile&redirect_uri=${
|
|
3506
|
-
SIGNIN_URL: `${active_domain}/login?client_id=${client_id}&response_type=code&scope=email+openid+profile&redirect_uri=${
|
|
3638
|
+
SIGNUP_URL: `${active_domain}/signup?client_id=${client_id}&response_type=code&scope=email+openid+profile&redirect_uri=${redirectUrl}`,
|
|
3639
|
+
SIGNIN_URL: `${active_domain}/login?client_id=${client_id}&response_type=code&scope=email+openid+profile&redirect_uri=${redirectUrl}`,
|
|
3507
3640
|
JWT_COOKIE_NAME: 'mito-auth-token',
|
|
3508
3641
|
JWT_COOKIE_EXPIRY_HOURS: 1
|
|
3509
3642
|
};
|
|
@@ -4885,13 +5018,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4885
5018
|
/* harmony export */ });
|
|
4886
5019
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
4887
5020
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4888
|
-
/* harmony import */ var
|
|
5021
|
+
/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model */ "./lib/Extensions/SettingsManager/database/model.js");
|
|
5022
|
+
/* harmony import */ var _GettingStartedVideo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GettingStartedVideo */ "./lib/Extensions/SettingsManager/database/GettingStartedVideo.js");
|
|
4889
5023
|
/*
|
|
4890
5024
|
* Copyright (c) Saga Inc.
|
|
4891
5025
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
4892
5026
|
*/
|
|
4893
5027
|
|
|
4894
5028
|
|
|
5029
|
+
|
|
4895
5030
|
const ConnectionList = ({ connections, loading, error, onDelete }) => {
|
|
4896
5031
|
const [clickedDelete, setClickedDelete] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
4897
5032
|
if (loading) {
|
|
@@ -4903,7 +5038,10 @@ const ConnectionList = ({ connections, loading, error, onDelete }) => {
|
|
|
4903
5038
|
error);
|
|
4904
5039
|
}
|
|
4905
5040
|
if (Object.keys(connections).length === 0) {
|
|
4906
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5041
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "no-connections-container" },
|
|
5042
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "No database connections found."),
|
|
5043
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "video-tutorial" },
|
|
5044
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_GettingStartedVideo__WEBPACK_IMPORTED_MODULE_1__.GettingStartedVideo, { width: "560", height: "315" }))));
|
|
4907
5045
|
}
|
|
4908
5046
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "connections-grid" }, Object.entries(connections).map(([id, connection]) => {
|
|
4909
5047
|
var _a;
|
|
@@ -4912,7 +5050,7 @@ const ConnectionList = ({ connections, loading, error, onDelete }) => {
|
|
|
4912
5050
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", { className: "connection-alias" }, connection.alias ? connection.alias : connection.database),
|
|
4913
5051
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "connection-type" }, connection.type.toUpperCase())),
|
|
4914
5052
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "connection-divider" }),
|
|
4915
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "connection-details" }, (_a =
|
|
5053
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "connection-details" }, (_a = _model__WEBPACK_IMPORTED_MODULE_2__.databaseConfigs[connection.type]) === null || _a === void 0 ? void 0 : _a.fields.map(field => {
|
|
4916
5054
|
// Skip specific fields
|
|
4917
5055
|
if (field.type === 'password')
|
|
4918
5056
|
return null;
|
|
@@ -4952,6 +5090,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4952
5090
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4953
5091
|
/* harmony import */ var _ConnectionList__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ConnectionList */ "./lib/Extensions/SettingsManager/database/ConnectionList.js");
|
|
4954
5092
|
/* harmony import */ var _ConnectionForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConnectionForm */ "./lib/Extensions/SettingsManager/database/ConnectionForm.js");
|
|
5093
|
+
/* harmony import */ var _GettingStartedVideo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GettingStartedVideo */ "./lib/Extensions/SettingsManager/database/GettingStartedVideo.js");
|
|
4955
5094
|
/* harmony import */ var _restAPI_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../restAPI/utils */ "./lib/restAPI/utils.js");
|
|
4956
5095
|
/* harmony import */ var _style_DatabasePage_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/DatabasePage.css */ "./style/DatabasePage.css");
|
|
4957
5096
|
/*
|
|
@@ -4963,11 +5102,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4963
5102
|
|
|
4964
5103
|
|
|
4965
5104
|
|
|
5105
|
+
|
|
4966
5106
|
const DatabasePage = () => {
|
|
4967
5107
|
const [connections, setConnections] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({});
|
|
4968
5108
|
const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true);
|
|
4969
5109
|
const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
4970
5110
|
const [showModal, setShowModal] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
5111
|
+
const [showVideoModal, setShowVideoModal] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
4971
5112
|
const [formData, setFormData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
|
4972
5113
|
type: 'snowflake',
|
|
4973
5114
|
username: '',
|
|
@@ -5040,15 +5181,54 @@ const DatabasePage = () => {
|
|
|
5040
5181
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "db-connections" },
|
|
5041
5182
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "settings-header" },
|
|
5042
5183
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h2", null, "Database Connections"),
|
|
5043
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5044
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("
|
|
5184
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "header-buttons" },
|
|
5185
|
+
Object.keys(connections).length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-gray", onClick: () => setShowVideoModal(true) },
|
|
5186
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("b", null, "Getting Started"))),
|
|
5187
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-purple", onClick: () => setShowModal(true) },
|
|
5188
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("b", null, "\uFF0B Add Connection")))),
|
|
5045
5189
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ConnectionList__WEBPACK_IMPORTED_MODULE_3__.ConnectionList, { connections: connections, loading: loading, error: error, onDelete: handleDelete }),
|
|
5046
5190
|
showModal && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-overlay", onClick: () => setShowModal(false) },
|
|
5047
5191
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-content", onClick: e => e.stopPropagation() },
|
|
5048
5192
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-header" },
|
|
5049
5193
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, "Add New Connection"),
|
|
5050
5194
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "modal-close-button", onClick: () => setShowModal(false) }, "\u2715")),
|
|
5051
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ConnectionForm__WEBPACK_IMPORTED_MODULE_4__.ConnectionForm, { formData: formData, formError: formError, onInputChange: handleInputChange, onSubmit: handleSubmit, onClose: () => setShowModal(false) }))))
|
|
5195
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ConnectionForm__WEBPACK_IMPORTED_MODULE_4__.ConnectionForm, { formData: formData, formError: formError, onInputChange: handleInputChange, onSubmit: handleSubmit, onClose: () => setShowModal(false) })))),
|
|
5196
|
+
showVideoModal && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-overlay", onClick: () => setShowVideoModal(false) },
|
|
5197
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-content video-modal", onClick: e => e.stopPropagation() },
|
|
5198
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "modal-header" },
|
|
5199
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", null, "Getting Started"),
|
|
5200
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "modal-close-button", onClick: () => setShowVideoModal(false) }, "\u2715")),
|
|
5201
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_GettingStartedVideo__WEBPACK_IMPORTED_MODULE_5__.GettingStartedVideo, null),
|
|
5202
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "video-description" },
|
|
5203
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null,
|
|
5204
|
+
"Still have questions? Check out our ",
|
|
5205
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", { href: "https://docs.trymito.io/mito-ai/database-connectors", target: "_blank", rel: "noopener noreferrer" }, "documentation"),
|
|
5206
|
+
" for more information.")))))));
|
|
5207
|
+
};
|
|
5208
|
+
|
|
5209
|
+
|
|
5210
|
+
/***/ }),
|
|
5211
|
+
|
|
5212
|
+
/***/ "./lib/Extensions/SettingsManager/database/GettingStartedVideo.js":
|
|
5213
|
+
/*!************************************************************************!*\
|
|
5214
|
+
!*** ./lib/Extensions/SettingsManager/database/GettingStartedVideo.js ***!
|
|
5215
|
+
\************************************************************************/
|
|
5216
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5217
|
+
|
|
5218
|
+
__webpack_require__.r(__webpack_exports__);
|
|
5219
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5220
|
+
/* harmony export */ GettingStartedVideo: () => (/* binding */ GettingStartedVideo)
|
|
5221
|
+
/* harmony export */ });
|
|
5222
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
5223
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5224
|
+
/*
|
|
5225
|
+
* Copyright (c) Saga Inc.
|
|
5226
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5227
|
+
*/
|
|
5228
|
+
|
|
5229
|
+
const GettingStartedVideo = ({ width = "100%", height = "400", className = "" }) => {
|
|
5230
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `video-container ${className}` },
|
|
5231
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("iframe", { width: width, height: height, src: "https://www.youtube.com/embed/sJgphOrmZb4?rel=0", title: "How to connect to your database with Mito", frameBorder: "0", allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", allowFullScreen: true })));
|
|
5052
5232
|
};
|
|
5053
5233
|
|
|
5054
5234
|
|
|
@@ -5572,6 +5752,142 @@ const SupportPage = () => {
|
|
|
5572
5752
|
};
|
|
5573
5753
|
|
|
5574
5754
|
|
|
5755
|
+
/***/ }),
|
|
5756
|
+
|
|
5757
|
+
/***/ "./lib/Extensions/StreamlitPreview/StreamlitPreviewPlugin.js":
|
|
5758
|
+
/*!*******************************************************************!*\
|
|
5759
|
+
!*** ./lib/Extensions/StreamlitPreview/StreamlitPreviewPlugin.js ***!
|
|
5760
|
+
\*******************************************************************/
|
|
5761
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5762
|
+
|
|
5763
|
+
__webpack_require__.r(__webpack_exports__);
|
|
5764
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5765
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5766
|
+
/* harmony export */ });
|
|
5767
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
5768
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__);
|
|
5769
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
5770
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
5771
|
+
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/coreutils */ "webpack/sharing/consume/default/@jupyterlab/coreutils");
|
|
5772
|
+
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);
|
|
5773
|
+
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
|
|
5774
|
+
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_3__);
|
|
5775
|
+
/* harmony import */ var _AiChat_token__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../AiChat/token */ "./lib/Extensions/AiChat/token.js");
|
|
5776
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
5777
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
5778
|
+
/*
|
|
5779
|
+
* Copyright (c) Saga Inc.
|
|
5780
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5781
|
+
*/
|
|
5782
|
+
|
|
5783
|
+
|
|
5784
|
+
|
|
5785
|
+
|
|
5786
|
+
|
|
5787
|
+
|
|
5788
|
+
|
|
5789
|
+
|
|
5790
|
+
|
|
5791
|
+
/**
|
|
5792
|
+
* Simple HTML widget for displaying iframe content.
|
|
5793
|
+
*/
|
|
5794
|
+
class IFrameWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {
|
|
5795
|
+
constructor(url) {
|
|
5796
|
+
super();
|
|
5797
|
+
this.addClass('jp-iframe-widget');
|
|
5798
|
+
const iframe = document.createElement('iframe');
|
|
5799
|
+
iframe.src = url;
|
|
5800
|
+
iframe.style.width = '100%';
|
|
5801
|
+
iframe.style.height = '100%';
|
|
5802
|
+
iframe.style.border = 'none';
|
|
5803
|
+
this.node.appendChild(iframe);
|
|
5804
|
+
}
|
|
5805
|
+
setUrl(url) {
|
|
5806
|
+
const iframe = this.node.querySelector('iframe');
|
|
5807
|
+
if (iframe) {
|
|
5808
|
+
iframe.src = url;
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
}
|
|
5812
|
+
/**
|
|
5813
|
+
* The streamlit preview plugin.
|
|
5814
|
+
*/
|
|
5815
|
+
const StreamlitPreviewPlugin = {
|
|
5816
|
+
id: 'mito-ai:streamlit-preview',
|
|
5817
|
+
autoStart: true,
|
|
5818
|
+
requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__.INotebookTracker, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ICommandPalette, _AiChat_token__WEBPACK_IMPORTED_MODULE_4__.IChatTracker],
|
|
5819
|
+
activate: (app, notebookTracker, palette) => {
|
|
5820
|
+
console.log('mito-ai: StreamlitPreviewPlugin activated');
|
|
5821
|
+
// Add command to command palette
|
|
5822
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_5__.previewAsStreamlit, {
|
|
5823
|
+
label: 'Preview as Streamlit',
|
|
5824
|
+
caption: 'Convert current notebook to Streamlit app and preview it',
|
|
5825
|
+
execute: async () => {
|
|
5826
|
+
await previewNotebookAsStreamlit(app, notebookTracker);
|
|
5827
|
+
}
|
|
5828
|
+
});
|
|
5829
|
+
// Add to command palette
|
|
5830
|
+
palette.addItem({
|
|
5831
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_5__.previewAsStreamlit,
|
|
5832
|
+
category: 'Mito AI'
|
|
5833
|
+
});
|
|
5834
|
+
}
|
|
5835
|
+
};
|
|
5836
|
+
/**
|
|
5837
|
+
* Preview the current notebook as a Streamlit app.
|
|
5838
|
+
*/
|
|
5839
|
+
async function previewNotebookAsStreamlit(app, notebookTracker) {
|
|
5840
|
+
const notebookPanel = notebookTracker.currentWidget;
|
|
5841
|
+
if (!notebookPanel) {
|
|
5842
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.error('No notebook is currently active');
|
|
5843
|
+
return;
|
|
5844
|
+
}
|
|
5845
|
+
// First save the notebook to ensure the app is up to date
|
|
5846
|
+
await notebookPanel.context.save();
|
|
5847
|
+
const notebookPath = notebookPanel.context.path;
|
|
5848
|
+
const notebookName = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PathExt.basename(notebookPath, '.ipynb');
|
|
5849
|
+
// Show building notification
|
|
5850
|
+
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Building App Preview...', 'in-progress', { autoClose: false });
|
|
5851
|
+
try {
|
|
5852
|
+
const previewData = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_6__.startStreamlitPreview)(notebookPath);
|
|
5853
|
+
// Create iframe widget
|
|
5854
|
+
const iframeWidget = new IFrameWidget(previewData.url);
|
|
5855
|
+
// Create main area widget
|
|
5856
|
+
const widget = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.MainAreaWidget({ content: iframeWidget });
|
|
5857
|
+
widget.title.label = `App Preview (${notebookName})`;
|
|
5858
|
+
widget.title.closable = true;
|
|
5859
|
+
// Handle widget disposal
|
|
5860
|
+
widget.disposed.connect(() => {
|
|
5861
|
+
console.log('Widget disposed, stopping preview');
|
|
5862
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_6__.stopStreamlitPreview)(previewData.id);
|
|
5863
|
+
});
|
|
5864
|
+
// Add widget to main area with split-right mode
|
|
5865
|
+
app.shell.add(widget, 'main', {
|
|
5866
|
+
mode: 'split-right',
|
|
5867
|
+
ref: notebookPanel.id
|
|
5868
|
+
});
|
|
5869
|
+
// Update notification to success
|
|
5870
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.update({
|
|
5871
|
+
id: notificationId,
|
|
5872
|
+
message: 'Streamlit preview started successfully!',
|
|
5873
|
+
type: 'default',
|
|
5874
|
+
autoClose: false
|
|
5875
|
+
});
|
|
5876
|
+
}
|
|
5877
|
+
catch (error) {
|
|
5878
|
+
console.error('Error starting streamlit preview:', error);
|
|
5879
|
+
// Update notification to error
|
|
5880
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.update({
|
|
5881
|
+
id: notificationId,
|
|
5882
|
+
message: `Failed to start preview: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
5883
|
+
type: 'error',
|
|
5884
|
+
autoClose: false
|
|
5885
|
+
});
|
|
5886
|
+
}
|
|
5887
|
+
}
|
|
5888
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StreamlitPreviewPlugin);
|
|
5889
|
+
|
|
5890
|
+
|
|
5575
5891
|
/***/ }),
|
|
5576
5892
|
|
|
5577
5893
|
/***/ "./lib/Extensions/ToolbarButtons/ToolbarButtonsPlugin.js":
|
|
@@ -5672,6 +5988,17 @@ const ToolbarButtonsPlugin = {
|
|
|
5672
5988
|
return app.commands.hasCommand(_commands__WEBPACK_IMPORTED_MODULE_3__.COMMAND_MITO_AI_BETA_MODE_ENABLED);
|
|
5673
5989
|
}
|
|
5674
5990
|
});
|
|
5991
|
+
commands.addCommand('toolbar-button:preview-as-streamlit', {
|
|
5992
|
+
label: 'Preview App',
|
|
5993
|
+
caption: 'Preview as Streamlit',
|
|
5994
|
+
className: 'text-button-mito-ai button-base button-purple button-small',
|
|
5995
|
+
execute: async () => {
|
|
5996
|
+
void app.commands.execute('mito-ai:preview-as-streamlit');
|
|
5997
|
+
},
|
|
5998
|
+
isVisible: () => {
|
|
5999
|
+
return app.commands.hasCommand(_commands__WEBPACK_IMPORTED_MODULE_3__.COMMAND_MITO_AI_BETA_MODE_ENABLED);
|
|
6000
|
+
}
|
|
6001
|
+
});
|
|
5675
6002
|
// Check if the beta mode is enabled. After checking, tell Jupyter to
|
|
5676
6003
|
// re-evaluate convert-to-streamlit visibility now that we have had the
|
|
5677
6004
|
// opportunity to set the mito-ai:beta-mode-enabled command if beta mode is enabled.
|
|
@@ -5680,6 +6007,7 @@ const ToolbarButtonsPlugin = {
|
|
|
5680
6007
|
commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_3__.COMMAND_MITO_AI_BETA_MODE_ENABLED, { execute: () => { } });
|
|
5681
6008
|
commands.notifyCommandChanged('toolbar-button:convert-to-streamlit');
|
|
5682
6009
|
commands.notifyCommandChanged('toolbar-button:toggle-include-cell-in-app');
|
|
6010
|
+
commands.notifyCommandChanged('toolbar-button:preview-as-streamlit');
|
|
5683
6011
|
}
|
|
5684
6012
|
}).catch(error => {
|
|
5685
6013
|
console.error('Error checking beta mode:', error);
|
|
@@ -6177,7 +6505,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6177
6505
|
/* harmony export */ COMMAND_MITO_AI_SEND_AGENT_MESSAGE: () => (/* binding */ COMMAND_MITO_AI_SEND_AGENT_MESSAGE),
|
|
6178
6506
|
/* harmony export */ COMMAND_MITO_AI_SEND_DEBUG_ERROR_MESSAGE: () => (/* binding */ COMMAND_MITO_AI_SEND_DEBUG_ERROR_MESSAGE),
|
|
6179
6507
|
/* harmony export */ COMMAND_MITO_AI_SEND_EXPLAIN_CODE_MESSAGE: () => (/* binding */ COMMAND_MITO_AI_SEND_EXPLAIN_CODE_MESSAGE),
|
|
6180
|
-
/* harmony export */ COMMAND_MITO_AI_SEND_MESSAGE: () => (/* binding */ COMMAND_MITO_AI_SEND_MESSAGE)
|
|
6508
|
+
/* harmony export */ COMMAND_MITO_AI_SEND_MESSAGE: () => (/* binding */ COMMAND_MITO_AI_SEND_MESSAGE),
|
|
6509
|
+
/* harmony export */ previewAsStreamlit: () => (/* binding */ previewAsStreamlit)
|
|
6181
6510
|
/* harmony export */ });
|
|
6182
6511
|
/*
|
|
6183
6512
|
* Copyright (c) Saga Inc.
|
|
@@ -6196,6 +6525,8 @@ const COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE = `toolbar-button:accept-code`;
|
|
|
6196
6525
|
const COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE = `toolbar-button:reject-code`;
|
|
6197
6526
|
// Beta mode commands
|
|
6198
6527
|
const COMMAND_MITO_AI_BETA_MODE_ENABLED = `${MITO_AI}:beta-mode-enabled`;
|
|
6528
|
+
// Streamlit commands
|
|
6529
|
+
const previewAsStreamlit = 'mito-ai:preview-as-streamlit';
|
|
6199
6530
|
|
|
6200
6531
|
|
|
6201
6532
|
/***/ }),
|
|
@@ -6621,7 +6952,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6621
6952
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
6622
6953
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6623
6954
|
/* harmony import */ var _style_ModelSelector_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style/ModelSelector.css */ "./style/ModelSelector.css");
|
|
6624
|
-
/* harmony import */ var
|
|
6955
|
+
/* harmony import */ var _icons_NucleausIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/NucleausIcon */ "./lib/icons/NucleausIcon.js");
|
|
6956
|
+
/* harmony import */ var _utils_models__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/models */ "./lib/utils/models.js");
|
|
6625
6957
|
/*
|
|
6626
6958
|
* Copyright (c) Saga Inc.
|
|
6627
6959
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -6629,15 +6961,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6629
6961
|
|
|
6630
6962
|
|
|
6631
6963
|
|
|
6964
|
+
|
|
6632
6965
|
const MODEL_MAPPINGS = [
|
|
6966
|
+
{ displayName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.GPT_DISPLAY_NAME, fullName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.GPT_MODEL_NAME },
|
|
6633
6967
|
{ displayName: 'GPT 4.1', fullName: 'gpt-4.1' },
|
|
6634
|
-
{ displayName:
|
|
6635
|
-
{ displayName:
|
|
6968
|
+
{ displayName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_OPUS_DISPLAY_NAME, fullName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_OPUS_MODEL_NAME },
|
|
6969
|
+
{ displayName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_SONNET_DISPLAY_NAME, fullName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_SONNET_MODEL_NAME },
|
|
6636
6970
|
{ displayName: 'Gemini 2.5 Pro', fullName: 'gemini-2.5-pro-preview-03-25' }
|
|
6637
6971
|
];
|
|
6638
6972
|
const ALL_MODEL_DISPLAY_NAMES = MODEL_MAPPINGS.map(mapping => mapping.displayName);
|
|
6639
6973
|
// Maximum length for displayed model name before truncating
|
|
6640
|
-
const DEFAULT_MODEL =
|
|
6974
|
+
const DEFAULT_MODEL = _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_SONNET_DISPLAY_NAME;
|
|
6641
6975
|
const ModelSelector = ({ onConfigChange }) => {
|
|
6642
6976
|
const [selectedModel, setSelectedModel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(DEFAULT_MODEL);
|
|
6643
6977
|
const [isOpen, setIsOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
@@ -6697,7 +7031,7 @@ const ModelSelector = ({ onConfigChange }) => {
|
|
|
6697
7031
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `model-selector-dropdown`, onClick: () => setIsOpen(!isOpen), title: selectedModel, "data-testid": "model-selector" },
|
|
6698
7032
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "selected-model" },
|
|
6699
7033
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-icon" },
|
|
6700
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
7034
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NucleausIcon__WEBPACK_IMPORTED_MODULE_3__["default"], { height: 10, width: 10 })),
|
|
6701
7035
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-name" }, selectedModel),
|
|
6702
7036
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "dropdown-arrow" }, "\u25BC")),
|
|
6703
7037
|
isOpen && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `model-options dropup`, style: { minWidth: '150px' } }, ALL_MODEL_DISPLAY_NAMES.map(model => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: model, className: `model-option ${model === selectedModel ? 'selected' : ''}`, onClick: (e) => {
|
|
@@ -6791,6 +7125,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6791
7125
|
/* harmony import */ var _icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icons/RuleIcon */ "./lib/icons/RuleIcon.js");
|
|
6792
7126
|
/* harmony import */ var _icons_CodeIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/CodeIcon */ "./lib/icons/CodeIcon.js");
|
|
6793
7127
|
/* harmony import */ var _icons_DatabaseIcon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icons/DatabaseIcon */ "./lib/icons/DatabaseIcon.js");
|
|
7128
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/notebook */ "./lib/utils/notebook.js");
|
|
6794
7129
|
/*
|
|
6795
7130
|
* Copyright (c) Saga Inc.
|
|
6796
7131
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -6800,7 +7135,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6800
7135
|
|
|
6801
7136
|
|
|
6802
7137
|
|
|
6803
|
-
|
|
7138
|
+
|
|
7139
|
+
const SelectedContextContainer = ({ title, type, onRemove, onClick, notebookTracker, activeCellID }) => {
|
|
6804
7140
|
const [isHovered, setIsHovered] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
6805
7141
|
let icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_RuleIcon__WEBPACK_IMPORTED_MODULE_2__["default"], null);
|
|
6806
7142
|
switch (type) {
|
|
@@ -6813,9 +7149,38 @@ const SelectedContextContainer = ({ title, type, onRemove }) => {
|
|
|
6813
7149
|
case 'db':
|
|
6814
7150
|
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_DatabaseIcon__WEBPACK_IMPORTED_MODULE_4__["default"], null);
|
|
6815
7151
|
break;
|
|
7152
|
+
case 'active_cell':
|
|
7153
|
+
icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_CodeIcon__WEBPACK_IMPORTED_MODULE_3__["default"], null);
|
|
7154
|
+
break;
|
|
6816
7155
|
}
|
|
6817
|
-
|
|
6818
|
-
|
|
7156
|
+
const handleClick = () => {
|
|
7157
|
+
var _a;
|
|
7158
|
+
if (type === 'active_cell') {
|
|
7159
|
+
// Handle active cell context click
|
|
7160
|
+
if (notebookTracker && activeCellID) {
|
|
7161
|
+
// Find the cell
|
|
7162
|
+
const cell = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_5__.getCellByID)(notebookTracker, activeCellID);
|
|
7163
|
+
if (cell) {
|
|
7164
|
+
// Scroll to the cell
|
|
7165
|
+
void ((_a = notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.content.scrollToCell(cell, 'center'));
|
|
7166
|
+
// Highlight the cell
|
|
7167
|
+
setTimeout(() => {
|
|
7168
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_5__.highlightCodeCell)(notebookTracker, activeCellID);
|
|
7169
|
+
}, 500);
|
|
7170
|
+
}
|
|
7171
|
+
}
|
|
7172
|
+
// If notebookTracker or activeCellID are not available, do nothing
|
|
7173
|
+
}
|
|
7174
|
+
else if (onClick) {
|
|
7175
|
+
// Call the custom onClick handler for other context types
|
|
7176
|
+
onClick();
|
|
7177
|
+
}
|
|
7178
|
+
};
|
|
7179
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "selected-context-container", onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: handleClick, "data-testid": "selected-context-container" },
|
|
7180
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `icon`, onClick: (e) => {
|
|
7181
|
+
e.stopPropagation(); // Prevent triggering the button's onClick
|
|
7182
|
+
onRemove();
|
|
7183
|
+
}, title: isHovered ? "Remove rule" : "Selected rule" }, isHovered && type !== 'active_cell' ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "remove-icon" }, "X")) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "icon" }, icon))),
|
|
6819
7184
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "rule-name" }, title)));
|
|
6820
7185
|
};
|
|
6821
7186
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SelectedContextContainer);
|
|
@@ -6885,12 +7250,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6885
7250
|
|
|
6886
7251
|
|
|
6887
7252
|
|
|
6888
|
-
const TextButton = ({ text, onClick, title, variant, width, action }) => {
|
|
7253
|
+
const TextButton = ({ text, onClick, title, variant, width, action, textAlign = 'center', className }) => {
|
|
6889
7254
|
if (action) {
|
|
6890
7255
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("form", { action: action, method: "POST", target: "_blank" },
|
|
6891
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_3__.classNames)("text-button-mito-ai", "button-base", `button-${variant}`, `button-width-${width}`), onClick: onClick, title: title }, text)));
|
|
7256
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_3__.classNames)("text-button-mito-ai", "button-base", `button-${variant}`, `button-width-${width}`, `text-align-${textAlign}`, className), onClick: onClick, title: title }, text)));
|
|
6892
7257
|
}
|
|
6893
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_3__.classNames)("text-button-mito-ai", "button-base", `button-${variant}`, `button-width-${width}`), onClick: onClick, title: title }, text));
|
|
7258
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_3__.classNames)("text-button-mito-ai", "button-base", `button-${variant}`, `button-width-${width}`, `text-align-${textAlign}`, className), onClick: onClick, title: title }, text));
|
|
6894
7259
|
};
|
|
6895
7260
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TextButton);
|
|
6896
7261
|
|
|
@@ -7515,13 +7880,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7515
7880
|
/* harmony import */ var _Extensions_AiChat_AiChatPlugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Extensions/AiChat/AiChatPlugin */ "./lib/Extensions/AiChat/AiChatPlugin.js");
|
|
7516
7881
|
/* harmony import */ var _Extensions_ContextManager_ContextManagerPlugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Extensions/ContextManager/ContextManagerPlugin */ "./lib/Extensions/ContextManager/ContextManagerPlugin.js");
|
|
7517
7882
|
/* harmony import */ var _Extensions_ErrorMimeRenderer_ErrorMimeRendererPlugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Extensions/ErrorMimeRenderer/ErrorMimeRendererPlugin */ "./lib/Extensions/ErrorMimeRenderer/ErrorMimeRendererPlugin.js");
|
|
7518
|
-
/* harmony import */ var
|
|
7883
|
+
/* harmony import */ var _Extensions_ToolbarButtons_ToolbarButtonsPlugin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Extensions/ToolbarButtons/ToolbarButtonsPlugin */ "./lib/Extensions/ToolbarButtons/ToolbarButtonsPlugin.js");
|
|
7519
7884
|
/* harmony import */ var _Extensions_AppBuilder_AppBuilderPlugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Extensions/AppBuilder/AppBuilderPlugin */ "./lib/Extensions/AppBuilder/AppBuilderPlugin.js");
|
|
7520
|
-
/* harmony import */ var
|
|
7521
|
-
/* harmony import */ var
|
|
7522
|
-
/* harmony import */ var
|
|
7523
|
-
/* harmony import */ var
|
|
7524
|
-
/* harmony import */ var
|
|
7885
|
+
/* harmony import */ var _Extensions_StreamlitPreview_StreamlitPreviewPlugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Extensions/StreamlitPreview/StreamlitPreviewPlugin */ "./lib/Extensions/StreamlitPreview/StreamlitPreviewPlugin.js");
|
|
7886
|
+
/* harmony import */ var _Extensions_emptyCell_EmptyCellPlugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Extensions/emptyCell/EmptyCellPlugin */ "./lib/Extensions/emptyCell/EmptyCellPlugin.js");
|
|
7887
|
+
/* harmony import */ var _Extensions_status__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Extensions/status */ "./lib/Extensions/status/index.js");
|
|
7888
|
+
/* harmony import */ var _Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Extensions/SettingsManager/SettingsManagerPlugin */ "./lib/Extensions/SettingsManager/SettingsManagerPlugin.js");
|
|
7889
|
+
/* harmony import */ var _Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Extensions/VersionCheck */ "./lib/Extensions/VersionCheck/index.js");
|
|
7890
|
+
/* harmony import */ var _Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Extensions/NotebookFooter */ "./lib/Extensions/NotebookFooter/index.js");
|
|
7525
7891
|
/*
|
|
7526
7892
|
* Copyright (c) Saga Inc.
|
|
7527
7893
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -7536,6 +7902,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7536
7902
|
|
|
7537
7903
|
|
|
7538
7904
|
|
|
7905
|
+
|
|
7539
7906
|
// This is the main entry point to the mito-ai extension. It must export all of the top level
|
|
7540
7907
|
// extensions that we want to load.
|
|
7541
7908
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([
|
|
@@ -7543,12 +7910,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7543
7910
|
_Extensions_ErrorMimeRenderer_ErrorMimeRendererPlugin__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
7544
7911
|
_Extensions_ContextManager_ContextManagerPlugin__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
7545
7912
|
_Extensions_AppBuilder_AppBuilderPlugin__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7913
|
+
_Extensions_StreamlitPreview_StreamlitPreviewPlugin__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
7914
|
+
_Extensions_ToolbarButtons_ToolbarButtonsPlugin__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
7915
|
+
_Extensions_emptyCell_EmptyCellPlugin__WEBPACK_IMPORTED_MODULE_6__.emptyCellPlaceholder,
|
|
7916
|
+
_Extensions_status__WEBPACK_IMPORTED_MODULE_7__.statusItem,
|
|
7917
|
+
_Extensions_SettingsManager_SettingsManagerPlugin__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
7918
|
+
_Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__.versionCheckPlugin,
|
|
7919
|
+
_Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__["default"]
|
|
7552
7920
|
]);
|
|
7553
7921
|
|
|
7554
7922
|
|
|
@@ -7568,6 +7936,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7568
7936
|
/* harmony export */ getSetting: () => (/* binding */ getSetting),
|
|
7569
7937
|
/* harmony export */ logEvent: () => (/* binding */ logEvent),
|
|
7570
7938
|
/* harmony export */ setRule: () => (/* binding */ setRule),
|
|
7939
|
+
/* harmony export */ startStreamlitPreview: () => (/* binding */ startStreamlitPreview),
|
|
7940
|
+
/* harmony export */ stopStreamlitPreview: () => (/* binding */ stopStreamlitPreview),
|
|
7571
7941
|
/* harmony export */ updateSettings: () => (/* binding */ updateSettings)
|
|
7572
7942
|
/* harmony export */ });
|
|
7573
7943
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./lib/restAPI/utils.js");
|
|
@@ -7658,6 +8028,29 @@ const getDatabaseConnections = async () => {
|
|
|
7658
8028
|
}
|
|
7659
8029
|
return resp.data || {};
|
|
7660
8030
|
};
|
|
8031
|
+
/************************************
|
|
8032
|
+
|
|
8033
|
+
STREAMLIT PREVIEW ENDPOINTS
|
|
8034
|
+
|
|
8035
|
+
************************************/
|
|
8036
|
+
const startStreamlitPreview = async (notebookPath) => {
|
|
8037
|
+
const response = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('streamlit-preview', {
|
|
8038
|
+
method: 'POST',
|
|
8039
|
+
body: JSON.stringify({ notebook_path: notebookPath }),
|
|
8040
|
+
});
|
|
8041
|
+
if (response.error) {
|
|
8042
|
+
throw new Error(response.error.message);
|
|
8043
|
+
}
|
|
8044
|
+
return response.data;
|
|
8045
|
+
};
|
|
8046
|
+
const stopStreamlitPreview = async (previewId) => {
|
|
8047
|
+
const response = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)(`streamlit-preview/${previewId}`, {
|
|
8048
|
+
method: 'DELETE',
|
|
8049
|
+
});
|
|
8050
|
+
if (response.error) {
|
|
8051
|
+
throw new Error(response.error.message);
|
|
8052
|
+
}
|
|
8053
|
+
};
|
|
7661
8054
|
|
|
7662
8055
|
|
|
7663
8056
|
/***/ }),
|
|
@@ -8080,11 +8473,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8080
8473
|
/* harmony export */ restoreCheckpoint: () => (/* binding */ restoreCheckpoint)
|
|
8081
8474
|
/* harmony export */ });
|
|
8082
8475
|
/* harmony import */ var _notebook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./notebook */ "./lib/utils/notebook.js");
|
|
8476
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
8083
8477
|
/*
|
|
8084
8478
|
* Copyright (c) Saga Inc.
|
|
8085
8479
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8086
8480
|
*/
|
|
8087
8481
|
|
|
8482
|
+
|
|
8088
8483
|
const createCheckpoint = async (app, setHasCheckpoint) => {
|
|
8089
8484
|
// By saving the notebook, we create a checkpoint that we can restore from
|
|
8090
8485
|
await app.commands.execute("docmanager:save");
|
|
@@ -8099,7 +8494,7 @@ const getNotebookStateHash = (notebookTracker) => {
|
|
|
8099
8494
|
const notebookState = cells.map(cell => `${cell.id}:${cell.code}`).join('|');
|
|
8100
8495
|
return notebookState;
|
|
8101
8496
|
};
|
|
8102
|
-
const restoreCheckpoint = async (app, notebookTracker, setHasCheckpoint
|
|
8497
|
+
const restoreCheckpoint = async (app, notebookTracker, setHasCheckpoint) => {
|
|
8103
8498
|
// Get the notebook state before attempting restoration
|
|
8104
8499
|
const notebookStateBefore = getNotebookStateHash(notebookTracker);
|
|
8105
8500
|
// Restore the checkpoint
|
|
@@ -8113,10 +8508,8 @@ const restoreCheckpoint = async (app, notebookTracker, setHasCheckpoint, getDupl
|
|
|
8113
8508
|
}
|
|
8114
8509
|
// The restoration was successful, so update the state
|
|
8115
8510
|
setHasCheckpoint(false);
|
|
8116
|
-
//
|
|
8117
|
-
|
|
8118
|
-
newChatHistoryManager.addAIMessageFromResponse("I've reverted all previous changes", "chat", false);
|
|
8119
|
-
setChatHistoryManager(newChatHistoryManager);
|
|
8511
|
+
// Log the checkpoint restoration
|
|
8512
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_1__.logEvent)('mito_ai_checkpoint_restored', {});
|
|
8120
8513
|
// Restart the run all
|
|
8121
8514
|
await app.commands.execute("notebook:restart-run-all");
|
|
8122
8515
|
};
|
|
@@ -8450,6 +8843,35 @@ const stripFileEnding = (rule) => {
|
|
|
8450
8843
|
};
|
|
8451
8844
|
|
|
8452
8845
|
|
|
8846
|
+
/***/ }),
|
|
8847
|
+
|
|
8848
|
+
/***/ "./lib/utils/models.js":
|
|
8849
|
+
/*!*****************************!*\
|
|
8850
|
+
!*** ./lib/utils/models.js ***!
|
|
8851
|
+
\*****************************/
|
|
8852
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8853
|
+
|
|
8854
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8855
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8856
|
+
/* harmony export */ CLAUDE_OPUS_DISPLAY_NAME: () => (/* binding */ CLAUDE_OPUS_DISPLAY_NAME),
|
|
8857
|
+
/* harmony export */ CLAUDE_OPUS_MODEL_NAME: () => (/* binding */ CLAUDE_OPUS_MODEL_NAME),
|
|
8858
|
+
/* harmony export */ CLAUDE_SONNET_DISPLAY_NAME: () => (/* binding */ CLAUDE_SONNET_DISPLAY_NAME),
|
|
8859
|
+
/* harmony export */ CLAUDE_SONNET_MODEL_NAME: () => (/* binding */ CLAUDE_SONNET_MODEL_NAME),
|
|
8860
|
+
/* harmony export */ GPT_DISPLAY_NAME: () => (/* binding */ GPT_DISPLAY_NAME),
|
|
8861
|
+
/* harmony export */ GPT_MODEL_NAME: () => (/* binding */ GPT_MODEL_NAME)
|
|
8862
|
+
/* harmony export */ });
|
|
8863
|
+
/*
|
|
8864
|
+
* Copyright (c) Saga Inc.
|
|
8865
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8866
|
+
*/
|
|
8867
|
+
const CLAUDE_OPUS_DISPLAY_NAME = 'Claude 4.1 Opus';
|
|
8868
|
+
const CLAUDE_OPUS_MODEL_NAME = 'claude-opus-4-1-20250805';
|
|
8869
|
+
const CLAUDE_SONNET_DISPLAY_NAME = 'Claude 4 Sonnet';
|
|
8870
|
+
const CLAUDE_SONNET_MODEL_NAME = 'claude-sonnet-4-20250514';
|
|
8871
|
+
const GPT_DISPLAY_NAME = 'GPT 5 (max)';
|
|
8872
|
+
const GPT_MODEL_NAME = 'gpt-5';
|
|
8873
|
+
|
|
8874
|
+
|
|
8453
8875
|
/***/ }),
|
|
8454
8876
|
|
|
8455
8877
|
/***/ "./lib/utils/notebook.js":
|
|
@@ -10381,7 +10803,24 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
10381
10803
|
|
|
10382
10804
|
.context-button:hover {
|
|
10383
10805
|
background-color: var(--jp-layout-color3);
|
|
10384
|
-
}
|
|
10806
|
+
}
|
|
10807
|
+
|
|
10808
|
+
/* Disabled state styles */
|
|
10809
|
+
.chat-input:disabled {
|
|
10810
|
+
opacity: 0.6;
|
|
10811
|
+
cursor: not-allowed;
|
|
10812
|
+
background-color: var(--jp-layout-color2);
|
|
10813
|
+
}
|
|
10814
|
+
|
|
10815
|
+
.context-button:disabled {
|
|
10816
|
+
opacity: 0.6;
|
|
10817
|
+
cursor: not-allowed;
|
|
10818
|
+
background-color: var(--jp-layout-color2);
|
|
10819
|
+
}
|
|
10820
|
+
|
|
10821
|
+
.context-button:disabled:hover {
|
|
10822
|
+
background-color: var(--jp-layout-color2);
|
|
10823
|
+
}`, "",{"version":3,"sources":["webpack://./style/ChatInput.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,gBAAgB;EAChB,SAAS;EACT,cAAc;EACd,gBAAgB;EAChB,2DAA2D;EAC3D;;;iCAG+B;EAC/B,WAAW;EACX,mBAAmB;EACnB,iDAAiD;AACnD;;AAEA;EACE,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,aAAa;EACb,kBAAkB;EAClB,sBAAsB;EACtB,yBAAyB;EACzB,2DAA2D;EAC3D,eAAe;EACf,gBAAgB;EAChB,qCAAqC;EACrC,gBAAgB;EAChB,iDAAiD;AACnD;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,2BAA2B;EAC3B;;;iCAG+B;AACjC;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,+BAA+B;EAC/B,2BAA2B;AAC7B;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,gBAAgB;EAChB,eAAe;EACf,yCAAyC;EACzC,eAAe;EACf,oCAAoC;EACpC,sCAAsC;AACxC;;AAEA;EACE,yCAAyC;AAC3C;;AAEA,0BAA0B;AAC1B;EACE,YAAY;EACZ,mBAAmB;EACnB,yCAAyC;AAC3C;;AAEA;EACE,YAAY;EACZ,mBAAmB;EACnB,yCAAyC;AAC3C;;AAEA;EACE,yCAAyC;AAC3C","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.chat-input-container {\n position: sticky;\n bottom: 0;\n margin: 10px 0;\n margin-top: auto;\n background-color: var(--chat-user-message-background-color);\n box-shadow: \n 0 4px 12px rgba(0, 0, 0, 0.08),\n 0 2px 4px rgba(0, 0, 0, 0.06),\n 0 0 0 1px rgba(0, 0, 0, 0.02);\n width: 100%;\n border-radius: 12px;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.chat-input-text-area-container {\n position: relative;\n height: min-content;\n}\n\n.chat-input {\n outline: none;\n border: none;\n resize: none;\n width: 100%;\n padding: 10px;\n overflow-y: hidden;\n box-sizing: border-box;\n flex-shrink: 0 !important;\n background-color: var(--chat-user-message-background-color);\n font-size: 12px;\n font-weight: 400;\n font-family: var(--jp-ui-font-family);\n line-height: 1.2;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.active-cell-preview-container {\n padding: 10px;\n}\n\n.chat-input-container:focus-within {\n transform: translateY(-1px);\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.12),\n 0 8px 16px rgba(0, 0, 0, 0.08),\n 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n\n.chat-input:focus {\n color: var(--jp-ui-font-color1);\n}\n\n.chat-input::placeholder {\n color: var(--jp-ui-font-color2);\n transition: color 0.2s ease;\n}\n\n.chat-input:focus::placeholder {\n color: var(--jp-ui-font-color3);\n}\n\n.context-button {\n display: flex;\n align-items: center;\n background-color: var(--jp-layout-color2);\n border: 1px solid var(--jp-border-color1);\n border-radius: 3px;\n padding: 4px 8px;\n font-size: 12px;\n height: var(--chat-context-button-height);\n cursor: pointer;\n color: var(--jp-content-font-color1);\n transition: background-color 0.2s ease;\n}\n\n.context-button:hover {\n background-color: var(--jp-layout-color3);\n}\n\n/* Disabled state styles */\n.chat-input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n background-color: var(--jp-layout-color2);\n}\n\n.context-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n background-color: var(--jp-layout-color2);\n}\n\n.context-button:disabled:hover {\n background-color: var(--jp-layout-color2);\n}"],"sourceRoot":""}]);
|
|
10385
10824
|
// Exports
|
|
10386
10825
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
10387
10826
|
|
|
@@ -11233,6 +11672,28 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
11233
11672
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11234
11673
|
*/
|
|
11235
11674
|
|
|
11675
|
+
.settings-header {
|
|
11676
|
+
display: flex;
|
|
11677
|
+
justify-content: space-between;
|
|
11678
|
+
align-items: center;
|
|
11679
|
+
margin-bottom: 20px;
|
|
11680
|
+
}
|
|
11681
|
+
|
|
11682
|
+
.header-buttons {
|
|
11683
|
+
display: flex;
|
|
11684
|
+
gap: 12px;
|
|
11685
|
+
align-items: center;
|
|
11686
|
+
}
|
|
11687
|
+
|
|
11688
|
+
.header-buttons .button-base {
|
|
11689
|
+
min-width: 120px;
|
|
11690
|
+
height: 32px;
|
|
11691
|
+
display: flex;
|
|
11692
|
+
align-items: center;
|
|
11693
|
+
justify-content: center;
|
|
11694
|
+
padding: 8px 16px;
|
|
11695
|
+
}
|
|
11696
|
+
|
|
11236
11697
|
.connections-grid {
|
|
11237
11698
|
display: grid;
|
|
11238
11699
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
@@ -11323,7 +11784,39 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
11323
11784
|
.confirmation-buttons {
|
|
11324
11785
|
display: flex;
|
|
11325
11786
|
gap: 8px;
|
|
11326
|
-
}
|
|
11787
|
+
}
|
|
11788
|
+
|
|
11789
|
+
/* No connections container styles */
|
|
11790
|
+
.no-connections-container {
|
|
11791
|
+
display: flex;
|
|
11792
|
+
flex-direction: column;
|
|
11793
|
+
align-items: center;
|
|
11794
|
+
justify-content: center;
|
|
11795
|
+
min-height: 400px;
|
|
11796
|
+
text-align: center;
|
|
11797
|
+
padding: 40px 20px;
|
|
11798
|
+
}
|
|
11799
|
+
|
|
11800
|
+
.no-connections-container p {
|
|
11801
|
+
font-size: 1.1em;
|
|
11802
|
+
color: var(--jp-ui-font-color2);
|
|
11803
|
+
margin-bottom: 32px;
|
|
11804
|
+
margin-top: 0;
|
|
11805
|
+
}
|
|
11806
|
+
|
|
11807
|
+
.video-tutorial {
|
|
11808
|
+
border-radius: 8px;
|
|
11809
|
+
display: block;
|
|
11810
|
+
border: 1px solid var(--purple-500);
|
|
11811
|
+
border-radius: 12px;
|
|
11812
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
11813
|
+
padding: 12px;
|
|
11814
|
+
}
|
|
11815
|
+
|
|
11816
|
+
.video-container iframe {
|
|
11817
|
+
border-radius: 8px;
|
|
11818
|
+
display: block;
|
|
11819
|
+
} `, "",{"version":3,"sources":["webpack://./style/DatabasePage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,mBAAmB;AACvB;;AAEA;IACI,aAAa;IACb,SAAS;IACT,mBAAmB;AACvB;;AAEA;IACI,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;AACrB;;AAEA;IACI,aAAa;IACb,4DAA4D;IAC5D,SAAS;IACT,gBAAgB;AACpB;;AAEA;IACI,mCAAmC;IACnC,yCAAyC;IACzC,kBAAkB;IAClB,aAAa;IACb,yBAAyB;IACzB,aAAa;IACb,sBAAsB;AAC1B;;AAEA;IACI,mCAAmC;AACvC;;AAEA;IACI,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,kBAAkB;AACtB;;AAEA;IACI,gBAAgB;IAChB,iBAAiB;IACjB,+BAA+B;IAC/B,SAAS;AACb;;AAEA;IACI,6BAA6B;IAC7B,wBAAwB;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,0BAA0B;IAC1B,gBAAgB;AACpB;;AAEA;IACI,WAAW;IACX,mCAAmC;IACnC,oBAAoB;IACpB,WAAW;AACf;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,aAAa;IACb,gBAAgB;IAChB,+BAA+B;AACnC;;AAEA;IACI,aAAa;IACb,gBAAgB;IAChB,QAAQ;AACZ;;AAEA;IACI,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,6BAA6B;AACjC;;AAEA;IACI,wCAAwC;IACxC,YAAY;AAChB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,QAAQ;AACZ;;AAEA,oCAAoC;AACpC;IACI,aAAa;IACb,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;AACtB;;AAEA;IACI,gBAAgB;IAChB,+BAA+B;IAC/B,mBAAmB;IACnB,aAAa;AACjB;;AAEA;IACI,kBAAkB;IAClB,cAAc;IACd,mCAAmC;IACnC,mBAAmB;IACnB,yCAAyC;IACzC,aAAa;AACjB;;AAEA;IACI,kBAAkB;IAClB,cAAc;AAClB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.settings-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n}\n\n.header-buttons {\n display: flex;\n gap: 12px;\n align-items: center;\n}\n\n.header-buttons .button-base {\n min-width: 120px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 8px 16px;\n}\n\n.connections-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 20px;\n margin-top: 20px;\n}\n\n.connection-card {\n background: var(--jp-layout-color0);\n border: 1px solid var(--jp-border-color1);\n border-radius: 8px;\n padding: 16px;\n transition: all 0.2s ease;\n display: flex;\n flex-direction: column;\n}\n\n.connection-card:hover {\n border: 1px solid var(--purple-500);\n}\n\n.connection-card-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n}\n\n.connection-alias {\n font-size: 1.2em;\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n margin: 0;\n}\n\n.connection-type {\n background: var(--purple-100);\n color: var(--purple-700);\n border-radius: 12px;\n padding: 2px 10px;\n font-size: 0.85em;\n font-weight: 500;\n text-transform: capitalize;\n margin-left: 8px;\n}\n\n.connection-divider {\n height: 1px;\n background: var(--jp-border-color2);\n margin: 8px 0 12px 0;\n width: 100%;\n}\n\n.connection-details {\n flex-grow: 1;\n}\n\n.connection-details p {\n margin: 4px 0;\n font-size: 0.9em;\n color: var(--jp-ui-font-color2);\n}\n\n.connection-actions {\n display: flex;\n margin-top: 12px;\n gap: 8px;\n}\n\n.connection-actions button {\n padding: 4px 8px;\n font-size: 0.9em;\n}\n\n.connection-actions .delete-button {\n color: var(--jp-error-color1);\n}\n\n.connection-actions .delete-button:hover {\n background-color: var(--jp-error-color2);\n color: white;\n}\n\n.delete-container {\n position: relative;\n}\n\n.confirmation-buttons {\n display: flex;\n gap: 8px;\n}\n\n/* No connections container styles */\n.no-connections-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 400px;\n text-align: center;\n padding: 40px 20px;\n}\n\n.no-connections-container p {\n font-size: 1.1em;\n color: var(--jp-ui-font-color2);\n margin-bottom: 32px;\n margin-top: 0;\n}\n\n.video-tutorial {\n border-radius: 8px;\n display: block;\n border: 1px solid var(--purple-500);\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n padding: 12px;\n}\n\n.video-container iframe {\n border-radius: 8px;\n display: block;\n} "],"sourceRoot":""}]);
|
|
11327
11820
|
// Exports
|
|
11328
11821
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
11329
11822
|
|
|
@@ -11927,7 +12420,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
11927
12420
|
}
|
|
11928
12421
|
|
|
11929
12422
|
/* On compact screens, show only the icon */
|
|
11930
|
-
@container (max-width:
|
|
12423
|
+
@container (max-width: 260px) {
|
|
11931
12424
|
|
|
11932
12425
|
/* Shift the dropdown to the left to help prevent right-edge overflow */
|
|
11933
12426
|
.model-options {
|
|
@@ -11941,7 +12434,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
11941
12434
|
.model-name {
|
|
11942
12435
|
display: none;
|
|
11943
12436
|
}
|
|
11944
|
-
}`, "",{"version":3,"sources":["webpack://./style/ModelSelector.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,4DAA4D;;AAE5D;EACE,kBAAkB;EAClB,cAAc;EACd,aAAa;EACb,YAAY,EAAE,mCAAmC;EACjD,aAAa;EACb,mBAAmB,EAAE,sBAAsB;EAC3C,+BAA+B;AACjC;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,kBAAkB;EAClB,YAAY,EAAE,yCAAyC;EACvD,kBAAkB;EAClB,eAAe;EACf,aAAa;EACb,mBAAmB,EAAE,0CAA0C;EAC/D,kBAAkB;EAClB,eAAe;AACjB;;;AAGA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,WAAW;EACX,YAAY;EACZ,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;AACzB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;;AAEA;EACE,cAAc;EACd,0BAA0B;EAC1B,gBAAgB;EAChB,cAAc,EAAE,iCAAiC;AACnD;;AAEA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,YAAY;EACZ,iBAAiB;EACjB,gBAAgB;EAChB,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,kBAAkB;EAClB,yCAAyC;EACzC,aAAa;EACb,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,mCAAmC;EACnC,oCAAoC;EACpC,eAAe;EACf,iCAAiC;EACjC,mBAAmB;EACnB,0BAA0B;AAC5B;;AAEA;EACE,yCAAyC;EACzC,wBAAwB;AAC1B;;AAEA;EACE,yCAAyC;EACzC,wBAAwB;AAC1B;;AAEA,4EAA4E;AAC5E;EACE,YAAY;EACZ,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,YAAY;EACZ,kBAAkB;AACpB;;AAEA,iDAAiD;AACjD;EACE,aAAa;EACb,wCAAwC;AAC1C;;AAEA;EACE,qBAAqB;EACrB,gBAAgB;EAChB,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;AACxB;;AAEA,qDAAqD;AACrD;EACE,aAAa;AACf;;AAEA;EACE,eAAe;AACjB;;AAEA,2CAA2C;AAC3C;;EAEE,uEAAuE;EACvE;IACE,WAAW;EACb;;EAEA;IACE,eAAe;EACjB;;EAEA;IACE,aAAa;EACf;AACF","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* ModelSelector.css - responsive design with compact mode */\n\n.model-selector {\n position: relative;\n flex: 0 0 auto;\n margin: 0 8px;\n height: 20px; /* Match height of other elements */\n display: flex;\n align-items: center; /* Center vertically */\n color: var(--jp-ui-font-color2);\n}\n\n.model-selector:hover {\n color: var(--jp-ui-font-color1);\n}\n\n.model-selector-dropdown {\n position: relative;\n height: 20px; /* Fixed height to match other elements */\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center; /* Ensure content is vertically centered */\n width: min-content;\n max-width: 18ch;\n}\n\n\n.selected-model {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n padding: 0 8px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.model-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n line-height: 1;\n}\n\n.dropdown-arrow {\n font-size: 8px;\n transition: transform 0.2s;\n margin-left: 4px;\n flex-shrink: 0; /* Prevent arrow from shrinking */\n}\n\n/* Model options dropdown */\n.model-options {\n position: absolute;\n bottom: 100%;\n max-height: 180px;\n overflow-y: auto;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-layout-color2);\n border-radius: 4px;\n margin-bottom: 4px;\n box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n width: auto;\n}\n\n.model-option {\n padding: 4px 8px;\n font-size: 12px;\n /* Keep this size for readability */\n color: var(--jp-content-font-color1);\n cursor: pointer;\n transition: background-color 0.2s;\n white-space: nowrap;\n /* Prevent text wrapping */\n}\n\n.model-option:hover {\n background-color: var(--jp-layout-color2);\n color: var(--purple-700);\n}\n\n.model-option.selected {\n background-color: var(--jp-layout-color2);\n color: var(--purple-700);\n}\n\n/* When inside chat-controls - ensure proper alignment with other controls */\n.chat-controls .model-selector {\n height: 20px;\n display: flex;\n align-items: center;\n}\n\n.chat-controls .model-selector-dropdown {\n height: 20px;\n align-self: center;\n}\n\n/* Ensure dropdown appears above other elements */\n.model-options {\n z-index: 1010;\n /* Higher z-index to ensure visibility */\n}\n\n.model-name {\n display: inline-block;\n max-width: 120px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: bottom;\n}\n\n/* On wider screens, show only the name of the model*/\n.model-icon {\n display: none;\n}\n\n.model-name {\n display: inline;\n}\n\n/* On compact screens, show only the icon */\n@container (max-width:
|
|
12437
|
+
}`, "",{"version":3,"sources":["webpack://./style/ModelSelector.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,4DAA4D;;AAE5D;EACE,kBAAkB;EAClB,cAAc;EACd,aAAa;EACb,YAAY,EAAE,mCAAmC;EACjD,aAAa;EACb,mBAAmB,EAAE,sBAAsB;EAC3C,+BAA+B;AACjC;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,kBAAkB;EAClB,YAAY,EAAE,yCAAyC;EACvD,kBAAkB;EAClB,eAAe;EACf,aAAa;EACb,mBAAmB,EAAE,0CAA0C;EAC/D,kBAAkB;EAClB,eAAe;AACjB;;;AAGA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,WAAW;EACX,YAAY;EACZ,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;AACzB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,cAAc;AAChB;;AAEA;EACE,cAAc;EACd,0BAA0B;EAC1B,gBAAgB;EAChB,cAAc,EAAE,iCAAiC;AACnD;;AAEA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,YAAY;EACZ,iBAAiB;EACjB,gBAAgB;EAChB,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,kBAAkB;EAClB,yCAAyC;EACzC,aAAa;EACb,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,mCAAmC;EACnC,oCAAoC;EACpC,eAAe;EACf,iCAAiC;EACjC,mBAAmB;EACnB,0BAA0B;AAC5B;;AAEA;EACE,yCAAyC;EACzC,wBAAwB;AAC1B;;AAEA;EACE,yCAAyC;EACzC,wBAAwB;AAC1B;;AAEA,4EAA4E;AAC5E;EACE,YAAY;EACZ,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,YAAY;EACZ,kBAAkB;AACpB;;AAEA,iDAAiD;AACjD;EACE,aAAa;EACb,wCAAwC;AAC1C;;AAEA;EACE,qBAAqB;EACrB,gBAAgB;EAChB,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;AACxB;;AAEA,qDAAqD;AACrD;EACE,aAAa;AACf;;AAEA;EACE,eAAe;AACjB;;AAEA,2CAA2C;AAC3C;;EAEE,uEAAuE;EACvE;IACE,WAAW;EACb;;EAEA;IACE,eAAe;EACjB;;EAEA;IACE,aAAa;EACf;AACF","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* ModelSelector.css - responsive design with compact mode */\n\n.model-selector {\n position: relative;\n flex: 0 0 auto;\n margin: 0 8px;\n height: 20px; /* Match height of other elements */\n display: flex;\n align-items: center; /* Center vertically */\n color: var(--jp-ui-font-color2);\n}\n\n.model-selector:hover {\n color: var(--jp-ui-font-color1);\n}\n\n.model-selector-dropdown {\n position: relative;\n height: 20px; /* Fixed height to match other elements */\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center; /* Ensure content is vertically centered */\n width: min-content;\n max-width: 18ch;\n}\n\n\n.selected-model {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n padding: 0 8px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.model-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n line-height: 1;\n}\n\n.dropdown-arrow {\n font-size: 8px;\n transition: transform 0.2s;\n margin-left: 4px;\n flex-shrink: 0; /* Prevent arrow from shrinking */\n}\n\n/* Model options dropdown */\n.model-options {\n position: absolute;\n bottom: 100%;\n max-height: 180px;\n overflow-y: auto;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-layout-color2);\n border-radius: 4px;\n margin-bottom: 4px;\n box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n width: auto;\n}\n\n.model-option {\n padding: 4px 8px;\n font-size: 12px;\n /* Keep this size for readability */\n color: var(--jp-content-font-color1);\n cursor: pointer;\n transition: background-color 0.2s;\n white-space: nowrap;\n /* Prevent text wrapping */\n}\n\n.model-option:hover {\n background-color: var(--jp-layout-color2);\n color: var(--purple-700);\n}\n\n.model-option.selected {\n background-color: var(--jp-layout-color2);\n color: var(--purple-700);\n}\n\n/* When inside chat-controls - ensure proper alignment with other controls */\n.chat-controls .model-selector {\n height: 20px;\n display: flex;\n align-items: center;\n}\n\n.chat-controls .model-selector-dropdown {\n height: 20px;\n align-self: center;\n}\n\n/* Ensure dropdown appears above other elements */\n.model-options {\n z-index: 1010;\n /* Higher z-index to ensure visibility */\n}\n\n.model-name {\n display: inline-block;\n max-width: 120px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: bottom;\n}\n\n/* On wider screens, show only the name of the model*/\n.model-icon {\n display: none;\n}\n\n.model-name {\n display: inline;\n}\n\n/* On compact screens, show only the icon */\n@container (max-width: 260px) {\n\n /* Shift the dropdown to the left to help prevent right-edge overflow */\n .model-options {\n left: -40px;\n }\n\n .model-icon {\n display: inline;\n }\n\n .model-name {\n display: none;\n }\n}"],"sourceRoot":""}]);
|
|
11945
12438
|
// Exports
|
|
11946
12439
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
11947
12440
|
|
|
@@ -12532,6 +13025,128 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
12532
13025
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
12533
13026
|
|
|
12534
13027
|
|
|
13028
|
+
/***/ }),
|
|
13029
|
+
|
|
13030
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/RevertQuestionnaire.css":
|
|
13031
|
+
/*!*****************************************************************************!*\
|
|
13032
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/RevertQuestionnaire.css ***!
|
|
13033
|
+
\*****************************************************************************/
|
|
13034
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
13035
|
+
|
|
13036
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13037
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13038
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13039
|
+
/* harmony export */ });
|
|
13040
|
+
/* 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");
|
|
13041
|
+
/* 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__);
|
|
13042
|
+
/* 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");
|
|
13043
|
+
/* 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__);
|
|
13044
|
+
// Imports
|
|
13045
|
+
|
|
13046
|
+
|
|
13047
|
+
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()));
|
|
13048
|
+
// Module
|
|
13049
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
13050
|
+
* Copyright (c) Saga Inc.
|
|
13051
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
13052
|
+
*/
|
|
13053
|
+
|
|
13054
|
+
.revert-questionnaire-message {
|
|
13055
|
+
display: flex;
|
|
13056
|
+
flex-direction: column;
|
|
13057
|
+
gap: 2px;
|
|
13058
|
+
padding: 12px 16px;
|
|
13059
|
+
margin: 8px 8px;
|
|
13060
|
+
border-radius: 12px;
|
|
13061
|
+
background-color: var(--chat-user-message-background-color);
|
|
13062
|
+
border: 1px solid var(--jp-border-color2);
|
|
13063
|
+
box-sizing: border-box;
|
|
13064
|
+
width: calc(100% - 16px);
|
|
13065
|
+
max-width: calc(100vw - 32px);
|
|
13066
|
+
}
|
|
13067
|
+
|
|
13068
|
+
.revert-questionnaire-message-text {
|
|
13069
|
+
font-size: 12px;
|
|
13070
|
+
color: var(--jp-ui-font-color1);
|
|
13071
|
+
margin-bottom: 20px;
|
|
13072
|
+
word-wrap: break-word;
|
|
13073
|
+
overflow-wrap: break-word;
|
|
13074
|
+
max-width: 100%;
|
|
13075
|
+
}
|
|
13076
|
+
|
|
13077
|
+
.revert-questionnaire-button {
|
|
13078
|
+
display: inline-flex;
|
|
13079
|
+
align-items: center;
|
|
13080
|
+
justify-content: space-between;
|
|
13081
|
+
gap: 8px;
|
|
13082
|
+
padding: 8px 12px;
|
|
13083
|
+
background: var(--jp-layout-color1);
|
|
13084
|
+
border: 1px solid var(--jp-border-color2);
|
|
13085
|
+
border-radius: 20px;
|
|
13086
|
+
color: var(--jp-ui-font-color2);
|
|
13087
|
+
font-size: 12px;
|
|
13088
|
+
cursor: pointer;
|
|
13089
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
13090
|
+
text-align: left;
|
|
13091
|
+
width: 100%;
|
|
13092
|
+
overflow: hidden;
|
|
13093
|
+
position: relative;
|
|
13094
|
+
margin-bottom: 6px;
|
|
13095
|
+
box-sizing: border-box;
|
|
13096
|
+
word-wrap: break-word;
|
|
13097
|
+
overflow-wrap: break-word;
|
|
13098
|
+
white-space: normal;
|
|
13099
|
+
min-height: 36px;
|
|
13100
|
+
max-width: 100%;
|
|
13101
|
+
}
|
|
13102
|
+
|
|
13103
|
+
.revert-questionnaire-button::before {
|
|
13104
|
+
content: '';
|
|
13105
|
+
position: absolute;
|
|
13106
|
+
top: 0;
|
|
13107
|
+
left: 0;
|
|
13108
|
+
right: 0;
|
|
13109
|
+
bottom: 0;
|
|
13110
|
+
background: linear-gradient(135deg, var(--jp-brand-color3) 0%, rgba(var(--jp-brand-color1), 0.1) 100%);
|
|
13111
|
+
border-radius: 20px;
|
|
13112
|
+
opacity: 0;
|
|
13113
|
+
transition: opacity 0.2s ease;
|
|
13114
|
+
}
|
|
13115
|
+
|
|
13116
|
+
.revert-questionnaire-button:hover {
|
|
13117
|
+
background: var(--jp-layout-color2);
|
|
13118
|
+
transform: translateY(-1px) scale(1.02);
|
|
13119
|
+
box-shadow: 0 4px 12px rgba(var(--jp-brand-color1), 0.15);
|
|
13120
|
+
border-color: var(--jp-brand-color1);
|
|
13121
|
+
}
|
|
13122
|
+
|
|
13123
|
+
.revert-questionnaire-button:hover::before {
|
|
13124
|
+
opacity: 1;
|
|
13125
|
+
}
|
|
13126
|
+
|
|
13127
|
+
.revert-questionnaire-button:active {
|
|
13128
|
+
transform: translateY(0) scale(0.98);
|
|
13129
|
+
transition: all 0.1s ease;
|
|
13130
|
+
}
|
|
13131
|
+
|
|
13132
|
+
.revert-questionnaire-button::after {
|
|
13133
|
+
content: '→';
|
|
13134
|
+
color: var(--jp-brand-color1);
|
|
13135
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
13136
|
+
opacity: 0;
|
|
13137
|
+
transform: translateX(-4px);
|
|
13138
|
+
flex-shrink: 0;
|
|
13139
|
+
margin-left: auto;
|
|
13140
|
+
}
|
|
13141
|
+
|
|
13142
|
+
.revert-questionnaire-button:hover::after {
|
|
13143
|
+
opacity: 1;
|
|
13144
|
+
transform: translateX(0);
|
|
13145
|
+
}`, "",{"version":3,"sources":["webpack://./style/RevertQuestionnaire.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,aAAa;IACb,sBAAsB;IACtB,QAAQ;IACR,kBAAkB;IAClB,eAAe;IACf,mBAAmB;IACnB,2DAA2D;IAC3D,yCAAyC;IACzC,sBAAsB;IACtB,wBAAwB;IACxB,6BAA6B;AACjC;;AAEA;IACI,eAAe;IACf,+BAA+B;IAC/B,mBAAmB;IACnB,qBAAqB;IACrB,yBAAyB;IACzB,eAAe;AACnB;;AAEA;IACI,oBAAoB;IACpB,mBAAmB;IACnB,8BAA8B;IAC9B,QAAQ;IACR,iBAAiB;IACjB,mCAAmC;IACnC,yCAAyC;IACzC,mBAAmB;IACnB,+BAA+B;IAC/B,eAAe;IACf,eAAe;IACf,iDAAiD;IACjD,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,sBAAsB;IACtB,qBAAqB;IACrB,yBAAyB;IACzB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;AACnB;;AAEA;IACI,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,OAAO;IACP,QAAQ;IACR,SAAS;IACT,sGAAsG;IACtG,mBAAmB;IACnB,UAAU;IACV,6BAA6B;AACjC;;AAEA;IACI,mCAAmC;IACnC,uCAAuC;IACvC,yDAAyD;IACzD,oCAAoC;AACxC;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,oCAAoC;IACpC,yBAAyB;AAC7B;;AAEA;IACI,YAAY;IACZ,6BAA6B;IAC7B,iDAAiD;IACjD,UAAU;IACV,2BAA2B;IAC3B,cAAc;IACd,iBAAiB;AACrB;;AAEA;IACI,UAAU;IACV,wBAAwB;AAC5B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.revert-questionnaire-message {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 12px 16px;\n margin: 8px 8px;\n border-radius: 12px;\n background-color: var(--chat-user-message-background-color);\n border: 1px solid var(--jp-border-color2);\n box-sizing: border-box;\n width: calc(100% - 16px);\n max-width: calc(100vw - 32px);\n}\n\n.revert-questionnaire-message-text {\n font-size: 12px;\n color: var(--jp-ui-font-color1);\n margin-bottom: 20px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n max-width: 100%;\n}\n\n.revert-questionnaire-button {\n display: inline-flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 12px;\n background: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 20px;\n color: var(--jp-ui-font-color2);\n font-size: 12px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n text-align: left;\n width: 100%;\n overflow: hidden;\n position: relative;\n margin-bottom: 6px;\n box-sizing: border-box;\n word-wrap: break-word;\n overflow-wrap: break-word;\n white-space: normal;\n min-height: 36px;\n max-width: 100%;\n}\n\n.revert-questionnaire-button::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(135deg, var(--jp-brand-color3) 0%, rgba(var(--jp-brand-color1), 0.1) 100%);\n border-radius: 20px;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n\n.revert-questionnaire-button:hover {\n background: var(--jp-layout-color2);\n transform: translateY(-1px) scale(1.02);\n box-shadow: 0 4px 12px rgba(var(--jp-brand-color1), 0.15);\n border-color: var(--jp-brand-color1);\n}\n\n.revert-questionnaire-button:hover::before {\n opacity: 1;\n}\n\n.revert-questionnaire-button:active {\n transform: translateY(0) scale(0.98);\n transition: all 0.1s ease;\n}\n\n.revert-questionnaire-button::after {\n content: '→';\n color: var(--jp-brand-color1);\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n opacity: 0;\n transform: translateX(-4px);\n flex-shrink: 0;\n margin-left: auto;\n}\n\n.revert-questionnaire-button:hover::after {\n opacity: 1;\n transform: translateX(0);\n}"],"sourceRoot":""}]);
|
|
13146
|
+
// Exports
|
|
13147
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13148
|
+
|
|
13149
|
+
|
|
12535
13150
|
/***/ }),
|
|
12536
13151
|
|
|
12537
13152
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/RulesForm.css":
|
|
@@ -12727,7 +13342,8 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
12727
13342
|
justify-content: center;
|
|
12728
13343
|
width: 12px;
|
|
12729
13344
|
max-height: 14px;
|
|
12730
|
-
|
|
13345
|
+
color: var(--jp-content-font-color3);
|
|
13346
|
+
}`, "",{"version":3,"sources":["webpack://./style/SelectedContextContainer.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,eAAe;EACf,mBAAmB;EACnB,QAAQ;EACR,iBAAiB;AACnB;;AAEA,6DAA6D;AAC7D;EACE,WAAW;AACb;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,kBAAkB;EAClB,yCAAyC;EACzC,kBAAkB;EAClB,gBAAgB;EAChB,WAAW;;EAEX,eAAe;EACf,YAAY;EACZ,kBAAkB;;EAElB,yCAAyC;EACzC,eAAe;;EAEf;IACE,yCAAyC;EAC3C;AACF;;AAEA;EACE,gBAAgB;EAChB,oCAAoC;EACpC,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;EACvB,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,uBAAuB;EACvB,WAAW;EACX,gBAAgB;EAChB,oCAAoC;AACtC","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.context-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n padding: 8px 10px;\n}\n\n/* Consistent spacing for all children of context container */\n.context-container>* {\n margin: 2px;\n}\n\n.selected-context-container {\n display: flex;\n align-items: center;\n text-align: center;\n background-color: var(--jp-layout-color2);\n border-radius: 3px;\n padding: 4px 8px;\n margin: 2px;\n\n font-size: 12px;\n height: 20px;\n width: fit-content;\n\n border: 1px solid var(--jp-border-color1);\n cursor: pointer;\n\n &:hover {\n background-color: var(--jp-layout-color3);\n }\n}\n\n.selected-context-container .rule-name {\n margin-left: 6px;\n color: var(--jp-content-font-color1);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 200px;\n}\n\n.selected-context-container .icon {\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: 12px;\n max-height: 14px;\n color: var(--jp-content-font-color3);\n}"],"sourceRoot":""}]);
|
|
12731
13347
|
// Exports
|
|
12732
13348
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
12733
13349
|
|
|
@@ -12929,7 +13545,19 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
12929
13545
|
align-items: center;
|
|
12930
13546
|
justify-content: space-around;
|
|
12931
13547
|
}
|
|
12932
|
-
|
|
13548
|
+
|
|
13549
|
+
.text-align-left {
|
|
13550
|
+
justify-content: flex-start;
|
|
13551
|
+
}
|
|
13552
|
+
|
|
13553
|
+
.text-align-center {
|
|
13554
|
+
justify-content: space-around;
|
|
13555
|
+
}
|
|
13556
|
+
|
|
13557
|
+
.text-align-right {
|
|
13558
|
+
justify-content: flex-end;
|
|
13559
|
+
}
|
|
13560
|
+
`, "",{"version":3,"sources":["webpack://./style/TextButton.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,mBAAmB;EACnB,6BAA6B;AAC/B;;AAEA;EACE,2BAA2B;AAC7B;;AAEA;EACE,6BAA6B;AAC/B;;AAEA;EACE,yBAAyB;AAC3B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.text-button-mito-ai {\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\n.text-align-left {\n justify-content: flex-start;\n}\n\n.text-align-center {\n justify-content: space-around;\n}\n\n.text-align-right {\n justify-content: flex-end;\n}\n"],"sourceRoot":""}]);
|
|
12933
13561
|
// Exports
|
|
12934
13562
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
12935
13563
|
|
|
@@ -12978,7 +13606,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
12978
13606
|
gap: 8px;
|
|
12979
13607
|
min-width: 20px;
|
|
12980
13608
|
font-size: 12px;
|
|
12981
|
-
padding: 2px
|
|
13609
|
+
padding: 2px 8px;
|
|
12982
13610
|
}
|
|
12983
13611
|
|
|
12984
13612
|
.toggle-button-half:first-child {
|
|
@@ -13005,7 +13633,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13005
13633
|
width: 16px;
|
|
13006
13634
|
height: 16px;
|
|
13007
13635
|
}
|
|
13008
|
-
`, "",{"version":3,"sources":["webpack://./style/ToggleButton.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,QAAQ;EACR,yCAAyC;EACzC,0CAA0C;EAC1C,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,QAAQ;EACR,eAAe;EACf,eAAe;EACf,
|
|
13636
|
+
`, "",{"version":3,"sources":["webpack://./style/ToggleButton.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,QAAQ;EACR,yCAAyC;EACzC,0CAA0C;EAC1C,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,QAAQ;EACR,eAAe;EACf,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,UAAU;EACV,mCAAmC;EACnC,mCAAmC;AACrC;;AAEA;EACE,YAAY;EACZ,wCAAwC;EACxC,0CAA0C;AAC5C;;AAEA;EACE,WAAW;EACX,YAAY;AACd","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.toggle-button-container {\n display: flex;\n gap: 1px;\n background-color: var(--jp-layout-color2);\n border: 1px solid var(--jp-ui-font-color3);\n border-radius: 2px;\n width: 100px;\n overflow: hidden;\n}\n\n.toggle-button-half {\n flex: 0 0 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n min-width: 20px;\n font-size: 12px;\n padding: 2px 8px;\n}\n\n.toggle-button-half:first-child {\n border-radius: 0px;\n}\n\n.toggle-button-half:last-child {\n border-radius: 0px;\n}\n\n.toggle-button-half.selected {\n opacity: 1;\n background-color: var(--purple-400);\n color: var(--purple-700) !important;\n}\n\n.toggle-button-half.unselected {\n opacity: 0.6;\n background-color: transparent !important;\n color: var(--jp-ui-font-color2) !important;\n}\n\n.toggle-button-icon {\n width: 16px;\n height: 16px;\n}\n"],"sourceRoot":""}]);
|
|
13009
13637
|
// Exports
|
|
13010
13638
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13011
13639
|
|
|
@@ -13100,7 +13728,8 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
13100
13728
|
height: 20px;
|
|
13101
13729
|
font-size: 12px;
|
|
13102
13730
|
padding: 2px 5px;
|
|
13103
|
-
}
|
|
13731
|
+
}
|
|
13732
|
+
`, "",{"version":3,"sources":["webpack://./style/button.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;;;;CAIC;;AAED;EACE,YAAY;EACZ,kBAAkB;EAClB,eAAe;EACf,eAAe;EACf,2EAA2E;EAC3E,mBAAmB;EACnB,iBAAiB;AACnB;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,gCAAgC;EAChC,gCAAgC;AAClC;;AAEA;EACE,gCAAgC;AAClC;;AAEA;EACE,yCAAyC;EACzC,+CAA+C;AACjD;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mCAAmC;EACnC,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,eAAe;EACf,gBAAgB;AAClB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* \n Classes that can be used for any button, making it easier to keep \n the theme consistent. For example, use them to make a textButton or\n textAndIconButton green.\n*/\n\n.button-base {\n border: none;\n border-radius: 3px;\n cursor: pointer;\n font-size: 14px;\n /* Make sure the button grows large enough so that the text does not wrap */\n white-space: nowrap;\n padding: 5px 10px;\n}\n\n.button-green {\n background-color: var(--green-400);\n color: var(--green-900) !important;\n}\n\n.button-green:hover {\n background-color: var(--green-500);\n}\n\n.button-red {\n background-color: var(--red-400);\n color: var(--red-900) !important;\n}\n\n.button-red:hover {\n background-color: var(--red-500);\n}\n\n.button-gray {\n background-color: var(--jp-layout-color2);\n color: var(--jp-content-font-color1) !important;\n}\n\n.button-gray:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.button-purple {\n background-color: var(--purple-300);\n color: var(--purple-700) !important;\n}\n\n.button-purple:hover {\n background-color: var(--purple-400);\n}\n\n.button-width-block {\n width: 100%;\n}\n\n.button-width-fit-contents {\n width: fit-content;\n}\n\n.button-small {\n height: 20px;\n font-size: 12px;\n padding: 2px 5px;\n}\n"],"sourceRoot":""}]);
|
|
13104
13733
|
// Exports
|
|
13105
13734
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
13106
13735
|
|
|
@@ -14717,6 +15346,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
14717
15346
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_PythonCode_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_PythonCode_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_PythonCode_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
14718
15347
|
|
|
14719
15348
|
|
|
15349
|
+
/***/ }),
|
|
15350
|
+
|
|
15351
|
+
/***/ "./style/RevertQuestionnaire.css":
|
|
15352
|
+
/*!***************************************!*\
|
|
15353
|
+
!*** ./style/RevertQuestionnaire.css ***!
|
|
15354
|
+
\***************************************/
|
|
15355
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
15356
|
+
|
|
15357
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15358
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15359
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15360
|
+
/* harmony export */ });
|
|
15361
|
+
/* 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");
|
|
15362
|
+
/* 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__);
|
|
15363
|
+
/* 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");
|
|
15364
|
+
/* 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__);
|
|
15365
|
+
/* 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");
|
|
15366
|
+
/* 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__);
|
|
15367
|
+
/* 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");
|
|
15368
|
+
/* 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__);
|
|
15369
|
+
/* 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");
|
|
15370
|
+
/* 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__);
|
|
15371
|
+
/* 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");
|
|
15372
|
+
/* 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__);
|
|
15373
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_RevertQuestionnaire_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./RevertQuestionnaire.css */ "./node_modules/css-loader/dist/cjs.js!./style/RevertQuestionnaire.css");
|
|
15374
|
+
|
|
15375
|
+
|
|
15376
|
+
|
|
15377
|
+
|
|
15378
|
+
|
|
15379
|
+
|
|
15380
|
+
|
|
15381
|
+
|
|
15382
|
+
|
|
15383
|
+
|
|
15384
|
+
|
|
15385
|
+
var options = {};
|
|
15386
|
+
|
|
15387
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
15388
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
15389
|
+
|
|
15390
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
15391
|
+
|
|
15392
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
15393
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
15394
|
+
|
|
15395
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_RevertQuestionnaire_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
15396
|
+
|
|
15397
|
+
|
|
15398
|
+
|
|
15399
|
+
|
|
15400
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_RevertQuestionnaire_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_RevertQuestionnaire_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_RevertQuestionnaire_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
15401
|
+
|
|
15402
|
+
|
|
14720
15403
|
/***/ }),
|
|
14721
15404
|
|
|
14722
15405
|
/***/ "./style/RulesForm.css":
|
|
@@ -15098,4 +15781,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
15098
15781
|
/***/ })
|
|
15099
15782
|
|
|
15100
15783
|
}]);
|
|
15101
|
-
//# sourceMappingURL=lib_index_js.
|
|
15784
|
+
//# sourceMappingURL=lib_index_js.16b532b655cd2906e04a.js.map
|