@notebook-intelligence/notebook-intelligence 2.1.0 → 2.2.1
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 +5 -4
- package/package.json +1 -1
- package/src/chat-sidebar.tsx +9 -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
|
};
|
|
@@ -857,6 +857,7 @@ function SidebarComponent(props) {
|
|
|
857
857
|
telemetryEmitter.emitTelemetryEvent({
|
|
858
858
|
type: TelemetryEventType.ChatRequest,
|
|
859
859
|
data: {
|
|
860
|
+
chatMode,
|
|
860
861
|
chatModel: {
|
|
861
862
|
provider: NBIAPI.config.chatModel.provider,
|
|
862
863
|
model: NBIAPI.config.chatModel.model
|
|
@@ -1219,7 +1220,7 @@ function SidebarComponent(props) {
|
|
|
1219
1220
|
React.createElement(CheckBoxItem, { label: `${extension.name} (${extension.id})`, header: true, checked: getExtensionState(extension.id), onClick: () => onExtensionClicked(extension.id) }),
|
|
1220
1221
|
extension.toolsets.map((toolset, index) => (React.createElement(React.Fragment, null,
|
|
1221
1222
|
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)) }))))))))))))))));
|
|
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)) }))))))))))))))));
|
|
1223
1224
|
}
|
|
1224
1225
|
function InlinePopoverComponent(props) {
|
|
1225
1226
|
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
|
}
|
|
@@ -1349,6 +1349,7 @@ function SidebarComponent(props: any) {
|
|
|
1349
1349
|
telemetryEmitter.emitTelemetryEvent({
|
|
1350
1350
|
type: TelemetryEventType.ChatRequest,
|
|
1351
1351
|
data: {
|
|
1352
|
+
chatMode,
|
|
1352
1353
|
chatModel: {
|
|
1353
1354
|
provider: NBIAPI.config.chatModel.provider,
|
|
1354
1355
|
model: NBIAPI.config.chatModel.model
|
|
@@ -1991,22 +1992,23 @@ function SidebarComponent(props: any) {
|
|
|
1991
1992
|
/>
|
|
1992
1993
|
{toolset.tools.map((tool: any, index: number) => (
|
|
1993
1994
|
<CheckBoxItem
|
|
1994
|
-
label={tool}
|
|
1995
|
+
label={tool.name}
|
|
1996
|
+
title={tool.description}
|
|
1995
1997
|
indent={2}
|
|
1996
1998
|
checked={getExtensionToolsetToolState(
|
|
1997
1999
|
extension.id,
|
|
1998
2000
|
toolset.id,
|
|
1999
|
-
tool
|
|
2001
|
+
tool.name
|
|
2000
2002
|
)}
|
|
2001
2003
|
onClick={() =>
|
|
2002
2004
|
setExtensionToolsetToolState(
|
|
2003
2005
|
extension.id,
|
|
2004
2006
|
toolset.id,
|
|
2005
|
-
tool,
|
|
2007
|
+
tool.name,
|
|
2006
2008
|
!getExtensionToolsetToolState(
|
|
2007
2009
|
extension.id,
|
|
2008
2010
|
toolset.id,
|
|
2009
|
-
tool
|
|
2011
|
+
tool.name
|
|
2010
2012
|
)
|
|
2011
2013
|
)
|
|
2012
2014
|
}
|