@bytexbyte/nxtlinq-ai-agent-sdk 1.5.2 → 1.5.4
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.
|
@@ -858,18 +858,18 @@ requireWalletIDVVerification = true }) => {
|
|
|
858
858
|
// Try to sign in wallet
|
|
859
859
|
await signInWallet(false); // Don't show success message yet
|
|
860
860
|
console.log('Auto sign-in successful, retrying message...');
|
|
861
|
-
//
|
|
862
|
-
|
|
861
|
+
// Wait a bit for everything to settle
|
|
862
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
863
863
|
// // Retry the message
|
|
864
864
|
// sendMessage(content, retryCount + 1, isPresetMessage);
|
|
865
|
-
setMessages(prev => [...prev, {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
return
|
|
865
|
+
// setMessages(prev => [...prev, {
|
|
866
|
+
// id: Date.now().toString(),
|
|
867
|
+
// content: 'Click button to continue tool',
|
|
868
|
+
// role: 'assistant',
|
|
869
|
+
// timestamp: new Date().toISOString(),
|
|
870
|
+
// button: 'continue'
|
|
871
|
+
// }]);
|
|
872
|
+
// return
|
|
873
873
|
}
|
|
874
874
|
catch (signInError) {
|
|
875
875
|
console.log('Auto sign-in failed, showing error message');
|
|
@@ -942,17 +942,6 @@ requireWalletIDVVerification = true }) => {
|
|
|
942
942
|
const isToolAllowed = await hasPermission(toolUse.name, true, () => {
|
|
943
943
|
wasAutoConnected = true;
|
|
944
944
|
});
|
|
945
|
-
if (wasAutoConnected) {
|
|
946
|
-
setIsLoading(false);
|
|
947
|
-
setMessages(prev => [...prev, {
|
|
948
|
-
id: Date.now().toString(),
|
|
949
|
-
content: 'Click button to continue tool',
|
|
950
|
-
role: 'assistant',
|
|
951
|
-
timestamp: new Date().toISOString(),
|
|
952
|
-
button: 'continue'
|
|
953
|
-
}]);
|
|
954
|
-
return;
|
|
955
|
-
}
|
|
956
945
|
// If currentPermissions does not include toolName and availablePermissionLabels includes toolName, it means AIT permission is missing
|
|
957
946
|
if (!isToolAllowed && !permissions.includes(toolUse.name) && availablePermissions.map(p => p.label).includes(toolUse.name)) {
|
|
958
947
|
permissionDenied = true;
|
|
@@ -1009,6 +998,17 @@ requireWalletIDVVerification = true }) => {
|
|
|
1009
998
|
}
|
|
1010
999
|
return;
|
|
1011
1000
|
}
|
|
1001
|
+
if (wasAutoConnected) {
|
|
1002
|
+
setIsLoading(false);
|
|
1003
|
+
setMessages(prev => [...prev, {
|
|
1004
|
+
id: Date.now().toString(),
|
|
1005
|
+
content: 'Click button to continue using tool',
|
|
1006
|
+
role: 'assistant',
|
|
1007
|
+
timestamp: new Date().toISOString(),
|
|
1008
|
+
button: 'continue'
|
|
1009
|
+
}]);
|
|
1010
|
+
return;
|
|
1011
|
+
}
|
|
1012
1012
|
const toolResult = await onToolUse(toolUse);
|
|
1013
1013
|
toolMsg = toolResult?.content || `Tool ${toolUse.name} executed successfully`;
|
|
1014
1014
|
}
|
package/package.json
CHANGED