@notebook-intelligence/notebook-intelligence 2.2.1 → 2.2.3

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.
@@ -1219,7 +1219,7 @@ function SidebarComponent(props) {
1219
1219
  toolConfig.extensions.map((extension, index) => (React.createElement("div", { className: "mode-tools-group" },
1220
1220
  React.createElement(CheckBoxItem, { label: `${extension.name} (${extension.id})`, header: true, checked: getExtensionState(extension.id), onClick: () => onExtensionClicked(extension.id) }),
1221
1221
  extension.toolsets.map((toolset, index) => (React.createElement(React.Fragment, null,
1222
- React.createElement(CheckBoxItem, { label: `${toolset.name} (${toolset.id})`, indent: 1, checked: getExtensionToolsetState(extension.id, toolset.id), onClick: () => onExtensionToolsetClicked(extension.id, toolset.id) }),
1222
+ React.createElement(CheckBoxItem, { label: `${toolset.name} (${toolset.id})`, title: toolset.description, indent: 1, checked: getExtensionToolsetState(extension.id, toolset.id), onClick: () => onExtensionToolsetClicked(extension.id, toolset.id) }),
1223
1223
  toolset.tools.map((tool, index) => (React.createElement(CheckBoxItem, { label: tool.name, title: tool.description, indent: 2, checked: getExtensionToolsetToolState(extension.id, toolset.id, tool.name), onClick: () => setExtensionToolsetToolState(extension.id, toolset.id, tool.name, !getExtensionToolsetToolState(extension.id, toolset.id, tool.name)) }))))))))))))))));
1224
1224
  }
1225
1225
  function InlinePopoverComponent(props) {
package/lib/index.js CHANGED
@@ -41,10 +41,9 @@ var CommandIDs;
41
41
  CommandIDs.addCodeCellToActiveNotebook = 'notebook-intelligence:add-code-cell-to-active-notebook';
42
42
  CommandIDs.deleteCellAtIndex = 'notebook-intelligence:delete-cell-at-index';
43
43
  CommandIDs.insertCellAtIndex = 'notebook-intelligence:insert-cell-at-index';
44
+ CommandIDs.getCellTypeAndSource = 'notebook-intelligence:get-cell-type-and-source';
44
45
  CommandIDs.setCellTypeAndSource = 'notebook-intelligence:set-cell-type-and-source';
45
46
  CommandIDs.getNumberOfCells = 'notebook-intelligence:get-number-of-cells';
46
- CommandIDs.getCellType = 'notebook-intelligence:get-cell-type';
47
- CommandIDs.getCellSource = 'notebook-intelligence:get-cell-source';
48
47
  CommandIDs.getCellOutput = 'notebook-intelligence:get-cell-output';
49
48
  CommandIDs.runCellAtIndex = 'notebook-intelligence:run-cell-at-index';
50
49
  CommandIDs.getCurrentFileContent = 'notebook-intelligence:get-current-file-content';
@@ -699,6 +698,19 @@ const plugin = {
699
698
  return true;
700
699
  }
701
700
  });
