teodor-new-chat-ui 4.3.691 → 4.3.697
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/features/conversation/messages/hooks/useMessageContent.d.ts +2 -2
- package/dist/features/conversation/messages/types/ai.d.ts +2 -2
- package/dist/features/conversation/messages/utils/parsers.d.ts +2 -2
- package/dist/features/conversation/messages/utils/toolCallUtils.d.ts +2 -2
- package/dist/index.esm.js +655 -656
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +19 -19
- package/dist/index.umd.js.map +1 -1
- package/dist/types/domain/chat.d.ts +4 -5
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ChatMessage, ImagePart, FilePart,
|
|
1
|
+
import type { ChatMessage, ImagePart, FilePart, ToolCall, InterruptPart, MessagePart } from "@/types";
|
|
2
2
|
export interface MessageContentResult {
|
|
3
3
|
textContent: string;
|
|
4
4
|
imageParts: ImagePart[];
|
|
5
5
|
fileParts: FilePart[];
|
|
6
|
-
toolCalls:
|
|
6
|
+
toolCalls: ToolCall[];
|
|
7
7
|
interruptParts: InterruptPart[];
|
|
8
8
|
contentParts: MessagePart[];
|
|
9
9
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ChatMessage, TextPart,
|
|
1
|
+
import type { ChatMessage, TextPart, ToolCall } from "@/types";
|
|
2
2
|
/**
|
|
3
3
|
* AI/Assistant Message
|
|
4
4
|
* Represents responses generated by the model.
|
|
5
5
|
*/
|
|
6
6
|
export interface AIMessage extends ChatMessage {
|
|
7
7
|
role: "assistant";
|
|
8
|
-
content: Array<TextPart |
|
|
8
|
+
content: Array<TextPart | ToolCall | any>;
|
|
9
9
|
toolCalls?: any[];
|
|
10
10
|
model?: string;
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatMessage, ImagePart, FilePart,
|
|
1
|
+
import type { ChatMessage, ImagePart, FilePart, ToolCall, InterruptPart } from "@/types";
|
|
2
2
|
/**
|
|
3
3
|
* Extracts all text content from a message as a single string.
|
|
4
4
|
*/
|
|
@@ -14,7 +14,7 @@ export declare function extractFileParts(message: ChatMessage): FilePart[];
|
|
|
14
14
|
/**
|
|
15
15
|
* Extracts all tool calls from an AI message.
|
|
16
16
|
*/
|
|
17
|
-
export declare function extractToolCalls(message: ChatMessage):
|
|
17
|
+
export declare function extractToolCalls(message: ChatMessage): ToolCall[];
|
|
18
18
|
/**
|
|
19
19
|
* Extracts all interrupt blocks from a message.
|
|
20
20
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ChatMessage,
|
|
1
|
+
import type { ChatMessage, ToolCall } from "@/types";
|
|
2
2
|
export type ToolCallState = "pending" | "completed" | "error";
|
|
3
3
|
export type ToolCallWithResult = {
|
|
4
|
-
call:
|
|
4
|
+
call: ToolCall;
|
|
5
5
|
result?: ChatMessage;
|
|
6
6
|
state: ToolCallState;
|
|
7
7
|
progress?: Array<Record<string, unknown>>;
|