@notebook-intelligence/notebook-intelligence 2.1.0 → 2.2.0
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.
- package/lib/chat-sidebar.js +4 -4
- package/package.json +1 -1
- package/src/chat-sidebar.tsx +8 -7
package/lib/chat-sidebar.js
CHANGED
|
@@ -517,7 +517,7 @@ function SidebarComponent(props) {
|
|
|
517
517
|
const extensionToolset = extension.toolsets.find((toolset) => toolset.id === toolsetId);
|
|
518
518
|
const selectedToolsetTools = toolSelections.extensions[extensionId][toolsetId];
|
|
519
519
|
for (const tool of extensionToolset.tools) {
|
|
520
|
-
if (!selectedToolsetTools.includes(tool)) {
|
|
520
|
+
if (!selectedToolsetTools.includes(tool.name)) {
|
|
521
521
|
return false;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
@@ -543,7 +543,7 @@ function SidebarComponent(props) {
|
|
|
543
543
|
}
|
|
544
544
|
newConfig.extensions[extensionId] = {};
|
|
545
545
|
for (const toolset of extension.toolsets) {
|
|
546
|
-
newConfig.extensions[extensionId][toolset.id] = structuredClone(toolset.tools);
|
|
546
|
+
newConfig.extensions[extensionId][toolset.id] = structuredClone(toolset.tools.map((tool) => tool.name));
|
|
547
547
|
}
|
|
548
548
|
setToolSelections(newConfig);
|
|
549
549
|
}
|
|
@@ -572,7 +572,7 @@ function SidebarComponent(props) {
|
|
|
572
572
|
if (!(extensionId in newConfig.extensions)) {
|
|
573
573
|
newConfig.extensions[extensionId] = {};
|
|
574
574
|
}
|
|
575
|
-
newConfig.extensions[extensionId][toolsetId] = structuredClone(extensionToolset.tools);
|
|
575
|
+
newConfig.extensions[extensionId][toolsetId] = structuredClone(extensionToolset.tools.map((tool) => tool.name));
|
|
576
576
|
setToolSelections(newConfig);
|
|
577
577
|
}
|
|
578
578
|
};
|
|
@@ -1219,7 +1219,7 @@ function SidebarComponent(props) {
|
|
|
1219
1219
|
React.createElement(CheckBoxItem, { label: `${extension.name} (${extension.id})`, header: true, checked: getExtensionState(extension.id), onClick: () => onExtensionClicked(extension.id) }),
|
|
1220
1220
|
extension.toolsets.map((toolset, index) => (React.createElement(React.Fragment, null,
|
|
1221
1221
|
React.createElement(CheckBoxItem, { label: `${toolset.name} (${toolset.id})`, indent: 1, checked: getExtensionToolsetState(extension.id, toolset.id), onClick: () => onExtensionToolsetClicked(extension.id, toolset.id) }),
|
|
1222
|
-
toolset.tools.map((tool, index) => (React.createElement(CheckBoxItem, { label: tool, indent: 2, checked: getExtensionToolsetToolState(extension.id, toolset.id, tool), onClick: () => setExtensionToolsetToolState(extension.id, toolset.id, tool, !getExtensionToolsetToolState(extension.id, toolset.id, tool)) }))))))))))))))));
|
|
1222
|
+
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)) }))))))))))))))));
|
|
1223
1223
|
}
|
|
1224
1224
|
function InlinePopoverComponent(props) {
|
|
1225
1225
|
const [modifiedCode, setModifiedCode] = useState('');
|
package/package.json
CHANGED
package/src/chat-sidebar.tsx
CHANGED
|
@@ -925,7 +925,7 @@ function SidebarComponent(props: any) {
|
|
|
925
925
|
toolSelections.extensions[extensionId][toolsetId];
|
|
926
926
|
|
|
927
927
|
for (const tool of extensionToolset.tools) {
|
|
928
|
-
if (!selectedToolsetTools.includes(tool)) {
|
|
928
|
+
if (!selectedToolsetTools.includes(tool.name)) {
|
|
929
929
|
return false;
|
|
930
930
|
}
|
|
931
931
|
}
|
|
@@ -957,7 +957,7 @@ function SidebarComponent(props: any) {
|
|
|
957
957
|
newConfig.extensions[extensionId] = {};
|
|
958
958
|
for (const toolset of extension.toolsets) {
|
|
959
959
|
newConfig.extensions[extensionId][toolset.id] = structuredClone(
|
|
960
|
-
toolset.tools
|
|
960
|
+
toolset.tools.map((tool: any) => tool.name)
|
|
961
961
|
);
|
|
962
962
|
}
|
|
963
963
|
setToolSelections(newConfig);
|
|
@@ -1001,7 +1001,7 @@ function SidebarComponent(props: any) {
|
|
|
1001
1001
|
newConfig.extensions[extensionId] = {};
|
|
1002
1002
|
}
|
|
1003
1003
|
newConfig.extensions[extensionId][toolsetId] = structuredClone(
|
|
1004
|
-
extensionToolset.tools
|
|
1004
|
+
extensionToolset.tools.map((tool: any) => tool.name)
|
|
1005
1005
|
);
|
|
1006
1006
|
setToolSelections(newConfig);
|
|
1007
1007
|
}
|
|
@@ -1991,22 +1991,23 @@ function SidebarComponent(props: any) {
|
|
|
1991
1991
|
/>
|
|
1992
1992
|
{toolset.tools.map((tool: any, index: number) => (
|
|
1993
1993
|
<CheckBoxItem
|
|
1994
|
-
label={tool}
|
|
1994
|
+
label={tool.name}
|
|
1995
|
+
title={tool.description}
|
|
1995
1996
|
indent={2}
|
|
1996
1997
|
checked={getExtensionToolsetToolState(
|
|
1997
1998
|
extension.id,
|
|
1998
1999
|
toolset.id,
|
|
1999
|
-
tool
|
|
2000
|
+
tool.name
|
|
2000
2001
|
)}
|
|
2001
2002
|
onClick={() =>
|
|
2002
2003
|
setExtensionToolsetToolState(
|
|
2003
2004
|
extension.id,
|
|
2004
2005
|
toolset.id,
|
|
2005
|
-
tool,
|
|
2006
|
+
tool.name,
|
|
2006
2007
|
!getExtensionToolsetToolState(
|
|
2007
2008
|
extension.id,
|
|
2008
2009
|
toolset.id,
|
|
2009
|
-
tool
|
|
2010
|
+
tool.name
|
|
2010
2011
|
)
|
|
2011
2012
|
)
|
|
2012
2013
|
}
|