701
+ app.commands.addCommand(CommandIDs.getCellTypeAndSource, {
702
+ execute: args => {
703
+ if (!ensureANotebookIsActive()) {
704
+ return false;
705
+ }
706
+ const np = app.shell.currentWidget;
707
+ const model = np.model.sharedModel;
708
+ return {
709
+ type: model.cells[args.cellIndex].cell_type,
710
+ source: model.cells[args.cellIndex].source
711
+ };
712
+ }
713
+ });
702
714
  app.commands.addCommand(CommandIDs.setCellTypeAndSource, {
703
715
  execute: args => {
704
716
  if (!ensureANotebookIsActive()) {
@@ -728,26 +740,6 @@ const plugin = {
728
740
  return model.cells.length;
729
741
  }
730
742
  });
731
- app.commands.addCommand(CommandIDs.getCellType, {
732
- execute: args => {
733
- if (!ensureANotebookIsActive()) {
734
- return false;
735
- }
736
- const np = app.shell.currentWidget;
737
- const model = np.model.sharedModel;
738
- return model.cells[args.cellIndex].cell_type;
739
- }
740
- });
741
- app.commands.addCommand(CommandIDs.getCellSource, {
742
- execute: args => {
743
- if (!ensureANotebookIsActive()) {
744
- return false;
745
- }
746
- const np = app.shell.currentWidget;
747
- const model = np.model.sharedModel;
748
- return model.cells[args.cellIndex].source;
749
- }
750
- });
751
743
  app.commands.addCommand(CommandIDs.getCellOutput, {
752
744
  execute: args => {
753
745
  if (!ensureANotebookIsActive()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notebook-intelligence/notebook-intelligence",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "AI coding assistant for JupyterLab",
5
5
  "keywords": [
6
6
  "AI",
@@ -1981,6 +1981,7 @@ function SidebarComponent(props: any) {
1981
1981
  <>
1982
1982
  <CheckBoxItem
1983
1983
  label={`${toolset.name} (${toolset.id})`}
1984
+ title={toolset.description}
1984
1985
  indent={1}
1985
1986
  checked={getExtensionToolsetState(
1986
1987
  extension.id,
package/src/index.ts CHANGED
@@ -110,11 +110,11 @@ namespace CommandIDs {
110
110
  'notebook-intelligence:add-code-cell-to-active-notebook';
111
111
  export const deleteCellAtIndex = 'notebook-intelligence:delete-cell-at-index';
112
112
  export const insertCellAtIndex = 'notebook-intelligence:insert-cell-at-index';
113
+ export const getCellTypeAndSource =
114
+ 'notebook-intelligence:get-cell-type-and-source';
113
115
  export const setCellTypeAndSource =
114
116
  'notebook-intelligence:set-cell-type-and-source';
115
117
  export const getNumberOfCells = 'notebook-intelligence:get-number-of-cells';
116
- export const getCellType = 'notebook-intelligence:get-cell-type';
117
- export const getCellSource = 'notebook-intelligence:get-cell-source';
118
118
  export const getCellOutput = 'notebook-intelligence:get-cell-output';
119
119
  export const runCellAtIndex = 'notebook-intelligence:run-cell-at-index';
120
120
  export const getCurrentFileContent =
@@ -948,6 +948,22 @@ const plugin: JupyterFrontEndPlugin<INotebookIntelligence> = {
948
948
  }
949
949
  });
950
950
 
951
+ app.commands.addCommand(CommandIDs.getCellTypeAndSource, {
952
+ execute: args => {
953
+ if (!ensureANotebookIsActive()) {
954
+ return false;
955
+ }
956
+
957
+ const np = app.shell.currentWidget as NotebookPanel;
958
+ const model = np.model.sharedModel;
959
+
960
+ return {
961
+ type: model.cells[args.cellIndex as number].cell_type,
962
+ source: model.cells[args.cellIndex as number].source
963
+ };
964
+ }
965
+ });
966
+
951
967
  app.commands.addCommand(CommandIDs.setCellTypeAndSource, {
952
968
  execute: args => {
953
969
  if (!ensureANotebookIsActive()) {
@@ -985,32 +1001,6 @@ const plugin: JupyterFrontEndPlugin<INotebookIntelligence> = {
985
1001
  }
986
1002
  });
987
1003
 
988
- app.commands.addCommand(CommandIDs.getCellType, {
989
- execute: args => {
990
- if (!ensureANotebookIsActive()) {
991
- return false;
992
- }
993
-
994
- const np = app.shell.currentWidget as NotebookPanel;
995
- const model = np.model.sharedModel;
996
-
997
- return model.cells[args.cellIndex as number].cell_type;
998
- }
999
- });
1000
-
1001
- app.commands.addCommand(CommandIDs.getCellSource, {
1002
- execute: args => {
1003
- if (!ensureANotebookIsActive()) {
1004
- return false;
1005
- }
1006
-
1007
- const np = app.shell.currentWidget as NotebookPanel;
1008
- const model = np.model.sharedModel;
1009
-
1010
- return model.cells[args.cellIndex as number].source;
1011
- }
1012
- });
1013
-
1014
1004
  app.commands.addCommand(CommandIDs.getCellOutput, {
1015
1005
  execute: args => {
1016
1006
  if (!ensureANotebookIsActive()) {