mito-ai 0.1.32__py3-none-any.whl → 0.1.33__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.
Files changed (25) hide show
  1. mito_ai/_version.py +1 -1
  2. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/build_log.json +1 -1
  3. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/package.json +2 -2
  4. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/package.json.orig +1 -1
  5. mito_ai-0.1.32.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.42b54cf8f038cc526980.js → mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.281f4b9af60d620c6fb1.js +49 -33
  6. mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.281f4b9af60d620c6fb1.js.map +1 -0
  7. mito_ai-0.1.32.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.a711c58b58423173bd24.js → mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.4f1d00fd0c58fcc05d8d.js +3 -3
  8. mito_ai-0.1.32.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.a711c58b58423173bd24.js.map → mito_ai-0.1.33.data/data/share/jupyter/labextensions/mito_ai/static/remoteEntry.4f1d00fd0c58fcc05d8d.js.map +1 -1
  9. {mito_ai-0.1.32.dist-info → mito_ai-0.1.33.dist-info}/METADATA +1 -1
  10. {mito_ai-0.1.32.dist-info → mito_ai-0.1.33.dist-info}/RECORD +24 -24
  11. mito_ai-0.1.32.data/data/share/jupyter/labextensions/mito_ai/static/lib_index_js.42b54cf8f038cc526980.js.map +0 -1
  12. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/etc/jupyter/jupyter_server_config.d/mito_ai.json +0 -0
  13. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/schemas/mito_ai/toolbar-buttons.json +0 -0
  14. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/style.js +0 -0
  15. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.06083e515de4862df010.js +0 -0
  16. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/style_index_js.06083e515de4862df010.js.map +0 -0
  17. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_html2canvas_dist_html2canvas_js.ea47e8c8c906197f8d19.js +0 -0
  18. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_html2canvas_dist_html2canvas_js.ea47e8c8c906197f8d19.js.map +0 -0
  19. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js +0 -0
  20. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_semver_index_js.9795f79265ddb416864b.js.map +0 -0
  21. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js +0 -0
  22. {mito_ai-0.1.32.data → mito_ai-0.1.33.data}/data/share/jupyter/labextensions/mito_ai/static/vendors-node_modules_vscode-diff_dist_index_js.ea55f1f9346638aafbcf.js.map +0 -0
  23. {mito_ai-0.1.32.dist-info → mito_ai-0.1.33.dist-info}/WHEEL +0 -0
  24. {mito_ai-0.1.32.dist-info → mito_ai-0.1.33.dist-info}/entry_points.txt +0 -0
  25. {mito_ai-0.1.32.dist-info → mito_ai-0.1.33.dist-info}/licenses/LICENSE +0 -0
mito_ai/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '0.1.32'
4
+ __version__ = VERSION = '0.1.33'
@@ -710,7 +710,7 @@
710
710
  "semver": {},
711
711
  "vscode-diff": {},
