@bytexbyte/nxtlinq-ai-agent-sdk 1.1.6 → 1.1.7
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.
|
@@ -607,16 +607,16 @@ export const ChatBot = ({ onMessage, onError, onToolUse, presetMessages = [], pl
|
|
|
607
607
|
if (onToolUse) {
|
|
608
608
|
const isToolAllowed = await hasPermission(novaResponse.toolCall.toolUse.name);
|
|
609
609
|
if (!isToolAllowed) {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
610
|
+
const message = {
|
|
611
|
+
id: Date.now().toString(),
|
|
612
|
+
content: 'You have not been granted this permission for the AI agent.',
|
|
613
|
+
role: 'assistant',
|
|
614
|
+
timestamp: new Date().toISOString()
|
|
615
|
+
};
|
|
616
|
+
if (hitAddress && ait) {
|
|
617
617
|
setMessages(prev => [...prev, message]);
|
|
618
|
-
return message;
|
|
619
618
|
}
|
|
619
|
+
return message;
|
|
620
620
|
}
|
|
621
621
|
const toolUseResult = await onToolUse(novaResponse.toolCall.toolUse);
|
|
622
622
|
if (toolUseResult) {
|