@eloquentai/chat-sdk 0.19.10-dev → 0.20.0-dev
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/dist/components/chat/background-poller.hook.d.ts +19 -0
- package/dist/components/chat/background-poller.hook.test.d.ts +1 -0
- package/dist/components/chat/message-events.hook.d.ts +3 -2
- package/dist/components/chat/real-time-events.hook.d.ts +4 -1
- package/dist/components/chat/validations.d.ts +76 -16
- package/dist/contexts/agent-cognition-context-definition.d.ts +2 -0
- package/dist/contexts/agent-cognition.context.d.ts +6 -0
- package/dist/contexts/constants.d.ts +2 -1
- package/dist/contexts/utils.d.ts +1 -1
- package/dist/hooks/use-agent-cognition-context.d.ts +2 -0
- package/dist/hooks/use-agent-cognition.d.ts +7 -0
- package/dist/index.css +1 -1
- package/dist/index.mjs +3646 -3382
- package/dist/index.mjs.map +1 -1
- package/dist/lib/eloquent-ai-api-client.d.ts +13 -0
- package/dist/test-setup.d.ts +0 -0
- package/dist/type.d.ts +3 -3
- package/package.json +9 -2
- package/dist/hooks/use-thinking-message.d.ts +0 -1
@@ -14,6 +14,18 @@ export interface CreateConversationApiResponse {
|
|
14
14
|
export interface IdentifyUserApiResponse {
|
15
15
|
result: string;
|
16
16
|
}
|
17
|
+
export interface MessageResponse {
|
18
|
+
response: {
|
19
|
+
id: string;
|
20
|
+
type: string;
|
21
|
+
content: string;
|
22
|
+
};
|
23
|
+
message_id: string;
|
24
|
+
message_number: number;
|
25
|
+
created_at: string;
|
26
|
+
previousMessage?: MessageResponse;
|
27
|
+
role: "user" | "assistant";
|
28
|
+
}
|
17
29
|
export interface BootResponse {
|
18
30
|
chat_settings: {
|
19
31
|
agent_name: string;
|
@@ -63,4 +75,5 @@ export declare class EloquentAiApiClient {
|
|
63
75
|
deviceId: string;
|
64
76
|
externalId?: string;
|
65
77
|
}): Promise<IdentifyUserApiResponse>;
|
78
|
+
getChatHistory(conversationId: string): Promise<MessageResponse[]>;
|
66
79
|
}
|
File without changes
|
package/dist/type.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
export type MessageData = {
|
2
|
-
id: string
|
2
|
+
id: string;
|
3
3
|
content: string;
|
4
|
-
sender: "user" | "
|
4
|
+
sender: "user" | "assistant";
|
5
5
|
timestamp: string;
|
6
6
|
type?: "text" | "image";
|
7
7
|
isWelcomeMessage?: boolean;
|
8
8
|
isThinking?: boolean;
|
9
9
|
};
|
10
|
-
export type Message = MessageData
|
10
|
+
export type Message = MessageData;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eloquentai/chat-sdk",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.20.0-dev",
|
4
4
|
"description": "",
|
5
5
|
"keywords": [
|
6
6
|
"chat",
|
@@ -36,10 +36,15 @@
|
|
36
36
|
"trunk": "trunk",
|
37
37
|
"lint": "trunk check",
|
38
38
|
"format": "trunk fmt",
|
39
|
+
"test": "vitest",
|
40
|
+
"test:run": "vitest run",
|
39
41
|
"preview:dev": "npx http-server ./dev"
|
40
42
|
},
|
41
43
|
"devDependencies": {
|
42
44
|
"@eslint/js": "^9.17.0",
|
45
|
+
"@testing-library/jest-dom": "^6.7.0",
|
46
|
+
"@testing-library/react": "^16.3.0",
|
47
|
+
"@testing-library/user-event": "^14.6.1",
|
43
48
|
"@trunkio/launcher": "^1.3.4",
|
44
49
|
"@types/node": "^22.10.2",
|
45
50
|
"@types/react": "^18",
|
@@ -51,6 +56,7 @@
|
|
51
56
|
"eslint-plugin-react-hooks": "^5.1.0",
|
52
57
|
"eslint-plugin-react-refresh": "^0.4.16",
|
53
58
|
"globals": "^15.14.0",
|
59
|
+
"jsdom": "^26.1.0",
|
54
60
|
"postcss": "^8.4.49",
|
55
61
|
"prettier": "^3.4.2",
|
56
62
|
"rollup-plugin-terser": "^7.0.2",
|
@@ -60,7 +66,8 @@
|
|
60
66
|
"typescript": "~5.7.2",
|
61
67
|
"typescript-eslint": "^8.18.2",
|
62
68
|
"vite": "^6.3.5",
|
63
|
-
"vite-plugin-dts": "^4.4.0"
|
69
|
+
"vite-plugin-dts": "^4.4.0",
|
70
|
+
"vitest": "^3.2.4"
|
64
71
|
},
|
65
72
|
"peerDependencies": {
|
66
73
|
"@radix-ui/react-avatar": ">=1.1.0",
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function useThinkingMessage(): string;
|