@applica-software-guru/persona-chat-sdk 0.1.113 → 0.1.114
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/.eslintrc.cjs
CHANGED
|
@@ -7,5 +7,12 @@ module.exports = {
|
|
|
7
7
|
plugins: ['react-refresh'],
|
|
8
8
|
rules: {
|
|
9
9
|
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
|
10
|
+
'no-console': 'error',
|
|
10
11
|
},
|
|
12
|
+
overrides: [
|
|
13
|
+
{
|
|
14
|
+
files: ['src/logging.ts'],
|
|
15
|
+
rules: { 'no-console': 'off' },
|
|
16
|
+
},
|
|
17
|
+
],
|
|
11
18
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@applica-software-guru/persona-chat-sdk",
|
|
3
3
|
"description": "Official Chat SDK for the Persona API — React runtime provider with REST, WebSocket and WebRTC protocols via assistant-ui.",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.114",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
package/playground/src/tools.ts
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* showcase or test tool integration.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { createTool, PersonaTools } from '@applica-software-guru/persona-chat-sdk';
|
|
10
|
+
import { createTool, PersonaConsoleLogger, PersonaTools } from '@applica-software-guru/persona-chat-sdk';
|
|
11
|
+
|
|
12
|
+
const logger = new PersonaConsoleLogger();
|
|
11
13
|
|
|
12
14
|
const toolLibrary = [
|
|
13
15
|
createTool({
|
|
@@ -22,13 +24,12 @@ const toolLibrary = [
|
|
|
22
24
|
success: { type: 'boolean', description: 'Indicates if the field value was set successfully' },
|
|
23
25
|
},
|
|
24
26
|
implementation: async (name: string, value: string) => {
|
|
25
|
-
console.log({ name, value });
|
|
26
27
|
const field = document.querySelector(`[name="${name}"]`);
|
|
27
28
|
if (field) {
|
|
28
29
|
(field as HTMLInputElement).value = value;
|
|
29
30
|
return { success: true };
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
logger.error(`Field with name "${name}" not found.`);
|
|
32
33
|
return { success: false };
|
|
33
34
|
},
|
|
34
35
|
}),
|