mito-ai 0.1.56__py3-none-any.whl → 0.1.58__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mito_ai/__init__.py +17 -21
- mito_ai/_version.py +1 -1
- mito_ai/anthropic_client.py +24 -14
- mito_ai/chart_wizard/__init__.py +3 -0
- mito_ai/chart_wizard/handlers.py +113 -0
- mito_ai/chart_wizard/urls.py +26 -0
- mito_ai/completions/completion_handlers/agent_auto_error_fixup_handler.py +6 -8
- mito_ai/completions/completion_handlers/agent_execution_handler.py +6 -8
- mito_ai/completions/completion_handlers/chat_completion_handler.py +13 -17
- mito_ai/completions/completion_handlers/code_explain_handler.py +13 -17
- mito_ai/completions/completion_handlers/completion_handler.py +14 -7
- mito_ai/completions/completion_handlers/inline_completer_handler.py +5 -6
- mito_ai/completions/completion_handlers/scratchpad_result_handler.py +64 -0
- mito_ai/completions/completion_handlers/smart_debug_handler.py +13 -17
- mito_ai/completions/completion_handlers/utils.py +3 -7
- mito_ai/completions/handlers.py +36 -21
- mito_ai/completions/message_history.py +8 -10
- mito_ai/completions/models.py +23 -2
- mito_ai/completions/prompt_builders/agent_smart_debug_prompt.py +5 -3
- mito_ai/completions/prompt_builders/agent_system_message.py +97 -5
- mito_ai/completions/prompt_builders/chart_add_field_prompt.py +35 -0
- mito_ai/completions/prompt_builders/chart_conversion_prompt.py +27 -0
- mito_ai/completions/prompt_builders/chat_system_message.py +2 -0
- mito_ai/completions/prompt_builders/prompt_constants.py +28 -0
- mito_ai/completions/prompt_builders/scratchpad_result_prompt.py +17 -0
- mito_ai/constants.py +8 -1
- mito_ai/enterprise/__init__.py +1 -1
- mito_ai/enterprise/litellm_client.py +137 -0
- mito_ai/log/handlers.py +1 -1
- mito_ai/openai_client.py +10 -90
- mito_ai/{completions/providers.py → provider_manager.py} +157 -53
- mito_ai/settings/enterprise_handler.py +26 -0
- mito_ai/settings/urls.py +2 -0
- mito_ai/streamlit_conversion/agent_utils.py +2 -30
- mito_ai/streamlit_conversion/streamlit_agent_handler.py +48 -46
- mito_ai/streamlit_preview/handlers.py +6 -3
- mito_ai/streamlit_preview/urls.py +5 -3
- mito_ai/tests/message_history/test_generate_short_chat_name.py +72 -28
- mito_ai/tests/providers/test_anthropic_client.py +174 -16
- mito_ai/tests/providers/test_azure.py +13 -13
- mito_ai/tests/providers/test_capabilities.py +14 -17
- mito_ai/tests/providers/test_gemini_client.py +14 -13
- mito_ai/tests/providers/test_model_resolution.py +145 -89
- mito_ai/tests/providers/test_openai_client.py +209 -13
- mito_ai/tests/providers/test_provider_limits.py +5 -5
- mito_ai/tests/providers/test_providers.py +229 -51
- mito_ai/tests/providers/test_retry_logic.py +13 -22
- mito_ai/tests/providers/utils.py +4 -4
- mito_ai/tests/streamlit_conversion/test_streamlit_agent_handler.py +57 -85
- mito_ai/tests/streamlit_preview/test_streamlit_preview_handler.py +4 -1
- mito_ai/tests/test_enterprise_mode.py +162 -0
- mito_ai/tests/test_model_utils.py +271 -0
- mito_ai/utils/anthropic_utils.py +8 -6
- mito_ai/utils/gemini_utils.py +0 -3
- mito_ai/utils/litellm_utils.py +84 -0
- mito_ai/utils/model_utils.py +178 -0
- mito_ai/utils/open_ai_utils.py +0 -8
- mito_ai/utils/provider_utils.py +6 -21
- mito_ai/utils/telemetry_utils.py +14 -2
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +102 -102
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
- mito_ai-0.1.56.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.dfd7975de75d64db80d6.js → mito_ai-0.1.58.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.03302cc521d72eb56b00.js +2992 -282
- mito_ai-0.1.58.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.03302cc521d72eb56b00.js.map +1 -0
- mito_ai-0.1.56.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.1e7b5cf362385f109883.js → mito_ai-0.1.58.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.570df809a692f53a7ab7.js +17 -17
- mito_ai-0.1.56.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.1e7b5cf362385f109883.js.map → mito_ai-0.1.58.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.570df809a692f53a7ab7.js.map +1 -1
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/themes/mito_ai/index.css +7 -2
- {mito_ai-0.1.56.dist-info → mito_ai-0.1.58.dist-info}/METADATA +2 -1
- {mito_ai-0.1.56.dist-info → mito_ai-0.1.58.dist-info}/RECORD +94 -81
- mito_ai-0.1.56.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.dfd7975de75d64db80d6.js.map +0 -1
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.f5d476ac514294615881.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.f5d476ac514294615881.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_apis_signOut_mjs-node_module-75790d.688c25857e7b81b1740f.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_auth_dist_esm_providers_cognito_tokenProvider_tokenProvider_-72f1c8.a917210f057fcfe224ad.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_dist_esm_index_mjs.6bac1a8c4cc93f15f6b7.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_aws-amplify_ui-react_dist_esm_index_mjs.4fcecd65bef9e9847609.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_react-dom_client_js-node_modules_aws-amplify_ui-react_dist_styles_css.b43d4249e4d3dac9ad7b.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.56.data → mito_ai-0.1.58.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.56.data → mito_ai-0.1.58.data}/data/share/jupyter/labextensions/mito_ai/themes/mito_ai/index.js +0 -0
- {mito_ai-0.1.56.dist-info → mito_ai-0.1.58.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.56.dist-info → mito_ai-0.1.58.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.56.dist-info → mito_ai-0.1.58.dist-info}/licenses/LICENSE +0 -0
|
@@ -489,6 +489,25 @@ class ChatHistoryManager {
|
|
|
489
489
|
});
|
|
490
490
|
return agentExecutionMetadata;
|
|
491
491
|
}
|
|
492
|
+
addScratchpadResultMessage(activeThreadId, scratchpadResult) {
|
|
493
|
+
const scratchpadResultMetadata = {
|
|
494
|
+
promptType: 'agent:scratchpad-result',
|
|
495
|
+
threadId: activeThreadId,
|
|
496
|
+
scratchpadResult: scratchpadResult,
|
|
497
|
+
};
|
|
498
|
+
// Add empty user message to display history (like agent execution does for empty input)
|
|
499
|
+
const userMessage = {
|
|
500
|
+
role: 'user',
|
|
501
|
+
content: ''
|
|
502
|
+
};
|
|
503
|
+
this.displayOptimizedChatHistory.push({
|
|
504
|
+
message: userMessage,
|
|
505
|
+
type: 'openai message',
|
|
506
|
+
promptType: 'agent:scratchpad-result',
|
|
507
|
+
scratchpadResult: scratchpadResult,
|
|
508
|
+
});
|
|
509
|
+
return scratchpadResultMetadata;
|
|
510
|
+
}
|
|
492
511
|
addSmartDebugMessage(activeThreadId, errorMessage) {
|
|
493
512
|
const activeCellID = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.getActiveCellID)(this.notebookTracker) || '';
|
|
494
513
|
const activeCellCode = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.getCellCodeByID)(this.notebookTracker, activeCellID) || '';
|
|
@@ -1855,9 +1874,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1855
1874
|
/* harmony import */ var _components_AgentComponents_GetCellOutputToolUI__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../components/AgentComponents/GetCellOutputToolUI */ "./lib/components/AgentComponents/GetCellOutputToolUI.js");
|
|
1856
1875
|
/* harmony import */ var _components_AgentComponents_AssumptionToolUI__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../components/AgentComponents/AssumptionToolUI */ "./lib/components/AgentComponents/AssumptionToolUI.js");
|
|
1857
1876
|
/* harmony import */ var _components_SelectedContextContainer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../components/SelectedContextContainer */ "./lib/components/SelectedContextContainer.js");
|
|
1858
|
-
/* harmony import */ var
|
|
1859
|
-
/* harmony import */ var
|
|
1860
|
-
/* harmony import */ var
|
|
1877
|
+
/* harmony import */ var _components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../components/AgentComponents/RunAllCellsToolUI */ "./lib/components/AgentComponents/RunAllCellsToolUI.js");
|
|
1878
|
+
/* harmony import */ var _components_AgentComponents_AskUserQuestionToolUI__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../components/AgentComponents/AskUserQuestionToolUI */ "./lib/components/AgentComponents/AskUserQuestionToolUI.js");
|
|
1879
|
+
/* harmony import */ var _components_AgentComponents_ScratchpadToolUI__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../components/AgentComponents/ScratchpadToolUI */ "./lib/components/AgentComponents/ScratchpadToolUI.js");
|
|
1880
|
+
/* harmony import */ var _components_AgentComponents_CreateStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../components/AgentComponents/CreateStreamlitAppToolUI */ "./lib/components/AgentComponents/CreateStreamlitAppToolUI.js");
|
|
1881
|
+
/* harmony import */ var _components_AgentComponents_EditStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../components/AgentComponents/EditStreamlitAppToolUI */ "./lib/components/AgentComponents/EditStreamlitAppToolUI.js");
|
|
1861
1882
|
/*
|
|
1862
1883
|
* Copyright (c) Saga Inc.
|
|
1863
1884
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -1885,7 +1906,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1885
1906
|
|
|
1886
1907
|
|
|
1887
1908
|
|
|
1888
|
-
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mitoAIConnectionError, mitoAIConnectionErrorType, notebookTracker, renderMimeRegistry, isLastAiMessage, isLastMessage, operatingSystem, previewAICode, acceptAICode, rejectAICode, contextManager, codeReviewStatus, setNextSteps, agentModeEnabled, additionalContext, handleSubmitUserMessage, scratchpadResult, }) => {
|
|
1889
1912
|
const [isEditing, setIsEditing] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
1890
1913
|
if (message.role !== 'user' && message.role !== 'assistant') {
|
|
1891
1914
|
return null;
|
|
@@ -1915,7 +1938,7 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1915
1938
|
setNextSteps(agentResponse.next_steps);
|
|
1916
1939
|
}
|
|
1917
1940
|
if (isEditing) {
|
|
1918
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(), onCancel: handleCancel, isEditing: isEditing, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled:
|
|
1941
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatInput__WEBPACK_IMPORTED_MODULE_4__["default"], { app: app, initialContent: message.content.replace(/```[\s\S]*?```/g, '').trim(), onCancel: handleCancel, isEditing: isEditing, contextManager: contextManager, notebookTracker: notebookTracker, agentModeEnabled: agentModeEnabled, handleSubmitUserMessage: handleSubmitUserMessageAndCloseEditing, messageIndex: messageIndex }));
|
|
1919
1942
|
}
|
|
1920
1943
|
if (mitoAIConnectionError) {
|
|
1921
1944
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_5__.classNames)("message") },
|
|
@@ -1977,12 +2000,18 @@ const ChatMessage = ({ app, message, promptType, agentResponse, messageIndex, mi
|
|
|
1977
2000
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_Pencil__WEBPACK_IMPORTED_MODULE_18__["default"], null))),
|
|
1978
2001
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'get_cell_output' &&
|
|
1979
2002
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_GetCellOutputToolUI__WEBPACK_IMPORTED_MODULE_19__["default"], null),
|
|
2003
|
+
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'scratchpad' &&
|
|
2004
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_ScratchpadToolUI__WEBPACK_IMPORTED_MODULE_20__["default"], { scratchpadCode: agentResponse.scratchpad_code, scratchpadSummary: agentResponse.scratchpad_summary, scratchpadResult: scratchpadResult, renderMimeRegistry: renderMimeRegistry }),
|
|
1980
2005
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'run_all_cells' && agentModeEnabled &&
|
|
1981
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
2006
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_RunAllCellsToolUI__WEBPACK_IMPORTED_MODULE_21__["default"], null),
|
|
2007
|
+
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'ask_user_question' &&
|
|
2008
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_AskUserQuestionToolUI__WEBPACK_IMPORTED_MODULE_22__["default"], { question: agentResponse.question || '', answers: agentResponse.answers, isLastMessage: isLastMessage, onAnswerSelected: (answer) => {
|
|
2009
|
+
handleSubmitUserMessage(answer);
|
|
2010
|
+
} }),
|
|
1982
2011
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'create_streamlit_app' && agentModeEnabled &&
|
|
1983
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
2012
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_CreateStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_23__["default"], { isRunning: isLastMessage }),
|
|
1984
2013
|
(agentResponse === null || agentResponse === void 0 ? void 0 : agentResponse.type) === 'edit_streamlit_app' && agentModeEnabled &&
|
|
1985
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
2014
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_EditStreamlitAppToolUI__WEBPACK_IMPORTED_MODULE_24__["default"], { isRunning: isLastMessage })));
|
|
1986
2015
|
};
|
|
1987
2016
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatMessage);
|
|
1988
2017
|
|
|
@@ -2876,6 +2905,23 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
2876
2905
|
};
|
|
2877
2906
|
await _sendMessageAndSaveResponse(completionRequest, newChatHistoryManager);
|
|
2878
2907
|
};
|
|
2908
|
+
const sendScratchpadResultMessage = async (scratchpadResult) => {
|
|
2909
|
+
// Step 0: reset the state for a new message
|
|
2910
|
+
resetForNewMessage();
|
|
2911
|
+
// Step 1: Add the scratchpad result message to the chat history
|
|
2912
|
+
const newChatHistoryManager = getDuplicateChatHistoryManager();
|
|
2913
|
+
const scratchpadResultMetadata = newChatHistoryManager.addScratchpadResultMessage(activeThreadIdRef.current, scratchpadResult);
|
|
2914
|
+
setChatHistoryManager(newChatHistoryManager);
|
|
2915
|
+
setLoadingStatus('thinking');
|
|
2916
|
+
// Step 2: Send the message to the AI
|
|
2917
|
+
const completionRequest = {
|
|
2918
|
+
type: 'agent:scratchpad-result',
|
|
2919
|
+
message_id: _lumino_coreutils__WEBPACK_IMPORTED_MODULE_2__.UUID.uuid4(),
|
|
2920
|
+
metadata: scratchpadResultMetadata,
|
|
2921
|
+
stream: false
|
|
2922
|
+
};
|
|
2923
|
+
await _sendMessageAndSaveResponse(completionRequest, newChatHistoryManager);
|
|
2924
|
+
};
|
|
2879
2925
|
/*
|
|
2880
2926
|
Send whatever message is currently in the chat input
|
|
2881
2927
|
*/
|
|
@@ -3024,8 +3070,8 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3024
3070
|
}
|
|
3025
3071
|
else {
|
|
3026
3072
|
const content = (_b = (_a = aiResponse.items[0]) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : '';
|
|
3027
|
-
if (completionRequest.metadata.promptType === 'agent:execution' || completionRequest.metadata.promptType === 'agent:autoErrorFixup') {
|
|
3028
|
-
// Agent:Execution prompts return a CellUpdate object that we need to parse
|
|
3073
|
+
if (completionRequest.metadata.promptType === 'agent:execution' || completionRequest.metadata.promptType === 'agent:scratchpad-result' || completionRequest.metadata.promptType === 'agent:autoErrorFixup') {
|
|
3074
|
+
// Agent:Execution and Agent:ScratchpadResult prompts return a CellUpdate object that we need to parse
|
|
3029
3075
|
const agentResponse = JSON.parse(content);
|
|
3030
3076
|
newChatHistoryManager.addAIMessageFromAgentResponse(agentResponse);
|
|
3031
3077
|
}
|
|
@@ -3087,6 +3133,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3087
3133
|
addAIMessageFromResponseAndUpdateState,
|
|
3088
3134
|
getDuplicateChatHistoryManager,
|
|
3089
3135
|
sendAgentExecutionMessage,
|
|
3136
|
+
sendScratchpadResultMessage,
|
|
3090
3137
|
sendAgentSmartDebugMessage,
|
|
3091
3138
|
agentReview,
|
|
3092
3139
|
agentTargetNotebookPanelRef,
|
|
@@ -3339,7 +3386,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3339
3386
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentComponents_ErrorFixupToolUI__WEBPACK_IMPORTED_MODULE_36__["default"], { key: index, messages: displayOptimizedChat, renderMimeRegistry: renderMimeRegistry, notebookTracker: notebookTracker }));
|
|
3340
3387
|
}
|
|
3341
3388
|
else {
|
|
3342
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_37__["default"], { key: index, message: displayOptimizedChat.message, promptType: displayOptimizedChat.promptType, agentResponse: displayOptimizedChat.agentResponse, codeCellID: displayOptimizedChat.codeCellID, mitoAIConnectionError: displayOptimizedChat.type === 'connection error', mitoAIConnectionErrorType: displayOptimizedChat.mitoAIConnectionErrorType || null, messageIndex: index, notebookTracker: notebookTracker, renderMimeRegistry: renderMimeRegistry, app: app, isLastAiMessage: index === lastAIMessagesIndex, isLastMessage: index === displayOptimizedChatHistory.length - 1, operatingSystem: operatingSystem, previewAICode: previewAICodeToActiveCell, acceptAICode: acceptAICode, rejectAICode: rejectAICode, handleSubmitUserMessage: handleSubmitUserMessage, contextManager: contextManager, codeReviewStatus: codeReviewStatus, setNextSteps: setNextSteps, agentModeEnabled: agentModeEnabled, additionalContext: displayOptimizedChat.additionalContext }));
|
|
3389
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_ChatMessage__WEBPACK_IMPORTED_MODULE_37__["default"], { key: index, message: displayOptimizedChat.message, promptType: displayOptimizedChat.promptType, agentResponse: displayOptimizedChat.agentResponse, codeCellID: displayOptimizedChat.codeCellID, mitoAIConnectionError: displayOptimizedChat.type === 'connection error', mitoAIConnectionErrorType: displayOptimizedChat.mitoAIConnectionErrorType || null, messageIndex: index, notebookTracker: notebookTracker, renderMimeRegistry: renderMimeRegistry, app: app, isLastAiMessage: index === lastAIMessagesIndex, isLastMessage: index === displayOptimizedChatHistory.length - 1, operatingSystem: operatingSystem, previewAICode: previewAICodeToActiveCell, acceptAICode: acceptAICode, rejectAICode: rejectAICode, handleSubmitUserMessage: handleSubmitUserMessage, contextManager: contextManager, codeReviewStatus: codeReviewStatus, setNextSteps: setNextSteps, agentModeEnabled: agentModeEnabled, additionalContext: displayOptimizedChat.additionalContext, scratchpadResult: displayOptimizedChat.scratchpadResult }));
|
|
3343
3390
|
}
|
|
3344
3391
|
}).filter(message => message !== null),
|
|
3345
3392
|
loadingStatus === 'thinking' &&
|
|
@@ -3958,6 +4005,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3958
4005
|
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/strings */ "./lib/utils/strings.js");
|
|
3959
4006
|
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
3960
4007
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./lib/Extensions/AiChat/utils.js");
|
|
4008
|
+
/* harmony import */ var _utils_scratchpadExecution__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/scratchpadExecution */ "./lib/utils/scratchpadExecution.js");
|
|
3961
4009
|
/*
|
|
3962
4010
|
* Copyright (c) Saga Inc.
|
|
3963
4011
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -3971,8 +4019,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3971
4019
|
|
|
3972
4020
|
|
|
3973
4021
|
|
|
4022
|
+
|
|
3974
4023
|
const AGENT_EXECUTION_DEPTH_LIMIT = 20;
|
|
3975
|
-
const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, websocketClient, documentManager, chatHistoryManagerRef, activeThreadIdRef, activeRequestControllerRef, setLoadingStatus, setAutoScrollFollowMode, setHasCheckpoint, addAIMessageFromResponseAndUpdateState, getDuplicateChatHistoryManager, sendAgentExecutionMessage, sendAgentSmartDebugMessage, agentReview, agentTargetNotebookPanelRef, audioContextRef, }) => {
|
|
4024
|
+
const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, websocketClient, documentManager, chatHistoryManagerRef, activeThreadIdRef, activeRequestControllerRef, setLoadingStatus, setAutoScrollFollowMode, setHasCheckpoint, addAIMessageFromResponseAndUpdateState, getDuplicateChatHistoryManager, sendAgentExecutionMessage, sendScratchpadResultMessage, sendAgentSmartDebugMessage, agentReview, agentTargetNotebookPanelRef, audioContextRef, }) => {
|
|
3976
4025
|
// Agent execution state
|
|
3977
4026
|
const [agentExecutionStatus, setAgentExecutionStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('idle');
|
|
3978
4027
|
const shouldContinueAgentExecution = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true);
|
|
@@ -4020,6 +4069,7 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
4020
4069
|
let isAgentFinished = false;
|
|
4021
4070
|
let agentExecutionDepth = 1;
|
|
4022
4071
|
let sendCellIDOutput = undefined;
|
|
4072
|
+
let processedScratchpadResult = undefined;
|
|
4023
4073
|
// Sometimes its useful to send extra information back to the agent. For example,
|
|
4024
4074
|
// if the agent tries to create a streamlit app and it errors, we want to let the
|
|
4025
4075
|
// orchestrator agent know about the issue.
|
|
@@ -4039,6 +4089,11 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
4039
4089
|
if (agentExecutionDepth === 1) {
|
|
4040
4090
|
await sendAgentExecutionMessage(input, messageIndex, undefined, additionalContext);
|
|
4041
4091
|
}
|
|
4092
|
+
else if (processedScratchpadResult !== undefined) {
|
|
4093
|
+
// If we have scratchpad results, send them using the scratchpad result message type
|
|
4094
|
+
await sendScratchpadResultMessage(processedScratchpadResult);
|
|
4095
|
+
processedScratchpadResult = undefined;
|
|
4096
|
+
}
|
|
4042
4097
|
else {
|
|
4043
4098
|
await sendAgentExecutionMessage(messageToShareWithAgent || '', undefined, sendCellIDOutput);
|
|
4044
4099
|
// Reset flag back to false until the agent requests the active cell output again
|
|
@@ -4056,7 +4111,7 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
4056
4111
|
const securityCheck = (0,_utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_7__.checkForBlacklistedWords)(aiGeneratedCode);
|
|
4057
4112
|
if (!securityCheck.safe) {
|
|
4058
4113
|
console.error('Security Warning:', securityCheck.reason);
|
|
4059
|
-
addAIMessageFromResponseAndUpdateState(`I cannot execute this code
|
|
4114
|
+
addAIMessageFromResponseAndUpdateState(`I cannot automatically execute this code because it did not pass my security checks. ${securityCheck.reason}. If you decide that this code is safe, you can manually run it.`, 'agent:execution', chatHistoryManagerRef.current);
|
|
4060
4115
|
await markAgentForStopping();
|
|
4061
4116
|
break;
|
|
4062
4117
|
}
|
|
@@ -4144,6 +4199,13 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
4144
4199
|
}
|
|
4145
4200
|
}
|
|
4146
4201
|
}
|
|
4202
|
+
if (agentResponse.type === 'ask_user_question') {
|
|
4203
|
+
// When the agent asks a question, we stop execution and wait for the user's response.
|
|
4204
|
+
// The agent will automatically resume when the user responds
|
|
4205
|
+
await markAgentForStopping();
|
|
4206
|
+
isAgentFinished = true;
|
|
4207
|
+
break;
|
|
4208
|
+
}
|
|
4147
4209
|
if (agentResponse.type === 'create_streamlit_app') {
|
|
4148
4210
|
// Create new preview using the service
|
|
4149
4211
|
const createStreamlitAppPrompt = agentResponse.streamlit_app_prompt || '';
|
|
@@ -4165,6 +4227,27 @@ const useAgentExecution = ({ notebookTracker, app, streamlitPreviewManager, webs
|
|
|
4165
4227
|
messageToShareWithAgent = streamlitPreviewResponse.message;
|
|
4166
4228
|
}
|
|
4167
4229
|
}
|
|
4230
|
+
if (agentResponse.type === 'scratchpad' && agentResponse.scratchpad_code) {
|
|
4231
|
+
// Check the scratchpad code for blacklisted words before executing it
|
|
4232
|
+
const securityCheck = (0,_utils_blacklistedWords__WEBPACK_IMPORTED_MODULE_7__.checkForBlacklistedWords)(agentResponse.scratchpad_code);
|
|
4233
|
+
if (!securityCheck.safe) {
|
|
4234
|
+
console.error('Security Warning:', securityCheck.reason);
|
|
4235
|
+
addAIMessageFromResponseAndUpdateState(`I cannot automatically execute this code because it did not pass my security checks. ${securityCheck.reason}. If you decide that this code is safe, you can manually run it.`, 'agent:execution', chatHistoryManagerRef.current);
|
|
4236
|
+
await markAgentForStopping();
|
|
4237
|
+
break;
|
|
4238
|
+
}
|
|
4239
|
+
// Execute scratchpad code silently
|
|
4240
|
+
setLoadingStatus('running-code');
|
|
4241
|
+
let scratchpadResult;
|
|
4242
|
+
try {
|
|
4243
|
+
scratchpadResult = await (0,_utils_scratchpadExecution__WEBPACK_IMPORTED_MODULE_9__.executeScratchpadCode)(agentTargetNotebookPanelRef.current, agentResponse.scratchpad_code);
|
|
4244
|
+
}
|
|
4245
|
+
finally {
|
|
4246
|
+
setLoadingStatus(undefined);
|
|
4247
|
+
}
|
|
4248
|
+
// Format the results for the agent
|
|
4249
|
+
processedScratchpadResult = (0,_utils_scratchpadExecution__WEBPACK_IMPORTED_MODULE_9__.formatScratchpadResult)(scratchpadResult);
|
|
4250
|
+
}
|
|
4168
4251
|
}
|
|
4169
4252
|
if (agentExecutionDepth > AGENT_EXECUTION_DEPTH_LIMIT) {
|
|
4170
4253
|
addAIMessageFromResponseAndUpdateState("Since I've been working for a while now, give my work a review and then tell me how to continue.", 'agent:execution', chatHistoryManagerRef.current);
|
|
@@ -5337,7 +5420,16 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
5337
5420
|
// Create a copy to avoid mutating the original
|
|
5338
5421
|
const correctedResponse = { ...agentResponse };
|
|
5339
5422
|
// Ensure type is valid. Default to finished_task if not valid.
|
|
5340
|
-
const validTypes = [
|
|
5423
|
+
const validTypes = [
|
|
5424
|
+
'cell_update',
|
|
5425
|
+
'get_cell_output',
|
|
5426
|
+
'run_all_cells',
|
|
5427
|
+
'ask_user_question',
|
|
5428
|
+
'finished_task',
|
|
5429
|
+
'create_streamlit_app',
|
|
5430
|
+
'edit_streamlit_app',
|
|
5431
|
+
'scratchpad'
|
|
5432
|
+
];
|
|
5341
5433
|
correctedResponse.type = (correctedResponse.type && validTypes.includes(correctedResponse.type))
|
|
5342
5434
|
? correctedResponse.type
|
|
5343
5435
|
: 'finished_task';
|
|
@@ -5352,6 +5444,13 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
5352
5444
|
if (correctedResponse.next_steps !== undefined && correctedResponse.next_steps !== null) {
|
|
5353
5445
|
correctedResponse.next_steps = correctStringArray(correctedResponse.next_steps);
|
|
5354
5446
|
}
|
|
5447
|
+
// Correct ask_user_question
|
|
5448
|
+
if (correctedResponse.answers !== undefined && correctedResponse.answers !== null) {
|
|
5449
|
+
correctedResponse.answers = correctStringArray(correctedResponse.answers);
|
|
5450
|
+
}
|
|
5451
|
+
if (correctedResponse.type === 'ask_user_question' && typeof correctedResponse.question !== 'string') {
|
|
5452
|
+
correctedResponse.question = "";
|
|
5453
|
+
}
|
|
5355
5454
|
// Correct analysis_assumptions - handle string to array conversion
|
|
5356
5455
|
if (correctedResponse.analysis_assumptions !== undefined && correctedResponse.analysis_assumptions !== null) {
|
|
5357
5456
|
correctedResponse.analysis_assumptions = correctStringArray(correctedResponse.analysis_assumptions);
|
|
@@ -5361,6 +5460,13 @@ function validateAndCorrectAgentResponse(agentResponse) {
|
|
|
5361
5460
|
// Correct streamlit_app_prompt - ensure it's a string when present
|
|
5362
5461
|
const editStreamlitAppPromptType = typeof correctedResponse.streamlit_app_prompt;
|
|
5363
5462
|
correctedResponse.streamlit_app_prompt = editStreamlitAppPromptType === 'string' ? correctedResponse.streamlit_app_prompt : undefined;
|
|
5463
|
+
// Correct scratchpad_code and scratchpad_summary - ensure they're strings when present
|
|
5464
|
+
if (correctedResponse.type === 'scratchpad') {
|
|
5465
|
+
const scratchpadCodeType = typeof correctedResponse.scratchpad_code;
|
|
5466
|
+
correctedResponse.scratchpad_code = scratchpadCodeType === 'string' ? correctedResponse.scratchpad_code : undefined;
|
|
5467
|
+
const scratchpadSummaryType = typeof correctedResponse.scratchpad_summary;
|
|
5468
|
+
correctedResponse.scratchpad_summary = scratchpadSummaryType === 'string' ? correctedResponse.scratchpad_summary : undefined;
|
|
5469
|
+
}
|
|
5364
5470
|
// For now we don't validate the cell_update object itself, as this is more complex and has
|
|
5365
5471
|
// not caused issues thus far.
|
|
5366
5472
|
return correctedResponse;
|
|
@@ -7313,25 +7419,24 @@ const getAppNameFromNotebookID = (notebookID) => {
|
|
|
7313
7419
|
|
|
7314
7420
|
/***/ }),
|
|
7315
7421
|
|
|
7316
|
-
/***/ "./lib/Extensions/
|
|
7317
|
-
|
|
7318
|
-
!*** ./lib/Extensions/
|
|
7319
|
-
|
|
7422
|
+
/***/ "./lib/Extensions/ChartWizard/AddFieldButton.js":
|
|
7423
|
+
/*!******************************************************!*\
|
|
7424
|
+
!*** ./lib/Extensions/ChartWizard/AddFieldButton.js ***!
|
|
7425
|
+
\******************************************************/
|
|
7320
7426
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7321
7427
|
|
|
7322
7428
|
__webpack_require__.r(__webpack_exports__);
|
|
7323
7429
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7324
|
-
/* harmony export */ ContextManager: () => (/* binding */ ContextManager),
|
|
7325
|
-
/* harmony export */ ContextManagerPlugin: () => (/* binding */ ContextManagerPlugin),
|
|
7326
|
-
/* harmony export */ IContextManager: () => (/* binding */ IContextManager),
|
|
7327
7430
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7328
7431
|
/* harmony export */ });
|
|
7329
|
-
/* harmony import */ var
|
|
7330
|
-
/* harmony import */ var
|
|
7331
|
-
/* harmony import */ var
|
|
7332
|
-
/* harmony import */ var
|
|
7333
|
-
/* harmony import */ var
|
|
7334
|
-
/* harmony import */ var
|
|
7432
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7433
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7434
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
7435
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
7436
|
+
/* harmony import */ var _utils_parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/parser */ "./lib/Extensions/ChartWizard/utils/parser.js");
|
|
7437
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
7438
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/strings */ "./lib/utils/strings.js");
|
|
7439
|
+
/* harmony import */ var _style_AddFieldButton_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/AddFieldButton.css */ "./style/AddFieldButton.css");
|
|
7335
7440
|
/*
|
|
7336
7441
|
* Copyright (c) Saga Inc.
|
|
7337
7442
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -7340,183 +7445,1440 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7340
7445
|
|
|
7341
7446
|
|
|
7342
7447
|
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
}
|
|
7358
|
-
// As soon as the notebook is opened, fetch the files since these are not related to the kernel,
|
|
7359
|
-
// but to the notebook itself. This is useful so we can tell the agent which files are available
|
|
7360
|
-
// or let the user select a file from the dropdown menu before the kernel is started.
|
|
7361
|
-
// We use the notebookPanel.id to identify the notebook because we might need to access
|
|
7362
|
-
// NotebookContext even before the kernel is started. For example, to figure out
|
|
7363
|
-
// which files are available.
|
|
7364
|
-
const updatedFiles = await (0,_FileInspector__WEBPACK_IMPORTED_MODULE_2__.getFiles)(app, notebookPanel);
|
|
7365
|
-
this.updateNotebookFiles(notebookPanel.id, updatedFiles);
|
|
7366
|
-
// Listen for kernel restart or shut down events and clear the variables for this notebook
|
|
7367
|
-
notebookPanel.context.sessionContext.statusChanged.connect((sender, status) => {
|
|
7368
|
-
if (status === 'restarting' || status === 'terminating' || status === 'unknown') {
|
|
7369
|
-
// Clear the variables for this specific notebook, but don't clear the files
|
|
7370
|
-
// as they have not changed.
|
|
7371
|
-
this.updateNotebookVariables(notebookPanel.id, []); // Clear variables for this specific notebook
|
|
7372
|
-
}
|
|
7373
|
-
});
|
|
7374
|
-
// Listen to kernel messages
|
|
7375
|
-
notebookPanel.context.sessionContext.iopubMessage.connect(async (sender, msg) => {
|
|
7376
|
-
// Watch for execute_input messages, which indicate is a request to execute code.
|
|
7377
|
-
// Previosuly, we watched for 'execute_result' messages, but these are only returned
|
|
7378
|
-
// from the kernel when a code cell prints a value to the output cell, which is not what we want.
|
|
7379
|
-
// TODO: Check if there is a race condition where we might end up fetching variables before the
|
|
7380
|
-
// code is executed. I don't think this is the case because the kernel runs in one thread I believe.
|
|
7381
|
-
// TODO: Eventually we should create a document manager listener so if the user uploads a new file
|
|
7382
|
-
// to jupyter, we can update the available files even if they have not executed a kernel message.
|
|
7383
|
-
if (msg.header.msg_type === 'execute_input') {
|
|
7384
|
-
void (0,_VariableInspector__WEBPACK_IMPORTED_MODULE_3__.fetchVariablesAndUpdateState)(notebookPanel, this.updateNotebookVariables.bind(this, notebookPanel.id));
|
|
7385
|
-
const updatedFiles = await (0,_FileInspector__WEBPACK_IMPORTED_MODULE_2__.getFiles)(app, notebookPanel);
|
|
7386
|
-
this.updateNotebookFiles(notebookPanel.id, updatedFiles);
|
|
7387
|
-
}
|
|
7448
|
+
|
|
7449
|
+
|
|
7450
|
+
/**
|
|
7451
|
+
* Component that renders a button to add a new field to the chart configuration.
|
|
7452
|
+
* When clicked, prompts the user for a description and uses LLM to add the field.
|
|
7453
|
+
*/
|
|
7454
|
+
const AddFieldButton = ({ code, onFieldAdded, clearPendingUpdate, onLoadingStateChange }) => {
|
|
7455
|
+
/**
|
|
7456
|
+
* Handles adding a new field to the chart configuration.
|
|
7457
|
+
*/
|
|
7458
|
+
const handleAddField = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => {
|
|
7459
|
+
if (!code) {
|
|
7460
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('No source code available', 'error', {
|
|
7461
|
+
autoClose: 3000
|
|
7388
7462
|
});
|
|
7463
|
+
return;
|
|
7464
|
+
}
|
|
7465
|
+
// Create a component that manages its own input state
|
|
7466
|
+
// Use a ref to store the value so we can access it after dialog closes
|
|
7467
|
+
const inputValueRef = { current: '' };
|
|
7468
|
+
const InputDialogBody = () => {
|
|
7469
|
+
const [value, setValue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('');
|
|
7470
|
+
const textareaRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef(null);
|
|
7471
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7472
|
+
// Focus the textarea when component mounts
|
|
7473
|
+
// Use a small timeout to ensure the dialog is fully rendered and focusable
|
|
7474
|
+
const timeoutId = setTimeout(() => {
|
|
7475
|
+
if (textareaRef.current) {
|
|
7476
|
+
textareaRef.current.focus();
|
|
7477
|
+
// Also select any existing text for better UX
|
|
7478
|
+
textareaRef.current.select();
|
|
7479
|
+
}
|
|
7480
|
+
}, 100);
|
|
7481
|
+
return () => clearTimeout(timeoutId);
|
|
7482
|
+
}, []);
|
|
7483
|
+
const handleChange = (e) => {
|
|
7484
|
+
const newValue = e.target.value;
|
|
7485
|
+
setValue(newValue);
|
|
7486
|
+
inputValueRef.current = newValue;
|
|
7487
|
+
};
|
|
7488
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null,
|
|
7489
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "Describe what field you would like to add to the chart configuration:"),
|
|
7490
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("textarea", { ref: textareaRef, value: value, onChange: handleChange, placeholder: "e.g., font size for the title, background color, grid visibility...", className: "add-field-dialog-textarea" })));
|
|
7389
7491
|
};
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
if (!activeNotebook)
|
|
7400
|
-
return undefined;
|
|
7401
|
-
return this.getNotebookContext(activeNotebook.id);
|
|
7402
|
-
}
|
|
7403
|
-
updateNotebookVariables(notebookID, variables) {
|
|
7404
|
-
const context = this.notebookContexts.get(notebookID) || { variables: [], files: [] };
|
|
7405
|
-
context.variables = variables;
|
|
7406
|
-
this.notebookContexts.set(notebookID, context);
|
|
7407
|
-
}
|
|
7408
|
-
updateNotebookFiles(notebookID, files) {
|
|
7409
|
-
const context = this.notebookContexts.get(notebookID) || { variables: [], files: [] };
|
|
7410
|
-
context.files = files;
|
|
7411
|
-
this.notebookContexts.set(notebookID, context);
|
|
7412
|
-
}
|
|
7413
|
-
// Setup kernel execution listener
|
|
7414
|
-
setupKernelListener(app, notebookTracker) {
|
|
7415
|
-
// Start the kernel listener for the currently active notebook
|
|
7416
|
-
const notebookPanel = notebookTracker.currentWidget;
|
|
7417
|
-
void this._startKernelListener(app, notebookPanel);
|
|
7418
|
-
// Update the kernel listener whenever the active notebook changes
|
|
7419
|
-
notebookTracker.currentChanged.connect(async (_, notebookPanel) => {
|
|
7420
|
-
void this._startKernelListener(app, notebookPanel);
|
|
7492
|
+
// Show dialog to get user description
|
|
7493
|
+
const result = await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.showDialog)({
|
|
7494
|
+
title: 'Add New Field',
|
|
7495
|
+
body: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(InputDialogBody, null),
|
|
7496
|
+
buttons: [
|
|
7497
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.cancelButton({ label: 'Cancel' }),
|
|
7498
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Dialog.okButton({ label: 'Add Field' })
|
|
7499
|
+
],
|
|
7500
|
+
defaultButton: 1
|
|
7421
7501
|
});
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7502
|
+
if (!result.button.accept) {
|
|
7503
|
+
return;
|
|
7504
|
+
}
|
|
7505
|
+
// Get the input value from the ref
|
|
7506
|
+
const description = inputValueRef.current.trim();
|
|
7507
|
+
if (!description) {
|
|
7508
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Please provide a description of the field you want to add', 'warning', {
|
|
7509
|
+
autoClose: 3000
|
|
7510
|
+
});
|
|
7511
|
+
return;
|
|
7512
|
+
}
|
|
7513
|
+
// Log the field addition event with user input
|
|
7514
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_3__.logEvent)('chart_wizard_add_chart_field', {
|
|
7515
|
+
user_input: description
|
|
7516
|
+
});
|
|
7517
|
+
// Clear any pending debounced updates
|
|
7518
|
+
clearPendingUpdate();
|
|
7519
|
+
onLoadingStateChange(true);
|
|
7520
|
+
try {
|
|
7521
|
+
// Get existing variable names
|
|
7522
|
+
const parsed = (0,_utils_parser__WEBPACK_IMPORTED_MODULE_4__.parseChartConfig)(code);
|
|
7523
|
+
const existingVariables = parsed ? parsed.variables.map(v => v.name) : [];
|
|
7524
|
+
const response = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_3__.addChartField)(code, description, existingVariables);
|
|
7525
|
+
if (response.updated_code) {
|
|
7526
|
+
// Check if the response contains a code block
|
|
7527
|
+
// If no code block is found, the AI couldn't add the field
|
|
7528
|
+
const hasCodeBlock = response.updated_code.includes(_utils_strings__WEBPACK_IMPORTED_MODULE_5__.PYTHON_CODE_BLOCK_START_WITH_NEW_LINE);
|
|
7529
|
+
if (!hasCodeBlock) {
|
|
7530
|
+
// AI couldn't add the field and didn't return a code block
|
|
7531
|
+
console.log('AI response does not contain a code block - field addition was not possible.');
|
|
7532
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Unable to add the requested field. Please try a different description or ensure your request is clear and applicable to chart configuration.', 'warning', {
|
|
7533
|
+
autoClose: 5000
|
|
7534
|
+
});
|
|
7535
|
+
return;
|
|
7536
|
+
}
|
|
7537
|
+
// Extract code from markdown code blocks if present
|
|
7538
|
+
const extractedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_5__.removeMarkdownCodeFormatting)(response.updated_code);
|
|
7539
|
+
// Validate that extracted code is not empty
|
|
7540
|
+
if (!extractedCode || extractedCode.trim().length === 0) {
|
|
7541
|
+
console.error('Error: Extracted code is empty. Cannot update notebook cell.');
|
|
7542
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Failed to add field: The updated code is empty. Please try again.', 'error', {
|
|
7543
|
+
autoClose: 5000
|
|
7544
|
+
});
|
|
7545
|
+
return;
|
|
7546
|
+
}
|
|
7547
|
+
// Notify parent component of the updated code
|
|
7548
|
+
onFieldAdded(extractedCode);
|
|
7549
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Field added successfully!', 'success', {
|
|
7550
|
+
autoClose: 3000
|
|
7551
|
+
});
|
|
7552
|
+
}
|
|
7553
|
+
else {
|
|
7554
|
+
// Handle case where updated_code is missing, null, or empty
|
|
7555
|
+
console.error('Error: No updated code returned from server.');
|
|
7556
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Failed to add field: The server did not return updated code. Please try again.', 'error', {
|
|
7557
|
+
autoClose: 5000
|
|
7558
|
+
});
|
|
7559
|
+
}
|
|
7560
|
+
}
|
|
7561
|
+
catch (error) {
|
|
7562
|
+
console.error('Error adding field:', error);
|
|
7563
|
+
const errorMessage = error instanceof Error ? error.message : 'An unknown error occurred';
|
|
7564
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit(`Failed to add field: ${errorMessage}. Please try again.`, 'error', {
|
|
7565
|
+
autoClose: 5000
|
|
7566
|
+
});
|
|
7567
|
+
}
|
|
7568
|
+
finally {
|
|
7569
|
+
onLoadingStateChange(false);
|
|
7570
|
+
}
|
|
7571
|
+
}, [code, onFieldAdded, clearPendingUpdate, onLoadingStateChange]);
|
|
7572
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "add-field-container" },
|
|
7573
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-purple add-field-button", onClick: handleAddField, type: "button" }, "+ Add New Field")));
|
|
7433
7574
|
};
|
|
7434
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
7575
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddFieldButton);
|
|
7435
7576
|
|
|
7436
7577
|
|
|
7437
7578
|
/***/ }),
|
|
7438
7579
|
|
|
7439
|
-
/***/ "./lib/Extensions/
|
|
7440
|
-
|
|
7441
|
-
!*** ./lib/Extensions/
|
|
7442
|
-
|
|
7580
|
+
/***/ "./lib/Extensions/ChartWizard/ChartWizardPlugin.js":
|
|
7581
|
+
/*!*********************************************************!*\
|
|
7582
|
+
!*** ./lib/Extensions/ChartWizard/ChartWizardPlugin.js ***!
|
|
7583
|
+
\*********************************************************/
|
|
7443
7584
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7444
7585
|
|
|
7445
7586
|
__webpack_require__.r(__webpack_exports__);
|
|
7446
7587
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7447
|
-
/* harmony export */
|
|
7588
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7448
7589
|
/* harmony export */ });
|
|
7449
|
-
/* harmony import */ var
|
|
7450
|
-
/* harmony import */ var
|
|
7590
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7591
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7592
|
+
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "./node_modules/react-dom/client.js");
|
|
7593
|
+
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/application */ "webpack/sharing/consume/default/@jupyterlab/application");
|
|
7594
|
+
/* harmony import */ var _jupyterlab_application__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_application__WEBPACK_IMPORTED_MODULE_2__);
|
|
7595
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
7596
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_3__);
|
|
7597
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
7598
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_4__);
|
|
7599
|
+
/* harmony import */ var _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @jupyterlab/cells */ "webpack/sharing/consume/default/@jupyterlab/cells");
|
|
7600
|
+
/* harmony import */ var _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_cells__WEBPACK_IMPORTED_MODULE_5__);
|
|
7601
|
+
/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @jupyterlab/rendermime */ "webpack/sharing/consume/default/@jupyterlab/rendermime");
|
|
7602
|
+
/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_6__);
|
|
7603
|
+
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @lumino/widgets */ "webpack/sharing/consume/default/@lumino/widgets");
|
|
7604
|
+
/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_7__);
|
|
7605
|
+
/* harmony import */ var _ChartWizardWidget__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ChartWizardWidget */ "./lib/Extensions/ChartWizard/ChartWizardWidget.js");
|
|
7606
|
+
/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../commands */ "./lib/commands.js");
|
|
7607
|
+
/* harmony import */ var _components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/TextAndIconButton */ "./lib/components/TextAndIconButton.js");
|
|
7608
|
+
/* harmony import */ var _icons_MagicWand__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../icons/MagicWand */ "./lib/icons/MagicWand.js");
|
|
7609
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
7610
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/notebook */ "./lib/utils/notebook.js");
|
|
7611
|
+
/* harmony import */ var _style_ChartWizardPlugin_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../style/ChartWizardPlugin.css */ "./style/ChartWizardPlugin.css");
|
|
7451
7612
|
/*
|
|
7452
7613
|
* Copyright (c) Saga Inc.
|
|
7453
7614
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7454
7615
|
*/
|
|
7455
7616
|
|
|
7456
|
-
/*
|
|
7457
|
-
Fetches all files in the current directory and updates the state of the files.
|
|
7458
|
-
*/
|
|
7459
|
-
const getFiles = async (app, notebookPanel) => {
|
|
7460
|
-
const fileManager = app.serviceManager.contents;
|
|
7461
|
-
const relativeNotebookPath = notebookPanel.context.path;
|
|
7462
|
-
const relativeDirectoryPath = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.dirname(relativeNotebookPath);
|
|
7463
|
-
try {
|
|
7464
|
-
const contents = await fileManager.get(relativeDirectoryPath);
|
|
7465
|
-
if (contents.type === 'directory') {
|
|
7466
|
-
// Filter for only csv and Excel files
|
|
7467
|
-
const data_files = contents.content.filter((file) => {
|
|
7468
|
-
var _a;
|
|
7469
|
-
const extension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
7470
|
-
return extension === 'csv' ||
|
|
7471
|
-
extension === 'xlsx' ||
|
|
7472
|
-
extension === 'xls' ||
|
|
7473
|
-
extension === 'xlsm';
|
|
7474
|
-
});
|
|
7475
|
-
// Map the files to the File type
|
|
7476
|
-
const files = data_files.map((file) => ({
|
|
7477
|
-
file_name: file.name
|
|
7478
|
-
}));
|
|
7479
|
-
// Update the state of the files
|
|
7480
|
-
return files;
|
|
7481
|
-
}
|
|
7482
|
-
else {
|
|
7483
|
-
// If the contents are not a directory, set the files to an empty array
|
|
7484
|
-
return [];
|
|
7485
|
-
}
|
|
7486
|
-
}
|
|
7487
|
-
catch (error) {
|
|
7488
|
-
console.error('Error listing directory contents:', error);
|
|
7489
|
-
return [];
|
|
7490
|
-
}
|
|
7491
|
-
};
|
|
7492
7617
|
|
|
7493
7618
|
|
|
7494
|
-
/***/ }),
|
|
7495
7619
|
|
|
7496
|
-
/***/ "./lib/Extensions/ContextManager/VariableInspector.js":
|
|
7497
|
-
/*!************************************************************!*\
|
|
7498
|
-
!*** ./lib/Extensions/ContextManager/VariableInspector.js ***!
|
|
7499
|
-
\************************************************************/
|
|
7500
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7501
7620
|
|
|
7502
|
-
__webpack_require__.r(__webpack_exports__);
|
|
7503
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7504
|
-
/* harmony export */ fetchVariablesAndUpdateState: () => (/* binding */ fetchVariablesAndUpdateState)
|
|
7505
|
-
/* harmony export */ });
|
|
7506
|
-
/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/services */ "webpack/sharing/consume/default/@jupyterlab/services");
|
|
7507
|
-
/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__);
|
|
7508
|
-
/*
|
|
7509
|
-
* Copyright (c) Saga Inc.
|
|
7510
|
-
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7511
|
-
*/
|
|
7512
7621
|
|
|
7513
|
-
// TODO: Use something like raw-loader to load an actual python file
|
|
7514
|
-
// to make it easier to modify the script without creating syntax errors.
|
|
7515
|
-
const pythonVariableInspectionScript = `import json
|
|
7516
|
-
import inspect
|
|
7517
7622
|
|
|
7518
7623
|
|
|
7519
|
-
|
|
7624
|
+
|
|
7625
|
+
|
|
7626
|
+
|
|
7627
|
+
|
|
7628
|
+
|
|
7629
|
+
|
|
7630
|
+
|
|
7631
|
+
const ChartWizardButton = ({ onButtonClick }) => {
|
|
7632
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
7633
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_TextAndIconButton__WEBPACK_IMPORTED_MODULE_9__["default"], { icon: _icons_MagicWand__WEBPACK_IMPORTED_MODULE_10__["default"], text: "Chart Wizard", title: "Chart Wizard", onClick: onButtonClick, variant: 'purple', width: 'fit-contents', iconPosition: 'left' })));
|
|
7634
|
+
};
|
|
7635
|
+
const ChartWizardPlugin = {
|
|
7636
|
+
id: 'mito-ai:chart-wizard',
|
|
7637
|
+
autoStart: true,
|
|
7638
|
+
requires: [_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_6__.IRenderMimeRegistry, _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_3__.ICommandPalette, _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_4__.INotebookTracker],
|
|
7639
|
+
optional: [_jupyterlab_application__WEBPACK_IMPORTED_MODULE_2__.ILayoutRestorer],
|
|
7640
|
+
activate: (app, rendermime, palette, notebookTracker, restorer) => {
|
|
7641
|
+
// Create the Chart Wizard widget
|
|
7642
|
+
const widget = new _ChartWizardWidget__WEBPACK_IMPORTED_MODULE_11__.ChartWizardWidget();
|
|
7643
|
+
widget.id = 'mito-ai-chart-wizard';
|
|
7644
|
+
widget.title.label = 'Chart Wizard';
|
|
7645
|
+
widget.title.closable = true;
|
|
7646
|
+
// Track and restore the widget state
|
|
7647
|
+
const tracker = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_3__.WidgetTracker({
|
|
7648
|
+
namespace: widget.id
|
|
7649
|
+
});
|
|
7650
|
+
// Function to open/update the Chart Wizard panel
|
|
7651
|
+
const openChartWizard = (chartData) => {
|
|
7652
|
+
// Update widget with new data if provided
|
|
7653
|
+
if (chartData) {
|
|
7654
|
+
widget.updateChartData(chartData);
|
|
7655
|
+
}
|
|
7656
|
+
// Add the widget to the tracker if not already there
|
|
7657
|
+
if (!tracker.has(widget)) {
|
|
7658
|
+
void tracker.add(widget);
|
|
7659
|
+
}
|
|
7660
|
+
// Get the current notebook panel for split-right mode
|
|
7661
|
+
const notebookPanel = notebookTracker.currentWidget;
|
|
7662
|
+
const refId = notebookPanel === null || notebookPanel === void 0 ? void 0 : notebookPanel.id;
|
|
7663
|
+
// Add the widget to main area with split-right mode (like StreamlitPreviewPlugin)
|
|
7664
|
+
if (!widget.isAttached) {
|
|
7665
|
+
if (refId) {
|
|
7666
|
+
app.shell.add(widget, 'main', {
|
|
7667
|
+
mode: 'split-right',
|
|
7668
|
+
ref: refId
|
|
7669
|
+
});
|
|
7670
|
+
}
|
|
7671
|
+
else {
|
|
7672
|
+
// Fallback to right sidebar if no notebook is open
|
|
7673
|
+
app.shell.add(widget, 'right');
|
|
7674
|
+
}
|
|
7675
|
+
}
|
|
7676
|
+
// Activate the widget
|
|
7677
|
+
app.shell.activateById(widget.id);
|
|
7678
|
+
};
|
|
7679
|
+
app.commands.addCommand(_commands__WEBPACK_IMPORTED_MODULE_12__.COMMAND_MITO_AI_OPEN_CHART_WIZARD, {
|
|
7680
|
+
label: 'Open Chart Wizard',
|
|
7681
|
+
execute: () => {
|
|
7682
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_13__.logEvent)('chart_wizard_opened', { source: 'command_palette' });
|
|
7683
|
+
openChartWizard();
|
|
7684
|
+
}
|
|
7685
|
+
});
|
|
7686
|
+
palette.addItem({
|
|
7687
|
+
command: _commands__WEBPACK_IMPORTED_MODULE_12__.COMMAND_MITO_AI_OPEN_CHART_WIZARD,
|
|
7688
|
+
category: 'Mito AI'
|
|
7689
|
+
});
|
|
7690
|
+
if (!tracker.has(widget)) {
|
|
7691
|
+
void tracker.add(widget);
|
|
7692
|
+
}
|
|
7693
|
+
if (restorer) {
|
|
7694
|
+
restorer.add(widget, 'mito-ai-chart-wizard');
|
|
7695
|
+
}
|
|
7696
|
+
const factory = rendermime.getFactory('image/png');
|
|
7697
|
+
if (factory) {
|
|
7698
|
+
rendermime.addFactory({
|
|
7699
|
+
safe: true,
|
|
7700
|
+
mimeTypes: ['image/png'],
|
|
7701
|
+
createRenderer: (options) => {
|
|
7702
|
+
const originalRenderer = factory.createRenderer(options);
|
|
7703
|
+
return new AugmentedImageRenderer(app, originalRenderer, notebookTracker, openChartWizard);
|
|
7704
|
+
}
|
|
7705
|
+
}, -1); // Giving this renderer a lower rank than the default renderer gives this default priority
|
|
7706
|
+
}
|
|
7707
|
+
console.log("mito-ai: ChartWizardPlugin activated");
|
|
7708
|
+
}
|
|
7709
|
+
};
|
|
7710
|
+
/**
|
|
7711
|
+
* A widget that extends the default ImageRenderer for matplotlib charts.
|
|
7712
|
+
*/
|
|
7713
|
+
class AugmentedImageRenderer extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__.Widget {
|
|
7714
|
+
constructor(app, originalRenderer, notebookTracker, openChartWizard) {
|
|
7715
|
+
super();
|
|
7716
|
+
this.reactRoot = null;
|
|
7717
|
+
this.originalRenderer = originalRenderer;
|
|
7718
|
+
this.notebookTracker = notebookTracker;
|
|
7719
|
+
this.app = app;
|
|
7720
|
+
this.openChartWizard = openChartWizard;
|
|
7721
|
+
}
|
|
7722
|
+
/**
|
|
7723
|
+
* Render the original image and append the Chart Wizard button.
|
|
7724
|
+
*/
|
|
7725
|
+
async renderModel(model) {
|
|
7726
|
+
// Clean up any existing React root before creating a new one
|
|
7727
|
+
if (this.reactRoot) {
|
|
7728
|
+
this.reactRoot.unmount();
|
|
7729
|
+
this.reactRoot = null;
|
|
7730
|
+
}
|
|
7731
|
+
const chartWizardDiv = document.createElement('div');
|
|
7732
|
+
chartWizardDiv.className = 'chart-wizard-button-container';
|
|
7733
|
+
const originalNode = this.originalRenderer.node;
|
|
7734
|
+
// Store the root reference so we can unmount it later
|
|
7735
|
+
this.reactRoot = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(chartWizardDiv);
|
|
7736
|
+
this.reactRoot.render(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ChartWizardButton, { onButtonClick: () => this.handleButtonClick(model) }));
|
|
7737
|
+
this.node.style.position = 'relative';
|
|
7738
|
+
this.node.classList.add('chart-wizard-output-container');
|
|
7739
|
+
this.node.appendChild(chartWizardDiv);
|
|
7740
|
+
await this.originalRenderer.renderModel(model);
|
|
7741
|
+
this.node.appendChild(originalNode);
|
|
7742
|
+
}
|
|
7743
|
+
/**
|
|
7744
|
+
* Dispose of the widget and clean up the React root.
|
|
7745
|
+
*/
|
|
7746
|
+
dispose() {
|
|
7747
|
+
if (this.reactRoot) {
|
|
7748
|
+
this.reactRoot.unmount();
|
|
7749
|
+
this.reactRoot = null;
|
|
7750
|
+
}
|
|
7751
|
+
super.dispose();
|
|
7752
|
+
}
|
|
7753
|
+
/*
|
|
7754
|
+
Handle the Chart Wizard button click.
|
|
7755
|
+
Extracts chart data and source code, then opens the Chart Wizard panel.
|
|
7756
|
+
*/
|
|
7757
|
+
handleButtonClick(_model) {
|
|
7758
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_13__.logEvent)('chart_wizard_opened', { source: 'chart_output_button' });
|
|
7759
|
+
// Get the notebook panel
|
|
7760
|
+
const notebookPanel = this.notebookTracker.currentWidget;
|
|
7761
|
+
if (!notebookPanel) {
|
|
7762
|
+
console.error('No active notebook panel');
|
|
7763
|
+
return;
|
|
7764
|
+
}
|
|
7765
|
+
// Find the cell that contains this output by traversing up the DOM tree
|
|
7766
|
+
const cellElement = this.node.closest('.jp-Cell');
|
|
7767
|
+
if (!cellElement) {
|
|
7768
|
+
console.error('Could not find cell element');
|
|
7769
|
+
return;
|
|
7770
|
+
}
|
|
7771
|
+
// Find the cell widget by checking which cell's node contains our element
|
|
7772
|
+
const cellWidget = notebookPanel.content.widgets.find(cell => {
|
|
7773
|
+
if (cell instanceof _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_5__.CodeCell) {
|
|
7774
|
+
return cell.node.contains(cellElement) || cellElement.contains(cell.node);
|
|
7775
|
+
}
|
|
7776
|
+
return false;
|
|
7777
|
+
});
|
|
7778
|
+
if (!(cellWidget instanceof _jupyterlab_cells__WEBPACK_IMPORTED_MODULE_5__.CodeCell)) {
|
|
7779
|
+
console.warn('Could not find CodeCell widget for this output');
|
|
7780
|
+
return;
|
|
7781
|
+
}
|
|
7782
|
+
const sourceCode = cellWidget.model.sharedModel.source;
|
|
7783
|
+
const cellId = cellWidget.model.id;
|
|
7784
|
+
// Set the cell as active before collapsing and scrolling
|
|
7785
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_14__.setActiveCellByIDInNotebookPanel)(notebookPanel, cellId);
|
|
7786
|
+
// Collapse the code cell when opening the chart wizard
|
|
7787
|
+
cellWidget.inputHidden = true;
|
|
7788
|
+
// Scroll to the top of the cell
|
|
7789
|
+
void notebookPanel.content.scrollToCell(cellWidget, 'start');
|
|
7790
|
+
// Open the Chart Wizard with the extracted data
|
|
7791
|
+
this.openChartWizard({
|
|
7792
|
+
sourceCode,
|
|
7793
|
+
cellId,
|
|
7794
|
+
notebookTracker: this.notebookTracker,
|
|
7795
|
+
notebookPanelId: notebookPanel.id,
|
|
7796
|
+
app: this.app
|
|
7797
|
+
});
|
|
7798
|
+
}
|
|
7799
|
+
}
|
|
7800
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChartWizardPlugin);
|
|
7801
|
+
|
|
7802
|
+
|
|
7803
|
+
/***/ }),
|
|
7804
|
+
|
|
7805
|
+
/***/ "./lib/Extensions/ChartWizard/ChartWizardWidget.js":
|
|
7806
|
+
/*!*********************************************************!*\
|
|
7807
|
+
!*** ./lib/Extensions/ChartWizard/ChartWizardWidget.js ***!
|
|
7808
|
+
\*********************************************************/
|
|
7809
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7810
|
+
|
|
7811
|
+
__webpack_require__.r(__webpack_exports__);
|
|
7812
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7813
|
+
/* harmony export */ ChartWizardWidget: () => (/* binding */ ChartWizardWidget)
|
|
7814
|
+
/* harmony export */ });
|
|
7815
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
7816
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7817
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
7818
|
+
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__);
|
|
7819
|
+
/* harmony import */ var _utils_parser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/parser */ "./lib/Extensions/ChartWizard/utils/parser.js");
|
|
7820
|
+
/* harmony import */ var _restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../restAPI/RestAPI */ "./lib/restAPI/RestAPI.js");
|
|
7821
|
+
/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/strings */ "./lib/utils/strings.js");
|
|
7822
|
+
/* harmony import */ var _components_LoadingDots__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/LoadingDots */ "./lib/components/LoadingDots.js");
|
|
7823
|
+
/* harmony import */ var _AddFieldButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./AddFieldButton */ "./lib/Extensions/ChartWizard/AddFieldButton.js");
|
|
7824
|
+
/* harmony import */ var _inputs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./inputs */ "./lib/Extensions/ChartWizard/inputs/BooleanInputRow.js");
|
|
7825
|
+
/* harmony import */ var _inputs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./inputs */ "./lib/Extensions/ChartWizard/inputs/TupleInputRow.js");
|
|
7826
|
+
/* harmony import */ var _inputs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./inputs */ "./lib/Extensions/ChartWizard/inputs/NumberInputRow.js");
|
|
7827
|
+
/* harmony import */ var _inputs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./inputs */ "./lib/Extensions/ChartWizard/inputs/utils.js");
|
|
7828
|
+
/* harmony import */ var _inputs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./inputs */ "./lib/Extensions/ChartWizard/inputs/ColorInputRow.js");
|
|
7829
|
+
/* harmony import */ var _inputs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./inputs */ "./lib/Extensions/ChartWizard/inputs/StringInputRow.js");
|
|
7830
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ "./lib/Extensions/ChartWizard/hooks/useChartConfig.js");
|
|
7831
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks */ "./lib/Extensions/ChartWizard/hooks/useDebouncedNotebookUpdate.js");
|
|
7832
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/notebook */ "./lib/utils/notebook.js");
|
|
7833
|
+
/* harmony import */ var _style_ChartWizardWidget_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/ChartWizardWidget.css */ "./style/ChartWizardWidget.css");
|
|
7834
|
+
/*
|
|
7835
|
+
* Copyright (c) Saga Inc.
|
|
7836
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
7837
|
+
*/
|
|
7838
|
+
|
|
7839
|
+
|
|
7840
|
+
|
|
7841
|
+
|
|
7842
|
+
|
|
7843
|
+
|
|
7844
|
+
|
|
7845
|
+
|
|
7846
|
+
|
|
7847
|
+
|
|
7848
|
+
|
|
7849
|
+
/**
|
|
7850
|
+
* Formats a variable name into a human-readable label.
|
|
7851
|
+
* Converts snake_case to Title Case (e.g., "figure_size" -> "Figure Size").
|
|
7852
|
+
*/
|
|
7853
|
+
const formatVariableLabel = (variableName) => {
|
|
7854
|
+
return variableName
|
|
7855
|
+
.replace(/_/g, ' ')
|
|
7856
|
+
.toLowerCase()
|
|
7857
|
+
.replace(/\b\w/g, (l) => l.toUpperCase());
|
|
7858
|
+
};
|
|
7859
|
+
const ChartWizardContent = ({ chartData }) => {
|
|
7860
|
+
const [isConverting, setIsConverting] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7861
|
+
const [isAddingField, setIsAddingField] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7862
|
+
const [currentSourceCode, setCurrentSourceCode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
7863
|
+
const widgetRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
7864
|
+
const [overlayHeight, setOverlayHeight] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
|
|
7865
|
+
const [isActiveCellMismatch, setIsActiveCellMismatch] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
7866
|
+
// Reset currentSourceCode when switching to a different chart
|
|
7867
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7868
|
+
setCurrentSourceCode(null);
|
|
7869
|
+
}, [chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode]);
|
|
7870
|
+
// Track active cell changes and compare with chart cell
|
|
7871
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7872
|
+
if (!chartData) {
|
|
7873
|
+
setIsActiveCellMismatch(false);
|
|
7874
|
+
return;
|
|
7875
|
+
}
|
|
7876
|
+
const checkActiveCell = () => {
|
|
7877
|
+
const activeCellId = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.getActiveCellID)(chartData.notebookTracker);
|
|
7878
|
+
const chartCellId = chartData.cellId;
|
|
7879
|
+
// Show warning if active cell exists and doesn't match the chart cell
|
|
7880
|
+
setIsActiveCellMismatch(activeCellId !== undefined && activeCellId !== chartCellId);
|
|
7881
|
+
};
|
|
7882
|
+
// Initial check
|
|
7883
|
+
checkActiveCell();
|
|
7884
|
+
// Listen to active cell changes
|
|
7885
|
+
chartData.notebookTracker.activeCellChanged.connect(checkActiveCell);
|
|
7886
|
+
return () => {
|
|
7887
|
+
chartData.notebookTracker.activeCellChanged.disconnect(checkActiveCell);
|
|
7888
|
+
};
|
|
7889
|
+
}, [chartData]);
|
|
7890
|
+
// Update overlay height to cover full scrollable content
|
|
7891
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7892
|
+
if (!isAddingField) {
|
|
7893
|
+
setOverlayHeight(0);
|
|
7894
|
+
return;
|
|
7895
|
+
}
|
|
7896
|
+
const updateOverlayHeight = () => {
|
|
7897
|
+
if (widgetRef.current) {
|
|
7898
|
+
// Use scrollHeight to get the full scrollable content height
|
|
7899
|
+
setOverlayHeight(widgetRef.current.scrollHeight);
|
|
7900
|
+
}
|
|
7901
|
+
};
|
|
7902
|
+
// Initial update
|
|
7903
|
+
updateOverlayHeight();
|
|
7904
|
+
// Use ResizeObserver to watch for content size changes
|
|
7905
|
+
let resizeObserver = null;
|
|
7906
|
+
if (widgetRef.current && typeof ResizeObserver !== 'undefined') {
|
|
7907
|
+
resizeObserver = new ResizeObserver(() => {
|
|
7908
|
+
updateOverlayHeight();
|
|
7909
|
+
});
|
|
7910
|
+
resizeObserver.observe(widgetRef.current);
|
|
7911
|
+
}
|
|
7912
|
+
// Fallback: Update on window resize
|
|
7913
|
+
window.addEventListener('resize', updateOverlayHeight);
|
|
7914
|
+
return () => {
|
|
7915
|
+
if (resizeObserver) {
|
|
7916
|
+
resizeObserver.disconnect();
|
|
7917
|
+
}
|
|
7918
|
+
window.removeEventListener('resize', updateOverlayHeight);
|
|
7919
|
+
};
|
|
7920
|
+
}, [isAddingField]);
|
|
7921
|
+
// Use custom hook for chart config management
|
|
7922
|
+
const { configVariables, setConfigVariables, hasConfig } = (0,_hooks__WEBPACK_IMPORTED_MODULE_4__.useChartConfig)({
|
|
7923
|
+
sourceCode: chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode,
|
|
7924
|
+
currentSourceCode,
|
|
7925
|
+
});
|
|
7926
|
+
// Use custom hook for debounced notebook updates
|
|
7927
|
+
const { updateNotebookCell, scheduleUpdate, clearPendingUpdate } = (0,_hooks__WEBPACK_IMPORTED_MODULE_5__.useDebouncedNotebookUpdate)({
|
|
7928
|
+
chartData,
|
|
7929
|
+
debounceDelay: 500,
|
|
7930
|
+
});
|
|
7931
|
+
/**
|
|
7932
|
+
* Handles variable value changes with debounced notebook updates.
|
|
7933
|
+
*/
|
|
7934
|
+
const handleVariableChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((variableName, newValue) => {
|
|
7935
|
+
const codeToUse = currentSourceCode || (chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode);
|
|
7936
|
+
if (!codeToUse)
|
|
7937
|
+
return;
|
|
7938
|
+
// Update config variables state
|
|
7939
|
+
const updated = configVariables.map((v) => v.name === variableName ? { ...v, value: newValue } : v);
|
|
7940
|
+
setConfigVariables(updated);
|
|
7941
|
+
// Update the source code
|
|
7942
|
+
const updatedCode = (0,_utils_parser__WEBPACK_IMPORTED_MODULE_6__.updateChartConfig)(codeToUse, updated);
|
|
7943
|
+
setCurrentSourceCode(updatedCode);
|
|
7944
|
+
// Schedule debounced notebook update
|
|
7945
|
+
scheduleUpdate(updatedCode);
|
|
7946
|
+
}, [chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode, currentSourceCode, configVariables, setConfigVariables, scheduleUpdate]);
|
|
7947
|
+
/**
|
|
7948
|
+
* Handles chart conversion from matplotlib to Chart Wizard format.
|
|
7949
|
+
*/
|
|
7950
|
+
const handleConvertChart = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => {
|
|
7951
|
+
void (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_7__.logEvent)('chart_wizard_convert_chart');
|
|
7952
|
+
if (!(chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode)) {
|
|
7953
|
+
console.error('No source code available');
|
|
7954
|
+
return;
|
|
7955
|
+
}
|
|
7956
|
+
// Clear any pending debounced updates to prevent race conditions
|
|
7957
|
+
clearPendingUpdate();
|
|
7958
|
+
setIsConverting(true);
|
|
7959
|
+
try {
|
|
7960
|
+
const response = await (0,_restAPI_RestAPI__WEBPACK_IMPORTED_MODULE_7__.convertChartCode)(chartData.sourceCode);
|
|
7961
|
+
if (response.converted_code) {
|
|
7962
|
+
// Extract code from markdown code blocks if present
|
|
7963
|
+
const extractedCode = (0,_utils_strings__WEBPACK_IMPORTED_MODULE_8__.removeMarkdownCodeFormatting)(response.converted_code);
|
|
7964
|
+
// Validate that extracted code is not empty to prevent deleting user's code
|
|
7965
|
+
if (!extractedCode || extractedCode.trim().length === 0) {
|
|
7966
|
+
console.error('Error: Extracted code is empty. Cannot update notebook cell.');
|
|
7967
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit('Chart conversion failed: The converted code is empty. Please try again or check your chart code.', 'error', {
|
|
7968
|
+
autoClose: 5000
|
|
7969
|
+
});
|
|
7970
|
+
return;
|
|
7971
|
+
}
|
|
7972
|
+
// Update current source code so the useEffect will parse it
|
|
7973
|
+
setCurrentSourceCode(extractedCode);
|
|
7974
|
+
// Update the cell with the converted code and re-execute
|
|
7975
|
+
updateNotebookCell(extractedCode);
|
|
7976
|
+
}
|
|
7977
|
+
}
|
|
7978
|
+
catch (error) {
|
|
7979
|
+
console.error('Error converting chart code:', error);
|
|
7980
|
+
const errorMessage = error instanceof Error ? error.message : 'An unknown error occurred';
|
|
7981
|
+
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.Notification.emit(`Chart conversion failed: ${errorMessage}. Please try again.`, 'error', {
|
|
7982
|
+
autoClose: 5000
|
|
7983
|
+
});
|
|
7984
|
+
}
|
|
7985
|
+
finally {
|
|
7986
|
+
setIsConverting(false);
|
|
7987
|
+
}
|
|
7988
|
+
}, [chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode, clearPendingUpdate, updateNotebookCell]);
|
|
7989
|
+
/**
|
|
7990
|
+
* Handles when a new field is added via the AddFieldButton component.
|
|
7991
|
+
*/
|
|
7992
|
+
const handleFieldAdded = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((updatedCode) => {
|
|
7993
|
+
// Update current source code so the useEffect will parse it
|
|
7994
|
+
setCurrentSourceCode(updatedCode);
|
|
7995
|
+
// Update the cell with the updated code
|
|
7996
|
+
updateNotebookCell(updatedCode);
|
|
7997
|
+
}, [updateNotebookCell]);
|
|
7998
|
+
/**
|
|
7999
|
+
* Renders the appropriate input field component based on variable type.
|
|
8000
|
+
*/
|
|
8001
|
+
const renderInputField = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((variable) => {
|
|
8002
|
+
const label = formatVariableLabel(variable.name);
|
|
8003
|
+
const commonProps = {
|
|
8004
|
+
variable,
|
|
8005
|
+
label,
|
|
8006
|
+
onVariableChange: handleVariableChange,
|
|
8007
|
+
};
|
|
8008
|
+
switch (variable.type) {
|
|
8009
|
+
case 'boolean':
|
|
8010
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_inputs__WEBPACK_IMPORTED_MODULE_9__.BooleanInputRow, { key: variable.name, ...commonProps });
|
|
8011
|
+
case 'tuple':
|
|
8012
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_inputs__WEBPACK_IMPORTED_MODULE_10__.TupleInputRow, { key: variable.name, ...commonProps });
|
|
8013
|
+
case 'number':
|
|
8014
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_inputs__WEBPACK_IMPORTED_MODULE_11__.NumberInputRow, { key: variable.name, ...commonProps });
|
|
8015
|
+
case 'string': {
|
|
8016
|
+
// String input - check if it's a hex color
|
|
8017
|
+
const stringValue = variable.value;
|
|
8018
|
+
const isColor = (0,_inputs__WEBPACK_IMPORTED_MODULE_12__.isHexColor)(stringValue);
|
|
8019
|
+
if (isColor) {
|
|
8020
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_inputs__WEBPACK_IMPORTED_MODULE_13__.ColorInputRow, { key: variable.name, ...commonProps });
|
|
8021
|
+
}
|
|
8022
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_inputs__WEBPACK_IMPORTED_MODULE_14__.StringInputRow, { key: variable.name, ...commonProps });
|
|
8023
|
+
}
|
|
8024
|
+
default:
|
|
8025
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_inputs__WEBPACK_IMPORTED_MODULE_14__.StringInputRow, { key: variable.name, ...commonProps });
|
|
8026
|
+
}
|
|
8027
|
+
}, [handleVariableChange]);
|
|
8028
|
+
// Memoize input fields to prevent unnecessary re-renders
|
|
8029
|
+
const inputFields = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => configVariables.map(renderInputField), [configVariables, renderInputField]);
|
|
8030
|
+
// Early return for empty state
|
|
8031
|
+
if (!chartData) {
|
|
8032
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-empty-state" },
|
|
8033
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h2", null, "Chart Wizard"),
|
|
8034
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null, "Click the Chart Wizard button on a matplotlib chart to get started.")));
|
|
8035
|
+
}
|
|
8036
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-widget", ref: widgetRef, style: { position: 'relative' } },
|
|
8037
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h2", null, "Chart Wizard"),
|
|
8038
|
+
isActiveCellMismatch && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-warning" },
|
|
8039
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-warning-content" }, "The active cell is no longer the chart cell. Changes may not be applied correctly."),
|
|
8040
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "chart-wizard-warning-button", onClick: () => {
|
|
8041
|
+
var _a;
|
|
8042
|
+
if (chartData) {
|
|
8043
|
+
// Find the notebook panel by ID
|
|
8044
|
+
const notebookPanel = chartData.notebookTracker.find(panel => panel.id === chartData.notebookPanelId);
|
|
8045
|
+
if (notebookPanel) {
|
|
8046
|
+
// Activate the notebook panel if it's not the current one
|
|
8047
|
+
if (((_a = chartData.notebookTracker.currentWidget) === null || _a === void 0 ? void 0 : _a.id) !== notebookPanel.id) {
|
|
8048
|
+
chartData.app.shell.activateById(notebookPanel.id);
|
|
8049
|
+
// Wait a bit for the notebook to activate before scrolling
|
|
8050
|
+
setTimeout(() => {
|
|
8051
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.scrollToCell)(notebookPanel, chartData.cellId, undefined, 'start');
|
|
8052
|
+
}, 100);
|
|
8053
|
+
}
|
|
8054
|
+
else {
|
|
8055
|
+
// Navigate to and scroll to the chart cell
|
|
8056
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_3__.scrollToCell)(notebookPanel, chartData.cellId, undefined, 'start');
|
|
8057
|
+
}
|
|
8058
|
+
}
|
|
8059
|
+
}
|
|
8060
|
+
}, type: "button" }, "Go to Chart Cell"))),
|
|
8061
|
+
hasConfig ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-config-container" },
|
|
8062
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { className: "chart-wizard-config-description" }, "Edit values below to customize your chart. Changes will be reflected in the notebook."),
|
|
8063
|
+
inputFields,
|
|
8064
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AddFieldButton__WEBPACK_IMPORTED_MODULE_15__["default"], { code: currentSourceCode || (chartData === null || chartData === void 0 ? void 0 : chartData.sourceCode) || null, onFieldAdded: handleFieldAdded, clearPendingUpdate: clearPendingUpdate, onLoadingStateChange: setIsAddingField }))) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-no-config" },
|
|
8065
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", null,
|
|
8066
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", null, "This chart isn't ready for Chart Wizard yet."),
|
|
8067
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("br", null),
|
|
8068
|
+
"Run the converter below or let Mito AI handle it automatically."),
|
|
8069
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-purple", disabled: isConverting, onClick: handleConvertChart, type: "button" }, isConverting ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
8070
|
+
"Converting",
|
|
8071
|
+
' ',
|
|
8072
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "chart-wizard-loading-dots" },
|
|
8073
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_16__["default"], null)))) : ('Convert')))),
|
|
8074
|
+
isAddingField && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-overlay", style: { height: overlayHeight > 0 ? `${overlayHeight}px` : '100%' } },
|
|
8075
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-overlay-text" },
|
|
8076
|
+
"Adding new field",
|
|
8077
|
+
' ',
|
|
8078
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "chart-wizard-loading-dots" },
|
|
8079
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_16__["default"], null)))))));
|
|
8080
|
+
};
|
|
8081
|
+
class ChartWizardWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_1__.ReactWidget {
|
|
8082
|
+
constructor() {
|
|
8083
|
+
super();
|
|
8084
|
+
this.chartData = null;
|
|
8085
|
+
this.addClass('chart-wizard-widget');
|
|
8086
|
+
}
|
|
8087
|
+
updateChartData(chartData) {
|
|
8088
|
+
this.chartData = chartData;
|
|
8089
|
+
this.update();
|
|
8090
|
+
}
|
|
8091
|
+
render() {
|
|
8092
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ChartWizardContent, { chartData: this.chartData });
|
|
8093
|
+
}
|
|
8094
|
+
}
|
|
8095
|
+
|
|
8096
|
+
|
|
8097
|
+
/***/ }),
|
|
8098
|
+
|
|
8099
|
+
/***/ "./lib/Extensions/ChartWizard/hooks/useChartConfig.js":
|
|
8100
|
+
/*!************************************************************!*\
|
|
8101
|
+
!*** ./lib/Extensions/ChartWizard/hooks/useChartConfig.js ***!
|
|
8102
|
+
\************************************************************/
|
|
8103
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8104
|
+
|
|
8105
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8106
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8107
|
+
/* harmony export */ useChartConfig: () => (/* binding */ useChartConfig)
|
|
8108
|
+
/* harmony export */ });
|
|
8109
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8110
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8111
|
+
/* harmony import */ var _utils_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/parser */ "./lib/Extensions/ChartWizard/utils/parser.js");
|
|
8112
|
+
/*
|
|
8113
|
+
* Copyright (c) Saga Inc.
|
|
8114
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8115
|
+
*/
|
|
8116
|
+
|
|
8117
|
+
|
|
8118
|
+
/**
|
|
8119
|
+
* Hook to manage chart configuration parsing and state.
|
|
8120
|
+
*
|
|
8121
|
+
* Parses chart configuration from source code and provides:
|
|
8122
|
+
* - configVariables: Array of parsed configuration variables
|
|
8123
|
+
* - hasConfig: Boolean indicating if configuration exists
|
|
8124
|
+
*/
|
|
8125
|
+
const useChartConfig = ({ sourceCode, currentSourceCode }) => {
|
|
8126
|
+
const [configVariables, setConfigVariables] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
8127
|
+
// Parse config when chart data or current source code changes
|
|
8128
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
8129
|
+
const codeToParse = currentSourceCode || sourceCode;
|
|
8130
|
+
if (!codeToParse) {
|
|
8131
|
+
setConfigVariables([]);
|
|
8132
|
+
return;
|
|
8133
|
+
}
|
|
8134
|
+
const parsed = (0,_utils_parser__WEBPACK_IMPORTED_MODULE_1__.parseChartConfig)(codeToParse);
|
|
8135
|
+
if (parsed) {
|
|
8136
|
+
setConfigVariables(parsed.variables);
|
|
8137
|
+
}
|
|
8138
|
+
else {
|
|
8139
|
+
setConfigVariables([]);
|
|
8140
|
+
}
|
|
8141
|
+
}, [sourceCode, currentSourceCode]);
|
|
8142
|
+
const hasConfig = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => configVariables.length > 0, [configVariables.length]);
|
|
8143
|
+
return {
|
|
8144
|
+
configVariables,
|
|
8145
|
+
setConfigVariables,
|
|
8146
|
+
hasConfig,
|
|
8147
|
+
};
|
|
8148
|
+
};
|
|
8149
|
+
|
|
8150
|
+
|
|
8151
|
+
/***/ }),
|
|
8152
|
+
|
|
8153
|
+
/***/ "./lib/Extensions/ChartWizard/hooks/useDebouncedNotebookUpdate.js":
|
|
8154
|
+
/*!************************************************************************!*\
|
|
8155
|
+
!*** ./lib/Extensions/ChartWizard/hooks/useDebouncedNotebookUpdate.js ***!
|
|
8156
|
+
\************************************************************************/
|
|
8157
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8158
|
+
|
|
8159
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8160
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8161
|
+
/* harmony export */ useDebouncedNotebookUpdate: () => (/* binding */ useDebouncedNotebookUpdate)
|
|
8162
|
+
/* harmony export */ });
|
|
8163
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8164
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8165
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
8166
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__);
|
|
8167
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
8168
|
+
/*
|
|
8169
|
+
* Copyright (c) Saga Inc.
|
|
8170
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8171
|
+
*/
|
|
8172
|
+
|
|
8173
|
+
|
|
8174
|
+
|
|
8175
|
+
/**
|
|
8176
|
+
* Hook to manage debounced notebook cell updates.
|
|
8177
|
+
*
|
|
8178
|
+
* Provides:
|
|
8179
|
+
* - updateNotebookCell: Function to update and re-execute notebook cell with debouncing
|
|
8180
|
+
* - clearPendingUpdate: Function to clear any pending debounced updates
|
|
8181
|
+
*/
|
|
8182
|
+
const useDebouncedNotebookUpdate = ({ chartData, debounceDelay = 500, }) => {
|
|
8183
|
+
const executeTimeoutRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
8184
|
+
// Cleanup timeout on unmount or when chartData changes
|
|
8185
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
8186
|
+
return () => {
|
|
8187
|
+
if (executeTimeoutRef.current) {
|
|
8188
|
+
clearTimeout(executeTimeoutRef.current);
|
|
8189
|
+
}
|
|
8190
|
+
};
|
|
8191
|
+
}, [chartData]);
|
|
8192
|
+
const updateNotebookCell = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((updatedCode) => {
|
|
8193
|
+
var _a;
|
|
8194
|
+
if (!chartData)
|
|
8195
|
+
return;
|
|
8196
|
+
const notebookPanel = chartData.notebookTracker.currentWidget;
|
|
8197
|
+
if (!notebookPanel)
|
|
8198
|
+
return;
|
|
8199
|
+
// Update the cell code
|
|
8200
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_2__.writeCodeToCellByIDInNotebookPanel)(notebookPanel, updatedCode, chartData.cellId);
|
|
8201
|
+
// Re-execute the cell to show updated chart
|
|
8202
|
+
const notebook = notebookPanel.content;
|
|
8203
|
+
const sessionContext = (_a = notebookPanel.context) === null || _a === void 0 ? void 0 : _a.sessionContext;
|
|
8204
|
+
void _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_1__.NotebookActions.run(notebook, sessionContext);
|
|
8205
|
+
}, [chartData]);
|
|
8206
|
+
const scheduleUpdate = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((updatedCode) => {
|
|
8207
|
+
// Clear previous timeout
|
|
8208
|
+
if (executeTimeoutRef.current) {
|
|
8209
|
+
clearTimeout(executeTimeoutRef.current);
|
|
8210
|
+
}
|
|
8211
|
+
// Debounce the cell update and execution
|
|
8212
|
+
executeTimeoutRef.current = setTimeout(() => {
|
|
8213
|
+
updateNotebookCell(updatedCode);
|
|
8214
|
+
}, debounceDelay);
|
|
8215
|
+
}, [updateNotebookCell, debounceDelay]);
|
|
8216
|
+
const clearPendingUpdate = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
8217
|
+
if (executeTimeoutRef.current) {
|
|
8218
|
+
clearTimeout(executeTimeoutRef.current);
|
|
8219
|
+
executeTimeoutRef.current = null;
|
|
8220
|
+
}
|
|
8221
|
+
}, []);
|
|
8222
|
+
return {
|
|
8223
|
+
updateNotebookCell,
|
|
8224
|
+
scheduleUpdate,
|
|
8225
|
+
clearPendingUpdate,
|
|
8226
|
+
};
|
|
8227
|
+
};
|
|
8228
|
+
|
|
8229
|
+
|
|
8230
|
+
/***/ }),
|
|
8231
|
+
|
|
8232
|
+
/***/ "./lib/Extensions/ChartWizard/inputs/BooleanInputRow.js":
|
|
8233
|
+
/*!**************************************************************!*\
|
|
8234
|
+
!*** ./lib/Extensions/ChartWizard/inputs/BooleanInputRow.js ***!
|
|
8235
|
+
\**************************************************************/
|
|
8236
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8237
|
+
|
|
8238
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8239
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8240
|
+
/* harmony export */ BooleanInputRow: () => (/* binding */ BooleanInputRow)
|
|
8241
|
+
/* harmony export */ });
|
|
8242
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8243
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8244
|
+
/*
|
|
8245
|
+
* Copyright (c) Saga Inc.
|
|
8246
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8247
|
+
*/
|
|
8248
|
+
|
|
8249
|
+
const BooleanInputRow = ({ variable, label, onVariableChange }) => {
|
|
8250
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: variable.name, className: "chart-wizard-input-row chart-wizard-boolean-row" },
|
|
8251
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "chart-wizard-input-label chart-wizard-boolean-label" }, label),
|
|
8252
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "chart-wizard-toggle-container" },
|
|
8253
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "checkbox", checked: variable.value, onChange: (e) => onVariableChange(variable.name, e.target.checked), className: "chart-wizard-toggle-input" }),
|
|
8254
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "chart-wizard-toggle-slider" }))));
|
|
8255
|
+
};
|
|
8256
|
+
|
|
8257
|
+
|
|
8258
|
+
/***/ }),
|
|
8259
|
+
|
|
8260
|
+
/***/ "./lib/Extensions/ChartWizard/inputs/ColorInputRow.js":
|
|
8261
|
+
/*!************************************************************!*\
|
|
8262
|
+
!*** ./lib/Extensions/ChartWizard/inputs/ColorInputRow.js ***!
|
|
8263
|
+
\************************************************************/
|
|
8264
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8265
|
+
|
|
8266
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8267
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8268
|
+
/* harmony export */ ColorInputRow: () => (/* binding */ ColorInputRow)
|
|
8269
|
+
/* harmony export */ });
|
|
8270
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8271
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8272
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./lib/Extensions/ChartWizard/inputs/utils.js");
|
|
8273
|
+
/*
|
|
8274
|
+
* Copyright (c) Saga Inc.
|
|
8275
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8276
|
+
*/
|
|
8277
|
+
|
|
8278
|
+
|
|
8279
|
+
const ColorInputRow = ({ variable, label, onVariableChange }) => {
|
|
8280
|
+
const stringValue = variable.value;
|
|
8281
|
+
const normalizedColor = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.normalizeHexColor)(stringValue);
|
|
8282
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: variable.name, className: "chart-wizard-input-row" },
|
|
8283
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "chart-wizard-input-label" }, label),
|
|
8284
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-color-container" },
|
|
8285
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "color", value: normalizedColor, onChange: (e) => {
|
|
8286
|
+
// Color picker returns #RRGGBB, store with #
|
|
8287
|
+
onVariableChange(variable.name, e.target.value);
|
|
8288
|
+
}, className: "chart-wizard-color-picker" }),
|
|
8289
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", value: normalizedColor, onChange: (e) => {
|
|
8290
|
+
let newValue = e.target.value.trim();
|
|
8291
|
+
// Normalize: ensure it has # for valid hex colors
|
|
8292
|
+
if (newValue && !newValue.startsWith('#')) {
|
|
8293
|
+
if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.isHexColor)(newValue)) {
|
|
8294
|
+
newValue = `#${newValue}`;
|
|
8295
|
+
}
|
|
8296
|
+
}
|
|
8297
|
+
// Only update if it's a valid hex color
|
|
8298
|
+
if ((0,_utils__WEBPACK_IMPORTED_MODULE_1__.isHexColor)(newValue) || newValue === '') {
|
|
8299
|
+
onVariableChange(variable.name, newValue);
|
|
8300
|
+
}
|
|
8301
|
+
}, placeholder: "#RRGGBB", className: "chart-wizard-color-input" }))));
|
|
8302
|
+
};
|
|
8303
|
+
|
|
8304
|
+
|
|
8305
|
+
/***/ }),
|
|
8306
|
+
|
|
8307
|
+
/***/ "./lib/Extensions/ChartWizard/inputs/NumberInputRow.js":
|
|
8308
|
+
/*!*************************************************************!*\
|
|
8309
|
+
!*** ./lib/Extensions/ChartWizard/inputs/NumberInputRow.js ***!
|
|
8310
|
+
\*************************************************************/
|
|
8311
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8312
|
+
|
|
8313
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8314
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8315
|
+
/* harmony export */ NumberInputRow: () => (/* binding */ NumberInputRow)
|
|
8316
|
+
/* harmony export */ });
|
|
8317
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8318
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8319
|
+
/*
|
|
8320
|
+
* Copyright (c) Saga Inc.
|
|
8321
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8322
|
+
*/
|
|
8323
|
+
|
|
8324
|
+
const NumberInputRow = ({ variable, label, onVariableChange }) => {
|
|
8325
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: variable.name, className: "chart-wizard-input-row" },
|
|
8326
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "chart-wizard-input-label" }, label),
|
|
8327
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "number", value: variable.value, onChange: (e) => onVariableChange(variable.name, parseFloat(e.target.value) || 0), className: "chart-wizard-number-input" })));
|
|
8328
|
+
};
|
|
8329
|
+
|
|
8330
|
+
|
|
8331
|
+
/***/ }),
|
|
8332
|
+
|
|
8333
|
+
/***/ "./lib/Extensions/ChartWizard/inputs/StringInputRow.js":
|
|
8334
|
+
/*!*************************************************************!*\
|
|
8335
|
+
!*** ./lib/Extensions/ChartWizard/inputs/StringInputRow.js ***!
|
|
8336
|
+
\*************************************************************/
|
|
8337
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8338
|
+
|
|
8339
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8340
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8341
|
+
/* harmony export */ StringInputRow: () => (/* binding */ StringInputRow)
|
|
8342
|
+
/* harmony export */ });
|
|
8343
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8344
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8345
|
+
/*
|
|
8346
|
+
* Copyright (c) Saga Inc.
|
|
8347
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8348
|
+
*/
|
|
8349
|
+
|
|
8350
|
+
const StringInputRow = ({ variable, label, onVariableChange }) => {
|
|
8351
|
+
const stringValue = variable.value;
|
|
8352
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: variable.name, className: "chart-wizard-input-row" },
|
|
8353
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "chart-wizard-input-label" }, label),
|
|
8354
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "text", value: stringValue, onChange: (e) => onVariableChange(variable.name, e.target.value), className: "chart-wizard-text-input" })));
|
|
8355
|
+
};
|
|
8356
|
+
|
|
8357
|
+
|
|
8358
|
+
/***/ }),
|
|
8359
|
+
|
|
8360
|
+
/***/ "./lib/Extensions/ChartWizard/inputs/TupleInputRow.js":
|
|
8361
|
+
/*!************************************************************!*\
|
|
8362
|
+
!*** ./lib/Extensions/ChartWizard/inputs/TupleInputRow.js ***!
|
|
8363
|
+
\************************************************************/
|
|
8364
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8365
|
+
|
|
8366
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8367
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8368
|
+
/* harmony export */ TupleInputRow: () => (/* binding */ TupleInputRow)
|
|
8369
|
+
/* harmony export */ });
|
|
8370
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
8371
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8372
|
+
/*
|
|
8373
|
+
* Copyright (c) Saga Inc.
|
|
8374
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8375
|
+
*/
|
|
8376
|
+
|
|
8377
|
+
const TupleInputRow = ({ variable, label, onVariableChange }) => {
|
|
8378
|
+
const tupleValue = variable.value;
|
|
8379
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: variable.name, className: "chart-wizard-input-row" },
|
|
8380
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "chart-wizard-input-label" }, label),
|
|
8381
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chart-wizard-tuple-container" },
|
|
8382
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, "("),
|
|
8383
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "number", value: tupleValue[0], onChange: (e) => {
|
|
8384
|
+
const newValue = [parseFloat(e.target.value) || 0, tupleValue[1]];
|
|
8385
|
+
onVariableChange(variable.name, newValue);
|
|
8386
|
+
}, className: "chart-wizard-tuple-input" }),
|
|
8387
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, ","),
|
|
8388
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", { type: "number", value: tupleValue[1], onChange: (e) => {
|
|
8389
|
+
const newValue = [tupleValue[0], parseFloat(e.target.value) || 0];
|
|
8390
|
+
onVariableChange(variable.name, newValue);
|
|
8391
|
+
}, className: "chart-wizard-tuple-input" }),
|
|
8392
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, ")"))));
|
|
8393
|
+
};
|
|
8394
|
+
|
|
8395
|
+
|
|
8396
|
+
/***/ }),
|
|
8397
|
+
|
|
8398
|
+
/***/ "./lib/Extensions/ChartWizard/inputs/utils.js":
|
|
8399
|
+
/*!****************************************************!*\
|
|
8400
|
+
!*** ./lib/Extensions/ChartWizard/inputs/utils.js ***!
|
|
8401
|
+
\****************************************************/
|
|
8402
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8403
|
+
|
|
8404
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8405
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8406
|
+
/* harmony export */ isHexColor: () => (/* binding */ isHexColor),
|
|
8407
|
+
/* harmony export */ normalizeHexColor: () => (/* binding */ normalizeHexColor)
|
|
8408
|
+
/* harmony export */ });
|
|
8409
|
+
/*
|
|
8410
|
+
* Copyright (c) Saga Inc.
|
|
8411
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8412
|
+
*/
|
|
8413
|
+
/**
|
|
8414
|
+
* Checks if a string is a valid hex color code
|
|
8415
|
+
*/
|
|
8416
|
+
const isHexColor = (value) => {
|
|
8417
|
+
const hexPattern = /^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;
|
|
8418
|
+
return hexPattern.test(value);
|
|
8419
|
+
};
|
|
8420
|
+
/**
|
|
8421
|
+
* Normalizes hex color to ensure it has a # prefix and is in 6-digit format
|
|
8422
|
+
* Expands 3-digit hex codes (e.g., #FFF) to 6-digit format (e.g., #FFFFFF)
|
|
8423
|
+
* HTML color inputs require exactly 7 characters in #RRGGBB format
|
|
8424
|
+
*/
|
|
8425
|
+
const normalizeHexColor = (value) => {
|
|
8426
|
+
// Remove # if present to work with the hex digits only
|
|
8427
|
+
const hexDigits = value.startsWith('#') ? value.slice(1) : value;
|
|
8428
|
+
// If it's a 3-digit hex code, expand it to 6-digit format
|
|
8429
|
+
if (hexDigits.length === 3 && /^[0-9A-Fa-f]{3}$/.test(hexDigits)) {
|
|
8430
|
+
// Expand each digit: #FFF -> #FFFFFF, #abc -> #aabbcc
|
|
8431
|
+
const expanded = hexDigits
|
|
8432
|
+
.split('')
|
|
8433
|
+
.map(char => char + char)
|
|
8434
|
+
.join('');
|
|
8435
|
+
return `#${expanded}`;
|
|
8436
|
+
}
|
|
8437
|
+
// For 6-digit codes, just ensure it has the # prefix
|
|
8438
|
+
if (value.startsWith('#')) {
|
|
8439
|
+
return value;
|
|
8440
|
+
}
|
|
8441
|
+
return `#${value}`;
|
|
8442
|
+
};
|
|
8443
|
+
|
|
8444
|
+
|
|
8445
|
+
/***/ }),
|
|
8446
|
+
|
|
8447
|
+
/***/ "./lib/Extensions/ChartWizard/utils/parser.js":
|
|
8448
|
+
/*!****************************************************!*\
|
|
8449
|
+
!*** ./lib/Extensions/ChartWizard/utils/parser.js ***!
|
|
8450
|
+
\****************************************************/
|
|
8451
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8452
|
+
|
|
8453
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8454
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8455
|
+
/* harmony export */ parseChartConfig: () => (/* binding */ parseChartConfig),
|
|
8456
|
+
/* harmony export */ updateChartConfig: () => (/* binding */ updateChartConfig)
|
|
8457
|
+
/* harmony export */ });
|
|
8458
|
+
/*
|
|
8459
|
+
* Copyright (c) Saga Inc.
|
|
8460
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8461
|
+
*/
|
|
8462
|
+
/**
|
|
8463
|
+
* Parses the chart configuration section from Python code.
|
|
8464
|
+
* Looks for variables between "# === CHART CONFIG ===" and "# === END CONFIG ===" markers.
|
|
8465
|
+
*/
|
|
8466
|
+
function parseChartConfig(sourceCode) {
|
|
8467
|
+
const configStartMarker = '# === CHART CONFIG ===';
|
|
8468
|
+
const configEndMarker = '# === END CONFIG ===';
|
|
8469
|
+
const startIndex = sourceCode.indexOf(configStartMarker);
|
|
8470
|
+
const endIndex = sourceCode.indexOf(configEndMarker);
|
|
8471
|
+
if (startIndex === -1 || endIndex === -1 || startIndex >= endIndex) {
|
|
8472
|
+
return null;
|
|
8473
|
+
}
|
|
8474
|
+
const configSection = sourceCode.substring(startIndex + configStartMarker.length, endIndex).trim();
|
|
8475
|
+
const lines = configSection.split('\n').map(line => line.trim()).filter(line => line.length > 0);
|
|
8476
|
+
const variables = [];
|
|
8477
|
+
for (const line of lines) {
|
|
8478
|
+
// Skip comment lines
|
|
8479
|
+
if (line.startsWith('#')) {
|
|
8480
|
+
continue;
|
|
8481
|
+
}
|
|
8482
|
+
// Parse single variable assignments (one variable per line)
|
|
8483
|
+
const match = line.match(/^([A-Z_][A-Z0-9_]*)\s*=\s*(.+)$/);
|
|
8484
|
+
if (match && match[1] && match[2]) {
|
|
8485
|
+
const varName = match[1];
|
|
8486
|
+
const valueStr = match[2];
|
|
8487
|
+
const parsed = parseValue(valueStr.trim());
|
|
8488
|
+
if (parsed) {
|
|
8489
|
+
variables.push({
|
|
8490
|
+
name: varName,
|
|
8491
|
+
value: parsed.value,
|
|
8492
|
+
type: parsed.type
|
|
8493
|
+
});
|
|
8494
|
+
}
|
|
8495
|
+
}
|
|
8496
|
+
}
|
|
8497
|
+
return {
|
|
8498
|
+
variables,
|
|
8499
|
+
configStartIndex: startIndex,
|
|
8500
|
+
configEndIndex: endIndex + configEndMarker.length
|
|
8501
|
+
};
|
|
8502
|
+
}
|
|
8503
|
+
/**
|
|
8504
|
+
* Parses a Python value string into its appropriate type.
|
|
8505
|
+
*/
|
|
8506
|
+
function parseValue(valueStr) {
|
|
8507
|
+
// Remove surrounding whitespace
|
|
8508
|
+
valueStr = valueStr.trim();
|
|
8509
|
+
// Boolean values
|
|
8510
|
+
if (valueStr === 'True') {
|
|
8511
|
+
return { value: true, type: 'boolean' };
|
|
8512
|
+
}
|
|
8513
|
+
if (valueStr === 'False') {
|
|
8514
|
+
return { value: false, type: 'boolean' };
|
|
8515
|
+
}
|
|
8516
|
+
// Tuple (e.g., (12, 6) or (-10, 6))
|
|
8517
|
+
const tupleMatch = valueStr.match(/^\((-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\)$/);
|
|
8518
|
+
if (tupleMatch) {
|
|
8519
|
+
return {
|
|
8520
|
+
value: [parseFloat(tupleMatch[1] || '0'), parseFloat(tupleMatch[2] || '0')],
|
|
8521
|
+
type: 'tuple'
|
|
8522
|
+
};
|
|
8523
|
+
}
|
|
8524
|
+
// Number
|
|
8525
|
+
if (/^-?\d+(?:\.\d+)?$/.test(valueStr)) {
|
|
8526
|
+
return { value: parseFloat(valueStr), type: 'number' };
|
|
8527
|
+
}
|
|
8528
|
+
// String (remove quotes and unescape)
|
|
8529
|
+
const stringMatch = valueStr.match(/^(['"])(.*)\1$/);
|
|
8530
|
+
if (stringMatch && stringMatch[1]) {
|
|
8531
|
+
const quoteChar = stringMatch[1];
|
|
8532
|
+
const stringContent = stringMatch[2] || '';
|
|
8533
|
+
// Unescape the string content (convert \' to ', \\ to \, etc.)
|
|
8534
|
+
const unescaped = unescapePythonString(stringContent, quoteChar);
|
|
8535
|
+
return { value: unescaped, type: 'string' };
|
|
8536
|
+
}
|
|
8537
|
+
// Check if it's a Python expression (contains function calls, operators, etc.)
|
|
8538
|
+
// This includes things like pd.to_datetime('2012-04-09'), list comprehensions, etc.
|
|
8539
|
+
if (isPythonExpression(valueStr)) {
|
|
8540
|
+
return { value: valueStr, type: 'expression' };
|
|
8541
|
+
}
|
|
8542
|
+
// If it doesn't match any pattern, treat as string literal
|
|
8543
|
+
return { value: valueStr, type: 'string' };
|
|
8544
|
+
}
|
|
8545
|
+
/**
|
|
8546
|
+
* Unescapes a Python string content, converting escape sequences to their actual characters.
|
|
8547
|
+
*/
|
|
8548
|
+
function unescapePythonString(content, quoteChar) {
|
|
8549
|
+
let result = '';
|
|
8550
|
+
let i = 0;
|
|
8551
|
+
while (i < content.length) {
|
|
8552
|
+
if (content[i] === '\\' && i + 1 < content.length) {
|
|
8553
|
+
const next = content[i + 1];
|
|
8554
|
+
if (next !== undefined) {
|
|
8555
|
+
switch (next) {
|
|
8556
|
+
case '\\':
|
|
8557
|
+
result += '\\';
|
|
8558
|
+
i += 2;
|
|
8559
|
+
break;
|
|
8560
|
+
case quoteChar:
|
|
8561
|
+
result += quoteChar;
|
|
8562
|
+
i += 2;
|
|
8563
|
+
break;
|
|
8564
|
+
case 'n':
|
|
8565
|
+
result += '\n';
|
|
8566
|
+
i += 2;
|
|
8567
|
+
break;
|
|
8568
|
+
case 't':
|
|
8569
|
+
result += '\t';
|
|
8570
|
+
i += 2;
|
|
8571
|
+
break;
|
|
8572
|
+
case 'r':
|
|
8573
|
+
result += '\r';
|
|
8574
|
+
i += 2;
|
|
8575
|
+
break;
|
|
8576
|
+
default:
|
|
8577
|
+
// Unknown escape sequence, keep as-is
|
|
8578
|
+
result += content[i] + next;
|
|
8579
|
+
i += 2;
|
|
8580
|
+
break;
|
|
8581
|
+
}
|
|
8582
|
+
}
|
|
8583
|
+
else {
|
|
8584
|
+
result += content[i];
|
|
8585
|
+
i += 1;
|
|
8586
|
+
}
|
|
8587
|
+
}
|
|
8588
|
+
else {
|
|
8589
|
+
result += content[i];
|
|
8590
|
+
i += 1;
|
|
8591
|
+
}
|
|
8592
|
+
}
|
|
8593
|
+
return result;
|
|
8594
|
+
}
|
|
8595
|
+
/**
|
|
8596
|
+
* Escapes a string for use in a Python single-quoted string literal.
|
|
8597
|
+
*/
|
|
8598
|
+
function escapePythonString(content) {
|
|
8599
|
+
return content
|
|
8600
|
+
.replace(/\\/g, '\\\\') // Escape backslashes first
|
|
8601
|
+
.replace(/'/g, "\\'"); // Then escape single quotes
|
|
8602
|
+
}
|
|
8603
|
+
/**
|
|
8604
|
+
* Determines if a string is a Python expression (function call, operator, etc.)
|
|
8605
|
+
* rather than a simple string literal.
|
|
8606
|
+
*/
|
|
8607
|
+
function isPythonExpression(valueStr) {
|
|
8608
|
+
// Check for function calls (e.g., pd.to_datetime(...), datetime(...))
|
|
8609
|
+
if (/[a-zA-Z_][a-zA-Z0-9_]*\s*\(/.test(valueStr)) {
|
|
8610
|
+
return true;
|
|
8611
|
+
}
|
|
8612
|
+
// Check for operators (arithmetic, comparison, etc.)
|
|
8613
|
+
if (/[+\-*/%<>=!&|]/.test(valueStr)) {
|
|
8614
|
+
return true;
|
|
8615
|
+
}
|
|
8616
|
+
// Check for list/dict comprehensions, slices, etc.
|
|
8617
|
+
if (/\[.*\]|{.*}/.test(valueStr) && !/^['"]/.test(valueStr)) {
|
|
8618
|
+
return true;
|
|
8619
|
+
}
|
|
8620
|
+
// Check for attribute access (e.g., obj.attr)
|
|
8621
|
+
if (/\.[a-zA-Z_][a-zA-Z0-9_]*/.test(valueStr)) {
|
|
8622
|
+
return true;
|
|
8623
|
+
}
|
|
8624
|
+
return false;
|
|
8625
|
+
}
|
|
8626
|
+
/**
|
|
8627
|
+
* Updates the chart configuration section with new variable values.
|
|
8628
|
+
* Regenerates the config section in a simple, consistent format.
|
|
8629
|
+
*/
|
|
8630
|
+
function updateChartConfig(sourceCode, variables) {
|
|
8631
|
+
const parsed = parseChartConfig(sourceCode);
|
|
8632
|
+
if (!parsed) {
|
|
8633
|
+
return sourceCode;
|
|
8634
|
+
}
|
|
8635
|
+
// Create a map of variable names to their new values
|
|
8636
|
+
const varMap = new Map();
|
|
8637
|
+
variables.forEach(v => varMap.set(v.name, v));
|
|
8638
|
+
// Build new config section - simple one variable per line format
|
|
8639
|
+
const configStartMarker = '# === CHART CONFIG ===';
|
|
8640
|
+
const configEndMarker = '# === END CONFIG ===';
|
|
8641
|
+
let newConfigSection = configStartMarker + '\n\n';
|
|
8642
|
+
// Use updated variables if available, otherwise keep original
|
|
8643
|
+
const variablesToWrite = parsed.variables.map(v => varMap.get(v.name) || v);
|
|
8644
|
+
for (const variable of variablesToWrite) {
|
|
8645
|
+
const formattedValue = formatValue(variable.value, variable.type);
|
|
8646
|
+
newConfigSection += `${variable.name} = ${formattedValue}\n`;
|
|
8647
|
+
}
|
|
8648
|
+
newConfigSection += '\n' + configEndMarker;
|
|
8649
|
+
// Replace the old config section with the new one
|
|
8650
|
+
const beforeConfig = sourceCode.substring(0, parsed.configStartIndex);
|
|
8651
|
+
const afterConfig = sourceCode.substring(parsed.configEndIndex);
|
|
8652
|
+
return beforeConfig + newConfigSection + afterConfig;
|
|
8653
|
+
}
|
|
8654
|
+
/**
|
|
8655
|
+
* Formats a value back to its Python string representation.
|
|
8656
|
+
*/
|
|
8657
|
+
function formatValue(value, type) {
|
|
8658
|
+
if (type === 'boolean') {
|
|
8659
|
+
return value ? 'True' : 'False';
|
|
8660
|
+
}
|
|
8661
|
+
if (type === 'tuple' && Array.isArray(value)) {
|
|
8662
|
+
return `(${value[0]}, ${value[1]})`;
|
|
8663
|
+
}
|
|
8664
|
+
if (type === 'number') {
|
|
8665
|
+
return String(value);
|
|
8666
|
+
}
|
|
8667
|
+
if (type === 'expression') {
|
|
8668
|
+
// Python expressions should be preserved as-is without quotes
|
|
8669
|
+
return String(value);
|
|
8670
|
+
}
|
|
8671
|
+
// String - escape properly and wrap in single quotes
|
|
8672
|
+
return `'${escapePythonString(String(value))}'`;
|
|
8673
|
+
}
|
|
8674
|
+
|
|
8675
|
+
|
|
8676
|
+
/***/ }),
|
|
8677
|
+
|
|
8678
|
+
/***/ "./lib/Extensions/ContextManager/ContextManagerPlugin.js":
|
|
8679
|
+
/*!***************************************************************!*\
|
|
8680
|
+
!*** ./lib/Extensions/ContextManager/ContextManagerPlugin.js ***!
|
|
8681
|
+
\***************************************************************/
|
|
8682
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8683
|
+
|
|
8684
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8685
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8686
|
+
/* harmony export */ ContextManager: () => (/* binding */ ContextManager),
|
|
8687
|
+
/* harmony export */ ContextManagerPlugin: () => (/* binding */ ContextManagerPlugin),
|
|
8688
|
+
/* harmony export */ IContextManager: () => (/* binding */ IContextManager),
|
|
8689
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8690
|
+
/* harmony export */ });
|
|
8691
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/notebook */ "webpack/sharing/consume/default/@jupyterlab/notebook");
|
|
8692
|
+
/* harmony import */ var _jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__);
|
|
8693
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
8694
|
+
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);
|
|
8695
|
+
/* harmony import */ var _VariableInspector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VariableInspector */ "./lib/Extensions/ContextManager/VariableInspector.js");
|
|
8696
|
+
/* harmony import */ var _FileInspector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FileInspector */ "./lib/Extensions/ContextManager/FileInspector.js");
|
|
8697
|
+
/*
|
|
8698
|
+
* Copyright (c) Saga Inc.
|
|
8699
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8700
|
+
*/
|
|
8701
|
+
|
|
8702
|
+
|
|
8703
|
+
|
|
8704
|
+
|
|
8705
|
+
// The provides field in JupyterLab's JupyterFrontEndPlugin expects a token
|
|
8706
|
+
// that can be used to look up the service in the dependency injection system,
|
|
8707
|
+
// so we define a new token for the ContextManager
|
|
8708
|
+
const IContextManager = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.Token('mito-ai:IContextManager');
|
|
8709
|
+
class ContextManager {
|
|
8710
|
+
constructor(app, notebookTracker) {
|
|
8711
|
+
this.notebookContexts = new Map();
|
|
8712
|
+
this._startKernelListener = async (app, notebookPanel) => {
|
|
8713
|
+
if (notebookPanel === null) {
|
|
8714
|
+
return;
|
|
8715
|
+
}
|
|
8716
|
+
// Initialize context for this notebook if it doesn't exist
|
|
8717
|
+
if (!this.notebookContexts.has(notebookPanel.id)) {
|
|
8718
|
+
this.notebookContexts.set(notebookPanel.id, { variables: [], files: [] });
|
|
8719
|
+
}
|
|
8720
|
+
// As soon as the notebook is opened, fetch the files since these are not related to the kernel,
|
|
8721
|
+
// but to the notebook itself. This is useful so we can tell the agent which files are available
|
|
8722
|
+
// or let the user select a file from the dropdown menu before the kernel is started.
|
|
8723
|
+
// We use the notebookPanel.id to identify the notebook because we might need to access
|
|
8724
|
+
// NotebookContext even before the kernel is started. For example, to figure out
|
|
8725
|
+
// which files are available.
|
|
8726
|
+
const updatedFiles = await (0,_FileInspector__WEBPACK_IMPORTED_MODULE_2__.getFiles)(app, notebookPanel);
|
|
8727
|
+
this.updateNotebookFiles(notebookPanel.id, updatedFiles);
|
|
8728
|
+
// Listen for kernel restart or shut down events and clear the variables for this notebook
|
|
8729
|
+
notebookPanel.context.sessionContext.statusChanged.connect((sender, status) => {
|
|
8730
|
+
if (status === 'restarting' || status === 'terminating' || status === 'unknown') {
|
|
8731
|
+
// Clear the variables for this specific notebook, but don't clear the files
|
|
8732
|
+
// as they have not changed.
|
|
8733
|
+
this.updateNotebookVariables(notebookPanel.id, []); // Clear variables for this specific notebook
|
|
8734
|
+
}
|
|
8735
|
+
});
|
|
8736
|
+
// Listen to kernel messages
|
|
8737
|
+
notebookPanel.context.sessionContext.iopubMessage.connect(async (sender, msg) => {
|
|
8738
|
+
// Watch for execute_input messages, which indicate is a request to execute code.
|
|
8739
|
+
// Previosuly, we watched for 'execute_result' messages, but these are only returned
|
|
8740
|
+
// from the kernel when a code cell prints a value to the output cell, which is not what we want.
|
|
8741
|
+
// TODO: Check if there is a race condition where we might end up fetching variables before the
|
|
8742
|
+
// code is executed. I don't think this is the case because the kernel runs in one thread I believe.
|
|
8743
|
+
// TODO: Eventually we should create a document manager listener so if the user uploads a new file
|
|
8744
|
+
// to jupyter, we can update the available files even if they have not executed a kernel message.
|
|
8745
|
+
if (msg.header.msg_type === 'execute_input') {
|
|
8746
|
+
void (0,_VariableInspector__WEBPACK_IMPORTED_MODULE_3__.fetchVariablesAndUpdateState)(notebookPanel, this.updateNotebookVariables.bind(this, notebookPanel.id));
|
|
8747
|
+
const updatedFiles = await (0,_FileInspector__WEBPACK_IMPORTED_MODULE_2__.getFiles)(app, notebookPanel);
|
|
8748
|
+
this.updateNotebookFiles(notebookPanel.id, updatedFiles);
|
|
8749
|
+
}
|
|
8750
|
+
});
|
|
8751
|
+
};
|
|
8752
|
+
this.notebookTracker = notebookTracker;
|
|
8753
|
+
// Setup the kernel listener to update context as kernel messages are received
|
|
8754
|
+
this.setupKernelListener(app, notebookTracker);
|
|
8755
|
+
}
|
|
8756
|
+
getNotebookContext(notebookId) {
|
|
8757
|
+
return this.notebookContexts.get(notebookId);
|
|
8758
|
+
}
|
|
8759
|
+
getActiveNotebookContext() {
|
|
8760
|
+
const activeNotebook = this.notebookTracker.currentWidget;
|
|
8761
|
+
if (!activeNotebook)
|
|
8762
|
+
return undefined;
|
|
8763
|
+
return this.getNotebookContext(activeNotebook.id);
|
|
8764
|
+
}
|
|
8765
|
+
updateNotebookVariables(notebookID, variables) {
|
|
8766
|
+
const context = this.notebookContexts.get(notebookID) || { variables: [], files: [] };
|
|
8767
|
+
context.variables = variables;
|
|
8768
|
+
this.notebookContexts.set(notebookID, context);
|
|
8769
|
+
}
|
|
8770
|
+
updateNotebookFiles(notebookID, files) {
|
|
8771
|
+
const context = this.notebookContexts.get(notebookID) || { variables: [], files: [] };
|
|
8772
|
+
context.files = files;
|
|
8773
|
+
this.notebookContexts.set(notebookID, context);
|
|
8774
|
+
}
|
|
8775
|
+
// Setup kernel execution listener
|
|
8776
|
+
setupKernelListener(app, notebookTracker) {
|
|
8777
|
+
// Start the kernel listener for the currently active notebook
|
|
8778
|
+
const notebookPanel = notebookTracker.currentWidget;
|
|
8779
|
+
void this._startKernelListener(app, notebookPanel);
|
|
8780
|
+
// Update the kernel listener whenever the active notebook changes
|
|
8781
|
+
notebookTracker.currentChanged.connect(async (_, notebookPanel) => {
|
|
8782
|
+
void this._startKernelListener(app, notebookPanel);
|
|
8783
|
+
});
|
|
8784
|
+
}
|
|
8785
|
+
}
|
|
8786
|
+
const ContextManagerPlugin = {
|
|
8787
|
+
id: 'mito-ai:context-manager',
|
|
8788
|
+
autoStart: true,
|
|
8789
|
+
requires: [_jupyterlab_notebook__WEBPACK_IMPORTED_MODULE_0__.INotebookTracker],
|
|
8790
|
+
provides: IContextManager,
|
|
8791
|
+
activate: (app, notebookTracker) => {
|
|
8792
|
+
console.log("mito-ai: ContextManagerPlugin activated");
|
|
8793
|
+
return new ContextManager(app, notebookTracker);
|
|
8794
|
+
}
|
|
8795
|
+
};
|
|
8796
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContextManagerPlugin);
|
|
8797
|
+
|
|
8798
|
+
|
|
8799
|
+
/***/ }),
|
|
8800
|
+
|
|
8801
|
+
/***/ "./lib/Extensions/ContextManager/FileInspector.js":
|
|
8802
|
+
/*!********************************************************!*\
|
|
8803
|
+
!*** ./lib/Extensions/ContextManager/FileInspector.js ***!
|
|
8804
|
+
\********************************************************/
|
|
8805
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8806
|
+
|
|
8807
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8808
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8809
|
+
/* harmony export */ getFiles: () => (/* binding */ getFiles)
|
|
8810
|
+
/* harmony export */ });
|
|
8811
|
+
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ "webpack/sharing/consume/default/@jupyterlab/coreutils");
|
|
8812
|
+
/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);
|
|
8813
|
+
/*
|
|
8814
|
+
* Copyright (c) Saga Inc.
|
|
8815
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8816
|
+
*/
|
|
8817
|
+
|
|
8818
|
+
/*
|
|
8819
|
+
Fetches all files in the current directory and updates the state of the files.
|
|
8820
|
+
*/
|
|
8821
|
+
const getFiles = async (app, notebookPanel) => {
|
|
8822
|
+
const fileManager = app.serviceManager.contents;
|
|
8823
|
+
const relativeNotebookPath = notebookPanel.context.path;
|
|
8824
|
+
const relativeDirectoryPath = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.dirname(relativeNotebookPath);
|
|
8825
|
+
try {
|
|
8826
|
+
const contents = await fileManager.get(relativeDirectoryPath);
|
|
8827
|
+
if (contents.type === 'directory') {
|
|
8828
|
+
// Filter for only csv and Excel files
|
|
8829
|
+
const data_files = contents.content.filter((file) => {
|
|
8830
|
+
var _a;
|
|
8831
|
+
const extension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
8832
|
+
return extension === 'csv' ||
|
|
8833
|
+
extension === 'xlsx' ||
|
|
8834
|
+
extension === 'xls' ||
|
|
8835
|
+
extension === 'xlsm';
|
|
8836
|
+
});
|
|
8837
|
+
// Map the files to the File type
|
|
8838
|
+
const files = data_files.map((file) => ({
|
|
8839
|
+
file_name: file.name
|
|
8840
|
+
}));
|
|
8841
|
+
// Update the state of the files
|
|
8842
|
+
return files;
|
|
8843
|
+
}
|
|
8844
|
+
else {
|
|
8845
|
+
// If the contents are not a directory, set the files to an empty array
|
|
8846
|
+
return [];
|
|
8847
|
+
}
|
|
8848
|
+
}
|
|
8849
|
+
catch (error) {
|
|
8850
|
+
console.error('Error listing directory contents:', error);
|
|
8851
|
+
return [];
|
|
8852
|
+
}
|
|
8853
|
+
};
|
|
8854
|
+
|
|
8855
|
+
|
|
8856
|
+
/***/ }),
|
|
8857
|
+
|
|
8858
|
+
/***/ "./lib/Extensions/ContextManager/VariableInspector.js":
|
|
8859
|
+
/*!************************************************************!*\
|
|
8860
|
+
!*** ./lib/Extensions/ContextManager/VariableInspector.js ***!
|
|
8861
|
+
\************************************************************/
|
|
8862
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8863
|
+
|
|
8864
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8865
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8866
|
+
/* harmony export */ fetchVariablesAndUpdateState: () => (/* binding */ fetchVariablesAndUpdateState)
|
|
8867
|
+
/* harmony export */ });
|
|
8868
|
+
/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/services */ "webpack/sharing/consume/default/@jupyterlab/services");
|
|
8869
|
+
/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__);
|
|
8870
|
+
/*
|
|
8871
|
+
* Copyright (c) Saga Inc.
|
|
8872
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
8873
|
+
*/
|
|
8874
|
+
|
|
8875
|
+
// TODO: Use something like raw-loader to load an actual python file
|
|
8876
|
+
// to make it easier to modify the script without creating syntax errors.
|
|
8877
|
+
const pythonVariableInspectionScript = `import json
|
|
8878
|
+
import inspect
|
|
8879
|
+
|
|
8880
|
+
|
|
8881
|
+
# We need to check if pandas is imported so we know if its safe
|
|
7520
8882
|
# to check for pandas dataframes
|
|
7521
8883
|
_is_pandas_imported = False
|
|
7522
8884
|
try:
|
|
@@ -7574,6 +8936,10 @@ def structured_globals():
|
|
|
7574
8936
|
if is_from_mitosheet(v):
|
|
7575
8937
|
continue
|
|
7576
8938
|
|
|
8939
|
+
if k.startswith("scratch_"):
|
|
8940
|
+
# Skip scratchpad variables the agent creates
|
|
8941
|
+
continue
|
|
8942
|
+
|
|
7577
8943
|
if not k.startswith("_") and k not in ("In", "Out", "json") and not callable(v):
|
|
7578
8944
|
|
|
7579
8945
|
if _is_pandas_imported and isinstance(v, pd.DataFrame):
|
|
@@ -10405,6 +11771,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10405
11771
|
/* harmony export */ COMMAND_MITO_AI_BETA_MODE_ENABLED: () => (/* binding */ COMMAND_MITO_AI_BETA_MODE_ENABLED),
|
|
10406
11772
|
/* harmony export */ COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE: () => (/* binding */ COMMAND_MITO_AI_CELL_TOOLBAR_ACCEPT_CODE),
|
|
10407
11773
|
/* harmony export */ COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE: () => (/* binding */ COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE),
|
|
11774
|
+
/* harmony export */ COMMAND_MITO_AI_OPEN_CHART_WIZARD: () => (/* binding */ COMMAND_MITO_AI_OPEN_CHART_WIZARD),
|
|
10408
11775
|
/* harmony export */ COMMAND_MITO_AI_OPEN_CHAT: () => (/* binding */ COMMAND_MITO_AI_OPEN_CHAT),
|
|
10409
11776
|
/* harmony export */ COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT: () => (/* binding */ COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT),
|
|
10410
11777
|
/* harmony export */ COMMAND_MITO_AI_PREVIEW_LATEST_CODE: () => (/* binding */ COMMAND_MITO_AI_PREVIEW_LATEST_CODE),
|
|
@@ -10437,6 +11804,8 @@ const COMMAND_MITO_AI_CELL_TOOLBAR_REJECT_CODE = `toolbar-button:reject-code`;
|
|
|
10437
11804
|
const COMMAND_MITO_AI_BETA_MODE_ENABLED = `${MITO_AI}:beta-mode-enabled`;
|
|
10438
11805
|
// Streamlit commands
|
|
10439
11806
|
const COMMAND_MITO_AI_PREVIEW_AS_STREAMLIT = 'mito-ai:preview-as-streamlit';
|
|
11807
|
+
// Chart Wizard commands
|
|
11808
|
+
const COMMAND_MITO_AI_OPEN_CHART_WIZARD = 'mito-ai:open-chart-wizard';
|
|
10440
11809
|
|
|
10441
11810
|
|
|
10442
11811
|
/***/ }),
|
|
@@ -10478,6 +11847,70 @@ const AgentComponentHeader = ({ icon, text, onClick, isExpanded, displayBorder =
|
|
|
10478
11847
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AgentComponentHeader);
|
|
10479
11848
|
|
|
10480
11849
|
|
|
11850
|
+
/***/ }),
|
|
11851
|
+
|
|
11852
|
+
/***/ "./lib/components/AgentComponents/AskUserQuestionToolUI.js":
|
|
11853
|
+
/*!*****************************************************************!*\
|
|
11854
|
+
!*** ./lib/components/AgentComponents/AskUserQuestionToolUI.js ***!
|
|
11855
|
+
\*****************************************************************/
|
|
11856
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11857
|
+
|
|
11858
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11859
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11860
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11861
|
+
/* harmony export */ });
|
|
11862
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
11863
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11864
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
11865
|
+
/* harmony import */ var _style_AgentToolUIComponent_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/AgentToolUIComponent.css */ "./style/AgentToolUIComponent.css");
|
|
11866
|
+
/* harmony import */ var _style_AskUserQuestionToolUI_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/AskUserQuestionToolUI.css */ "./style/AskUserQuestionToolUI.css");
|
|
11867
|
+
/* harmony import */ var _icons_QuestionIcon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../icons/QuestionIcon */ "./lib/icons/QuestionIcon.js");
|
|
11868
|
+
/* harmony import */ var _AgentComponentHeader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AgentComponentHeader */ "./lib/components/AgentComponents/AgentComponentHeader.js");
|
|
11869
|
+
/*
|
|
11870
|
+
* Copyright (c) Saga Inc.
|
|
11871
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
11872
|
+
*/
|
|
11873
|
+
|
|
11874
|
+
|
|
11875
|
+
|
|
11876
|
+
|
|
11877
|
+
|
|
11878
|
+
|
|
11879
|
+
const AskUserQuestionToolUI = ({ question, answers, onAnswerSelected, isLastMessage = false, }) => {
|
|
11880
|
+
const [isExpanded, setIsExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
11881
|
+
const cleanedAnswers = answers === null || answers === void 0 ? void 0 : answers.filter(answer => answer.trim() !== '');
|
|
11882
|
+
const handleAnswerClick = (answer) => {
|
|
11883
|
+
if (onAnswerSelected) {
|
|
11884
|
+
onAnswerSelected(answer);
|
|
11885
|
+
}
|
|
11886
|
+
};
|
|
11887
|
+
if (question.trim() === '') {
|
|
11888
|
+
return null;
|
|
11889
|
+
}
|
|
11890
|
+
// Collapsed mode: show as expandable item like Cell Updates
|
|
11891
|
+
if (!isLastMessage) {
|
|
11892
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_3__.classNames)('ask-user-question-collapsed', { expanded: isExpanded }) },
|
|
11893
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AgentComponentHeader__WEBPACK_IMPORTED_MODULE_4__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_QuestionIcon__WEBPACK_IMPORTED_MODULE_5__["default"], null), text: question, onClick: () => setIsExpanded(!isExpanded), isExpanded: isExpanded, displayBorder: true }),
|
|
11894
|
+
isExpanded && cleanedAnswers && cleanedAnswers.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "ask-user-question-expanded-content" },
|
|
11895
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "ask-user-question-collapsed-answers" }, cleanedAnswers.map((answer, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: index }, answer))))))));
|
|
11896
|
+
}
|
|
11897
|
+
// Active mode: show interactive UI with clickable buttons and purple glow
|
|
11898
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_3__.classNames)('agent-tool-ui-container', 'ask-user-question-container', 'ask-user-question-active') },
|
|
11899
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-tool-ui-content" },
|
|
11900
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "ask-user-question-pill" },
|
|
11901
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_QuestionIcon__WEBPACK_IMPORTED_MODULE_5__["default"], null),
|
|
11902
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "ask-user-question-pill-text" }, "User Question")),
|
|
11903
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "ask-user-question-content" },
|
|
11904
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "ask-user-question-question" }, question),
|
|
11905
|
+
cleanedAnswers && cleanedAnswers.length > 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "ask-user-question-answers" }, cleanedAnswers.map((answer, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { key: index, className: "ask-user-question-answer-button", onClick: () => handleAnswerClick(answer), title: answer },
|
|
11906
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { className: "ask-user-question-radio-icon", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11907
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5", fill: "none" })),
|
|
11908
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "ask-user-question-answer-text" }, answer)))))),
|
|
11909
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "ask-user-question-subtext" }, cleanedAnswers && cleanedAnswers.length > 0 ? 'Or respond in the Chat Input below' : 'Respond in the Chat Input below')))));
|
|
11910
|
+
};
|
|
11911
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AskUserQuestionToolUI);
|
|
11912
|
+
|
|
11913
|
+
|
|
10481
11914
|
/***/ }),
|
|
10482
11915
|
|
|
10483
11916
|
/***/ "./lib/components/AgentComponents/AssumptionToolUI.js":
|
|
@@ -10734,6 +12167,55 @@ const RunAllCellsToolUI = ({ inErrorFixup }) => {
|
|
|
10734
12167
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RunAllCellsToolUI);
|
|
10735
12168
|
|
|
10736
12169
|
|
|
12170
|
+
/***/ }),
|
|
12171
|
+
|
|
12172
|
+
/***/ "./lib/components/AgentComponents/ScratchpadToolUI.js":
|
|
12173
|
+
/*!************************************************************!*\
|
|
12174
|
+
!*** ./lib/components/AgentComponents/ScratchpadToolUI.js ***!
|
|
12175
|
+
\************************************************************/
|
|
12176
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12177
|
+
|
|
12178
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12179
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12180
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12181
|
+
/* harmony export */ });
|
|
12182
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
12183
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
12184
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/classNames */ "./lib/utils/classNames.js");
|
|
12185
|
+
/* harmony import */ var _style_AgentToolUIComponent_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../style/AgentToolUIComponent.css */ "./style/AgentToolUIComponent.css");
|
|
12186
|
+
/* harmony import */ var _style_AgentComponentHeader_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../style/AgentComponentHeader.css */ "./style/AgentComponentHeader.css");
|
|
12187
|
+
/* harmony import */ var _style_CodeBlock_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../style/CodeBlock.css */ "./style/CodeBlock.css");
|
|
12188
|
+
/* harmony import */ var _AgentComponentHeader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./AgentComponentHeader */ "./lib/components/AgentComponents/AgentComponentHeader.js");
|
|
12189
|
+
/* harmony import */ var _icons_NotepadIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../icons/NotepadIcon */ "./lib/icons/NotepadIcon.js");
|
|
12190
|
+
/* harmony import */ var _Extensions_AiChat_ChatMessage_PythonCode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Extensions/AiChat/ChatMessage/PythonCode */ "./lib/Extensions/AiChat/ChatMessage/PythonCode.js");
|
|
12191
|
+
/*
|
|
12192
|
+
* Copyright (c) Saga Inc.
|
|
12193
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
12194
|
+
*/
|
|
12195
|
+
|
|
12196
|
+
|
|
12197
|
+
|
|
12198
|
+
|
|
12199
|
+
|
|
12200
|
+
|
|
12201
|
+
|
|
12202
|
+
|
|
12203
|
+
const ScratchpadToolUI = ({ scratchpadCode, scratchpadSummary, scratchpadResult, renderMimeRegistry, }) => {
|
|
12204
|
+
const [isExpanded, setIsExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
12205
|
+
if (!scratchpadCode || scratchpadCode.trim() === '') {
|
|
12206
|
+
return null;
|
|
12207
|
+
}
|
|
12208
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_4__.classNames)('code-block-container', 'agent-mode', {
|
|
12209
|
+
'agent-mode-collapsed': !isExpanded,
|
|
12210
|
+
}) },
|
|
12211
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AgentComponentHeader__WEBPACK_IMPORTED_MODULE_5__["default"], { icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NotepadIcon__WEBPACK_IMPORTED_MODULE_6__["default"], null), text: scratchpadSummary || "Exploration code", onClick: () => setIsExpanded(!isExpanded), isExpanded: isExpanded, displayBorder: true }),
|
|
12212
|
+
isExpanded && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
12213
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Extensions_AiChat_ChatMessage_PythonCode__WEBPACK_IMPORTED_MODULE_7__["default"], { code: scratchpadCode, renderMimeRegistry: renderMimeRegistry }),
|
|
12214
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "scratchpad-result" }, scratchpadResult ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", null, scratchpadResult)) : (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("pre", { className: "scratchpad-result-warning" }, "Scratchpad results not available for display")))))));
|
|
12215
|
+
};
|
|
12216
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ScratchpadToolUI);
|
|
12217
|
+
|
|
12218
|
+
|
|
10737
12219
|
/***/ }),
|
|
10738
12220
|
|
|
10739
12221
|
/***/ "./lib/components/AgentComponents/ShimmerWrapper.js":
|
|
@@ -11175,47 +12657,124 @@ const MODEL_MAPPINGS = [
|
|
|
11175
12657
|
complexityHandling: 'High'
|
|
11176
12658
|
}
|
|
11177
12659
|
];
|
|
11178
|
-
|
|
12660
|
+
// Removed ALL_MODEL_DISPLAY_NAMES - now using availableModels from backend
|
|
11179
12661
|
// Maximum length for displayed model name before truncating
|
|
11180
12662
|
const DEFAULT_MODEL = _utils_models__WEBPACK_IMPORTED_MODULE_3__.CLAUDE_HAIKU_DISPLAY_NAME;
|
|
11181
12663
|
const ModelSelector = ({ onConfigChange }) => {
|
|
11182
12664
|
const [selectedModel, setSelectedModel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(DEFAULT_MODEL);
|
|
11183
12665
|
const [isOpen, setIsOpen] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
11184
12666
|
const [hoveredModel, setHoveredModel] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
12667
|
+
const [availableModels, setAvailableModels] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
|
|
12668
|
+
const [isLoadingModels, setIsLoadingModels] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true);
|
|
11185
12669
|
const dropdownRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
11186
|
-
//
|
|
12670
|
+
// Fetch available models from backend on mount
|
|
11187
12671
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
let fullModelName;
|
|
11191
|
-
let displayName;
|
|
11192
|
-
if (storedConfig) {
|
|
12672
|
+
const fetchModels = async () => {
|
|
12673
|
+
var _a, _b;
|
|
11193
12674
|
try {
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
12675
|
+
setIsLoadingModels(true);
|
|
12676
|
+
const models = await (0,_utils_models__WEBPACK_IMPORTED_MODULE_3__.getAvailableModels)();
|
|
12677
|
+
setAvailableModels(models);
|
|
12678
|
+
// Load config from localStorage and validate against available models
|
|
12679
|
+
const storedConfig = localStorage.getItem('llmModelConfig');
|
|
12680
|
+
let fullModelName;
|
|
12681
|
+
let displayName;
|
|
12682
|
+
if (storedConfig) {
|
|
12683
|
+
try {
|
|
12684
|
+
const parsedConfig = JSON.parse(storedConfig);
|
|
12685
|
+
const storedModel = parsedConfig.model;
|
|
12686
|
+
if (storedModel && typeof storedModel === 'string') {
|
|
12687
|
+
fullModelName = storedModel;
|
|
12688
|
+
// Check if model is in available models list
|
|
12689
|
+
if (models.includes(fullModelName)) {
|
|
12690
|
+
// Check if it's a LiteLLM model (has provider prefix)
|
|
12691
|
+
if (fullModelName.includes('/')) {
|
|
12692
|
+
// LiteLLM model - use model name directly as display name
|
|
12693
|
+
displayName = fullModelName;
|
|
12694
|
+
}
|
|
12695
|
+
else {
|
|
12696
|
+
// Standard model - find display name from MODEL_MAPPINGS
|
|
12697
|
+
displayName = (_a = MODEL_MAPPINGS.find(m => m.fullName === fullModelName)) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
12698
|
+
}
|
|
12699
|
+
}
|
|
12700
|
+
}
|
|
12701
|
+
}
|
|
12702
|
+
catch (e) {
|
|
12703
|
+
console.error('Failed to parse stored LLM config', e);
|
|
12704
|
+
}
|
|
12705
|
+
}
|
|
12706
|
+
// Fallback to default model or first available model if not found or invalid
|
|
12707
|
+
if (!fullModelName || !displayName || (fullModelName && !models.includes(fullModelName))) {
|
|
12708
|
+
if (models.length > 0) {
|
|
12709
|
+
// First, try to use the default model if it's available
|
|
12710
|
+
const defaultMapping = MODEL_MAPPINGS.find(m => m.displayName === DEFAULT_MODEL);
|
|
12711
|
+
if (defaultMapping && models.includes(defaultMapping.fullName)) {
|
|
12712
|
+
fullModelName = defaultMapping.fullName;
|
|
12713
|
+
displayName = defaultMapping.displayName;
|
|
12714
|
+
}
|
|
12715
|
+
else {
|
|
12716
|
+
// Fallback to first available model
|
|
12717
|
+
const firstModel = models[0];
|
|
12718
|
+
fullModelName = firstModel;
|
|
12719
|
+
// Check if it's a LiteLLM model
|
|
12720
|
+
if (firstModel && firstModel.includes('/')) {
|
|
12721
|
+
displayName = firstModel;
|
|
12722
|
+
}
|
|
12723
|
+
else {
|
|
12724
|
+
displayName = ((_b = MODEL_MAPPINGS.find(m => m.fullName === firstModel)) === null || _b === void 0 ? void 0 : _b.displayName) || firstModel;
|
|
12725
|
+
}
|
|
12726
|
+
}
|
|
12727
|
+
}
|
|
12728
|
+
else {
|
|
12729
|
+
// Fallback to default if no models available
|
|
12730
|
+
const defaultMapping = MODEL_MAPPINGS.find(m => m.displayName === DEFAULT_MODEL) || MODEL_MAPPINGS[0];
|
|
12731
|
+
if (defaultMapping) {
|
|
12732
|
+
fullModelName = defaultMapping.fullName;
|
|
12733
|
+
displayName = defaultMapping.displayName;
|
|
12734
|
+
}
|
|
12735
|
+
else {
|
|
12736
|
+
// Ultimate fallback
|
|
12737
|
+
fullModelName = _utils_models__WEBPACK_IMPORTED_MODULE_3__.GPT_4_1_MODEL_NAME;
|
|
12738
|
+
displayName = _utils_models__WEBPACK_IMPORTED_MODULE_3__.GPT_4_1_DISPLAY_NAME;
|
|
12739
|
+
}
|
|
12740
|
+
}
|
|
12741
|
+
}
|
|
12742
|
+
if (displayName && fullModelName) {
|
|
12743
|
+
setSelectedModel(displayName);
|
|
12744
|
+
onConfigChange({ model: fullModelName });
|
|
12745
|
+
}
|
|
11197
12746
|
}
|
|
11198
|
-
catch (
|
|
11199
|
-
console.error('Failed to
|
|
12747
|
+
catch (error) {
|
|
12748
|
+
console.error('Failed to fetch available models:', error);
|
|
12749
|
+
// Fallback to default models
|
|
12750
|
+
const defaultMapping = MODEL_MAPPINGS.find(m => m.displayName === DEFAULT_MODEL) || MODEL_MAPPINGS[0];
|
|
12751
|
+
setSelectedModel(defaultMapping.displayName);
|
|
12752
|
+
onConfigChange({ model: defaultMapping.fullName });
|
|
11200
12753
|
}
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
}
|
|
11207
|
-
if (!fullModelName || !displayName) {
|
|
11208
|
-
fullModelName = defaultMapping.fullName;
|
|
11209
|
-
displayName = defaultMapping.displayName;
|
|
11210
|
-
}
|
|
11211
|
-
setSelectedModel(displayName);
|
|
11212
|
-
onConfigChange({ model: fullModelName });
|
|
12754
|
+
finally {
|
|
12755
|
+
setIsLoadingModels(false);
|
|
12756
|
+
}
|
|
12757
|
+
};
|
|
12758
|
+
void fetchModels();
|
|
11213
12759
|
}, [onConfigChange]);
|
|
11214
|
-
const handleModelChange = (
|
|
12760
|
+
const handleModelChange = (modelName) => {
|
|
11215
12761
|
var _a;
|
|
11216
|
-
|
|
12762
|
+
if (!modelName) {
|
|
12763
|
+
return;
|
|
12764
|
+
}
|
|
12765
|
+
setSelectedModel(modelName);
|
|
11217
12766
|
setIsOpen(false);
|
|
11218
|
-
|
|
12767
|
+
// For LiteLLM models (with provider prefix), modelName is already the full model name
|
|
12768
|
+
// For standard models, we need to find the full name from MODEL_MAPPINGS
|
|
12769
|
+
let fullModelName;
|
|
12770
|
+
if (modelName.includes('/')) {
|
|
12771
|
+
// LiteLLM model - use model name directly
|
|
12772
|
+
fullModelName = modelName;
|
|
12773
|
+
}
|
|
12774
|
+
else {
|
|
12775
|
+
// Standard model - find full name from MODEL_MAPPINGS
|
|
12776
|
+
fullModelName = ((_a = MODEL_MAPPINGS.find(m => m.displayName === modelName)) === null || _a === void 0 ? void 0 : _a.fullName) || modelName;
|
|
12777
|
+
}
|
|
11219
12778
|
const newConfig = {
|
|
11220
12779
|
model: fullModelName
|
|
11221
12780
|
};
|
|
@@ -11255,18 +12814,30 @@ const ModelSelector = ({ onConfigChange }) => {
|
|
|
11255
12814
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_NucleausIcon__WEBPACK_IMPORTED_MODULE_4__["default"], { height: 10, width: 10 })),
|
|
11256
12815
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-name" }, selectedModel),
|
|
11257
12816
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "dropdown-arrow" }, "\u25BC")),
|
|
11258
|
-
isOpen && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `model-options dropup`, style: { minWidth: '150px' }, onMouseLeave: () => setHoveredModel(null) },
|
|
11259
|
-
|
|
11260
|
-
|
|
12817
|
+
isOpen && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: `model-options dropup`, style: { minWidth: '150px' }, onMouseLeave: () => setHoveredModel(null) }, isLoadingModels ? (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-option" }, "Loading models...")) : (availableModels.map(modelName => {
|
|
12818
|
+
// Check if it's a LiteLLM model (has provider prefix)
|
|
12819
|
+
const isLiteLLMModel = modelName.includes('/');
|
|
12820
|
+
let displayName;
|
|
12821
|
+
let modelMapping;
|
|
12822
|
+
if (isLiteLLMModel) {
|
|
12823
|
+
// LiteLLM model - use model name directly as display name
|
|
12824
|
+
displayName = modelName;
|
|
12825
|
+
}
|
|
12826
|
+
else {
|
|
12827
|
+
// Standard model - find display name from MODEL_MAPPINGS
|
|
12828
|
+
modelMapping = MODEL_MAPPINGS.find(m => m.fullName === modelName);
|
|
12829
|
+
displayName = (modelMapping === null || modelMapping === void 0 ? void 0 : modelMapping.displayName) || modelName;
|
|
12830
|
+
}
|
|
12831
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { key: modelName, className: `model-option ${displayName === selectedModel ? 'selected' : ''}`, onClick: (e) => {
|
|
11261
12832
|
e.stopPropagation();
|
|
11262
|
-
handleModelChange(
|
|
12833
|
+
handleModelChange(displayName);
|
|
11263
12834
|
}, onMouseEnter: () => setHoveredModel(modelMapping || null), "data-testid": "model-option" },
|
|
11264
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-option-name" },
|
|
12835
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-option-name" }, displayName),
|
|
11265
12836
|
(modelMapping === null || modelMapping === void 0 ? void 0 : modelMapping.type) === 'smart' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-type-icon" },
|
|
11266
12837
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_BrainIcon__WEBPACK_IMPORTED_MODULE_5__["default"], { height: 12, width: 12 }))),
|
|
11267
12838
|
(modelMapping === null || modelMapping === void 0 ? void 0 : modelMapping.type) === 'fast' && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-type-icon" },
|
|
11268
12839
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_LightningIcon__WEBPACK_IMPORTED_MODULE_6__["default"], { height: 12, width: 12 })))));
|
|
11269
|
-
})))),
|
|
12840
|
+
}))))),
|
|
11270
12841
|
isOpen && hoveredModel && react_dom__WEBPACK_IMPORTED_MODULE_1___default().createPortal(react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip" },
|
|
11271
12842
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-content" },
|
|
11272
12843
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-header" },
|
|
@@ -11288,7 +12859,14 @@ const ModelSelector = ({ onConfigChange }) => {
|
|
|
11288
12859
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "model-tooltip-metadata-value" }, hoveredModel.complexityHandling)))),
|
|
11289
12860
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-section" },
|
|
11290
12861
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-section-label" }, "Good For:"),
|
|
11291
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "model-tooltip-bullet-list" }, hoveredModel.goodFor.map((item, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: index, className: "model-tooltip-bullet-item" }, item))))))), document.body)
|
|
12862
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "model-tooltip-bullet-list" }, hoveredModel.goodFor.map((item, index) => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { key: index, className: "model-tooltip-bullet-item" }, item))))))), document.body),
|
|
12863
|
+
isOpen && !hoveredModel && selectedModel.includes('/') && react_dom__WEBPACK_IMPORTED_MODULE_1___default().createPortal(react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip" },
|
|
12864
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-content" },
|
|
12865
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-header" },
|
|
12866
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-title-row" },
|
|
12867
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-title" }, selectedModel))),
|
|
12868
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-section" },
|
|
12869
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "model-tooltip-section-label" }, "No additional information available")))), document.body)));
|
|
11292
12870
|
};
|
|
11293
12871
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ModelSelector);
|
|
11294
12872
|
|
|
@@ -12652,6 +14230,34 @@ const TextIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createEleme
|
|
|
12652
14230
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TextIcon);
|
|
12653
14231
|
|
|
12654
14232
|
|
|
14233
|
+
/***/ }),
|
|
14234
|
+
|
|
14235
|
+
/***/ "./lib/icons/NotepadIcon.js":
|
|
14236
|
+
/*!**********************************!*\
|
|
14237
|
+
!*** ./lib/icons/NotepadIcon.js ***!
|
|
14238
|
+
\**********************************/
|
|
14239
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14240
|
+
|
|
14241
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14242
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14243
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
14244
|
+
/* harmony export */ });
|
|
14245
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
14246
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14247
|
+
/*
|
|
14248
|
+
* Copyright (c) Saga Inc.
|
|
14249
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
14250
|
+
*/
|
|
14251
|
+
|
|
14252
|
+
const NotepadIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "14", height: "14", viewBox: "0 0 100 100", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
14253
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "18", y: "18", width: "64", height: "72", rx: "8", ry: "8", fill: "none", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.3" }),
|
|
14254
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("rect", { x: "10", y: "10", width: "64", height: "72", rx: "8", ry: "8", fill: "none", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
14255
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("line", { x1: "24", y1: "35", x2: "60", y2: "35", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round" }),
|
|
14256
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("line", { x1: "24", y1: "48", x2: "60", y2: "48", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round" }),
|
|
14257
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("line", { x1: "24", y1: "61", x2: "60", y2: "61", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round" })));
|
|
14258
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NotepadIcon);
|
|
14259
|
+
|
|
14260
|
+
|
|
12655
14261
|
/***/ }),
|
|
12656
14262
|
|
|
12657
14263
|
/***/ "./lib/icons/NucleausIcon.js":
|
|
@@ -12780,6 +14386,32 @@ const PlayButtonIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().creat
|
|
|
12780
14386
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PlayButtonIcon);
|
|
12781
14387
|
|
|
12782
14388
|
|
|
14389
|
+
/***/ }),
|
|
14390
|
+
|
|
14391
|
+
/***/ "./lib/icons/QuestionIcon.js":
|
|
14392
|
+
/*!***********************************!*\
|
|
14393
|
+
!*** ./lib/icons/QuestionIcon.js ***!
|
|
14394
|
+
\***********************************/
|
|
14395
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14396
|
+
|
|
14397
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14398
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14399
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
14400
|
+
/* harmony export */ });
|
|
14401
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
14402
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14403
|
+
/*
|
|
14404
|
+
* Copyright (c) Saga Inc.
|
|
14405
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
14406
|
+
*/
|
|
14407
|
+
|
|
14408
|
+
const QuestionIcon = () => (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", { width: "14", height: "14", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
14409
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M7.50018 11.5909C7.87674 11.5909 8.182 11.2856 8.182 10.9091C8.182 10.5325 7.87674 10.2273 7.50018 10.2273C7.12362 10.2273 6.81836 10.5325 6.81836 10.9091C6.81836 11.2856 7.12362 11.5909 7.50018 11.5909Z", fill: "currentColor" }),
|
|
14410
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.74299 5.15462C7.41191 5.16915 7.23537 5.30235 7.17425 5.4322C7.0139 5.77291 6.60771 5.91912 6.267 5.75877C5.92629 5.59841 5.78008 5.19222 5.94044 4.85151C6.29647 4.09503 7.06347 3.81949 7.6832 3.79229C8.27933 3.76613 9.02119 3.95601 9.43162 4.49121C9.74745 4.90306 9.92489 5.42514 9.85323 5.97406C9.78058 6.53067 9.46309 7.02995 8.94794 7.40893C8.26004 7.91501 8.26125 8.17321 8.26143 8.21081C8.26143 8.21136 8.26144 8.21186 8.26144 8.21232C8.26144 8.58887 7.95618 8.89413 7.57962 8.89413C7.20306 8.89413 6.8978 8.58887 6.8978 8.21232C6.8978 7.56001 7.27722 6.94514 8.13987 6.31051C8.40503 6.11545 8.48394 5.92881 8.50107 5.79756C8.5192 5.65864 8.47982 5.49093 8.34953 5.32102C8.34036 5.30907 8.29056 5.25933 8.16587 5.21452C8.04681 5.17174 7.8971 5.14785 7.74299 5.15462Z", fill: "currentColor" }),
|
|
14411
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { d: "M7.5 15C3.34091 15 0 11.6591 0 7.5C0 3.34091 3.34091 0 7.5 0C11.6591 0 15 3.34091 15 7.5C15 11.6591 11.6591 15 7.5 15ZM7.5 1.36364C4.09091 1.36364 1.36364 4.09091 1.36364 7.5C1.36364 10.9091 4.09091 13.6364 7.5 13.6364C10.9091 13.6364 13.6364 10.9091 13.6364 7.5C13.6364 4.09091 10.9091 1.36364 7.5 1.36364Z", fill: "currentColor" })));
|
|
14412
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (QuestionIcon);
|
|
14413
|
+
|
|
14414
|
+
|
|
12783
14415
|
/***/ }),
|
|
12784
14416
|
|
|
12785
14417
|
/***/ "./lib/icons/RejectIcon.js":
|
|
@@ -13056,6 +14688,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13056
14688
|
/* harmony import */ var _Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Extensions/NotebookFooter */ "./lib/Extensions/NotebookFooter/index.js");
|
|
13057
14689
|
/* harmony import */ var _Extensions_MitoThemeLight__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Extensions/MitoThemeLight */ "./lib/Extensions/MitoThemeLight/index.js");
|
|
13058
14690
|
/* harmony import */ var _Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Extensions/AppManager/ManageAppsPlugin */ "./lib/Extensions/AppManager/ManageAppsPlugin.js");
|
|
14691
|
+
/* harmony import */ var _Extensions_ChartWizard_ChartWizardPlugin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Extensions/ChartWizard/ChartWizardPlugin */ "./lib/Extensions/ChartWizard/ChartWizardPlugin.js");
|
|
13059
14692
|
/*
|
|
13060
14693
|
* Copyright (c) Saga Inc.
|
|
13061
14694
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -13073,6 +14706,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13073
14706
|
|
|
13074
14707
|
|
|
13075
14708
|
|
|
14709
|
+
|
|
13076
14710
|
// This is the main entry point to the mito-ai extension. It must export all of the top level
|
|
13077
14711
|
// extensions that we want to load.
|
|
13078
14712
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([
|
|
@@ -13088,7 +14722,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13088
14722
|
_Extensions_VersionCheck__WEBPACK_IMPORTED_MODULE_9__.versionCheckPlugin,
|
|
13089
14723
|
_Extensions_NotebookFooter__WEBPACK_IMPORTED_MODULE_10__["default"],
|
|
13090
14724
|
_Extensions_AppManager_ManageAppsPlugin__WEBPACK_IMPORTED_MODULE_11__["default"],
|
|
13091
|
-
_Extensions_MitoThemeLight__WEBPACK_IMPORTED_MODULE_12__["default"]
|
|
14725
|
+
_Extensions_MitoThemeLight__WEBPACK_IMPORTED_MODULE_12__["default"],
|
|
14726
|
+
_Extensions_ChartWizard_ChartWizardPlugin__WEBPACK_IMPORTED_MODULE_13__["default"]
|
|
13092
14727
|
]);
|
|
13093
14728
|
|
|
13094
14729
|
|
|
@@ -13102,6 +14737,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13102
14737
|
|
|
13103
14738
|
__webpack_require__.r(__webpack_exports__);
|
|
13104
14739
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14740
|
+
/* harmony export */ addChartField: () => (/* binding */ addChartField),
|
|
14741
|
+
/* harmony export */ convertChartCode: () => (/* binding */ convertChartCode),
|
|
13105
14742
|
/* harmony export */ getChatHistoryThread: () => (/* binding */ getChatHistoryThread),
|
|
13106
14743
|
/* harmony export */ getChatHistoryThreads: () => (/* binding */ getChatHistoryThreads),
|
|
13107
14744
|
/* harmony export */ getDatabaseConnections: () => (/* binding */ getDatabaseConnections),
|
|
@@ -13259,6 +14896,35 @@ const setUserKey = async (key, value) => {
|
|
|
13259
14896
|
}
|
|
13260
14897
|
return resp.data || '';
|
|
13261
14898
|
};
|
|
14899
|
+
/************************************
|
|
14900
|
+
|
|
14901
|
+
CHART WIZARD ENDPOINTS
|
|
14902
|
+
|
|
14903
|
+
************************************/
|
|
14904
|
+
const convertChartCode = async (code) => {
|
|
14905
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('chart-wizard/convert', {
|
|
14906
|
+
method: 'POST',
|
|
14907
|
+
body: JSON.stringify({ code }),
|
|
14908
|
+
});
|
|
14909
|
+
if (resp.error) {
|
|
14910
|
+
throw new Error(resp.error.message);
|
|
14911
|
+
}
|
|
14912
|
+
return resp.data;
|
|
14913
|
+
};
|
|
14914
|
+
const addChartField = async (code, userDescription, existingVariables) => {
|
|
14915
|
+
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('chart-wizard/add-field', {
|
|
14916
|
+
method: 'POST',
|
|
14917
|
+
body: JSON.stringify({
|
|
14918
|
+
code,
|
|
14919
|
+
user_description: userDescription,
|
|
14920
|
+
existing_variables: existingVariables
|
|
14921
|
+
}),
|
|
14922
|
+
});
|
|
14923
|
+
if (resp.error) {
|
|
14924
|
+
throw new Error(resp.error.message);
|
|
14925
|
+
}
|
|
14926
|
+
return resp.data;
|
|
14927
|
+
};
|
|
13262
14928
|
const getChatHistoryThreads = async () => {
|
|
13263
14929
|
var _a;
|
|
13264
14930
|
const resp = await (0,_utils__WEBPACK_IMPORTED_MODULE_0__.requestAPI)('chat-history/threads');
|
|
@@ -13507,6 +15173,12 @@ const retryIfExecutionError = async (notebookPanel, app, sendAgentSmartDebugMess
|
|
|
13507
15173
|
console.log('Error after running all cells:', result.errorMessage);
|
|
13508
15174
|
}
|
|
13509
15175
|
}
|
|
15176
|
+
else if (agentResponse.type === 'ask_user_question' || agentResponse.type === 'finished_task') {
|
|
15177
|
+
// When the agent asks a question during error retry, we should stop the agent execution
|
|
15178
|
+
// and wait for the user's response, just like in the main execution loop
|
|
15179
|
+
await markAgentForStopping();
|
|
15180
|
+
return 'interupted';
|
|
15181
|
+
}
|
|
13510
15182
|
else {
|
|
13511
15183
|
// Agent responded with an unexpected type for error fixing
|
|
13512
15184
|
return 'failure';
|
|
@@ -13977,24 +15649,62 @@ const processChatHistoryForErrorGrouping = (displayOptimizedChatHistory) => {
|
|
|
13977
15649
|
const processedDisplayOptimizedChatHistory = [];
|
|
13978
15650
|
let groupedErrorMessages = [];
|
|
13979
15651
|
for (let i = 0; i < displayOptimizedChatHistory.length; i++) {
|
|
13980
|
-
|
|
15652
|
+
let displayOptimizedChatItem = displayOptimizedChatHistory[i];
|
|
13981
15653
|
if (!displayOptimizedChatItem) {
|
|
13982
15654
|
continue;
|
|
13983
15655
|
}
|
|
15656
|
+
// Associate scratchpad results with their corresponding scratchpad tool calls
|
|
15657
|
+
// The scratchpad result is stored in the next message (the user message that follows the AI's scratchpad response)
|
|
15658
|
+
if (((_a = displayOptimizedChatItem.agentResponse) === null || _a === void 0 ? void 0 : _a.type) === 'scratchpad') {
|
|
15659
|
+
const nextIndex = i + 1;
|
|
15660
|
+
if (nextIndex < displayOptimizedChatHistory.length) {
|
|
15661
|
+
const nextItem = displayOptimizedChatHistory[nextIndex];
|
|
15662
|
+
if (nextItem === null || nextItem === void 0 ? void 0 : nextItem.scratchpadResult) {
|
|
15663
|
+
displayOptimizedChatItem = {
|
|
15664
|
+
...displayOptimizedChatItem,
|
|
15665
|
+
scratchpadResult: nextItem.scratchpadResult
|
|
15666
|
+
};
|
|
15667
|
+
}
|
|
15668
|
+
}
|
|
15669
|
+
}
|
|
13984
15670
|
const messageContent = (0,_strings__WEBPACK_IMPORTED_MODULE_0__.getContentStringFromMessage)(displayOptimizedChatItem.message);
|
|
13985
15671
|
const _isErrorFixupMessage = (0,_errors__WEBPACK_IMPORTED_MODULE_1__.isErrorFixupMessage)(displayOptimizedChatItem.promptType, displayOptimizedChatItem.message, messageContent);
|
|
13986
15672
|
if (_isErrorFixupMessage) {
|
|
13987
|
-
// If the current message is an error fixup message, we
|
|
13988
|
-
//
|
|
15673
|
+
// If the current message is an error fixup message, we add it to the current group.
|
|
15674
|
+
// This allows consecutive error/cell_update cycles to be grouped together, which
|
|
15675
|
+
// results in a collapsed UI that keeps the error-fixing flow out of the way for users.
|
|
15676
|
+
// For example: [error1, cellUpdate1, error2, askUserQuestion] →
|
|
15677
|
+
// [[error1, cellUpdate1, error2], askUserQuestion]
|
|
15678
|
+
// All the error-fixing is grouped together, and askUserQuestion displays separately with its UI.
|
|
13989
15679
|
groupedErrorMessages.push(displayOptimizedChatItem);
|
|
13990
15680
|
// Note: We check that the next message is an ai response to the error fixup message.
|
|
13991
15681
|
// If the user has stopped the agent, it might not be an ai response to the error fixup message.
|
|
13992
15682
|
const next_index = i + 1;
|
|
15683
|
+
const nextItem = displayOptimizedChatHistory[next_index];
|
|
13993
15684
|
if (next_index < displayOptimizedChatHistory.length &&
|
|
13994
|
-
(
|
|
13995
|
-
(
|
|
13996
|
-
|
|
13997
|
-
|
|
15685
|
+
(nextItem === null || nextItem === void 0 ? void 0 : nextItem.type) === 'openai message' &&
|
|
15686
|
+
(nextItem === null || nextItem === void 0 ? void 0 : nextItem.message.role) === 'assistant') {
|
|
15687
|
+
// Only group if the agent response is cell_update or run_all_cells.
|
|
15688
|
+
// Other types (finished_task, ask_user_question) should be displayed normally
|
|
15689
|
+
// with their UI components, not grouped with the error message.
|
|
15690
|
+
const agentResponseType = (_b = nextItem.agentResponse) === null || _b === void 0 ? void 0 : _b.type;
|
|
15691
|
+
if (agentResponseType === 'cell_update' || agentResponseType === 'run_all_cells') {
|
|
15692
|
+
groupedErrorMessages.push(nextItem);
|
|
15693
|
+
i = next_index;
|
|
15694
|
+
}
|
|
15695
|
+
else {
|
|
15696
|
+
// Don't group - push the error message as a standalone item and let the next message
|
|
15697
|
+
// be displayed normally with its UI component (finished_task, ask_user_question, etc.)
|
|
15698
|
+
processedDisplayOptimizedChatHistory.push(groupedErrorMessages);
|
|
15699
|
+
groupedErrorMessages = new Array();
|
|
15700
|
+
// Continue to next iteration - don't skip the next item, let it be processed normally
|
|
15701
|
+
}
|
|
15702
|
+
}
|
|
15703
|
+
else {
|
|
15704
|
+
// No next message or next message is not an assistant message
|
|
15705
|
+
// Push the error message as a standalone item
|
|
15706
|
+
processedDisplayOptimizedChatHistory.push(groupedErrorMessages);
|
|
15707
|
+
groupedErrorMessages = new Array();
|
|
13998
15708
|
}
|
|
13999
15709
|
}
|
|
14000
15710
|
else {
|
|
@@ -14698,7 +16408,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14698
16408
|
/* harmony export */ GPT_4_1_DISPLAY_NAME: () => (/* binding */ GPT_4_1_DISPLAY_NAME),
|
|
14699
16409
|
/* harmony export */ GPT_4_1_MODEL_NAME: () => (/* binding */ GPT_4_1_MODEL_NAME),
|
|
14700
16410
|
/* harmony export */ GPT_5_2_DISPLAY_NAME: () => (/* binding */ GPT_5_2_DISPLAY_NAME),
|
|
14701
|
-
/* harmony export */ GPT_5_2_MODEL_NAME: () => (/* binding */ GPT_5_2_MODEL_NAME)
|
|
16411
|
+
/* harmony export */ GPT_5_2_MODEL_NAME: () => (/* binding */ GPT_5_2_MODEL_NAME),
|
|
16412
|
+
/* harmony export */ getAvailableModels: () => (/* binding */ getAvailableModels)
|
|
14702
16413
|
/* harmony export */ });
|
|
14703
16414
|
/*
|
|
14704
16415
|
* Copyright (c) Saga Inc.
|
|
@@ -14716,6 +16427,33 @@ const GEMINI_3_FLASH_DISPLAY_NAME = 'Gemini 3 Flash';
|
|
|
14716
16427
|
const GEMINI_3_FLASH_MODEL_NAME = 'gemini-3-flash-preview';
|
|
14717
16428
|
const GEMINI_3_PRO_DISPLAY_NAME = 'Gemini 3 Pro';
|
|
14718
16429
|
const GEMINI_3_PRO_MODEL_NAME = 'gemini-3-pro-preview';
|
|
16430
|
+
/**
|
|
16431
|
+
* Fetch available models from the backend API.
|
|
16432
|
+
* Returns the list of model names that are available based on enterprise mode and LiteLLM configuration.
|
|
16433
|
+
*
|
|
16434
|
+
* @returns Promise resolving to an array of model names
|
|
16435
|
+
*/
|
|
16436
|
+
async function getAvailableModels() {
|
|
16437
|
+
var _a;
|
|
16438
|
+
// Lazy import to avoid loading JupyterLab dependencies when only constants are needed
|
|
16439
|
+
const { requestAPI } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../restAPI/utils */ "./lib/restAPI/utils.js"));
|
|
16440
|
+
const response = await requestAPI('available-models', {
|
|
16441
|
+
method: 'GET'
|
|
16442
|
+
});
|
|
16443
|
+
if (response.error) {
|
|
16444
|
+
console.error('Failed to fetch available models:', response.error.message);
|
|
16445
|
+
// Return default models as fallback
|
|
16446
|
+
return [
|
|
16447
|
+
GPT_4_1_MODEL_NAME,
|
|
16448
|
+
GPT_5_2_MODEL_NAME,
|
|
16449
|
+
CLAUDE_SONNET_MODEL_NAME,
|
|
16450
|
+
CLAUDE_HAIKU_MODEL_NAME,
|
|
16451
|
+
GEMINI_3_FLASH_MODEL_NAME,
|
|
16452
|
+
GEMINI_3_PRO_MODEL_NAME,
|
|
16453
|
+
];
|
|
16454
|
+
}
|
|
16455
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.models) || [];
|
|
16456
|
+
}
|
|
14719
16457
|
|
|
14720
16458
|
|
|
14721
16459
|
/***/ }),
|
|
@@ -15197,15 +16935,152 @@ const getNotebookID = (notebookPanel) => {
|
|
|
15197
16935
|
if (notebookPanel === null) {
|
|
15198
16936
|
return undefined;
|
|
15199
16937
|
}
|
|
15200
|
-
return (_a = notebookPanel.model) === null || _a === void 0 ? void 0 : _a.getMetadata(MITO_NOTEBOOK_ID_KEY);
|
|
15201
|
-
};
|
|
15202
|
-
const getNotebookIDAndSetIfNonexistant = (notebookPanel) => {
|
|
15203
|
-
const notebookID = getNotebookID(notebookPanel);
|
|
15204
|
-
if (notebookID === undefined) {
|
|
15205
|
-
setNotebookID(notebookPanel);
|
|
16938
|
+
return (_a = notebookPanel.model) === null || _a === void 0 ? void 0 : _a.getMetadata(MITO_NOTEBOOK_ID_KEY);
|
|
16939
|
+
};
|
|
16940
|
+
const getNotebookIDAndSetIfNonexistant = (notebookPanel) => {
|
|
16941
|
+
const notebookID = getNotebookID(notebookPanel);
|
|
16942
|
+
if (notebookID === undefined) {
|
|
16943
|
+
setNotebookID(notebookPanel);
|
|
16944
|
+
}
|
|
16945
|
+
return getNotebookID(notebookPanel);
|
|
16946
|
+
};
|
|
16947
|
+
|
|
16948
|
+
|
|
16949
|
+
/***/ }),
|
|
16950
|
+
|
|
16951
|
+
/***/ "./lib/utils/scratchpadExecution.js":
|
|
16952
|
+
/*!******************************************!*\
|
|
16953
|
+
!*** ./lib/utils/scratchpadExecution.js ***!
|
|
16954
|
+
\******************************************/
|
|
16955
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16956
|
+
|
|
16957
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16958
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16959
|
+
/* harmony export */ executeScratchpadCode: () => (/* binding */ executeScratchpadCode),
|
|
16960
|
+
/* harmony export */ formatScratchpadResult: () => (/* binding */ formatScratchpadResult)
|
|
16961
|
+
/* harmony export */ });
|
|
16962
|
+
/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/services */ "webpack/sharing/consume/default/@jupyterlab/services");
|
|
16963
|
+
/* harmony import */ var _jupyterlab_services__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__);
|
|
16964
|
+
/* harmony import */ var _Extensions_ErrorMimeRenderer_errorUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Extensions/ErrorMimeRenderer/errorUtils */ "./lib/Extensions/ErrorMimeRenderer/errorUtils.js");
|
|
16965
|
+
/*
|
|
16966
|
+
* Copyright (c) Saga Inc.
|
|
16967
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
16968
|
+
*/
|
|
16969
|
+
|
|
16970
|
+
|
|
16971
|
+
/**
|
|
16972
|
+
* Executes Python code silently in the kernel and captures the output.
|
|
16973
|
+
* This is used for scratchpad exploration work that shouldn't leave code in the notebook.
|
|
16974
|
+
*
|
|
16975
|
+
* @param notebookPanel - The notebook panel containing the kernel
|
|
16976
|
+
* @param code - The Python code to execute
|
|
16977
|
+
* @returns Promise resolving to the execution result with stdout, stderr, and any errors
|
|
16978
|
+
*/
|
|
16979
|
+
async function executeScratchpadCode(notebookPanel, code) {
|
|
16980
|
+
var _a;
|
|
16981
|
+
const kernel = (_a = notebookPanel.context.sessionContext.session) === null || _a === void 0 ? void 0 : _a.kernel;
|
|
16982
|
+
if (!kernel) {
|
|
16983
|
+
return {
|
|
16984
|
+
success: false,
|
|
16985
|
+
stdout: '',
|
|
16986
|
+
stderr: '',
|
|
16987
|
+
error: 'No kernel available'
|
|
16988
|
+
};
|
|
16989
|
+
}
|
|
16990
|
+
return new Promise((resolve) => {
|
|
16991
|
+
let stdout = '';
|
|
16992
|
+
let stderr = '';
|
|
16993
|
+
let errorMessage = undefined;
|
|
16994
|
+
let traceback = undefined;
|
|
16995
|
+
let hasError = false;
|
|
16996
|
+
// Request the kernel to execute the code silently
|
|
16997
|
+
const future = kernel.requestExecute({
|
|
16998
|
+
code: code,
|
|
16999
|
+
// Adding silent: true prevents an execute_input message from being sent
|
|
17000
|
+
silent: true
|
|
17001
|
+
});
|
|
17002
|
+
// Listen for output from the kernel
|
|
17003
|
+
future.onIOPub = (msg) => {
|
|
17004
|
+
// Handle stream messages (stdout/stderr)
|
|
17005
|
+
if (_jupyterlab_services__WEBPACK_IMPORTED_MODULE_0__.KernelMessage.isStreamMsg(msg)) {
|
|
17006
|
+
if (msg.content.name === 'stdout') {
|
|
17007
|
+
// Accumulate stdout output (may come in chunks)
|
|
17008
|
+
stdout += msg.content.text;
|
|
17009
|
+
}
|
|
17010
|
+
else if (msg.content.name === 'stderr') {
|
|
17011
|
+
// Accumulate stderr output (may come in chunks)
|
|
17012
|
+
stderr += msg.content.text;
|
|
17013
|
+
}
|
|
17014
|
+
}
|
|
17015
|
+
// Handle error messages
|
|
17016
|
+
else if (msg.header.msg_type === 'error') {
|
|
17017
|
+
hasError = true;
|
|
17018
|
+
const errorContent = msg.content;
|
|
17019
|
+
errorMessage = errorContent.ename + ': ' + errorContent.evalue;
|
|
17020
|
+
// Extract traceback if available
|
|
17021
|
+
if (errorContent.traceback && Array.isArray(errorContent.traceback)) {
|
|
17022
|
+
traceback = (0,_Extensions_ErrorMimeRenderer_errorUtils__WEBPACK_IMPORTED_MODULE_1__.getFullErrorMessageFromTraceback)(errorContent.traceback);
|
|
17023
|
+
}
|
|
17024
|
+
else if (errorContent.traceback) {
|
|
17025
|
+
traceback = String(errorContent.traceback);
|
|
17026
|
+
}
|
|
17027
|
+
}
|
|
17028
|
+
};
|
|
17029
|
+
// Handle execution completion
|
|
17030
|
+
future.done.then(() => {
|
|
17031
|
+
resolve({
|
|
17032
|
+
success: !hasError,
|
|
17033
|
+
stdout: stdout.trim(),
|
|
17034
|
+
stderr: stderr.trim(),
|
|
17035
|
+
error: errorMessage,
|
|
17036
|
+
traceback: traceback
|
|
17037
|
+
});
|
|
17038
|
+
}).catch((error) => {
|
|
17039
|
+
// Handle execution failure
|
|
17040
|
+
resolve({
|
|
17041
|
+
success: false,
|
|
17042
|
+
stdout: stdout.trim(),
|
|
17043
|
+
stderr: stderr.trim(),
|
|
17044
|
+
error: error.message || 'Execution failed',
|
|
17045
|
+
traceback: error.stack
|
|
17046
|
+
});
|
|
17047
|
+
});
|
|
17048
|
+
});
|
|
17049
|
+
}
|
|
17050
|
+
/**
|
|
17051
|
+
* Formats a scratchpad execution result into a string message for the agent.
|
|
17052
|
+
* Handles both success and error cases, formatting stdout, stderr, errors, and tracebacks.
|
|
17053
|
+
*
|
|
17054
|
+
* @param scratchpadResult - The result from executing scratchpad code
|
|
17055
|
+
* @returns Formatted string message containing the execution results
|
|
17056
|
+
*/
|
|
17057
|
+
function formatScratchpadResult(scratchpadResult) {
|
|
17058
|
+
let resultMessage = '';
|
|
17059
|
+
if (scratchpadResult.success) {
|
|
17060
|
+
if (scratchpadResult.stdout) {
|
|
17061
|
+
resultMessage += scratchpadResult.stdout;
|
|
17062
|
+
}
|
|
17063
|
+
if (scratchpadResult.stderr) {
|
|
17064
|
+
resultMessage += (resultMessage ? '\n' : '') + `[stderr]\n${scratchpadResult.stderr}`;
|
|
17065
|
+
}
|
|
17066
|
+
}
|
|
17067
|
+
else {
|
|
17068
|
+
resultMessage += '[Execution Error]\n';
|
|
17069
|
+
if (scratchpadResult.error) {
|
|
17070
|
+
resultMessage += `${scratchpadResult.error}\n`;
|
|
17071
|
+
}
|
|
17072
|
+
if (scratchpadResult.traceback) {
|
|
17073
|
+
resultMessage += `\n${scratchpadResult.traceback}`;
|
|
17074
|
+
}
|
|
17075
|
+
if (scratchpadResult.stdout) {
|
|
17076
|
+
resultMessage += `\n[stdout before error]\n${scratchpadResult.stdout}`;
|
|
17077
|
+
}
|
|
17078
|
+
if (scratchpadResult.stderr) {
|
|
17079
|
+
resultMessage += `\n[stderr]\n${scratchpadResult.stderr}`;
|
|
17080
|
+
}
|
|
15206
17081
|
}
|
|
15207
|
-
return
|
|
15208
|
-
}
|
|
17082
|
+
return resultMessage;
|
|
17083
|
+
}
|
|
15209
17084
|
|
|
15210
17085
|
|
|
15211
17086
|
/***/ }),
|
|
@@ -16508,6 +18383,59 @@ class CompletionWebsocketClient extends _BaseWebsocketClient__WEBPACK_IMPORTED_M
|
|
|
16508
18383
|
}
|
|
16509
18384
|
|
|
16510
18385
|
|
|
18386
|
+
/***/ }),
|
|
18387
|
+
|
|
18388
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/AddFieldButton.css":
|
|
18389
|
+
/*!************************************************************************!*\
|
|
18390
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/AddFieldButton.css ***!
|
|
18391
|
+
\************************************************************************/
|
|
18392
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
18393
|
+
|
|
18394
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18395
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18396
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18397
|
+
/* harmony export */ });
|
|
18398
|
+
/* 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");
|
|
18399
|
+
/* 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__);
|
|
18400
|
+
/* 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");
|
|
18401
|
+
/* 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__);
|
|
18402
|
+
// Imports
|
|
18403
|
+
|
|
18404
|
+
|
|
18405
|
+
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()));
|
|
18406
|
+
// Module
|
|
18407
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
18408
|
+
* Copyright (c) Saga Inc.
|
|
18409
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
18410
|
+
*/
|
|
18411
|
+
|
|
18412
|
+
.add-field-container {
|
|
18413
|
+
margin-top: 16px;
|
|
18414
|
+
padding-top: 16px;
|
|
18415
|
+
border-top: 1px solid #e0e0e0;
|
|
18416
|
+
}
|
|
18417
|
+
|
|
18418
|
+
.add-field-button {
|
|
18419
|
+
width: 100%;
|
|
18420
|
+
}
|
|
18421
|
+
|
|
18422
|
+
.add-field-dialog-textarea {
|
|
18423
|
+
width: 100%;
|
|
18424
|
+
padding: 8px;
|
|
18425
|
+
margin-top: 10px;
|
|
18426
|
+
font-size: 14px;
|
|
18427
|
+
border: 1px solid #ccc;
|
|
18428
|
+
border-radius: 4px;
|
|
18429
|
+
min-height: 100px;
|
|
18430
|
+
resize: vertical;
|
|
18431
|
+
font-family: inherit;
|
|
18432
|
+
box-sizing: border-box;
|
|
18433
|
+
}
|
|
18434
|
+
`, "",{"version":3,"sources":["webpack://./style/AddFieldButton.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,gBAAgB;IAChB,iBAAiB;IACjB,6BAA6B;AACjC;;AAEA;IACI,WAAW;AACf;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,sBAAsB;IACtB,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,oBAAoB;IACpB,sBAAsB;AAC1B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.add-field-container {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e0e0e0;\n}\n\n.add-field-button {\n width: 100%;\n}\n\n.add-field-dialog-textarea {\n width: 100%;\n padding: 8px;\n margin-top: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 4px;\n min-height: 100px;\n resize: vertical;\n font-family: inherit;\n box-sizing: border-box;\n}\n"],"sourceRoot":""}]);
|
|
18435
|
+
// Exports
|
|
18436
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
18437
|
+
|
|
18438
|
+
|
|
16511
18439
|
/***/ }),
|
|
16512
18440
|
|
|
16513
18441
|
/***/ "./node_modules/css-loader/dist/cjs.js!./style/AgentChangeControls.css":
|
|
@@ -16640,6 +18568,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16640
18568
|
|
|
16641
18569
|
.agent-component-header:hover {
|
|
16642
18570
|
background-color: var(--jp-layout-color3);
|
|
18571
|
+
opacity: 0.75;
|
|
16643
18572
|
}
|
|
16644
18573
|
|
|
16645
18574
|
.agent-component-header.no-border {
|
|
@@ -16650,6 +18579,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16650
18579
|
border: none;
|
|
16651
18580
|
border-radius: 5px 5px 0 0;
|
|
16652
18581
|
background-color: var(--jp-layout-color2);
|
|
18582
|
+
opacity: 0.85;
|
|
16653
18583
|
}
|
|
16654
18584
|
|
|
16655
18585
|
.agent-component-header.error-fixup {
|
|
@@ -16706,7 +18636,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
16706
18636
|
|
|
16707
18637
|
.agent-component-header-expand-icon.expanded {
|
|
16708
18638
|
transform: rotate(90deg);
|
|
16709
|
-
} `, "",{"version":3,"sources":["webpack://./style/AgentComponentHeader.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,eAAe;IACf,+DAA+D;IAC/D,+BAA+B;IAC/B,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,oDAAoD;IACpD,sDAAsD;IACtD,8DAA8D;AAClE;;AAEA;IACI,yCAAyC;
|
|
18639
|
+
} `, "",{"version":3,"sources":["webpack://./style/AgentComponentHeader.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,eAAe;IACf,+DAA+D;IAC/D,+BAA+B;IAC/B,aAAa;IACb,8BAA8B;IAC9B,mBAAmB;IACnB,oDAAoD;IACpD,sDAAsD;IACtD,8DAA8D;AAClE;;AAEA;IACI,yCAAyC;IACzC,aAAa;AACjB;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,YAAY;IACZ,0BAA0B;IAC1B,yCAAyC;IACzC,aAAa;AACjB;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,OAAO;IACP,YAAY;AAChB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,QAAQ;IACR,cAAc;AAClB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,uBAAuB;IACvB,eAAe;IACf,kBAAkB;IAClB,+BAA+B;IAC/B,yDAAyD;IACzD,UAAU;AACd;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;AACnC;;AAEA;IACI,cAAc;IACd,+BAA+B;AACnC;;AAEA;IACI,wBAAwB;AAC5B","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.agent-component-header {\n cursor: pointer;\n padding: 10px var(--chat-taskpane-tool-call-horizontal-padding);\n color: var(--jp-ui-font-color2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--jp-cell-editor-border-color);\n border-radius: var(--chat-taskpane-item-border-radius);\n transition: background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.agent-component-header:hover {\n background-color: var(--jp-layout-color3);\n opacity: 0.75;\n}\n\n.agent-component-header.no-border {\n border: none;\n}\n\n.agent-component-header.expanded {\n border: none;\n border-radius: 5px 5px 0 0;\n background-color: var(--jp-layout-color2);\n opacity: 0.85;\n}\n\n.agent-component-header.error-fixup {\n border: none;\n}\n\n.agent-component-header.error-fixup.expanded {\n background-color: var(--jp-layout-color2);\n}\n\n.agent-component-header-content {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-component-header-content svg {\n flex-shrink: 0;\n}\n\n.agent-component-header-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-shrink: 0;\n}\n\n.agent-component-header-action-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background: transparent;\n cursor: pointer;\n border-radius: 4px;\n color: var(--jp-ui-font-color2);\n transition: background-color 0.15s ease, color 0.15s ease;\n padding: 0;\n}\n\n.agent-component-header-action-button:hover {\n background-color: var(--jp-layout-color3);\n color: var(--jp-ui-font-color1);\n}\n\n.agent-component-header-expand-icon {\n flex-shrink: 0;\n transition: transform 0.2s ease;\n}\n\n.agent-component-header-expand-icon.expanded {\n transform: rotate(90deg);\n} "],"sourceRoot":""}]);
|
|
16710
18640
|
// Exports
|
|
16711
18641
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
16712
18642
|
|
|
@@ -17151,46 +19081,274 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
17151
19081
|
font-size: 12px;
|
|
17152
19082
|
}
|
|
17153
19083
|
|
|
17154
|
-
.app-item-last-deployed {
|
|
17155
|
-
color: var(--jp-ui-font-color2);
|
|
17156
|
-
font-size: 11px;
|
|
19084
|
+
.app-item-last-deployed {
|
|
19085
|
+
color: var(--jp-ui-font-color2);
|
|
19086
|
+
font-size: 11px;
|
|
19087
|
+
}
|
|
19088
|
+
|
|
19089
|
+
.app-item-url-container {
|
|
19090
|
+
display: flex;
|
|
19091
|
+
align-items: center;
|
|
19092
|
+
background-color: var(--jp-layout-color1);
|
|
19093
|
+
border: 1px solid var(--jp-border-color2);
|
|
19094
|
+
border-radius: 3px;
|
|
19095
|
+
padding: 6px 8px;
|
|
19096
|
+
}
|
|
19097
|
+
|
|
19098
|
+
.app-item-url {
|
|
19099
|
+
flex: 1;
|
|
19100
|
+
color: var(--jp-ui-font-color1);
|
|
19101
|
+
font-size: 11px;
|
|
19102
|
+
overflow: hidden;
|
|
19103
|
+
text-overflow: ellipsis;
|
|
19104
|
+
white-space: nowrap;
|
|
19105
|
+
font-family: var(--jp-code-font-family);
|
|
19106
|
+
}
|
|
19107
|
+
|
|
19108
|
+
.app-item-copy-button {
|
|
19109
|
+
border: none;
|
|
19110
|
+
background: transparent;
|
|
19111
|
+
cursor: pointer;
|
|
19112
|
+
padding: 2px;
|
|
19113
|
+
display: flex;
|
|
19114
|
+
align-items: center;
|
|
19115
|
+
justify-content: center;
|
|
19116
|
+
margin-left: 8px;
|
|
19117
|
+
border-radius: 2px;
|
|
19118
|
+
}
|
|
19119
|
+
|
|
19120
|
+
.app-item-copy-button:hover {
|
|
19121
|
+
background-color: var(--jp-layout-color2);
|
|
19122
|
+
}
|
|
19123
|
+
`, "",{"version":3,"sources":["webpack://./style/AppsList.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,kBAAkB;AAClB;EACE,aAAa;EACb,sBAAsB;EACtB,YAAY;EACZ,eAAe;EACf,qCAAqC;EACrC,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,aAAa;EACb,cAAc;EACd,gDAAgD;AAClD;;AAEA;EACE,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa;AACf;;AAEA;EACE,SAAS;EACT,eAAe;EACf,iBAAiB;EACjB,+BAA+B;AACjC;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;EACE,gBAAgB;EAChB,eAAe;EACf,6BAA6B;EAC7B,+BAA+B;EAC/B,yCAAyC;EACzC,kBAAkB;EAClB,eAAe;EACf,mBAAmB;EACnB,sCAAsC;AACxC;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,+BAA+B;EAC/B,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,eAAe;EACf,yCAAyC;EACzC,yBAAyB;EACzB,kBAAkB;AACpB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,+BAA+B;EAC/B,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;EAClB,aAAa;EACb,sBAAsB;EACtB,mBAAmB;EACnB,SAAS;AACX;;AAEA;EACE,eAAe;EACf,iBAAiB;EACjB,qCAAqC;AACvC;;AAEA;EACE,eAAe;EACf,eAAe;AACjB;;AAEA;EACE,+BAA+B;EAC/B,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,yCAAyC;EACzC,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,yCAAyC;AAC3C;;AAEA;EACE,aAAa;EACb,8BAA8B;EAC9B,uBAAuB;EACvB,kBAAkB;AACpB;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,iBAAiB;EACjB,+BAA+B;EAC/B,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;EACrB,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,iBAAiB;AACnB;;AAEA;EACE,+BAA+B;EAC/B,eAAe;AACjB;;AAEA;EACE,+BAA+B;EAC/B,eAAe;AACjB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,OAAO;EACP,+BAA+B;EAC/B,eAAe;EACf,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;EACnB,uCAAuC;AACzC;;AAEA;EACE,YAAY;EACZ,uBAAuB;EACvB,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,gBAAgB;EAChB,kBAAkB;AACpB;;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/* apps-list.css */\n.apps-list-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n font-size: 13px;\n font-family: var(--jp-ui-font-family);\n overflow: hidden;\n}\n\n.apps-list-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px;\n flex-shrink: 0;\n border-bottom: 1px solid var(--jp-border-color2);\n}\n\n.apps-list-content {\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n min-height: 0;\n}\n\n.apps-list-title {\n margin: 0;\n font-size: 14px;\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n}\n\n.apps-list-actions {\n display: flex;\n gap: 8px;\n}\n\n.apps-list-button {\n padding: 4px 8px;\n font-size: 11px;\n background-color: transparent;\n color: var(--jp-ui-font-color2);\n border: 1px solid var(--jp-border-color2);\n border-radius: 3px;\n cursor: pointer;\n font-weight: normal;\n transition: background-color 0.2s ease;\n}\n\n.apps-list-button:hover {\n background-color: var(--jp-layout-color2);\n}\n\n.apps-list-button:disabled {\n cursor: not-allowed;\n}\n\n.apps-list-button.primary {\n background-color: var(--jp-brand-color1);\n color: white;\n border: none;\n}\n\n.apps-list-loading {\n color: var(--jp-ui-font-color2);\n text-align: center;\n padding: 20px 0;\n}\n\n.apps-list-error {\n color: #f44336;\n text-align: center;\n padding: 20px 0;\n background-color: var(--jp-layout-color1);\n border: 1px solid #f44336;\n border-radius: 4px;\n}\n\n.apps-list-error-actions {\n margin-top: 8px;\n}\n\n.apps-list-auth-message {\n color: var(--jp-ui-font-color1);\n background-color: var(--jp-layout-color0);\n border: 1px solid var(--jp-border-color2);\n border-radius: 4px;\n padding: 24px 16px;\n text-align: center;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n}\n\n.apps-list-auth-text {\n font-size: 14px;\n font-weight: bold;\n font-family: var(--jp-ui-font-family);\n}\n\n.apps-list-auth-login-button {\n font-size: 13px;\n min-width: 96px;\n}\n\n.apps-list-empty {\n color: var(--jp-ui-font-color2);\n text-align: center;\n padding: 20px 0;\n}\n\n.app-item {\n border: 1px solid var(--jp-border-color1);\n border-radius: 4px;\n padding: 12px;\n margin-bottom: 8px;\n background-color: var(--jp-layout-color0);\n}\n\n.app-item-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n}\n\n.app-item-content {\n flex: 1;\n}\n\n.app-item-name {\n font-weight: bold;\n color: var(--jp-ui-font-color1);\n margin-bottom: 4px;\n}\n\n.app-item-status-container {\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.app-item-status-indicator {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n margin-right: 6px;\n}\n\n.app-item-status-text {\n color: var(--jp-ui-font-color2);\n font-size: 12px;\n}\n\n.app-item-last-deployed {\n color: var(--jp-ui-font-color2);\n font-size: 11px;\n}\n\n.app-item-url-container {\n display: flex;\n align-items: center;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-border-color2);\n border-radius: 3px;\n padding: 6px 8px;\n}\n\n.app-item-url {\n flex: 1;\n color: var(--jp-ui-font-color1);\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--jp-code-font-family);\n}\n\n.app-item-copy-button {\n border: none;\n background: transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 8px;\n border-radius: 2px;\n}\n\n.app-item-copy-button:hover {\n background-color: var(--jp-layout-color2);\n}\n"],"sourceRoot":""}]);
|
|
19124
|
+
// Exports
|
|
19125
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
19126
|
+
|
|
19127
|
+
|
|
19128
|
+
/***/ }),
|
|
19129
|
+
|
|
19130
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/AskUserQuestionToolUI.css":
|
|
19131
|
+
/*!*******************************************************************************!*\
|
|
19132
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/AskUserQuestionToolUI.css ***!
|
|
19133
|
+
\*******************************************************************************/
|
|
19134
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
19135
|
+
|
|
19136
|
+
__webpack_require__.r(__webpack_exports__);
|
|
19137
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19138
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19139
|
+
/* harmony export */ });
|
|
19140
|
+
/* 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");
|
|
19141
|
+
/* 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__);
|
|
19142
|
+
/* 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");
|
|
19143
|
+
/* 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__);
|
|
19144
|
+
// Imports
|
|
19145
|
+
|
|
19146
|
+
|
|
19147
|
+
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()));
|
|
19148
|
+
// Module
|
|
19149
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
19150
|
+
* Copyright (c) Saga Inc.
|
|
19151
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
19152
|
+
*/
|
|
19153
|
+
|
|
19154
|
+
/* Active mode: purple border with glow effect */
|
|
19155
|
+
.ask-user-question-active {
|
|
19156
|
+
border: 2px solid var(--jp-brand-color1) !important;
|
|
19157
|
+
border-radius: 5px !important;
|
|
19158
|
+
box-shadow: 0 0 8px rgba(76, 29, 149, 0.2), 0 0 16px rgba(76, 29, 149, 0.1), 0 0 2px rgba(76, 29, 149, 0.15) inset;
|
|
19159
|
+
background-color: var(--jp-layout-color1);
|
|
19160
|
+
}
|
|
19161
|
+
|
|
19162
|
+
.ask-user-question-container {
|
|
19163
|
+
flex-direction: column;
|
|
19164
|
+
align-items: flex-start;
|
|
19165
|
+
padding: 12px;
|
|
19166
|
+
}
|
|
19167
|
+
|
|
19168
|
+
.ask-user-question-container .agent-tool-ui-content {
|
|
19169
|
+
width: 100%;
|
|
19170
|
+
flex-direction: column;
|
|
19171
|
+
align-items: flex-start;
|
|
19172
|
+
gap: 12px;
|
|
19173
|
+
}
|
|
19174
|
+
|
|
19175
|
+
/* Purple pill badge for active mode */
|
|
19176
|
+
.ask-user-question-pill {
|
|
19177
|
+
display: inline-flex;
|
|
19178
|
+
align-items: center;
|
|
19179
|
+
gap: 6px;
|
|
19180
|
+
padding: 4px 10px;
|
|
19181
|
+
background-color: var(--purple-300);
|
|
19182
|
+
border-radius: 12px;
|
|
19183
|
+
color: var(--purple-700);
|
|
19184
|
+
font-size: 11px;
|
|
19185
|
+
font-weight: 500;
|
|
19186
|
+
line-height: 1;
|
|
19187
|
+
}
|
|
19188
|
+
|
|
19189
|
+
.ask-user-question-pill svg {
|
|
19190
|
+
width: 12px;
|
|
19191
|
+
height: 12px;
|
|
19192
|
+
flex-shrink: 0;
|
|
19193
|
+
}
|
|
19194
|
+
|
|
19195
|
+
.ask-user-question-pill-text {
|
|
19196
|
+
white-space: nowrap;
|
|
19197
|
+
}
|
|
19198
|
+
|
|
19199
|
+
.ask-user-question-content {
|
|
19200
|
+
display: flex;
|
|
19201
|
+
flex-direction: column;
|
|
19202
|
+
gap: 10px;
|
|
19203
|
+
width: 100%;
|
|
19204
|
+
margin-left: 0;
|
|
19205
|
+
}
|
|
19206
|
+
|
|
19207
|
+
.ask-user-question-message {
|
|
19208
|
+
color: var(--jp-ui-font-color1);
|
|
19209
|
+
font-size: var(--jp-ui-font-size1);
|
|
19210
|
+
line-height: 1.5;
|
|
19211
|
+
}
|
|
19212
|
+
|
|
19213
|
+
.ask-user-question-question {
|
|
19214
|
+
color: var(--jp-ui-font-color0);
|
|
19215
|
+
font-size: var(--jp-ui-font-size1);
|
|
19216
|
+
font-weight: 500;
|
|
19217
|
+
line-height: 1.5;
|
|
19218
|
+
}
|
|
19219
|
+
|
|
19220
|
+
.ask-user-question-answers {
|
|
19221
|
+
display: flex;
|
|
19222
|
+
flex-direction: column;
|
|
19223
|
+
gap: 0;
|
|
19224
|
+
width: 100%;
|
|
19225
|
+
margin-top: 4px;
|
|
19226
|
+
border-radius: 4px;
|
|
19227
|
+
overflow: hidden;
|
|
19228
|
+
}
|
|
19229
|
+
|
|
19230
|
+
.ask-user-question-answer-button {
|
|
19231
|
+
display: flex;
|
|
19232
|
+
align-items: center;
|
|
19233
|
+
gap: 10px;
|
|
19234
|
+
padding: 10px 14px;
|
|
19235
|
+
background-color: var(--jp-layout-color1);
|
|
19236
|
+
border: none;
|
|
19237
|
+
border-bottom: 1px solid var(--jp-border-color2);
|
|
19238
|
+
border-radius: 0;
|
|
19239
|
+
color: var(--jp-ui-font-color1);
|
|
19240
|
+
font-size: var(--jp-ui-font-size1);
|
|
19241
|
+
cursor: pointer;
|
|
19242
|
+
transition: background-color 0.2s ease;
|
|
19243
|
+
text-align: left;
|
|
19244
|
+
width: 100%;
|
|
19245
|
+
}
|
|
19246
|
+
|
|
19247
|
+
.ask-user-question-answer-button:last-child {
|
|
19248
|
+
border-bottom: none;
|
|
19249
|
+
}
|
|
19250
|
+
|
|
19251
|
+
.ask-user-question-answer-button:hover:not(:disabled) {
|
|
19252
|
+
background-color: var(--jp-layout-color2);
|
|
19253
|
+
color: var(--jp-ui-font-color0);
|
|
19254
|
+
}
|
|
19255
|
+
|
|
19256
|
+
.ask-user-question-answer-button:active:not(:disabled) {
|
|
19257
|
+
background-color: var(--jp-layout-color3);
|
|
19258
|
+
}
|
|
19259
|
+
|
|
19260
|
+
.ask-user-question-answer-button:disabled {
|
|
19261
|
+
opacity: 0.6;
|
|
19262
|
+
cursor: not-allowed;
|
|
19263
|
+
}
|
|
19264
|
+
|
|
19265
|
+
.ask-user-question-radio-icon {
|
|
19266
|
+
flex-shrink: 0;
|
|
19267
|
+
color: var(--jp-ui-font-color2);
|
|
19268
|
+
width: 16px;
|
|
19269
|
+
height: 16px;
|
|
19270
|
+
}
|
|
19271
|
+
|
|
19272
|
+
.ask-user-question-answer-button:hover:not(:disabled) .ask-user-question-radio-icon {
|
|
19273
|
+
color: var(--jp-brand-color1);
|
|
19274
|
+
}
|
|
19275
|
+
|
|
19276
|
+
.ask-user-question-answer-text {
|
|
19277
|
+
flex: 1;
|
|
19278
|
+
text-align: left;
|
|
19279
|
+
}
|
|
19280
|
+
|
|
19281
|
+
.ask-user-question-subtext {
|
|
19282
|
+
color: var(--jp-ui-font-color2);
|
|
19283
|
+
font-size: 11px;
|
|
19284
|
+
line-height: 1.4;
|
|
19285
|
+
margin-top: 8px;
|
|
19286
|
+
font-style: italic;
|
|
19287
|
+
opacity: 0.7;
|
|
19288
|
+
}
|
|
19289
|
+
|
|
19290
|
+
/* Align subtext with radio button circles when options are present */
|
|
19291
|
+
.ask-user-question-answers + .ask-user-question-subtext {
|
|
19292
|
+
padding-left: 14px; /* Matches button left padding to align with radio button circles */
|
|
19293
|
+
}
|
|
19294
|
+
|
|
19295
|
+
/* Collapsed mode styles */
|
|
19296
|
+
.ask-user-question-collapsed {
|
|
19297
|
+
display: flex;
|
|
19298
|
+
flex-direction: column;
|
|
19299
|
+
align-items: stretch;
|
|
19300
|
+
justify-content: start;
|
|
19301
|
+
background-color: transparent;
|
|
19302
|
+
margin: 0 0;
|
|
19303
|
+
color: var(--jp-ui-font-color2);
|
|
19304
|
+
overflow: hidden;
|
|
19305
|
+
}
|
|
19306
|
+
|
|
19307
|
+
.ask-user-question-collapsed.expanded {
|
|
19308
|
+
border: 1px solid var(--jp-cell-editor-border-color);
|
|
19309
|
+
border-radius: 5px;
|
|
19310
|
+
background-color: var(--chat-background-color);
|
|
19311
|
+
margin-bottom: 5px;
|
|
19312
|
+
}
|
|
19313
|
+
|
|
19314
|
+
.ask-user-question-collapsed-content {
|
|
19315
|
+
display: flex;
|
|
19316
|
+
flex-direction: column;
|
|
19317
|
+
gap: 6px;
|
|
19318
|
+
flex: 1;
|
|
17157
19319
|
}
|
|
17158
19320
|
|
|
17159
|
-
.
|
|
17160
|
-
|
|
17161
|
-
|
|
17162
|
-
|
|
17163
|
-
|
|
17164
|
-
border-radius: 3px;
|
|
17165
|
-
padding: 6px 8px;
|
|
19321
|
+
.ask-user-question-collapsed .ask-user-question-question {
|
|
19322
|
+
color: var(--jp-ui-font-color1);
|
|
19323
|
+
font-size: var(--jp-ui-font-size1);
|
|
19324
|
+
font-weight: 500;
|
|
19325
|
+
line-height: 1.5;
|
|
17166
19326
|
}
|
|
17167
19327
|
|
|
17168
|
-
.
|
|
17169
|
-
|
|
17170
|
-
|
|
17171
|
-
|
|
17172
|
-
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
font-family: var(--jp-code-font-family);
|
|
19328
|
+
.ask-user-question-collapsed-answers {
|
|
19329
|
+
margin: 0;
|
|
19330
|
+
padding-left: 20px;
|
|
19331
|
+
color: var(--jp-ui-font-color1);
|
|
19332
|
+
font-size: var(--jp-ui-font-size1);
|
|
19333
|
+
line-height: 1.5;
|
|
19334
|
+
list-style-type: disc;
|
|
17176
19335
|
}
|
|
17177
19336
|
|
|
17178
|
-
.
|
|
17179
|
-
|
|
17180
|
-
background: transparent;
|
|
17181
|
-
cursor: pointer;
|
|
17182
|
-
padding: 2px;
|
|
17183
|
-
display: flex;
|
|
17184
|
-
align-items: center;
|
|
17185
|
-
justify-content: center;
|
|
17186
|
-
margin-left: 8px;
|
|
17187
|
-
border-radius: 2px;
|
|
19337
|
+
.ask-user-question-collapsed-answers li {
|
|
19338
|
+
margin: 4px 0;
|
|
17188
19339
|
}
|
|
17189
19340
|
|
|
17190
|
-
|
|
17191
|
-
|
|
19341
|
+
/* Expanded content for collapsed mode */
|
|
19342
|
+
.ask-user-question-expanded-content {
|
|
19343
|
+
padding: 10px var(--chat-taskpane-tool-call-horizontal-padding);
|
|
19344
|
+
background-color: transparent;
|
|
19345
|
+
color: var(--jp-ui-font-color1);
|
|
19346
|
+
white-space: pre-wrap;
|
|
19347
|
+
word-break: break-word;
|
|
19348
|
+
border: none;
|
|
19349
|
+
border-radius: 0;
|
|
17192
19350
|
}
|
|
17193
|
-
`, "",{"version":3,"sources":["webpack://./style/
|
|
19351
|
+
`, "",{"version":3,"sources":["webpack://./style/AskUserQuestionToolUI.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,gDAAgD;AAChD;IACI,mDAAmD;IACnD,6BAA6B;IAC7B,kHAAkH;IAClH,yCAAyC;AAC7C;;AAEA;IACI,sBAAsB;IACtB,uBAAuB;IACvB,aAAa;AACjB;;AAEA;IACI,WAAW;IACX,sBAAsB;IACtB,uBAAuB;IACvB,SAAS;AACb;;AAEA,sCAAsC;AACtC;IACI,oBAAoB;IACpB,mBAAmB;IACnB,QAAQ;IACR,iBAAiB;IACjB,mCAAmC;IACnC,mBAAmB;IACnB,wBAAwB;IACxB,eAAe;IACf,gBAAgB;IAChB,cAAc;AAClB;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,cAAc;AAClB;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,SAAS;IACT,WAAW;IACX,cAAc;AAClB;;AAEA;IACI,+BAA+B;IAC/B,kCAAkC;IAClC,gBAAgB;AACpB;;AAEA;IACI,+BAA+B;IAC/B,kCAAkC;IAClC,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,MAAM;IACN,WAAW;IACX,eAAe;IACf,kBAAkB;IAClB,gBAAgB;AACpB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,kBAAkB;IAClB,yCAAyC;IACzC,YAAY;IACZ,gDAAgD;IAChD,gBAAgB;IAChB,+BAA+B;IAC/B,kCAAkC;IAClC,eAAe;IACf,sCAAsC;IACtC,gBAAgB;IAChB,WAAW;AACf;;AAEA;IACI,mBAAmB;AACvB;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;AACnC;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,YAAY;IACZ,mBAAmB;AACvB;;AAEA;IACI,cAAc;IACd,+BAA+B;IAC/B,WAAW;IACX,YAAY;AAChB;;AAEA;IACI,6BAA6B;AACjC;;AAEA;IACI,OAAO;IACP,gBAAgB;AACpB;;AAEA;IACI,+BAA+B;IAC/B,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,YAAY;AAChB;;AAEA,qEAAqE;AACrE;IACI,kBAAkB,EAAE,mEAAmE;AAC3F;;AAEA,0BAA0B;AAC1B;IACI,aAAa;IACb,sBAAsB;IACtB,oBAAoB;IACpB,sBAAsB;IACtB,6BAA6B;IAC7B,WAAW;IACX,+BAA+B;IAC/B,gBAAgB;AACpB;;AAEA;IACI,oDAAoD;IACpD,kBAAkB;IAClB,8CAA8C;IAC9C,kBAAkB;AACtB;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,QAAQ;IACR,OAAO;AACX;;AAEA;IACI,+BAA+B;IAC/B,kCAAkC;IAClC,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,SAAS;IACT,kBAAkB;IAClB,+BAA+B;IAC/B,kCAAkC;IAClC,gBAAgB;IAChB,qBAAqB;AACzB;;AAEA;IACI,aAAa;AACjB;;AAEA,wCAAwC;AACxC;IACI,+DAA+D;IAC/D,6BAA6B;IAC7B,+BAA+B;IAC/B,qBAAqB;IACrB,sBAAsB;IACtB,YAAY;IACZ,gBAAgB;AACpB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* Active mode: purple border with glow effect */\n.ask-user-question-active {\n border: 2px solid var(--jp-brand-color1) !important;\n border-radius: 5px !important;\n box-shadow: 0 0 8px rgba(76, 29, 149, 0.2), 0 0 16px rgba(76, 29, 149, 0.1), 0 0 2px rgba(76, 29, 149, 0.15) inset;\n background-color: var(--jp-layout-color1);\n}\n\n.ask-user-question-container {\n flex-direction: column;\n align-items: flex-start;\n padding: 12px;\n}\n\n.ask-user-question-container .agent-tool-ui-content {\n width: 100%;\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n}\n\n/* Purple pill badge for active mode */\n.ask-user-question-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background-color: var(--purple-300);\n border-radius: 12px;\n color: var(--purple-700);\n font-size: 11px;\n font-weight: 500;\n line-height: 1;\n}\n\n.ask-user-question-pill svg {\n width: 12px;\n height: 12px;\n flex-shrink: 0;\n}\n\n.ask-user-question-pill-text {\n white-space: nowrap;\n}\n\n.ask-user-question-content {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 100%;\n margin-left: 0;\n}\n\n.ask-user-question-message {\n color: var(--jp-ui-font-color1);\n font-size: var(--jp-ui-font-size1);\n line-height: 1.5;\n}\n\n.ask-user-question-question {\n color: var(--jp-ui-font-color0);\n font-size: var(--jp-ui-font-size1);\n font-weight: 500;\n line-height: 1.5;\n}\n\n.ask-user-question-answers {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n margin-top: 4px;\n border-radius: 4px;\n overflow: hidden;\n}\n\n.ask-user-question-answer-button {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n background-color: var(--jp-layout-color1);\n border: none;\n border-bottom: 1px solid var(--jp-border-color2);\n border-radius: 0;\n color: var(--jp-ui-font-color1);\n font-size: var(--jp-ui-font-size1);\n cursor: pointer;\n transition: background-color 0.2s ease;\n text-align: left;\n width: 100%;\n}\n\n.ask-user-question-answer-button:last-child {\n border-bottom: none;\n}\n\n.ask-user-question-answer-button:hover:not(:disabled) {\n background-color: var(--jp-layout-color2);\n color: var(--jp-ui-font-color0);\n}\n\n.ask-user-question-answer-button:active:not(:disabled) {\n background-color: var(--jp-layout-color3);\n}\n\n.ask-user-question-answer-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.ask-user-question-radio-icon {\n flex-shrink: 0;\n color: var(--jp-ui-font-color2);\n width: 16px;\n height: 16px;\n}\n\n.ask-user-question-answer-button:hover:not(:disabled) .ask-user-question-radio-icon {\n color: var(--jp-brand-color1);\n}\n\n.ask-user-question-answer-text {\n flex: 1;\n text-align: left;\n}\n\n.ask-user-question-subtext {\n color: var(--jp-ui-font-color2);\n font-size: 11px;\n line-height: 1.4;\n margin-top: 8px;\n font-style: italic;\n opacity: 0.7;\n}\n\n/* Align subtext with radio button circles when options are present */\n.ask-user-question-answers + .ask-user-question-subtext {\n padding-left: 14px; /* Matches button left padding to align with radio button circles */\n}\n\n/* Collapsed mode styles */\n.ask-user-question-collapsed {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: start;\n background-color: transparent;\n margin: 0 0;\n color: var(--jp-ui-font-color2);\n overflow: hidden;\n}\n\n.ask-user-question-collapsed.expanded {\n border: 1px solid var(--jp-cell-editor-border-color);\n border-radius: 5px;\n background-color: var(--chat-background-color);\n margin-bottom: 5px;\n}\n\n.ask-user-question-collapsed-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n}\n\n.ask-user-question-collapsed .ask-user-question-question {\n color: var(--jp-ui-font-color1);\n font-size: var(--jp-ui-font-size1);\n font-weight: 500;\n line-height: 1.5;\n}\n\n.ask-user-question-collapsed-answers {\n margin: 0;\n padding-left: 20px;\n color: var(--jp-ui-font-color1);\n font-size: var(--jp-ui-font-size1);\n line-height: 1.5;\n list-style-type: disc;\n}\n\n.ask-user-question-collapsed-answers li {\n margin: 4px 0;\n}\n\n/* Expanded content for collapsed mode */\n.ask-user-question-expanded-content {\n padding: 10px var(--chat-taskpane-tool-call-horizontal-padding);\n background-color: transparent;\n color: var(--jp-ui-font-color1);\n white-space: pre-wrap;\n word-break: break-word;\n border: none;\n border-radius: 0;\n}\n"],"sourceRoot":""}]);
|
|
17194
19352
|
// Exports
|
|
17195
19353
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17196
19354
|
|
|
@@ -17862,24 +20020,314 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
17862
20020
|
vertical-align: baseline;
|
|
17863
20021
|
}
|
|
17864
20022
|
|
|
17865
|
-
.cell-reference:hover {
|
|
17866
|
-
background-color: var(--purple-300);
|
|
17867
|
-
color: var(--purple-700);
|
|
20023
|
+
.cell-reference:hover {
|
|
20024
|
+
background-color: var(--purple-300);
|
|
20025
|
+
color: var(--purple-700);
|
|
20026
|
+
}
|
|
20027
|
+
|
|
20028
|
+
/* Greyed out style for missing/unresolved cell references (deleted or in different notebook) */
|
|
20029
|
+
.cell-reference.cell-reference-missing {
|
|
20030
|
+
color: var(--jp-ui-font-color2);
|
|
20031
|
+
text-decoration: none;
|
|
20032
|
+
cursor: default;
|
|
20033
|
+
opacity: 0.6;
|
|
20034
|
+
}
|
|
20035
|
+
|
|
20036
|
+
.cell-reference.cell-reference-missing:hover {
|
|
20037
|
+
background-color: var(--jp-layout-color3);
|
|
20038
|
+
color: var(--jp-ui-font-color2);
|
|
20039
|
+
}
|
|
20040
|
+
`, "",{"version":3,"sources":["webpack://./style/CellReference.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,qEAAqE;AACrE;IACI,wBAAwB;IACxB,0BAA0B;IAC1B,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;AAC5B;;AAEA;IACI,mCAAmC;IACnC,wBAAwB;AAC5B;;AAEA,+FAA+F;AAC/F;IACI,+BAA+B;IAC/B,qBAAqB;IACrB,eAAe;IACf,YAAY;AAChB;;AAEA;IACI,yCAAyC;IACzC,+BAA+B;AACnC","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* Cell reference links in chat messages - styled as standard links */\n.cell-reference {\n color: var(--purple-600);\n text-decoration: underline;\n cursor: pointer;\n font-weight: 500;\n padding: 1px 5px;\n border-radius: 3px;\n position: relative;\n vertical-align: baseline;\n}\n\n.cell-reference:hover {\n background-color: var(--purple-300);\n color: var(--purple-700);\n}\n\n/* Greyed out style for missing/unresolved cell references (deleted or in different notebook) */\n.cell-reference.cell-reference-missing {\n color: var(--jp-ui-font-color2);\n text-decoration: none;\n cursor: default;\n opacity: 0.6;\n}\n\n.cell-reference.cell-reference-missing:hover {\n background-color: var(--jp-layout-color3);\n color: var(--jp-ui-font-color2);\n}\n"],"sourceRoot":""}]);
|
|
20041
|
+
// Exports
|
|
20042
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
20043
|
+
|
|
20044
|
+
|
|
20045
|
+
/***/ }),
|
|
20046
|
+
|
|
20047
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ChartWizardPlugin.css":
|
|
20048
|
+
/*!***************************************************************************!*\
|
|
20049
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/ChartWizardPlugin.css ***!
|
|
20050
|
+
\***************************************************************************/
|
|
20051
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
20052
|
+
|
|
20053
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20054
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20055
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20056
|
+
/* harmony export */ });
|
|
20057
|
+
/* 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");
|
|
20058
|
+
/* 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__);
|
|
20059
|
+
/* 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");
|
|
20060
|
+
/* 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__);
|
|
20061
|
+
// Imports
|
|
20062
|
+
|
|
20063
|
+
|
|
20064
|
+
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()));
|
|
20065
|
+
// Module
|
|
20066
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
20067
|
+
* Copyright (c) Saga Inc.
|
|
20068
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
20069
|
+
*/
|
|
20070
|
+
|
|
20071
|
+
/* Position the button container in the upper right */
|
|
20072
|
+
.chart-wizard-button-container {
|
|
20073
|
+
position: absolute;
|
|
20074
|
+
top: 8px;
|
|
20075
|
+
right: 8px;
|
|
20076
|
+
z-index: 10;
|
|
20077
|
+
opacity: 0;
|
|
20078
|
+
transition: opacity 0.2s ease-in-out;
|
|
20079
|
+
}
|
|
20080
|
+
|
|
20081
|
+
.chart-wizard-output-container:hover .chart-wizard-button-container {
|
|
20082
|
+
opacity: 1;
|
|
20083
|
+
}`, "",{"version":3,"sources":["webpack://./style/ChartWizardPlugin.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF,qDAAqD;AACrD;IACI,kBAAkB;IAClB,QAAQ;IACR,UAAU;IACV,WAAW;IACX,UAAU;IACV,oCAAoC;AACxC;;AAEA;IACI,UAAU;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/* Position the button container in the upper right */\n.chart-wizard-button-container {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.chart-wizard-output-container:hover .chart-wizard-button-container {\n opacity: 1;\n}"],"sourceRoot":""}]);
|
|
20084
|
+
// Exports
|
|
20085
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
20086
|
+
|
|
20087
|
+
|
|
20088
|
+
/***/ }),
|
|
20089
|
+
|
|
20090
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./style/ChartWizardWidget.css":
|
|
20091
|
+
/*!***************************************************************************!*\
|
|
20092
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./style/ChartWizardWidget.css ***!
|
|
20093
|
+
\***************************************************************************/
|
|
20094
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
20095
|
+
|
|
20096
|
+
__webpack_require__.r(__webpack_exports__);
|
|
20097
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20098
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20099
|
+
/* harmony export */ });
|
|
20100
|
+
/* 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");
|
|
20101
|
+
/* 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__);
|
|
20102
|
+
/* 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");
|
|
20103
|
+
/* 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__);
|
|
20104
|
+
// Imports
|
|
20105
|
+
|
|
20106
|
+
|
|
20107
|
+
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()));
|
|
20108
|
+
// Module
|
|
20109
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
20110
|
+
* Copyright (c) Saga Inc.
|
|
20111
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
20112
|
+
*/
|
|
20113
|
+
|
|
20114
|
+
.chart-wizard-widget {
|
|
20115
|
+
padding: 10px;
|
|
20116
|
+
height: 100%;
|
|
20117
|
+
overflow-y: auto;
|
|
20118
|
+
display: flex;
|
|
20119
|
+
flex-direction: column;
|
|
20120
|
+
box-sizing: border-box;
|
|
20121
|
+
}
|
|
20122
|
+
|
|
20123
|
+
.chart-wizard-input-row {
|
|
20124
|
+
display: flex;
|
|
20125
|
+
flex-direction: column;
|
|
20126
|
+
margin-bottom: 15px;
|
|
20127
|
+
gap: 5px;
|
|
20128
|
+
}
|
|
20129
|
+
|
|
20130
|
+
.chart-wizard-boolean-row {
|
|
20131
|
+
flex-direction: row;
|
|
20132
|
+
align-items: center;
|
|
20133
|
+
justify-content: space-between;
|
|
20134
|
+
margin-bottom: 12px;
|
|
20135
|
+
gap: 12px;
|
|
20136
|
+
}
|
|
20137
|
+
|
|
20138
|
+
.chart-wizard-input-label {
|
|
20139
|
+
color: var(--jp-content-font-color2);
|
|
20140
|
+
font-size: 12px;
|
|
20141
|
+
font-weight: 500;
|
|
20142
|
+
text-transform: none;
|
|
20143
|
+
}
|
|
20144
|
+
|
|
20145
|
+
.chart-wizard-boolean-label {
|
|
20146
|
+
flex: 1;
|
|
20147
|
+
margin: 0;
|
|
20148
|
+
cursor: pointer;
|
|
20149
|
+
}
|
|
20150
|
+
|
|
20151
|
+
.chart-wizard-toggle-container {
|
|
20152
|
+
position: relative;
|
|
20153
|
+
display: inline-flex;
|
|
20154
|
+
align-items: center;
|
|
20155
|
+
cursor: pointer;
|
|
20156
|
+
flex-shrink: 0;
|
|
20157
|
+
}
|
|
20158
|
+
|
|
20159
|
+
.chart-wizard-toggle-input {
|
|
20160
|
+
position: absolute;
|
|
20161
|
+
opacity: 0;
|
|
20162
|
+
cursor: pointer;
|
|
20163
|
+
width: 0;
|
|
20164
|
+
height: 0;
|
|
20165
|
+
margin: 0;
|
|
20166
|
+
}
|
|
20167
|
+
|
|
20168
|
+
.chart-wizard-toggle-slider {
|
|
20169
|
+
position: relative;
|
|
20170
|
+
display: inline-block;
|
|
20171
|
+
width: 44px;
|
|
20172
|
+
height: 24px;
|
|
20173
|
+
background-color: var(--jp-border-color2);
|
|
20174
|
+
border-radius: 12px;
|
|
20175
|
+
transition: background-color 0.3s ease;
|
|
20176
|
+
box-sizing: border-box;
|
|
20177
|
+
}
|
|
20178
|
+
|
|
20179
|
+
.chart-wizard-toggle-slider::before {
|
|
20180
|
+
content: '';
|
|
20181
|
+
position: absolute;
|
|
20182
|
+
width: 20px;
|
|
20183
|
+
height: 20px;
|
|
20184
|
+
left: 2px;
|
|
20185
|
+
top: 2px;
|
|
20186
|
+
background-color: white;
|
|
20187
|
+
border-radius: 50%;
|
|
20188
|
+
transition: transform 0.3s ease;
|
|
20189
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
20190
|
+
}
|
|
20191
|
+
|
|
20192
|
+
.chart-wizard-toggle-input:checked + .chart-wizard-toggle-slider {
|
|
20193
|
+
background-color: var(--jp-brand-color1);
|
|
20194
|
+
}
|
|
20195
|
+
|
|
20196
|
+
.chart-wizard-toggle-input:checked + .chart-wizard-toggle-slider::before {
|
|
20197
|
+
transform: translateX(20px);
|
|
20198
|
+
}
|
|
20199
|
+
|
|
20200
|
+
.chart-wizard-toggle-input:focus + .chart-wizard-toggle-slider {
|
|
20201
|
+
box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
|
|
20202
|
+
}
|
|
20203
|
+
|
|
20204
|
+
.chart-wizard-toggle-input:hover + .chart-wizard-toggle-slider {
|
|
20205
|
+
background-color: var(--jp-border-color1);
|
|
20206
|
+
}
|
|
20207
|
+
|
|
20208
|
+
.chart-wizard-toggle-input:checked:hover + .chart-wizard-toggle-slider {
|
|
20209
|
+
background-color: var(--jp-brand-color0);
|
|
20210
|
+
}
|
|
20211
|
+
|
|
20212
|
+
.chart-wizard-number-input,
|
|
20213
|
+
.chart-wizard-text-input,
|
|
20214
|
+
.chart-wizard-color-input,
|
|
20215
|
+
.chart-wizard-tuple-input {
|
|
20216
|
+
width: 100%;
|
|
20217
|
+
box-sizing: border-box;
|
|
20218
|
+
}
|
|
20219
|
+
|
|
20220
|
+
.chart-wizard-color-container {
|
|
20221
|
+
display: flex;
|
|
20222
|
+
gap: 8px;
|
|
20223
|
+
width: 100%;
|
|
20224
|
+
}
|
|
20225
|
+
|
|
20226
|
+
.chart-wizard-color-picker {
|
|
20227
|
+
flex-shrink: 0;
|
|
20228
|
+
}
|
|
20229
|
+
|
|
20230
|
+
.chart-wizard-color-input {
|
|
20231
|
+
flex: 1;
|
|
20232
|
+
}
|
|
20233
|
+
|
|
20234
|
+
.chart-wizard-tuple-container {
|
|
20235
|
+
display: flex;
|
|
20236
|
+
align-items: center;
|
|
20237
|
+
gap: 5px;
|
|
20238
|
+
width: 100%;
|
|
20239
|
+
}
|
|
20240
|
+
|
|
20241
|
+
.chart-wizard-tuple-input {
|
|
20242
|
+
flex: 1;
|
|
20243
|
+
}
|
|
20244
|
+
|
|
20245
|
+
.chart-wizard-config-container {
|
|
20246
|
+
flex: 1;
|
|
20247
|
+
min-height: 0;
|
|
20248
|
+
}
|
|
20249
|
+
|
|
20250
|
+
.chart-wizard-empty-state,
|
|
20251
|
+
.chart-wizard-no-config {
|
|
20252
|
+
flex: 1;
|
|
20253
|
+
display: flex;
|
|
20254
|
+
flex-direction: column;
|
|
20255
|
+
justify-content: center;
|
|
20256
|
+
}
|
|
20257
|
+
|
|
20258
|
+
.chart-wizard-no-config p {
|
|
20259
|
+
text-align: center;
|
|
20260
|
+
}
|
|
20261
|
+
|
|
20262
|
+
.chart-wizard-loading-dots {
|
|
20263
|
+
display: inline-block;
|
|
20264
|
+
min-width: 1.5em;
|
|
20265
|
+
text-align: left;
|
|
20266
|
+
}
|
|
20267
|
+
|
|
20268
|
+
.chart-wizard-overlay {
|
|
20269
|
+
position: absolute;
|
|
20270
|
+
top: 0;
|
|
20271
|
+
left: 0;
|
|
20272
|
+
right: 0;
|
|
20273
|
+
/* Height is set dynamically via inline style to cover full scrollable content */
|
|
20274
|
+
min-height: 100%;
|
|
20275
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
20276
|
+
display: flex;
|
|
20277
|
+
align-items: center;
|
|
20278
|
+
justify-content: center;
|
|
20279
|
+
z-index: 1000;
|
|
20280
|
+
pointer-events: all;
|
|
20281
|
+
}
|
|
20282
|
+
|
|
20283
|
+
.chart-wizard-overlay-text {
|
|
20284
|
+
font-size: 16px;
|
|
20285
|
+
font-weight: 500;
|
|
20286
|
+
color: #333;
|
|
20287
|
+
}
|
|
20288
|
+
|
|
20289
|
+
.chart-wizard-warning {
|
|
20290
|
+
background-color: var(--yellow-100);
|
|
20291
|
+
color: var(--yellow-900);
|
|
20292
|
+
padding: 10px 12px;
|
|
20293
|
+
border-radius: 4px;
|
|
20294
|
+
margin-bottom: 15px;
|
|
20295
|
+
font-size: 13px;
|
|
20296
|
+
line-height: 1.4;
|
|
20297
|
+
border: 1px solid var(--yellow-300);
|
|
20298
|
+
display: flex;
|
|
20299
|
+
flex-direction: column;
|
|
20300
|
+
gap: 10px;
|
|
20301
|
+
}
|
|
20302
|
+
|
|
20303
|
+
.chart-wizard-warning-content {
|
|
20304
|
+
flex: 1;
|
|
17868
20305
|
}
|
|
17869
20306
|
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
|
-
color: var(--jp-ui-font-color2);
|
|
17873
|
-
text-decoration: none;
|
|
17874
|
-
cursor: default;
|
|
17875
|
-
opacity: 0.6;
|
|
20307
|
+
.chart-wizard-warning strong {
|
|
20308
|
+
font-weight: 600;
|
|
17876
20309
|
}
|
|
17877
20310
|
|
|
17878
|
-
.
|
|
17879
|
-
background-color: var(--
|
|
17880
|
-
color: var(--
|
|
20311
|
+
.chart-wizard-warning-button {
|
|
20312
|
+
background-color: var(--yellow-600);
|
|
20313
|
+
color: var(--yellow-900);
|
|
20314
|
+
border: none;
|
|
20315
|
+
padding: 6px 12px;
|
|
20316
|
+
border-radius: 4px;
|
|
20317
|
+
font-size: 12px;
|
|
20318
|
+
font-weight: 500;
|
|
20319
|
+
cursor: pointer;
|
|
20320
|
+
align-self: flex-start;
|
|
20321
|
+
transition: background-color 0.2s ease;
|
|
17881
20322
|
}
|
|
17882
|
-
|
|
20323
|
+
|
|
20324
|
+
.chart-wizard-warning-button:hover {
|
|
20325
|
+
background-color: var(--yellow-500);
|
|
20326
|
+
}
|
|
20327
|
+
|
|
20328
|
+
.chart-wizard-warning-button:active {
|
|
20329
|
+
background-color: var(--yellow-300);
|
|
20330
|
+
}`, "",{"version":3,"sources":["webpack://./style/ChartWizardWidget.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,aAAa;IACb,YAAY;IACZ,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,sBAAsB;AAC1B;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,mBAAmB;IACnB,QAAQ;AACZ;;AAEA;IACI,mBAAmB;IACnB,mBAAmB;IACnB,8BAA8B;IAC9B,mBAAmB;IACnB,SAAS;AACb;;AAEA;IACI,oCAAoC;IACpC,eAAe;IACf,gBAAgB;IAChB,oBAAoB;AACxB;;AAEA;IACI,OAAO;IACP,SAAS;IACT,eAAe;AACnB;;AAEA;IACI,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,cAAc;AAClB;;AAEA;IACI,kBAAkB;IAClB,UAAU;IACV,eAAe;IACf,QAAQ;IACR,SAAS;IACT,SAAS;AACb;;AAEA;IACI,kBAAkB;IAClB,qBAAqB;IACrB,WAAW;IACX,YAAY;IACZ,yCAAyC;IACzC,mBAAmB;IACnB,sCAAsC;IACtC,sBAAsB;AAC1B;;AAEA;IACI,WAAW;IACX,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,uBAAuB;IACvB,kBAAkB;IAClB,+BAA+B;IAC/B,wCAAwC;AAC5C;;AAEA;IACI,wCAAwC;AAC5C;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,6CAA6C;AACjD;;AAEA;IACI,yCAAyC;AAC7C;;AAEA;IACI,wCAAwC;AAC5C;;AAEA;;;;IAII,WAAW;IACX,sBAAsB;AAC1B;;AAEA;IACI,aAAa;IACb,QAAQ;IACR,WAAW;AACf;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,OAAO;AACX;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,QAAQ;IACR,WAAW;AACf;;AAEA;IACI,OAAO;AACX;;AAEA;IACI,OAAO;IACP,aAAa;AACjB;;AAEA;;IAEI,OAAO;IACP,aAAa;IACb,sBAAsB;IACtB,uBAAuB;AAC3B;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,qBAAqB;IACrB,gBAAgB;IAChB,gBAAgB;AACpB;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN,OAAO;IACP,QAAQ;IACR,gFAAgF;IAChF,gBAAgB;IAChB,0CAA0C;IAC1C,aAAa;IACb,mBAAmB;IACnB,uBAAuB;IACvB,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,eAAe;IACf,gBAAgB;IAChB,WAAW;AACf;;AAEA;IACI,mCAAmC;IACnC,wBAAwB;IACxB,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,mCAAmC;IACnC,aAAa;IACb,sBAAsB;IACtB,SAAS;AACb;;AAEA;IACI,OAAO;AACX;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,mCAAmC;IACnC,wBAAwB;IACxB,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,sBAAsB;IACtB,sCAAsC;AAC1C;;AAEA;IACI,mCAAmC;AACvC;;AAEA;IACI,mCAAmC;AACvC","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.chart-wizard-widget {\n padding: 10px;\n height: 100%;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.chart-wizard-input-row {\n display: flex;\n flex-direction: column;\n margin-bottom: 15px;\n gap: 5px;\n}\n\n.chart-wizard-boolean-row {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n gap: 12px;\n}\n\n.chart-wizard-input-label {\n color: var(--jp-content-font-color2);\n font-size: 12px;\n font-weight: 500;\n text-transform: none;\n}\n\n.chart-wizard-boolean-label {\n flex: 1;\n margin: 0;\n cursor: pointer;\n}\n\n.chart-wizard-toggle-container {\n position: relative;\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.chart-wizard-toggle-input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n width: 0;\n height: 0;\n margin: 0;\n}\n\n.chart-wizard-toggle-slider {\n position: relative;\n display: inline-block;\n width: 44px;\n height: 24px;\n background-color: var(--jp-border-color2);\n border-radius: 12px;\n transition: background-color 0.3s ease;\n box-sizing: border-box;\n}\n\n.chart-wizard-toggle-slider::before {\n content: '';\n position: absolute;\n width: 20px;\n height: 20px;\n left: 2px;\n top: 2px;\n background-color: white;\n border-radius: 50%;\n transition: transform 0.3s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n.chart-wizard-toggle-input:checked + .chart-wizard-toggle-slider {\n background-color: var(--jp-brand-color1);\n}\n\n.chart-wizard-toggle-input:checked + .chart-wizard-toggle-slider::before {\n transform: translateX(20px);\n}\n\n.chart-wizard-toggle-input:focus + .chart-wizard-toggle-slider {\n box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);\n}\n\n.chart-wizard-toggle-input:hover + .chart-wizard-toggle-slider {\n background-color: var(--jp-border-color1);\n}\n\n.chart-wizard-toggle-input:checked:hover + .chart-wizard-toggle-slider {\n background-color: var(--jp-brand-color0);\n}\n\n.chart-wizard-number-input,\n.chart-wizard-text-input,\n.chart-wizard-color-input,\n.chart-wizard-tuple-input {\n width: 100%;\n box-sizing: border-box;\n}\n\n.chart-wizard-color-container {\n display: flex;\n gap: 8px;\n width: 100%;\n}\n\n.chart-wizard-color-picker {\n flex-shrink: 0;\n}\n\n.chart-wizard-color-input {\n flex: 1;\n}\n\n.chart-wizard-tuple-container {\n display: flex;\n align-items: center;\n gap: 5px;\n width: 100%;\n}\n\n.chart-wizard-tuple-input {\n flex: 1;\n}\n\n.chart-wizard-config-container {\n flex: 1;\n min-height: 0;\n}\n\n.chart-wizard-empty-state,\n.chart-wizard-no-config {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.chart-wizard-no-config p {\n text-align: center;\n}\n\n.chart-wizard-loading-dots {\n display: inline-block;\n min-width: 1.5em;\n text-align: left;\n}\n\n.chart-wizard-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n /* Height is set dynamically via inline style to cover full scrollable content */\n min-height: 100%;\n background-color: rgba(255, 255, 255, 0.8);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n pointer-events: all;\n}\n\n.chart-wizard-overlay-text {\n font-size: 16px;\n font-weight: 500;\n color: #333;\n}\n\n.chart-wizard-warning {\n background-color: var(--yellow-100);\n color: var(--yellow-900);\n padding: 10px 12px;\n border-radius: 4px;\n margin-bottom: 15px;\n font-size: 13px;\n line-height: 1.4;\n border: 1px solid var(--yellow-300);\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.chart-wizard-warning-content {\n flex: 1;\n}\n\n.chart-wizard-warning strong {\n font-weight: 600;\n}\n\n.chart-wizard-warning-button {\n background-color: var(--yellow-600);\n color: var(--yellow-900);\n border: none;\n padding: 6px 12px;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n align-self: flex-start;\n transition: background-color 0.2s ease;\n}\n\n.chart-wizard-warning-button:hover {\n background-color: var(--yellow-500);\n}\n\n.chart-wizard-warning-button:active {\n background-color: var(--yellow-300);\n}"],"sourceRoot":""}]);
|
|
17883
20331
|
// Exports
|
|
17884
20332
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17885
20333
|
|
|
@@ -18195,6 +20643,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
18195
20643
|
font-size: 14px;
|
|
18196
20644
|
border-radius: var(--chat-taskpane-item-border-radius);
|
|
18197
20645
|
padding: 0 var(--chat-taskpane-item-indent);
|
|
20646
|
+
margin-bottom: 10px;
|
|
18198
20647
|
}
|
|
18199
20648
|
|
|
18200
20649
|
.message:hover .message-start-editing-button {
|
|
@@ -18318,7 +20767,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
18318
20767
|
|
|
18319
20768
|
.message-edit-buttons button:hover {
|
|
18320
20769
|
background-color: var(--jp-layout-color2);
|
|
18321
|
-
}`, "",{"version":3,"sources":["webpack://./style/ChatMessage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,sDAAsD;EACtD,2CAA2C;
|
|
20770
|
+
}`, "",{"version":3,"sources":["webpack://./style/ChatMessage.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,sDAAsD;EACtD,2CAA2C;EAC3C,mBAAmB;AACrB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,2DAA2D;EAC3D,0CAA0C;EAC1C,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;EACR,gBAAgB;EAChB,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,gBAAgB;EAChB,sBAAsB;EACtB,SAAS;EACT,gBAAgB;AAClB;;AAEA;EACE,mBAAmB;AACrB;;AAEA,qCAAqC;AACrC;EACE,kBAAkB;EAClB,WAAW;EACX,UAAU;EACV,aAAa;EACb,kBAAkB;EAClB,gBAAgB,EAAE,0DAA0D;AAC9E;;AAEA,qCAAqC;AACrC;;EAEE,eAAe;EACf,UAAU;EACV;;qCAEmC;EACnC,yCAAyC;EACzC,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;EACvB,oCAAoC;AACtC;;AAEA,gCAAgC;AAChC;EACE,WAAW;EACX,YAAY;EACZ,UAAU;EACV,gBAAgB,EAAE,oCAAoC;AACxD;;AAEA,yCAAyC;AACzC;EACE,+CAA+C;AACjD;;AAEA,8FAA8F;AAC9F;;EAEE,gBAAgB;AAClB;;AAEA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;AACpB;;AAEA,mBAAmB;AACnB;EACE,oCAAoC;AACtC;;AAEA,iBAAiB;AACjB;;EAEE,yCAAyC;AAC3C;;AAEA,kCAAkC;AAClC;;EAEE,UAAU;AACZ;;AAEA;EACE,aAAa;EACb,QAAQ;EACR,YAAY;AACd;;AAEA;EACE,iBAAiB;EACjB,kBAAkB;EAClB,yCAAyC;EACzC,oCAAoC;EACpC,yCAAyC;EACzC,eAAe;AACjB;;AAEA;EACE,yCAAyC;AAC3C","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.message {\n position: relative;\n height: min-content;\n box-sizing: border-box;\n width: 100%;\n font-size: 14px;\n border-radius: var(--chat-taskpane-item-border-radius);\n padding: 0 var(--chat-taskpane-item-indent);\n margin-bottom: 10px;\n}\n\n.message:hover .message-start-editing-button {\n opacity: 1 !important;\n}\n\n.message-user {\n background-color: var(--chat-user-message-background-color);\n color: var(--chat-user-message-font-color);\n padding: 10px;\n margin-bottom: 5px;\n}\n\n.message-assistant-chat {\n color: var(--chat-assistant-message-font-color);\n}\n\n.chat-message-buttons {\n display: flex;\n flex-direction: row;\n gap: 8px;\n margin-top: 10px;\n margin-bottom: 4px;\n flex-wrap: wrap;\n}\n\n.chat-taskpane-smart-debug-error-message {\n white-space: pre;\n font-family: monospace;\n margin: 0;\n overflow-x: auto;\n}\n\n.message-text {\n align-items: center;\n}\n\n/* Message Action Buttons Container */\n.message-action-buttons {\n position: absolute;\n bottom: 8px;\n right: 8px;\n display: flex;\n border-radius: 4px;\n overflow: hidden; /* Ensures inner buttons don't break the rounded corners */\n}\n\n/* Common styles for action buttons */\n.message-action-buttons button,\n.message-start-editing-button {\n cursor: pointer;\n opacity: 0;\n transition:\n opacity 0.2s ease-in-out,\n background-color 0.2s ease-in-out;\n background-color: var(--jp-layout-color3);\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--jp-content-font-color1);\n}\n\n/* Action buttons in the group */\n.message-action-buttons button {\n width: 28px;\n height: 28px;\n padding: 0;\n border-radius: 0; /* Remove individual button radius */\n}\n\n/* Add subtle separator between buttons */\n.message-action-buttons button:not(:last-child) {\n border-right: 1px solid var(--jp-border-color1);\n}\n\n/* Remove the individual button radius styles since we're handling it at the container level */\n.message-action-buttons button:first-child,\n.message-action-buttons button:last-child {\n border-radius: 0;\n}\n\n/* Standalone edit button */\n.message-start-editing-button {\n position: relative;\n padding: 4px;\n border-radius: 4px;\n}\n\n/* SVG icon color */\n.message-action-buttons button svg {\n color: var(--jp-content-font-color1);\n}\n\n/* Hover states */\n.message-action-buttons button:hover,\n.message-start-editing-button:hover {\n background-color: var(--jp-layout-color4);\n}\n\n/* Show buttons on message hover */\n.message:hover .message-action-buttons button,\n.message:hover .message-start-editing-button {\n opacity: 1;\n}\n\n.message-edit-buttons {\n display: flex;\n gap: 8px;\n padding: 5px;\n}\n\n.message-edit-buttons button {\n padding: 4px 12px;\n border-radius: 4px;\n background-color: var(--jp-layout-color1);\n color: var(--jp-content-font-color1);\n border: 1px solid var(--jp-border-color1);\n cursor: pointer;\n}\n\n.message-edit-buttons button:hover {\n background-color: var(--jp-layout-color2);\n}"],"sourceRoot":""}]);
|
|
18322
20771
|
// Exports
|
|
18323
20772
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
18324
20773
|
|
|
@@ -18805,9 +21254,29 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
18805
21254
|
margin: 0 0;
|
|
18806
21255
|
}
|
|
18807
21256
|
|
|
21257
|
+
.scratchpad-result {
|
|
21258
|
+
padding: 8px 12px;
|
|
21259
|
+
border-top: 1px solid var(--jp-cell-editor-border-color);
|
|
21260
|
+
background-color: var(--jp-layout-color1);
|
|
21261
|
+
}
|
|
21262
|
+
|
|
21263
|
+
.scratchpad-result pre {
|
|
21264
|
+
margin: 0;
|
|
21265
|
+
font-family: var(--jp-code-font-family);
|
|
21266
|
+
font-size: var(--jp-code-font-size);
|
|
21267
|
+
color: var(--jp-ui-font-color2);
|
|
21268
|
+
white-space: pre-wrap;
|
|
21269
|
+
word-wrap: break-word;
|
|
21270
|
+
max-height: 200px;
|
|
21271
|
+
overflow-y: auto;
|
|
21272
|
+
}
|
|
18808
21273
|
|
|
21274
|
+
.scratchpad-result-warning {
|
|
21275
|
+
color: var(--jp-warn-color1, #f0a000);
|
|
21276
|
+
font-style: italic;
|
|
21277
|
+
}
|
|
18809
21278
|
|
|
18810
|
-
`, "",{"version":3,"sources":["webpack://./style/CodeBlock.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,cAAc;;EAEd,8CAA8C;EAC9C,kBAAkB;EAClB,oDAAoD;EACpD,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,oBAAoB;;EAEpB,WAAW;EACX,2DAA2D;EAC3D,2DAA2D;EAC3D,gBAAgB;AAClB;;AAEA;EACE,YAAY;EACZ,gBAAgB;EAChB,0CAA0C;AAC5C;;AAEA;EACE,2DAA2D;EAC3D,YAAY;EACZ,yDAAyD;EACzD,kBAAkB;;EAElB,gBAAgB;EAChB,0CAA0C;AAC5C;;AAEA;EACE,8CAA8C;EAC9C,+CAA+C;AACjD;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,WAAW;EACX,8CAA8C;EAC9C,iCAAiC;EACjC,eAAe;AACjB;;AAEA;EACE,qCAAqC;AACvC;;AAEA;EACE,cAAc;EACd,SAAS;AACX;;AAEA;EACE,6BAA6B;AAC/B;;AAEA;EACE,eAAe;EACf,aAAa;EACb,+BAA+B;EAC/B,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,oDAAoD;EACpD,kBAAkB;EAClB,8DAA8D;AAChE;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,SAAS;EACT,OAAO;EACP,YAAY;AACd;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,YAAY;EACZ,0BAA0B;EAC1B,yCAAyC;AAC3C;;AAEA;EACE,YAAY;EACZ,WAAW;AACb","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.code-block-container {\n display: flex;\n flex-direction: column;\n position: relative;\n margin: 10px 0;\n\n background-color: var(--chat-background-color);\n border-radius: 4px;\n border: 1px solid var(--jp-cell-editor-border-color);\n overflow: hidden;\n}\n\n.code-content {\n width: 100%;\n overflow-x: auto;\n}\n\n.code-block-toolbar {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n\n width: 100%;\n background-color: var(--chat-user-message-background-color);\n border-bottom: 1px solid var(--jp-cell-editor-border-color);\n font-size: 0.8em;\n}\n\n.code-location {\n flex-grow: 1;\n margin-left: 5px;\n color: var(--chat-user-message-font-color);\n}\n\n.code-block-toolbar button {\n background-color: var(--chat-user-message-background-color);\n border: none;\n border-left: 1px solid var(--jp-cell-editor-border-color);\n border-radius: 0px;\n\n font-size: 0.8em;\n color: var(--chat-user-message-font-color);\n}\n\n.code-block-toolbar button:hover {\n background-color: var(--chat-background-color);\n color: var(--chat-assistant-message-font-color);\n}\n\n.active-cell-code-block {\n opacity: 0.7;\n}\n\n.active-cell-code-block:hover {\n opacity: 1;\n transition: 0.3s;\n}\n\n.code-block-expand-button {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 4px 0;\n width: 100%;\n background-color: var(--chat-background-color);\n transition: background-color 0.2s;\n cursor: pointer;\n}\n\n.code-block-expand-button:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.code-block-expand-button svg {\n display: block;\n margin: 0;\n}\n\n.code-block-expand-button .icon-button {\n background-color: transparent;\n}\n\n.agent-mode-toggle {\n cursor: pointer;\n padding: 10px;\n color: var(--jp-ui-font-color2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--jp-cell-editor-border-color);\n border-radius: 5px;\n transition: background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.agent-mode-toggle:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.agent-mode-toggle.error-fixup {\n border: none;\n}\n\n.agent-mode-toggle.error-fixup.expanded {\n background-color: var(--jp-layout-color2);\n}\n\n.agent-mode-toggle-content {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-mode-toggle-content svg {\n flex-shrink: 0;\n}\n\n.agent-mode-toggle svg:last-child {\n flex-shrink: 0;\n}\n\n.agent-mode-toggle.expanded {\n border: none;\n border-radius: 5px 5px 0 0;\n background-color: var(--jp-layout-color2);\n}\n\n.agent-mode-collapsed {\n border: none;\n margin: 0 0;\n}\n\n\n\n"],"sourceRoot":""}]);
|
|
21279
|
+
`, "",{"version":3,"sources":["webpack://./style/CodeBlock.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,aAAa;EACb,sBAAsB;EACtB,kBAAkB;EAClB,cAAc;;EAEd,8CAA8C;EAC9C,kBAAkB;EAClB,oDAAoD;EACpD,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,oBAAoB;;EAEpB,WAAW;EACX,2DAA2D;EAC3D,2DAA2D;EAC3D,gBAAgB;AAClB;;AAEA;EACE,YAAY;EACZ,gBAAgB;EAChB,0CAA0C;AAC5C;;AAEA;EACE,2DAA2D;EAC3D,YAAY;EACZ,yDAAyD;EACzD,kBAAkB;;EAElB,gBAAgB;EAChB,0CAA0C;AAC5C;;AAEA;EACE,8CAA8C;EAC9C,+CAA+C;AACjD;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,UAAU;EACV,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,WAAW;EACX,8CAA8C;EAC9C,iCAAiC;EACjC,eAAe;AACjB;;AAEA;EACE,qCAAqC;AACvC;;AAEA;EACE,cAAc;EACd,SAAS;AACX;;AAEA;EACE,6BAA6B;AAC/B;;AAEA;EACE,eAAe;EACf,aAAa;EACb,+BAA+B;EAC/B,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;EACnB,oDAAoD;EACpD,kBAAkB;EAClB,8DAA8D;AAChE;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,SAAS;EACT,OAAO;EACP,YAAY;AACd;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,YAAY;EACZ,0BAA0B;EAC1B,yCAAyC;AAC3C;;AAEA;EACE,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,iBAAiB;EACjB,wDAAwD;EACxD,yCAAyC;AAC3C;;AAEA;EACE,SAAS;EACT,uCAAuC;EACvC,mCAAmC;EACnC,+BAA+B;EAC/B,qBAAqB;EACrB,qBAAqB;EACrB,iBAAiB;EACjB,gBAAgB;AAClB;;AAEA;EACE,qCAAqC;EACrC,kBAAkB;AACpB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.code-block-container {\n display: flex;\n flex-direction: column;\n position: relative;\n margin: 10px 0;\n\n background-color: var(--chat-background-color);\n border-radius: 4px;\n border: 1px solid var(--jp-cell-editor-border-color);\n overflow: hidden;\n}\n\n.code-content {\n width: 100%;\n overflow-x: auto;\n}\n\n.code-block-toolbar {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n\n width: 100%;\n background-color: var(--chat-user-message-background-color);\n border-bottom: 1px solid var(--jp-cell-editor-border-color);\n font-size: 0.8em;\n}\n\n.code-location {\n flex-grow: 1;\n margin-left: 5px;\n color: var(--chat-user-message-font-color);\n}\n\n.code-block-toolbar button {\n background-color: var(--chat-user-message-background-color);\n border: none;\n border-left: 1px solid var(--jp-cell-editor-border-color);\n border-radius: 0px;\n\n font-size: 0.8em;\n color: var(--chat-user-message-font-color);\n}\n\n.code-block-toolbar button:hover {\n background-color: var(--chat-background-color);\n color: var(--chat-assistant-message-font-color);\n}\n\n.active-cell-code-block {\n opacity: 0.7;\n}\n\n.active-cell-code-block:hover {\n opacity: 1;\n transition: 0.3s;\n}\n\n.code-block-expand-button {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 4px 0;\n width: 100%;\n background-color: var(--chat-background-color);\n transition: background-color 0.2s;\n cursor: pointer;\n}\n\n.code-block-expand-button:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.code-block-expand-button svg {\n display: block;\n margin: 0;\n}\n\n.code-block-expand-button .icon-button {\n background-color: transparent;\n}\n\n.agent-mode-toggle {\n cursor: pointer;\n padding: 10px;\n color: var(--jp-ui-font-color2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--jp-cell-editor-border-color);\n border-radius: 5px;\n transition: background-color 0.2s ease, border-color 0.2s ease;\n}\n\n.agent-mode-toggle:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.agent-mode-toggle.error-fixup {\n border: none;\n}\n\n.agent-mode-toggle.error-fixup.expanded {\n background-color: var(--jp-layout-color2);\n}\n\n.agent-mode-toggle-content {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-mode-toggle-content svg {\n flex-shrink: 0;\n}\n\n.agent-mode-toggle svg:last-child {\n flex-shrink: 0;\n}\n\n.agent-mode-toggle.expanded {\n border: none;\n border-radius: 5px 5px 0 0;\n background-color: var(--jp-layout-color2);\n}\n\n.agent-mode-collapsed {\n border: none;\n margin: 0 0;\n}\n\n.scratchpad-result {\n padding: 8px 12px;\n border-top: 1px solid var(--jp-cell-editor-border-color);\n background-color: var(--jp-layout-color1);\n}\n\n.scratchpad-result pre {\n margin: 0;\n font-family: var(--jp-code-font-family);\n font-size: var(--jp-code-font-size);\n color: var(--jp-ui-font-color2);\n white-space: pre-wrap;\n word-wrap: break-word;\n max-height: 200px;\n overflow-y: auto;\n}\n\n.scratchpad-result-warning {\n color: var(--jp-warn-color1, #f0a000);\n font-style: italic;\n}\n\n"],"sourceRoot":""}]);
|
|
18811
21280
|
// Exports
|
|
18812
21281
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
18813
21282
|
|
|
@@ -19204,10 +21673,9 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
19204
21673
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
19205
21674
|
display: flex;
|
|
19206
21675
|
flex-direction: column;
|
|
19207
|
-
min-width:
|
|
21676
|
+
min-width: 225px;
|
|
19208
21677
|
white-space: nowrap;
|
|
19209
21678
|
height: 400px;
|
|
19210
|
-
min-width: 225px;
|
|
19211
21679
|
max-width: 350px;
|
|
19212
21680
|
overflow-y: auto;
|
|
19213
21681
|
}
|
|
@@ -19224,6 +21692,22 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
19224
21692
|
left: auto;
|
|
19225
21693
|
}
|
|
19226
21694
|
|
|
21695
|
+
/* Responsive width based on chat taskpane container width */
|
|
21696
|
+
/* Make dropdown width relative to container width, accounting for padding */
|
|
21697
|
+
/* At minimum taskpane width (350px), dropdown should fit within available space (330px accounting for 20px padding) */
|
|
21698
|
+
@container (max-width: 350px) {
|
|
21699
|
+
.dropdown-menu {
|
|
21700
|
+
max-width: calc(100cqw - 20px);
|
|
21701
|
+
}
|
|
21702
|
+
}
|
|
21703
|
+
|
|
21704
|
+
/* For wider taskpanes, allow dropdown to use up to 350px but still respect container width */
|
|
21705
|
+
@container (min-width: 351px) {
|
|
21706
|
+
.dropdown-menu {
|
|
21707
|
+
max-width: min(350px, calc(100cqw - 20px));
|
|
21708
|
+
}
|
|
21709
|
+
}
|
|
21710
|
+
|
|
19227
21711
|
.dropdown-item-row {
|
|
19228
21712
|
display: flex;
|
|
19229
21713
|
flex-direction: row;
|
|
@@ -19279,7 +21763,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
19279
21763
|
display: flex;
|
|
19280
21764
|
align-items: center;
|
|
19281
21765
|
}
|
|
19282
|
-
`, "",{"version":3,"sources":["webpack://./style/DropdownMenu.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,qBAAqB;EACrB,aAAa;EACb,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,wCAAwC;EACxC,aAAa;EACb,sBAAsB;EACtB,gBAAgB;EAChB,mBAAmB;EACnB,aAAa;EACb,gBAAgB;EAChB,gBAAgB;
|
|
21766
|
+
`, "",{"version":3,"sources":["webpack://./style/DropdownMenu.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,qBAAqB;AACvB;;AAEA;EACE,kBAAkB;EAClB,qBAAqB;EACrB,aAAa;EACb,yCAAyC;EACzC,yCAAyC;EACzC,kBAAkB;EAClB,wCAAwC;EACxC,aAAa;EACb,sBAAsB;EACtB,gBAAgB;EAChB,mBAAmB;EACnB,aAAa;EACb,gBAAgB;EAChB,gBAAgB;AAClB;;AAEA,0BAA0B;AAC1B;EACE,OAAO;EACP,WAAW;AACb;;AAEA,2BAA2B;AAC3B;EACE,QAAQ;EACR,UAAU;AACZ;;AAEA,4DAA4D;AAC5D,4EAA4E;AAC5E,sHAAsH;AACtH;EACE;IACE,8BAA8B;EAChC;AACF;;AAEA,6FAA6F;AAC7F;EACE;IACE,0CAA0C;EAC5C;AACF;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,mBAAmB;EACnB,QAAQ;EACR,gBAAgB;EAChB,mBAAmB,EAAE,iDAAiD;AACxE;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;EAChB,+BAA+B;EAC/B,OAAO;EACP,gBAAgB;EAChB,uBAAuB;EACvB,eAAe;AACjB;;AAEA;EACE,WAAW;EACX,eAAe;EACf,YAAY;EACZ,aAAa;EACb,mBAAmB;EACnB,uBAAuB;AACzB;;AAEA;EACE,iBAAiB,EAAE,2BAA2B;AAChD;;AAEA;EACE,YAAY;EACZ,eAAe;AACjB;;AAEA;;;CAGC;AACD;;EAEE,aAAa;EACb,mBAAmB;AACrB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.dropdown-container {\n position: relative;\n display: inline-block;\n}\n\n.dropdown-menu {\n position: absolute;\n top: calc(100% + 4px);\n z-index: 1000;\n background-color: var(--jp-layout-color1);\n border: 1px solid var(--jp-layout-color2);\n border-radius: 3px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n display: flex;\n flex-direction: column;\n min-width: 225px;\n white-space: nowrap;\n height: 400px;\n max-width: 350px;\n overflow-y: auto;\n}\n\n/* Left-aligned dropdown */\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n/* Right-aligned dropdown */\n.dropdown-menu-right {\n right: 0;\n left: auto;\n}\n\n/* Responsive width based on chat taskpane container width */\n/* Make dropdown width relative to container width, accounting for padding */\n/* At minimum taskpane width (350px), dropdown should fit within available space (330px accounting for 20px padding) */\n@container (max-width: 350px) {\n .dropdown-menu {\n max-width: calc(100cqw - 20px);\n }\n}\n\n/* For wider taskpanes, allow dropdown to use up to 350px but still respect container width */\n@container (min-width: 351px) {\n .dropdown-menu {\n max-width: min(350px, calc(100cqw - 20px));\n }\n}\n\n.dropdown-item-row {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 8px;\n padding: 4px 2px;\n padding-right: 20px; /* Add padding to leave space for the scrollbar */\n}\n\n.dropdown-item-row:hover {\n background-color: var(--jp-layout-color2);\n}\n\n.dropdown-item-main {\n display: flex;\n flex-direction: row;\n align-items: center;\n text-align: left;\n border: none;\n background: none;\n color: var(--jp-ui-font-color1);\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n.dropdown-item-icon {\n width: 20px;\n min-width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dropdown-item-label {\n padding-left: 3px; /* Add consistent padding */\n}\n\n.dropdown-item-disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n/* \n When using Lab Icons, we seem to get an extra div around the svg icon\n This makes sure the svg is aligned properly in that div\n*/\n.dropdown-item-icon > div, \n.dropdown-item-secondary > div{\n display: flex;\n align-items: center;\n}\n"],"sourceRoot":""}]);
|
|
19283
21767
|
// Exports
|
|
19284
21768
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
19285
21769
|
|
|
@@ -22091,6 +24575,12 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
22091
24575
|
padding: 5px 10px;
|
|
22092
24576
|
}
|
|
22093
24577
|
|
|
24578
|
+
.button-base:disabled {
|
|
24579
|
+
opacity: 0.6;
|
|
24580
|
+
cursor: not-allowed;
|
|
24581
|
+
pointer-events: none;
|
|
24582
|
+
}
|
|
24583
|
+
|
|
22094
24584
|
.button-green {
|
|
22095
24585
|
background-color: var(--green-400);
|
|
22096
24586
|
color: var(--green-900) !important;
|
|
@@ -22127,6 +24617,10 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
22127
24617
|
background-color: var(--purple-400);
|
|
22128
24618
|
}
|
|
22129
24619
|
|
|
24620
|
+
.button-purple:disabled:hover {
|
|
24621
|
+
background-color: var(--purple-300);
|
|
24622
|
+
}
|
|
24623
|
+
|
|
22130
24624
|
.button-blue {
|
|
22131
24625
|
background-color: var(--blue-300);
|
|
22132
24626
|
color: var(--blue-900) !important;
|
|
@@ -22160,7 +24654,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
22160
24654
|
font-size: 12px;
|
|
22161
24655
|
padding: 2px 5px;
|
|
22162
24656
|
}
|
|
22163
|
-
`, "",{"version":3,"sources":["webpack://./style/button.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;;;;CAIC;;AAED;EACE,YAAY;EACZ,kBAAkB;EAClB,eAAe;EACf,eAAe;EACf,2EAA2E;EAC3E,mBAAmB;EACnB,iBAAiB;AACnB;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,gCAAgC;EAChC,gCAAgC;AAClC;;AAEA;EACE,gCAAgC;AAClC;;AAEA;EACE,yCAAyC;EACzC,+CAA+C;AACjD;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mCAAmC;EACnC,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,iCAAiC;EACjC,iCAAiC;EACjC,mCAAmC;EACnC,kBAAkB;AACpB;;AAEA;EACE,iCAAiC;AACnC;;AAEA;EACE,mCAAmC;EACnC,8BAA8B;AAChC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,oCAAoC;EACpC,eAAe;EACf,gBAAgB;AAClB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* \n Classes that can be used for any button, making it easier to keep \n the theme consistent. For example, use them to make a textButton or\n textAndIconButton green.\n*/\n\n.button-base {\n border: none;\n border-radius: 3px;\n cursor: pointer;\n font-size: 14px;\n /* Make sure the button grows large enough so that the text does not wrap */\n white-space: nowrap;\n padding: 5px 10px;\n}\n\n.button-green {\n background-color: var(--green-400);\n color: var(--green-900) !important;\n}\n\n.button-green:hover {\n background-color: var(--green-500);\n}\n\n.button-red {\n background-color: var(--red-400);\n color: var(--red-900) !important;\n}\n\n.button-red:hover {\n background-color: var(--red-500);\n}\n\n.button-gray {\n background-color: var(--jp-layout-color2);\n color: var(--jp-content-font-color1) !important;\n}\n\n.button-gray:hover {\n background-color: var(--jp-layout-color3);\n}\n\n.button-purple {\n background-color: var(--purple-300);\n color: var(--purple-700) !important;\n}\n\n.button-purple:hover {\n background-color: var(--purple-400);\n}\n\n.button-blue {\n background-color: var(--blue-300);\n color: var(--blue-900) !important;\n border: 0.5px solid var(--blue-900);\n border-radius: 4px;\n}\n\n.button-blue:hover {\n background-color: var(--blue-400);\n}\n\n.button-dark-purple {\n background-color: var(--purple-500);\n color: var(--white) !important;\n}\n\n.button-dark-purple:hover {\n background-color: var(--purple-600);\n}\n\n.button-width-block {\n width: 100%;\n}\n\n.button-width-fit-contents {\n width: fit-content;\n}\n\n.button-small {\n height: var(--toolbar-button-height);\n font-size: 12px;\n padding: 2px 5px;\n}\n"],"sourceRoot":""}]);
|
|
24657
|
+
`, "",{"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,YAAY;EACZ,mBAAmB;EACnB,oBAAoB;AACtB;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,kCAAkC;AACpC;;AAEA;EACE,gCAAgC;EAChC,gCAAgC;AAClC;;AAEA;EACE,gCAAgC;AAClC;;AAEA;EACE,yCAAyC;EACzC,+CAA+C;AACjD;;AAEA;EACE,yCAAyC;AAC3C;;AAEA;EACE,mCAAmC;EACnC,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,iCAAiC;EACjC,iCAAiC;EACjC,mCAAmC;EACnC,kBAAkB;AACpB;;AAEA;EACE,iCAAiC;AACnC;;AAEA;EACE,mCAAmC;EACnC,8BAA8B;AAChC;;AAEA;EACE,mCAAmC;AACrC;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,oCAAoC;EACpC,eAAe;EACf,gBAAgB;AAClB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n/* \n Classes that can be used for any button, making it easier to keep \n the theme consistent. For example, use them to make a textButton or\n textAndIconButton green.\n*/\n\n.button-base {\n border: none;\n border-radius: 3px;\n cursor: pointer;\n font-size: 14px;\n /* Make sure the button grows large enough so that the text does not wrap */\n white-space: nowrap;\n padding: 5px 10px;\n}\n\n.button-base:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n pointer-events: none;\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-purple:disabled:hover {\n background-color: var(--purple-300);\n}\n\n.button-blue {\n background-color: var(--blue-300);\n color: var(--blue-900) !important;\n border: 0.5px solid var(--blue-900);\n border-radius: 4px;\n}\n\n.button-blue:hover {\n background-color: var(--blue-400);\n}\n\n.button-dark-purple {\n background-color: var(--purple-500);\n color: var(--white) !important;\n}\n\n.button-dark-purple:hover {\n background-color: var(--purple-600);\n}\n\n.button-width-block {\n width: 100%;\n}\n\n.button-width-fit-contents {\n width: fit-content;\n}\n\n.button-small {\n height: var(--toolbar-button-height);\n font-size: 12px;\n padding: 2px 5px;\n}\n"],"sourceRoot":""}]);
|
|
22164
24658
|
// Exports
|
|
22165
24659
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
22166
24660
|
|
|
@@ -22255,6 +24749,60 @@ module.exports = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 10 10\" fill=\"n
|
|
|
22255
24749
|
|
|
22256
24750
|
module.exports = "<svg width=\"33\" height=\"33\" viewBox=\"0 0 33 33\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"currentColor\">\n <path d=\"M27.8204 5.193C24.7983 2.1709 20.7805 0.506836 16.5068 0.506836C7.78625 0.506836 0.506836 7.78625 0.506836 16.5068C0.506836 25.2274 7.78625 32.5068 16.5068 32.5068C25.2274 32.5068 32.5068 25.2274 32.5068 16.5068C32.5068 12.2332 30.8426 8.2151 27.8207 5.19329L27.8204 5.193ZM23.627 21.5962L21.7553 17.7403L23.4737 16.9062L24.3955 18.8053L24.4401 18.6209C24.608 17.9267 24.6932 17.2155 24.6932 16.5068C24.6932 11.6336 20.7854 7.66893 15.9819 7.66893C11.1788 7.66893 7.27066 11.6336 7.27066 16.5068C7.27066 21.3572 11.1414 25.3073 15.9137 25.3444V27.2546C10.0885 27.217 5.36066 22.41 5.36066 16.5067C5.36066 10.5804 10.1253 5.75855 15.9819 5.75855C21.8385 5.75855 26.6032 10.5801 26.6032 16.5067C26.6032 17.2903 26.5175 18.0775 26.3484 18.8468L26.315 18.999L27.9027 18.0676L28.8693 19.7151L24.9693 22.003C24.3869 22.4896 23.6689 21.9597 23.6268 21.5962L23.627 21.5962Z\"/>\n </g>\n</svg>\n";
|
|
22257
24751
|
|
|
24752
|
+
/***/ }),
|
|
24753
|
+
|
|
24754
|
+
/***/ "./style/AddFieldButton.css":
|
|
24755
|
+
/*!**********************************!*\
|
|
24756
|
+
!*** ./style/AddFieldButton.css ***!
|
|
24757
|
+
\**********************************/
|
|
24758
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24759
|
+
|
|
24760
|
+
__webpack_require__.r(__webpack_exports__);
|
|
24761
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24762
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
24763
|
+
/* harmony export */ });
|
|
24764
|
+
/* 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");
|
|
24765
|
+
/* 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__);
|
|
24766
|
+
/* 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");
|
|
24767
|
+
/* 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__);
|
|
24768
|
+
/* 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");
|
|
24769
|
+
/* 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__);
|
|
24770
|
+
/* 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");
|
|
24771
|
+
/* 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__);
|
|
24772
|
+
/* 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");
|
|
24773
|
+
/* 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__);
|
|
24774
|
+
/* 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");
|
|
24775
|
+
/* 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__);
|
|
24776
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_AddFieldButton_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./AddFieldButton.css */ "./node_modules/css-loader/dist/cjs.js!./style/AddFieldButton.css");
|
|
24777
|
+
|
|
24778
|
+
|
|
24779
|
+
|
|
24780
|
+
|
|
24781
|
+
|
|
24782
|
+
|
|
24783
|
+
|
|
24784
|
+
|
|
24785
|
+
|
|
24786
|
+
|
|
24787
|
+
|
|
24788
|
+
var options = {};
|
|
24789
|
+
|
|
24790
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
24791
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
24792
|
+
|
|
24793
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
24794
|
+
|
|
24795
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
24796
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
24797
|
+
|
|
24798
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_AddFieldButton_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
24799
|
+
|
|
24800
|
+
|
|
24801
|
+
|
|
24802
|
+
|
|
24803
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_AddFieldButton_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_AddFieldButton_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_AddFieldButton_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
24804
|
+
|
|
24805
|
+
|
|
22258
24806
|
/***/ }),
|
|
22259
24807
|
|
|
22260
24808
|
/***/ "./style/AgentChangeControls.css":
|
|
@@ -22525,6 +25073,60 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
22525
25073
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_AppsList_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
22526
25074
|
|
|
22527
25075
|
|
|
25076
|
+
/***/ }),
|
|
25077
|
+
|
|
25078
|
+
/***/ "./style/AskUserQuestionToolUI.css":
|
|
25079
|
+
/*!*****************************************!*\
|
|
25080
|
+
!*** ./style/AskUserQuestionToolUI.css ***!
|
|
25081
|
+
\*****************************************/
|
|
25082
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25083
|
+
|
|
25084
|
+
__webpack_require__.r(__webpack_exports__);
|
|
25085
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25086
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25087
|
+
/* harmony export */ });
|
|
25088
|
+
/* 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");
|
|
25089
|
+
/* 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__);
|
|
25090
|
+
/* 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");
|
|
25091
|
+
/* 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__);
|
|
25092
|
+
/* 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");
|
|
25093
|
+
/* 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__);
|
|
25094
|
+
/* 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");
|
|
25095
|
+
/* 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__);
|
|
25096
|
+
/* 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");
|
|
25097
|
+
/* 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__);
|
|
25098
|
+
/* 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");
|
|
25099
|
+
/* 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__);
|
|
25100
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_AskUserQuestionToolUI_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./AskUserQuestionToolUI.css */ "./node_modules/css-loader/dist/cjs.js!./style/AskUserQuestionToolUI.css");
|
|
25101
|
+
|
|
25102
|
+
|
|
25103
|
+
|
|
25104
|
+
|
|
25105
|
+
|
|
25106
|
+
|
|
25107
|
+
|
|
25108
|
+
|
|
25109
|
+
|
|
25110
|
+
|
|
25111
|
+
|
|
25112
|
+
var options = {};
|
|
25113
|
+
|
|
25114
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
25115
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
25116
|
+
|
|
25117
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
25118
|
+
|
|
25119
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
25120
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
25121
|
+
|
|
25122
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_AskUserQuestionToolUI_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
25123
|
+
|
|
25124
|
+
|
|
25125
|
+
|
|
25126
|
+
|
|
25127
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_AskUserQuestionToolUI_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_AskUserQuestionToolUI_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_AskUserQuestionToolUI_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
25128
|
+
|
|
25129
|
+
|
|
22528
25130
|
/***/ }),
|
|
22529
25131
|
|
|
22530
25132
|
/***/ "./style/AssumptionTool.css":
|
|
@@ -22741,6 +25343,114 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
22741
25343
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_CellReference_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
22742
25344
|
|
|
22743
25345
|
|
|
25346
|
+
/***/ }),
|
|
25347
|
+
|
|
25348
|
+
/***/ "./style/ChartWizardPlugin.css":
|
|
25349
|
+
/*!*************************************!*\
|
|
25350
|
+
!*** ./style/ChartWizardPlugin.css ***!
|
|
25351
|
+
\*************************************/
|
|
25352
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25353
|
+
|
|
25354
|
+
__webpack_require__.r(__webpack_exports__);
|
|
25355
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25356
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25357
|
+
/* harmony export */ });
|
|
25358
|
+
/* 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");
|
|
25359
|
+
/* 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__);
|
|
25360
|
+
/* 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");
|
|
25361
|
+
/* 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__);
|
|
25362
|
+
/* 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");
|
|
25363
|
+
/* 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__);
|
|
25364
|
+
/* 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");
|
|
25365
|
+
/* 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__);
|
|
25366
|
+
/* 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");
|
|
25367
|
+
/* 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__);
|
|
25368
|
+
/* 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");
|
|
25369
|
+
/* 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__);
|
|
25370
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ChartWizardPlugin_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./ChartWizardPlugin.css */ "./node_modules/css-loader/dist/cjs.js!./style/ChartWizardPlugin.css");
|
|
25371
|
+
|
|
25372
|
+
|
|
25373
|
+
|
|
25374
|
+
|
|
25375
|
+
|
|
25376
|
+
|
|
25377
|
+
|
|
25378
|
+
|
|
25379
|
+
|
|
25380
|
+
|
|
25381
|
+
|
|
25382
|
+
var options = {};
|
|
25383
|
+
|
|
25384
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
25385
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
25386
|
+
|
|
25387
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
25388
|
+
|
|
25389
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
25390
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
25391
|
+
|
|
25392
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_ChartWizardPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
25393
|
+
|
|
25394
|
+
|
|
25395
|
+
|
|
25396
|
+
|
|
25397
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ChartWizardPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_ChartWizardPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_ChartWizardPlugin_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
25398
|
+
|
|
25399
|
+
|
|
25400
|
+
/***/ }),
|
|
25401
|
+
|
|
25402
|
+
/***/ "./style/ChartWizardWidget.css":
|
|
25403
|
+
/*!*************************************!*\
|
|
25404
|
+
!*** ./style/ChartWizardWidget.css ***!
|
|
25405
|
+
\*************************************/
|
|
25406
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25407
|
+
|
|
25408
|
+
__webpack_require__.r(__webpack_exports__);
|
|
25409
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25410
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25411
|
+
/* harmony export */ });
|
|
25412
|
+
/* 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");
|
|
25413
|
+
/* 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__);
|
|
25414
|
+
/* 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");
|
|
25415
|
+
/* 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__);
|
|
25416
|
+
/* 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");
|
|
25417
|
+
/* 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__);
|
|
25418
|
+
/* 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");
|
|
25419
|
+
/* 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__);
|
|
25420
|
+
/* 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");
|
|
25421
|
+
/* 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__);
|
|
25422
|
+
/* 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");
|
|
25423
|
+
/* 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__);
|
|
25424
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ChartWizardWidget_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./ChartWizardWidget.css */ "./node_modules/css-loader/dist/cjs.js!./style/ChartWizardWidget.css");
|
|
25425
|
+
|
|
25426
|
+
|
|
25427
|
+
|
|
25428
|
+
|
|
25429
|
+
|
|
25430
|
+
|
|
25431
|
+
|
|
25432
|
+
|
|
25433
|
+
|
|
25434
|
+
|
|
25435
|
+
|
|
25436
|
+
var options = {};
|
|
25437
|
+
|
|
25438
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
25439
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
25440
|
+
|
|
25441
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
25442
|
+
|
|
25443
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
25444
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
25445
|
+
|
|
25446
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_ChartWizardWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
25447
|
+
|
|
25448
|
+
|
|
25449
|
+
|
|
25450
|
+
|
|
25451
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_ChartWizardWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_ChartWizardWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_ChartWizardWidget_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
25452
|
+
|
|
25453
|
+
|
|
22744
25454
|
/***/ }),
|
|
22745
25455
|
|
|
22746
25456
|
/***/ "./style/ChatDropdown.css":
|
|
@@ -24580,4 +27290,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
24580
27290
|
/***/ })
|
|
24581
27291
|
|
|
24582
27292
|
}]);
|
|
24583
|
-
//# sourceMappingURL=lib_index_js.
|
|
27293
|
+
//# sourceMappingURL=lib_index_js.03302cc521d72eb56b00.js.map
|