mito-ai 0.1.51__py3-none-any.whl → 0.1.52__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/_version.py +1 -1
- mito_ai/constants.py +1 -1
- mito_ai/tests/test_constants.py +1 -1
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +111 -103
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
- mito_ai-0.1.51.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.c0b356ea4ace64bf1f03.js → mito_ai-0.1.52.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.5ec1e525d244fc8588cf.js +167 -118
- mito_ai-0.1.52.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.5ec1e525d244fc8588cf.js.map +1 -0
- mito_ai-0.1.51.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.d467572621b790a8240e.js → mito_ai-0.1.52.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.89927e1d3b5962d57ae3.js +17 -17
- mito_ai-0.1.51.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.d467572621b790a8240e.js.map → mito_ai-0.1.52.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.89927e1d3b5962d57ae3.js.map +1 -1
- {mito_ai-0.1.51.dist-info → mito_ai-0.1.52.dist-info}/METADATA +1 -1
- {mito_ai-0.1.51.dist-info → mito_ai-0.1.52.dist-info}/RECORD +36 -36
- mito_ai-0.1.51.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.c0b356ea4ace64bf1f03.js.map +0 -1
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/node_modules_process_browser_js.4b128e94d31a81ebd209.js.map +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.5876024bb17dbd6a3ee6.js.map +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.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.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.3f6754ac5116d47de76b.js.map +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
- {mito_ai-0.1.51.data → mito_ai-0.1.52.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.51.dist-info → mito_ai-0.1.52.dist-info}/WHEEL +0 -0
- {mito_ai-0.1.51.dist-info → mito_ai-0.1.52.dist-info}/entry_points.txt +0 -0
- {mito_ai-0.1.51.dist-info → mito_ai-0.1.52.dist-info}/licenses/LICENSE +0 -0
|
@@ -666,22 +666,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
666
666
|
|
|
667
667
|
|
|
668
668
|
|
|
669
|
-
const AgentChangeControls = ({ reviewAgentChanges, app, notebookTracker, setHasCheckpoint, setDisplayedNextStepsIfAvailable, setShowRevertQuestionnaire, chatTaskpaneMessagesRef, acceptAllAICode, rejectAllAICode,
|
|
670
|
-
const [changeCounts, setChangeCounts] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
669
|
+
const AgentChangeControls = ({ reviewAgentChanges, app, notebookTracker, setHasCheckpoint, setDisplayedNextStepsIfAvailable, setShowRevertQuestionnaire, chatTaskpaneMessagesRef, acceptAllAICode, rejectAllAICode, getReviewProgress, setAgentReviewStatus, agentReviewStatus, }) => {
|
|
671
670
|
const [reviewProgress, setReviewProgress] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
672
671
|
// Update counts when review starts
|
|
673
672
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
674
673
|
if (agentReviewStatus === 'in-agent-code-review') {
|
|
675
|
-
const counts = getChangeCounts();
|
|
676
|
-
setChangeCounts(counts);
|
|
677
674
|
const progress = getReviewProgress();
|
|
678
675
|
setReviewProgress(progress);
|
|
679
676
|
}
|
|
680
677
|
else {
|
|
681
|
-
setChangeCounts(null);
|
|
682
678
|
setReviewProgress(null);
|
|
683
679
|
}
|
|
684
|
-
}, [agentReviewStatus,
|
|
680
|
+
}, [agentReviewStatus, getReviewProgress]);
|
|
685
681
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
686
682
|
// Update progress periodically during review to reflect when cells are reviewed.
|
|
687
683
|
// We use polling here instead of event-driven updates because it's simpler and more robust -
|
|
@@ -702,16 +698,11 @@ const AgentChangeControls = ({ reviewAgentChanges, app, notebookTracker, setHasC
|
|
|
702
698
|
}, [agentReviewStatus]);
|
|
703
699
|
const handleReviewChanges = () => {
|
|
704
700
|
reviewAgentChanges();
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
// Scroll to show the new review controls after the UI updates
|
|
711
|
-
setTimeout(() => {
|
|
712
|
-
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_2__.scrollToDiv)(chatTaskpaneMessagesRef);
|
|
713
|
-
}, 0);
|
|
714
|
-
}
|
|
701
|
+
setAgentReviewStatus('in-agent-code-review');
|
|
702
|
+
// Scroll to show the new review controls after the UI updates
|
|
703
|
+
setTimeout(() => {
|
|
704
|
+
(0,_utils_scroll__WEBPACK_IMPORTED_MODULE_2__.scrollToDiv)(chatTaskpaneMessagesRef);
|
|
705
|
+
}, 0);
|
|
715
706
|
};
|
|
716
707
|
const handleAcceptAll = () => {
|
|
717
708
|
acceptAllAICode();
|
|
@@ -738,22 +729,6 @@ const AgentChangeControls = ({ reviewAgentChanges, app, notebookTracker, setHasC
|
|
|
738
729
|
if (agentReviewStatus === 'in-agent-code-review') {
|
|
739
730
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
740
731
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-change-controls-container" },
|
|
741
|
-
changeCounts && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-change-counts" },
|
|
742
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count" },
|
|
743
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-number agent-change-count-added" },
|
|
744
|
-
changeCounts.added,
|
|
745
|
-
" \u00A0"),
|
|
746
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-text" }, changeCounts.added === 1 ? 'cell added' : 'cells added')),
|
|
747
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count" },
|
|
748
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-number agent-change-count-modified" },
|
|
749
|
-
changeCounts.modified,
|
|
750
|
-
" \u00A0"),
|
|
751
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-text" }, changeCounts.modified === 1 ? 'cell modified' : 'cells modified')),
|
|
752
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count" },
|
|
753
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-number agent-change-count-removed" },
|
|
754
|
-
changeCounts.removed,
|
|
755
|
-
" \u00A0"),
|
|
756
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-text" }, changeCounts.removed === 1 ? 'cell removed' : 'cells removed')))),
|
|
757
732
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-change-controls-buttons" },
|
|
758
733
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-green", title: "Accept all changes", onClick: handleAcceptAll }, "Accept all"),
|
|
759
734
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", { className: "button-base button-red", onClick: handleRejectAll }, "Reject All")),
|
|
@@ -772,6 +747,43 @@ const AgentChangeControls = ({ reviewAgentChanges, app, notebookTracker, setHasC
|
|
|
772
747
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AgentChangeControls);
|
|
773
748
|
|
|
774
749
|
|
|
750
|
+
/***/ }),
|
|
751
|
+
|
|
752
|
+
/***/ "./lib/Extensions/AiChat/ChatMessage/AgentChangeSummary.js":
|
|
753
|
+
/*!*****************************************************************!*\
|
|
754
|
+
!*** ./lib/Extensions/AiChat/ChatMessage/AgentChangeSummary.js ***!
|
|
755
|
+
\*****************************************************************/
|
|
756
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
757
|
+
|
|
758
|
+
__webpack_require__.r(__webpack_exports__);
|
|
759
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
760
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
761
|
+
/* harmony export */ });
|
|
762
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
763
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
764
|
+
/* harmony import */ var _style_AgentChangeControls_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../style/AgentChangeControls.css */ "./style/AgentChangeControls.css");
|
|
765
|
+
/*
|
|
766
|
+
* Copyright (c) Saga Inc.
|
|
767
|
+
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
768
|
+
*/
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
const AgentChangeSummary = ({ getChangeCounts, }) => {
|
|
772
|
+
const changeCounts = getChangeCounts();
|
|
773
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "agent-change-counts" },
|
|
774
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count" },
|
|
775
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-number agent-change-count-added" }, changeCounts.added),
|
|
776
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-text" }, changeCounts.added === 1 ? 'cell added' : 'cells added')),
|
|
777
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count" },
|
|
778
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-number agent-change-count-modified" }, changeCounts.modified),
|
|
779
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-text" }, changeCounts.modified === 1 ? 'cell modified' : 'cells modified')),
|
|
780
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count" },
|
|
781
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-number agent-change-count-removed" }, changeCounts.removed),
|
|
782
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { className: "agent-change-count-text" }, changeCounts.removed === 1 ? 'cell removed' : 'cells removed'))));
|
|
783
|
+
};
|
|
784
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AgentChangeSummary);
|
|
785
|
+
|
|
786
|
+
|
|
775
787
|
/***/ }),
|
|
776
788
|
|
|
777
789
|
/***/ "./lib/Extensions/AiChat/ChatMessage/AlertBlock.js":
|
|
@@ -3041,7 +3053,7 @@ const ChatTaskpane = ({ notebookTracker, renderMimeRegistry, contextManager, str
|
|
|
3041
3053
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "chat-loading-message" },
|
|
3042
3054
|
"Thinking ",
|
|
3043
3055
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_LoadingDots__WEBPACK_IMPORTED_MODULE_37__["default"], null)),
|
|
3044
|
-
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentReviewPanel__WEBPACK_IMPORTED_MODULE_38__["default"], { hasCheckpoint: hasCheckpoint, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecution.agentExecutionStatus,
|
|
3056
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_AgentReviewPanel__WEBPACK_IMPORTED_MODULE_38__["default"], { hasCheckpoint: hasCheckpoint, agentModeEnabled: agentModeEnabled, agentExecutionStatus: agentExecution.agentExecutionStatus, showRevertQuestionnaire: showRevertQuestionnaire, reviewAgentChanges: agentReview.reviewAgentChanges, acceptAllAICode: agentReview.acceptAllAICode, rejectAllAICode: agentReview.rejectAllAICode, getChangeCounts: agentReview.getChangeCounts, getReviewProgress: agentReview.getReviewProgress, hasChanges: agentReview.hasChanges, setHasCheckpoint: setHasCheckpoint, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable, setShowRevertQuestionnaire: setShowRevertQuestionnaire, getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager, app: app, notebookTracker: notebookTracker, chatTaskpaneMessagesRef: chatTaskpaneMessagesRef, agentReviewStatus: agentReviewStatus, setAgentReviewStatus: setAgentReviewStatus })),
|
|
3045
3057
|
displayOptimizedChatHistory.length === 0 && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "suggestions-container" },
|
|
3046
3058
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_ScrollableSuggestions__WEBPACK_IMPORTED_MODULE_39__["default"], { onSelectSuggestion: (prompt) => {
|
|
3047
3059
|
if (agentModeEnabled) {
|
|
@@ -3557,8 +3569,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3557
3569
|
/* harmony export */ });
|
|
3558
3570
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
3559
3571
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3560
|
-
/* harmony import */ var
|
|
3561
|
-
/* harmony import */ var
|
|
3572
|
+
/* harmony import */ var _ChatMessage_AgentChangeControls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ChatMessage/AgentChangeControls */ "./lib/Extensions/AiChat/ChatMessage/AgentChangeControls.js");
|
|
3573
|
+
/* harmony import */ var _ChatMessage_AgentChangeSummary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ChatMessage/AgentChangeSummary */ "./lib/Extensions/AiChat/ChatMessage/AgentChangeSummary.js");
|
|
3574
|
+
/* harmony import */ var _ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ChatMessage/RevertQuestionnaire */ "./lib/Extensions/AiChat/ChatMessage/RevertQuestionnaire.js");
|
|
3562
3575
|
/*
|
|
3563
3576
|
* Copyright (c) Saga Inc.
|
|
3564
3577
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -3566,13 +3579,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3566
3579
|
|
|
3567
3580
|
|
|
3568
3581
|
|
|
3569
|
-
|
|
3582
|
+
|
|
3583
|
+
const AgentReviewPanel = ({ agentReviewStatus, setAgentReviewStatus, hasCheckpoint, agentModeEnabled, agentExecutionStatus, showRevertQuestionnaire, reviewAgentChanges, acceptAllAICode, rejectAllAICode, getChangeCounts, getReviewProgress, hasChanges, setHasCheckpoint, setDisplayedNextStepsIfAvailable, setShowRevertQuestionnaire, getDuplicateChatHistoryManager, setChatHistoryManager, app, notebookTracker, chatTaskpaneMessagesRef }) => {
|
|
3584
|
+
const agentFinished = hasCheckpoint && agentModeEnabled && agentExecutionStatus === 'idle';
|
|
3585
|
+
const shouldShowAgentChangeControls = agentFinished && hasChanges();
|
|
3586
|
+
const shouldShowSummary = agentFinished && (agentReviewStatus === 'pre-agent-code-review' || agentReviewStatus === 'in-agent-code-review');
|
|
3570
3587
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_2__["default"], { onDestroy: () => setShowRevertQuestionnaire(false), getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager }))));
|
|
3588
|
+
shouldShowSummary && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: 'message message-assistant-chat' },
|
|
3589
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_AgentChangeSummary__WEBPACK_IMPORTED_MODULE_1__["default"], { getChangeCounts: getChangeCounts }))),
|
|
3590
|
+
shouldShowAgentChangeControls && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_AgentChangeControls__WEBPACK_IMPORTED_MODULE_2__["default"], { reviewAgentChanges: reviewAgentChanges, app: app, notebookTracker: notebookTracker, setHasCheckpoint: setHasCheckpoint, setDisplayedNextStepsIfAvailable: setDisplayedNextStepsIfAvailable, setShowRevertQuestionnaire: setShowRevertQuestionnaire, chatTaskpaneMessagesRef: chatTaskpaneMessagesRef, acceptAllAICode: acceptAllAICode, rejectAllAICode: rejectAllAICode, getReviewProgress: getReviewProgress, agentReviewStatus: agentReviewStatus, setAgentReviewStatus: setAgentReviewStatus })),
|
|
3591
|
+
showRevertQuestionnaire && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ChatMessage_RevertQuestionnaire__WEBPACK_IMPORTED_MODULE_3__["default"], { onDestroy: () => setShowRevertQuestionnaire(false), getDuplicateChatHistoryManager: getDuplicateChatHistoryManager, setChatHistoryManager: setChatHistoryManager }))));
|
|
3576
3592
|
};
|
|
3577
3593
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AgentReviewPanel);
|
|
3578
3594
|
|
|
@@ -3884,9 +3900,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3884
3900
|
/* harmony export */ });
|
|
3885
3901
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/sharing/consume/default/react");
|
|
3886
3902
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3887
|
-
/* harmony import */ var
|
|
3903
|
+
/* harmony import */ var _AgentReviewUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../AgentReviewUtils */ "./lib/Extensions/AiChat/AgentReviewUtils.js");
|
|
3888
3904
|
/* harmony import */ var _utils_codeDiff__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/codeDiff */ "./lib/utils/codeDiff.js");
|
|
3889
|
-
/* harmony import */ var
|
|
3905
|
+
/* harmony import */ var _utils_notebook__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/notebook */ "./lib/utils/notebook.js");
|
|
3890
3906
|
/*
|
|
3891
3907
|
* Copyright (c) Saga Inc.
|
|
3892
3908
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -3922,47 +3938,19 @@ const useAgentReview = ({ app, agentTargetNotebookPanelRef, codeDiffStripesCompa
|
|
|
3922
3938
|
total: cells.length
|
|
3923
3939
|
};
|
|
3924
3940
|
};
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
if (!activeCellId || !hasUnreviewedChanges(activeCellId)) {
|
|
3929
|
-
return;
|
|
3930
|
-
}
|
|
3931
|
-
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_1__.acceptSingleCellEdit)(activeCellId, agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, notebookSnapshotAfterAgentExecutionRef.current, codeDiffStripesCompartments, changedCellsRef.current, setAgentReviewStatus);
|
|
3932
|
-
updateCellToolbarButtons();
|
|
3933
|
-
};
|
|
3934
|
-
const rejectAICodeInAgentMode = () => {
|
|
3935
|
-
var _a, _b;
|
|
3936
|
-
const activeCellId = (_b = (_a = agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current) === null || _a === void 0 ? void 0 : _a.content.activeCell) === null || _b === void 0 ? void 0 : _b.model.id;
|
|
3937
|
-
if (!activeCellId || !hasUnreviewedChanges(activeCellId)) {
|
|
3938
|
-
return;
|
|
3939
|
-
}
|
|
3940
|
-
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_1__.rejectSingleCellEdit)(activeCellId, agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, codeDiffStripesCompartments, changedCellsRef.current, setAgentReviewStatus, agentTargetNotebookPanelRef || undefined);
|
|
3941
|
-
updateCellToolbarButtons();
|
|
3942
|
-
};
|
|
3943
|
-
const acceptAllAICode = () => {
|
|
3944
|
-
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_1__.acceptAllCellEdits)(agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, notebookSnapshotAfterAgentExecutionRef.current, codeDiffStripesCompartments, changedCellsRef.current);
|
|
3945
|
-
updateCellToolbarButtons();
|
|
3946
|
-
};
|
|
3947
|
-
const rejectAllAICode = () => {
|
|
3948
|
-
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_1__.rejectAllCellEdits)(agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, codeDiffStripesCompartments, changedCellsRef.current);
|
|
3949
|
-
updateCellToolbarButtons();
|
|
3950
|
-
};
|
|
3951
|
-
const reviewAgentChanges = () => {
|
|
3941
|
+
// Helper function to detect and count changes between snapshots
|
|
3942
|
+
// This populates changedCellsRef and changeCountsRef without applying visual diffs
|
|
3943
|
+
const detectChanges = () => {
|
|
3952
3944
|
var _a;
|
|
3953
3945
|
if (!(agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current)) {
|
|
3954
|
-
return;
|
|
3946
|
+
return [];
|
|
3955
3947
|
}
|
|
3956
|
-
|
|
3957
|
-
app.shell.activateById(agentTargetNotebookPanelRef.current.id);
|
|
3958
|
-
const currentNotebookSnapshot = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_2__.getAIOptimizedCellsInNotebookPanel)(agentTargetNotebookPanelRef.current);
|
|
3959
|
-
notebookSnapshotAfterAgentExecutionRef.current = currentNotebookSnapshot;
|
|
3948
|
+
const currentNotebookSnapshot = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.getAIOptimizedCellsInNotebookPanel)(agentTargetNotebookPanelRef.current);
|
|
3960
3949
|
if (!notebookSnapshotPreAgentExecutionRef.current || !currentNotebookSnapshot) {
|
|
3961
|
-
return;
|
|
3950
|
+
return [];
|
|
3962
3951
|
}
|
|
3963
3952
|
// Clear and populate the changed cells array
|
|
3964
3953
|
const changedCells = [];
|
|
3965
|
-
changedCellsRef.current = changedCells;
|
|
3966
3954
|
// Initialize counters
|
|
3967
3955
|
let added = 0;
|
|
3968
3956
|
let modified = 0;
|
|
@@ -4015,6 +4003,50 @@ const useAgentReview = ({ app, agentTargetNotebookPanelRef, codeDiffStripesCompa
|
|
|
4015
4003
|
removed,
|
|
4016
4004
|
total: changedCells.length
|
|
4017
4005
|
};
|
|
4006
|
+
return changedCells;
|
|
4007
|
+
};
|
|
4008
|
+
const hasChanges = () => {
|
|
4009
|
+
detectChanges();
|
|
4010
|
+
// changeCountsRef is populated by detectChanges()
|
|
4011
|
+
return changeCountsRef.current.total > 0;
|
|
4012
|
+
};
|
|
4013
|
+
const acceptAICodeInAgentMode = () => {
|
|
4014
|
+
var _a, _b;
|
|
4015
|
+
const activeCellId = (_b = (_a = agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current) === null || _a === void 0 ? void 0 : _a.content.activeCell) === null || _b === void 0 ? void 0 : _b.model.id;
|
|
4016
|
+
if (!activeCellId || !hasUnreviewedChanges(activeCellId)) {
|
|
4017
|
+
return;
|
|
4018
|
+
}
|
|
4019
|
+
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_2__.acceptSingleCellEdit)(activeCellId, agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, notebookSnapshotAfterAgentExecutionRef.current, codeDiffStripesCompartments, changedCellsRef.current, setAgentReviewStatus);
|
|
4020
|
+
updateCellToolbarButtons();
|
|
4021
|
+
};
|
|
4022
|
+
const rejectAICodeInAgentMode = () => {
|
|
4023
|
+
var _a, _b;
|
|
4024
|
+
const activeCellId = (_b = (_a = agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current) === null || _a === void 0 ? void 0 : _a.content.activeCell) === null || _b === void 0 ? void 0 : _b.model.id;
|
|
4025
|
+
if (!activeCellId || !hasUnreviewedChanges(activeCellId)) {
|
|
4026
|
+
return;
|
|
4027
|
+
}
|
|
4028
|
+
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_2__.rejectSingleCellEdit)(activeCellId, agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, codeDiffStripesCompartments, changedCellsRef.current, setAgentReviewStatus, agentTargetNotebookPanelRef || undefined);
|
|
4029
|
+
updateCellToolbarButtons();
|
|
4030
|
+
};
|
|
4031
|
+
const acceptAllAICode = () => {
|
|
4032
|
+
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_2__.acceptAllCellEdits)(agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, notebookSnapshotAfterAgentExecutionRef.current, codeDiffStripesCompartments, changedCellsRef.current);
|
|
4033
|
+
updateCellToolbarButtons();
|
|
4034
|
+
};
|
|
4035
|
+
const rejectAllAICode = () => {
|
|
4036
|
+
(0,_AgentReviewUtils__WEBPACK_IMPORTED_MODULE_2__.rejectAllCellEdits)(agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current, codeDiffStripesCompartments, changedCellsRef.current);
|
|
4037
|
+
updateCellToolbarButtons();
|
|
4038
|
+
};
|
|
4039
|
+
const reviewAgentChanges = () => {
|
|
4040
|
+
if (!(agentTargetNotebookPanelRef === null || agentTargetNotebookPanelRef === void 0 ? void 0 : agentTargetNotebookPanelRef.current)) {
|
|
4041
|
+
return;
|
|
4042
|
+
}
|
|
4043
|
+
// Make the notebook panel the active notebook panel
|
|
4044
|
+
app.shell.activateById(agentTargetNotebookPanelRef.current.id);
|
|
4045
|
+
const currentNotebookSnapshot = (0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.getAIOptimizedCellsInNotebookPanel)(agentTargetNotebookPanelRef.current);
|
|
4046
|
+
notebookSnapshotAfterAgentExecutionRef.current = currentNotebookSnapshot;
|
|
4047
|
+
// Detect changes and populate refs
|
|
4048
|
+
const changedCells = detectChanges();
|
|
4049
|
+
changedCellsRef.current = changedCells;
|
|
4018
4050
|
if (changedCells.length === 0) {
|
|
4019
4051
|
console.log('No changes detected between snapshots');
|
|
4020
4052
|
return;
|
|
@@ -4024,16 +4056,16 @@ const useAgentReview = ({ app, agentTargetNotebookPanelRef, codeDiffStripesCompa
|
|
|
4024
4056
|
// Calculate the code diffs
|
|
4025
4057
|
const { unifiedCodeString, unifiedDiffs } = (0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_3__.getCodeDiffsAndUnifiedCodeString)(change.originalCode, change.currentCode);
|
|
4026
4058
|
// Write the unified code string to the cell
|
|
4027
|
-
(0,
|
|
4059
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.writeCodeToCellByIDInNotebookPanel)(agentTargetNotebookPanelRef.current, unifiedCodeString, change.cellId);
|
|
4028
4060
|
// Apply diff stripes to this cell
|
|
4029
4061
|
(0,_utils_codeDiff__WEBPACK_IMPORTED_MODULE_3__.applyDiffStripesToCell)(agentTargetNotebookPanelRef.current, change.cellId, unifiedDiffs, codeDiffStripesCompartments.current);
|
|
4030
4062
|
// Highlight the cell to draw attention
|
|
4031
|
-
(0,
|
|
4063
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.highlightCodeCellInNotebookPanel)(agentTargetNotebookPanelRef.current, change.cellId);
|
|
4032
4064
|
});
|
|
4033
4065
|
// Scroll to the first changed cell
|
|
4034
4066
|
const firstChangedCell = changedCells[0];
|
|
4035
4067
|
if (firstChangedCell && agentTargetNotebookPanelRef.current) {
|
|
4036
|
-
(0,
|
|
4068
|
+
(0,_utils_notebook__WEBPACK_IMPORTED_MODULE_1__.scrollToCell)(agentTargetNotebookPanelRef.current, firstChangedCell.cellId, undefined, 'start');
|
|
4037
4069
|
}
|
|
4038
4070
|
// Update toolbar buttons to show accept/reject buttons for cells with diffs
|
|
4039
4071
|
updateCellToolbarButtons();
|
|
@@ -4061,7 +4093,8 @@ const useAgentReview = ({ app, agentTargetNotebookPanelRef, codeDiffStripesCompa
|
|
|
4061
4093
|
setNotebookSnapshotPreAgentExecution,
|
|
4062
4094
|
hasUnreviewedChanges,
|
|
4063
4095
|
getChangeCounts,
|
|
4064
|
-
getReviewProgress
|
|
4096
|
+
getReviewProgress,
|
|
4097
|
+
hasChanges
|
|
4065
4098
|
};
|
|
4066
4099
|
};
|
|
4067
4100
|
|
|
@@ -5249,15 +5282,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5249
5282
|
/* harmony export */ });
|
|
5250
5283
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ "webpack/sharing/consume/default/@jupyterlab/apputils");
|
|
5251
5284
|
/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);
|
|
5252
|
-
/* harmony import */ var
|
|
5253
|
-
/* harmony import */ var
|
|
5285
|
+
/* harmony import */ var _requirementsUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./requirementsUtils */ "./lib/Extensions/AppDeploy/requirementsUtils.js");
|
|
5286
|
+
/* harmony import */ var _fileUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./fileUtils */ "./lib/Extensions/AppDeploy/fileUtils.js");
|
|
5254
5287
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ "webpack/sharing/consume/default/@lumino/coreutils");
|
|
5255
5288
|
/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);
|
|
5256
|
-
/* harmony import */ var
|
|
5289
|
+
/* harmony import */ var _DeployAppNotification__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./DeployAppNotification */ "./lib/Extensions/AppDeploy/DeployAppNotification.js");
|
|
5257
5290
|
/* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auth */ "./lib/Extensions/AppDeploy/auth.js");
|
|
5258
5291
|
/* harmony import */ var _authPopupUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./authPopupUtils */ "./lib/Extensions/AppDeploy/authPopupUtils.js");
|
|
5259
|
-
/* harmony import */ var
|
|
5292
|
+
/* harmony import */ var _FilesSelectorUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FilesSelectorUtils */ "./lib/Extensions/AppDeploy/FilesSelectorUtils.js");
|
|
5260
5293
|
/* harmony import */ var _utils_notebookMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/notebookMetadata */ "./lib/utils/notebookMetadata.js");
|
|
5294
|
+
/* harmony import */ var _AppPreview_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../AppPreview/utils */ "./lib/Extensions/AppPreview/utils.js");
|
|
5261
5295
|
/*
|
|
5262
5296
|
* Copyright (c) Saga Inc.
|
|
5263
5297
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
@@ -5271,6 +5305,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5271
5305
|
|
|
5272
5306
|
|
|
5273
5307
|
|
|
5308
|
+
|
|
5274
5309
|
/*
|
|
5275
5310
|
This function generates the requirements.txt file needed to host the streamlit app,
|
|
5276
5311
|
and deploys it!
|
|
@@ -5305,16 +5340,17 @@ const deployStreamlitApp = async (notebookPanel, appDeployService, appManagerSer
|
|
|
5305
5340
|
}
|
|
5306
5341
|
const notebookPath = notebookPanel.context.path;
|
|
5307
5342
|
const notebookID = (0,_utils_notebookMetadata__WEBPACK_IMPORTED_MODULE_4__.getNotebookIDAndSetIfNonexistant)(notebookPanel);
|
|
5343
|
+
const appFilename = notebookID ? (0,_AppPreview_utils__WEBPACK_IMPORTED_MODULE_5__.getAppNameFromNotebookID)(notebookID) : 'app.py';
|
|
5308
5344
|
const notificationId = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.emit('Step 1/7: Gathering requirements...', 'in-progress', {
|
|
5309
5345
|
autoClose: false
|
|
5310
5346
|
});
|
|
5311
5347
|
// Build the requirements.txt file
|
|
5312
|
-
const requirementsContent = await (0,
|
|
5348
|
+
const requirementsContent = await (0,_requirementsUtils__WEBPACK_IMPORTED_MODULE_6__.generateRequirementsTxt)(notebookPanel, appFilename);
|
|
5313
5349
|
// Save the files to the current directory
|
|
5314
|
-
await (0,
|
|
5350
|
+
await (0,_fileUtils__WEBPACK_IMPORTED_MODULE_7__.saveFileWithKernel)(notebookPanel, './requirements.txt', requirementsContent);
|
|
5315
5351
|
try {
|
|
5316
5352
|
_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Notification.dismiss(notificationId);
|
|
5317
|
-
selectedFiles = await (0,
|
|
5353
|
+
selectedFiles = await (0,_FilesSelectorUtils__WEBPACK_IMPORTED_MODULE_8__.fileSelectorPopup)(notebookPanel);
|
|
5318
5354
|
}
|
|
5319
5355
|
catch (error) {
|
|
5320
5356
|
const errorMsg = 'Files selection failed: ' + error;
|
|
@@ -5359,7 +5395,7 @@ const deployStreamlitApp = async (notebookPanel, appDeployService, appManagerSer
|
|
|
5359
5395
|
else {
|
|
5360
5396
|
console.log("App deployment response:", response);
|
|
5361
5397
|
const url = response.url;
|
|
5362
|
-
(0,
|
|
5398
|
+
(0,_DeployAppNotification__WEBPACK_IMPORTED_MODULE_9__.deployAppNotification)(url, appManagerService, newNotificationId);
|
|
5363
5399
|
}
|
|
5364
5400
|
}
|
|
5365
5401
|
catch (error) {
|
|
@@ -5704,9 +5740,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5704
5740
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5705
5741
|
*/
|
|
5706
5742
|
|
|
5707
|
-
const userPoolIdDev = 'us-east-
|
|
5708
|
-
const userPoolClientIdDev = '
|
|
5709
|
-
// TODO: modify to prod user ID and client ID on after creating
|
|
5743
|
+
const userPoolIdDev = 'us-east-1_s2V9RiyOa';
|
|
5744
|
+
const userPoolClientIdDev = '2sunerv2m6gp1qk3hib4t8oblh';
|
|
5745
|
+
// TODO: modify to prod user ID and client ID on after creating the cognito resources in prod
|
|
5710
5746
|
const userPoolId = userPoolIdDev;
|
|
5711
5747
|
const userPoolClientId = userPoolClientIdDev;
|
|
5712
5748
|
const configureAmplify = () => {
|
|
@@ -5808,37 +5844,47 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5808
5844
|
* Distributed under the terms of the GNU Affero General Public License v3.0 License.
|
|
5809
5845
|
*/
|
|
5810
5846
|
// Function to generate requirements.txt content using the kernel with pipreqs
|
|
5811
|
-
const generateRequirementsTxt = async (notebookPanel) => {
|
|
5847
|
+
const generateRequirementsTxt = async (notebookPanel, appFilename) => {
|
|
5812
5848
|
// Initialize with fallback requirements in case kernel execution fails
|
|
5813
5849
|
let requirementsContent = 'streamlit>=1.28.0';
|
|
5814
5850
|
try {
|
|
5815
5851
|
// Use the kernel to execute Python code using pipreqs
|
|
5816
5852
|
const session = notebookPanel.sessionContext.session;
|
|
5817
5853
|
if (session) {
|
|
5818
|
-
const
|
|
5819
|
-
// Create Python code to run pipreqs on the app
|
|
5854
|
+
const sanitizedAppFilename = JSON.stringify(appFilename);
|
|
5855
|
+
// Create Python code to run pipreqs on the app file
|
|
5820
5856
|
const pythonCode = `
|
|
5821
5857
|
import subprocess
|
|
5822
5858
|
import os
|
|
5859
|
+
import tempfile
|
|
5860
|
+
import shutil
|
|
5823
5861
|
|
|
5824
|
-
# Check if app
|
|
5825
|
-
|
|
5862
|
+
# Check if the Streamlit app file exists in the notebook directory
|
|
5863
|
+
app_py_filename = ${sanitizedAppFilename}
|
|
5864
|
+
app_py_path = os.path.join(os.getcwd(), app_py_filename)
|
|
5826
5865
|
if not os.path.exists(app_py_path):
|
|
5827
|
-
print(f"Error:
|
|
5866
|
+
print(f"Error: {app_py_filename} not found at {app_py_path}")
|
|
5828
5867
|
exit(1)
|
|
5868
|
+
notebook_dir = os.path.dirname(app_py_path)
|
|
5829
5869
|
|
|
5830
|
-
# Make sure pipreqs is installed. Then
|
|
5831
|
-
# 1. Create a requirements.in file
|
|
5832
|
-
# 2. From the requirements.in file, generate the requirements.txt file with the canonical PyPI name of the packages
|
|
5833
|
-
# and the versions as they exist on the user's terminal
|
|
5834
5870
|
try:
|
|
5835
|
-
#
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5871
|
+
# Create a temporary directory and copy the app file into it
|
|
5872
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
5873
|
+
tmp_app_path = os.path.join(tmpdir, app_py_filename)
|
|
5874
|
+
shutil.copy(app_py_path, tmp_app_path)
|
|
5875
|
+
|
|
5876
|
+
# Run pipreqs on the temporary directory
|
|
5877
|
+
generate_req_in_file = subprocess.run(
|
|
5878
|
+
[
|
|
5879
|
+
'pipreqs',
|
|
5880
|
+
'--encoding=utf-8',
|
|
5881
|
+
'--savepath', os.path.join(notebook_dir, 'requirements.in'),
|
|
5882
|
+
'--force',
|
|
5883
|
+
tmpdir
|
|
5884
|
+
],
|
|
5885
|
+
capture_output=True,
|
|
5886
|
+
text=True
|
|
5887
|
+
)
|
|
5842
5888
|
|
|
5843
5889
|
print("Log: ", generate_req_in_file.stderr)
|
|
5844
5890
|
|
|
@@ -10247,7 +10293,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10247
10293
|
const MODEL_MAPPINGS = [
|
|
10248
10294
|
{ displayName: 'GPT 4.1', fullName: 'gpt-4.1' },
|
|
10249
10295
|
{ displayName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_SONNET_DISPLAY_NAME, fullName: _utils_models__WEBPACK_IMPORTED_MODULE_2__.CLAUDE_SONNET_MODEL_NAME },
|
|
10250
|
-
{ displayName: 'Gemini 2.5 Pro', fullName: 'gemini-2.5-pro-preview-03-25' }
|
|
10296
|
+
{ displayName: 'Gemini 2.5 Pro', fullName: 'gemini-2.5-pro-preview-03-25' },
|
|
10297
|
+
{ displayName: 'Gemini 3 Pro', fullName: 'gemini-3-pro-preview' }
|
|
10251
10298
|
];
|
|
10252
10299
|
const ALL_MODEL_DISPLAY_NAMES = MODEL_MAPPINGS.map(mapping => mapping.displayName);
|
|
10253
10300
|
// Maximum length for displayed model name before truncating
|
|
@@ -14442,25 +14489,27 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14442
14489
|
font-size: 12px;
|
|
14443
14490
|
margin-bottom: 4px;
|
|
14444
14491
|
display: flex;
|
|
14445
|
-
flex-direction:
|
|
14446
|
-
gap:
|
|
14447
|
-
align-items:
|
|
14492
|
+
flex-direction: row;
|
|
14493
|
+
gap: 16px;
|
|
14494
|
+
align-items: center;
|
|
14448
14495
|
}
|
|
14449
14496
|
|
|
14450
14497
|
.agent-change-count {
|
|
14451
14498
|
display: inline-flex;
|
|
14452
|
-
align-items:
|
|
14499
|
+
align-items: baseline;
|
|
14500
|
+
gap: 4px;
|
|
14453
14501
|
}
|
|
14454
14502
|
|
|
14455
14503
|
.agent-change-count-number {
|
|
14456
|
-
font-weight:
|
|
14504
|
+
font-weight: bold;
|
|
14505
|
+
font-size: 14px;
|
|
14457
14506
|
display: inline-block;
|
|
14458
|
-
min-width: 24px;
|
|
14459
14507
|
text-align: left;
|
|
14460
14508
|
}
|
|
14461
14509
|
|
|
14462
14510
|
.agent-change-count-text {
|
|
14463
14511
|
color: var(--muted-text-color);
|
|
14512
|
+
font-size: 11px;
|
|
14464
14513
|
}
|
|
14465
14514
|
|
|
14466
14515
|
.agent-change-count-added {
|
|
@@ -14497,7 +14546,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `/*
|
|
|
14497
14546
|
align-items: center;
|
|
14498
14547
|
}
|
|
14499
14548
|
|
|
14500
|
-
`, "",{"version":3,"sources":["webpack://./style/AgentChangeControls.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,
|
|
14549
|
+
`, "",{"version":3,"sources":["webpack://./style/AgentChangeControls.css"],"names":[],"mappings":"AAAA;;;EAGE;;AAEF;IACI,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,mBAAmB;IACnB,SAAS;IACT,mBAAmB;AACvB;;AAEA;IACI,oBAAoB;IACpB,qBAAqB;IACrB,QAAQ;AACZ;;AAEA;IACI,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,gBAAgB;AACpB;;AAEA;IACI,8BAA8B;IAC9B,eAAe;AACnB;;AAEA;IACI,uBAAuB;AAC3B;;AAEA;IACI,wBAAwB;AAC5B;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,8BAA8B;IAC9B,aAAa;AACjB;;AAEA;IACI,eAAe;IACf,8BAA8B;AAClC;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,QAAQ;AACZ;;AAEA;IACI,aAAa;IACb,QAAQ;IACR,mBAAmB;AACvB","sourcesContent":["/*\n * Copyright (c) Saga Inc.\n * Distributed under the terms of the GNU Affero General Public License v3.0 License.\n */\n\n.agent-change-counts {\n font-size: 12px;\n margin-bottom: 4px;\n display: flex;\n flex-direction: row;\n gap: 16px;\n align-items: center;\n}\n\n.agent-change-count {\n display: inline-flex;\n align-items: baseline;\n gap: 4px;\n}\n\n.agent-change-count-number {\n font-weight: bold;\n font-size: 14px;\n display: inline-block;\n text-align: left;\n}\n\n.agent-change-count-text {\n color: var(--muted-text-color);\n font-size: 11px;\n}\n\n.agent-change-count-added {\n color: var(--green-700);\n}\n\n.agent-change-count-modified {\n color: var(--yellow-600);\n}\n\n.agent-change-count-removed {\n color: var(--red-700);\n}\n\n.agent-change-count-separator {\n color: var(--muted-text-color);\n margin: 0 4px;\n}\n\n.agent-review-progress {\n font-size: 12px;\n color: var(--muted-text-color);\n}\n\n.agent-change-controls-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.agent-change-controls-buttons {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n"],"sourceRoot":""}]);
|
|
14501
14550
|
// Exports
|
|
14502
14551
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
14503
14552
|
|
|
@@ -21843,4 +21892,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
|
|
21843
21892
|
/***/ })
|
|
21844
21893
|
|
|
21845
21894
|
}]);
|
|
21846
|
-
//# sourceMappingURL=lib_index_js.
|
|
21895
|
+
//# sourceMappingURL=lib_index_js.5ec1e525d244fc8588cf.js.map
|