712
712
  "mito_ai": {
713
- "version": "0.1.32",
713
+ "version": "0.1.33",
714
714
  "singleton": true,
715
715
  "import": "/home/runner/work/mito/mito/mito-ai/lib/index.js"
716
716
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mito_ai",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "AI chat for JupyterLab",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -138,7 +138,7 @@
138
138
  "outputDir": "mito_ai/labextension",
139
139
  "schemaDir": "schema",
140
140
  "_build": {
141
- "load": "static/remoteEntry.a711c58b58423173bd24.js",
141
+ "load": "static/remoteEntry.4f1d00fd0c58fcc05d8d.js",
142
142
  "extension": "./extension",
143
143
  "style": "./style"
144
144
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mito_ai",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "AI chat for JupyterLab",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -8738,46 +8738,62 @@ __webpack_require__.r(__webpack_exports__);
8738
8738
  This is used to wait for the notebook to be ready before sending the first message.
8739
8739
  */
8740
8740
  const waitForNotebookReady = async (notebookTracker) => {
8741
- const notebook = notebookTracker.currentWidget;
8742
- if (!notebook) {
8743
- console.warn('No active notebook found');
8744
- return;
8745
- }
8746
- // Wait for notebook to be ready and attached
8747
- await notebook.context.ready;
8748
- // Wait for attachment
8749
- if (!notebook.content.isAttached) {
8741
+ // This is not critical and we never want it to break the app.
8742
+ try {
8743
+ // First, wait for a notebook to exist with retry pattern
8744
+ let notebook = notebookTracker.currentWidget;
8745
+ let attempts = 0;
8746
+ const maxAttempts = 30; // Wait up to 30 seconds (30 attempts * 1 second each)
8747
+ while (!notebook && attempts < maxAttempts) {
8748
+ console.log(`🔍 Waiting for notebook to appear (attempt ${attempts + 1}/${maxAttempts})...`);
8749
+ await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1 second
8750
+ notebook = notebookTracker.currentWidget;
8751
+ attempts++;
8752
+ }
8753
+ if (!notebook) {
8754
+ throw new Error(`No active notebook found after ${maxAttempts} seconds`);
8755
+ }
8756
+ console.log('🔍 Notebook found, waiting for it to be ready...');
8757
+ // Wait for notebook to be ready and attached
8758
+ await notebook.context.ready;
8759
+ // Wait for attachment
8760
+ if (!notebook.content.isAttached) {
8761
+ await new Promise(resolve => {
8762
+ const checkAttached = () => {
8763
+ if (notebook.content.isAttached) {
8764
+ resolve();
8765
+ }
8766
+ else {
8767
+ setTimeout(checkAttached, 100);
8768
+ }
8769
+ };
8770
+ checkAttached();
8771
+ });
8772
+ }
8773
+ // Wait for all cells to be created and ready
8750
8774
  await new Promise(resolve => {
8751
- const checkAttached = () => {
8752
- if (notebook.content.isAttached) {
8775
+ const checkCellsReady = () => {
8776
+ const cells = notebook.content.widgets;
8777
+ // In large notebooks, not all of the cells are attatched I think.
8778
+ // So instead we just wait for any cell to be ready and then give it
8779
+ // another 500ms to be ready.
8780
+ const anyCellReady = cells.some(cell => cell.isAttached && cell.model);
8781
+ if (anyCellReady && cells.length > 0) {
8753
8782
  resolve();
8754
8783
  }
8755
8784
  else {
8756
- setTimeout(checkAttached, 100);
8785
+ setTimeout(checkCellsReady, 100);
8757
8786
  }
8758
8787
  };
8759
- checkAttached();
8788
+ checkCellsReady();
8760
8789
  });
8790
+ // Small buffer for final initialization
8791
+ await new Promise(resolve => setTimeout(resolve, 500));
8792
+ }
8793
+ catch (error) {
8794
+ console.error('Error waiting for notebook to be ready:', error);
8795
+ throw error;
8761
8796
  }
8762
- // Wait for all cells to be created and ready
8763
- await new Promise(resolve => {
8764
- const checkCellsReady = () => {
8765
- const cells = notebook.content.widgets;
8766
- // In large notebooks, not all of the cells are attatched I think.
8767
- // So instead we just wait for any cell to be ready and then give it
8768
- // another 500ms to be ready.
8769
- const anyCellReady = cells.some(cell => cell.isAttached && cell.model);
8770
- if (anyCellReady && cells.length > 0) {
8771
- resolve();
8772
- }
8773
- else {
8774
- setTimeout(checkCellsReady, 100);
8775
- }
8776
- };
8777
- checkCellsReady();
8778
- });
8779
- // Small buffer for final initialization
8780
- await new Promise(resolve => setTimeout(resolve, 500));
8781
8797
  };
8782
8798
 
8783
8799
 
@@ -14038,4 +14054,4 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
14038
14054
  /***/ })
14039
14055
 
14040
14056
  }]);
14041
- //# sourceMappingURL=lib_index_js.42b54cf8f038cc526980.js.map
14057
+ //# sourceMappingURL=lib_index_js.281f4b9af60d620c6fb1.js.map