@spscommerce/max 0.12.0 → 0.14.0
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/api-service.d.ts +8 -1
- package/lib/components/AgentMessage.d.ts +2 -2
- package/lib/components/SuggestedPrompt.d.ts +2 -1
- package/lib/components/SupportFyiNotice.d.ts +6 -0
- package/lib/components/ToolApprovalPrompt.d.ts +13 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/hooks/useMaxChat.d.ts +2 -1
- package/lib/hooks/useSupportFyi.d.ts +4 -0
- package/lib/icons/index.d.ts +2 -1
- package/lib/index.js +12813 -12475
- package/lib/index.umd.cjs +138 -138
- package/lib/models/Chat.d.ts +16 -1
- package/lib/models/Conversation.d.ts +12 -0
- package/lib/style.css +1 -1
- package/lib/utils.d.ts +2 -0
- package/package.json +1 -1
package/lib/models/Chat.d.ts
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ChatMessage {
|
|
2
2
|
role: "user" | "agent";
|
|
3
3
|
content: string | undefined;
|
|
4
4
|
id?: string;
|
|
5
5
|
obo?: boolean;
|
|
6
6
|
}
|
|
7
|
+
export type ToolApprovalStatus = "pending" | "accepted" | "rejected" | "superseded" | "expired" | "error";
|
|
8
|
+
export interface ToolApprovalChat {
|
|
9
|
+
role: "tool_approval";
|
|
10
|
+
/** tool_call_id — the React key and the correlation id for the response. */
|
|
11
|
+
id: string;
|
|
12
|
+
toolName: string;
|
|
13
|
+
toolInput?: Record<string, unknown>;
|
|
14
|
+
status: ToolApprovalStatus;
|
|
15
|
+
conversationId?: string;
|
|
16
|
+
source: "live" | "history";
|
|
17
|
+
originalMessage?: string;
|
|
18
|
+
held?: boolean;
|
|
19
|
+
inFlight?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type Chat = ChatMessage | ToolApprovalChat;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import type { ToolApprovalStatus } from "./Chat";
|
|
2
|
+
export interface ToolApproval {
|
|
3
|
+
tool_call_id: string;
|
|
4
|
+
tool_name: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
tool_input?: Record<string, unknown>;
|
|
7
|
+
status: Exclude<ToolApprovalStatus, "error">;
|
|
8
|
+
asked_at: string;
|
|
9
|
+
resolved_at?: string;
|
|
10
|
+
resolved_by?: string;
|
|
11
|
+
}
|
|
1
12
|
export interface Message {
|
|
2
13
|
createdDateTime: string;
|
|
3
14
|
id: string;
|
|
@@ -6,6 +17,7 @@ export interface Message {
|
|
|
6
17
|
conversationId: string;
|
|
7
18
|
status: string;
|
|
8
19
|
context: Record<string, any>;
|
|
20
|
+
toolApproval?: ToolApproval[] | null;
|
|
9
21
|
feedbackReceived: boolean;
|
|
10
22
|
archived: boolean;
|
|
11
23
|
completedDateTime: string;
|