@teodorruskvi/chat-core 0.1.37 → 0.1.39
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/hooks/useChatSession.d.ts +0 -1
- package/dist/features/conversation/hooks/useThreadsState.d.ts +1 -9
- package/dist/features/streaming/contexts/types.d.ts +0 -8
- package/dist/index.esm.js +1211 -1328
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/shared/core/api/clients/chatClient.d.ts +2 -8
- package/dist/types/api/runs.d.ts +0 -19
- package/dist/types/core.d.ts +0 -6
- package/dist/types/domain/chat.d.ts +6 -2
- package/dist/types/domain/streaming.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AgentDetail, AgentSchemaInfo, AgentSummary } from "@/types/api";
|
|
2
2
|
import type { TokenListener } from "@/types/core/models";
|
|
3
3
|
import type { ApiConfig } from "@/types/core/context";
|
|
4
|
-
import type { HistoryPayload,
|
|
5
|
-
import type { ThreadInfo
|
|
4
|
+
import type { HistoryPayload, CheckpointSnapshot, ThreadSummary } from "@/types/api";
|
|
5
|
+
import type { ThreadInfo } from "@/types/api";
|
|
6
6
|
import { getChatToken, onChatTokenChanged, setChatToken } from "../utils";
|
|
7
7
|
export declare class ChatApi {
|
|
8
8
|
get baseUrl(): string;
|
|
@@ -11,7 +11,6 @@ export declare class ChatApi {
|
|
|
11
11
|
setAuthToken(token: string | null): void;
|
|
12
12
|
onTokenChange(callback: TokenListener): () => void;
|
|
13
13
|
listThreads(): Promise<ThreadSummary[]>;
|
|
14
|
-
listSharedThreads(): Promise<SharedThreadSummary[]>;
|
|
15
14
|
createThread(title?: string, project?: {
|
|
16
15
|
id: string;
|
|
17
16
|
name: string;
|
|
@@ -21,7 +20,6 @@ export declare class ChatApi {
|
|
|
21
20
|
ok: boolean;
|
|
22
21
|
threadId: string;
|
|
23
22
|
}>;
|
|
24
|
-
shareThread(threadId: string, sharedWithUserId: string): Promise<ThreadShareResponse>;
|
|
25
23
|
threadInfo(threadId: string): Promise<ThreadInfo>;
|
|
26
24
|
listAgents(): Promise<AgentSummary[]>;
|
|
27
25
|
getAgent(agentId: string): Promise<AgentDetail>;
|
|
@@ -43,10 +41,6 @@ export declare class ChatApi {
|
|
|
43
41
|
cancelRun(runId: string): Promise<{
|
|
44
42
|
status: string;
|
|
45
43
|
}>;
|
|
46
|
-
unshareThread(threadId: string, shareId: string): Promise<{
|
|
47
|
-
ok: boolean;
|
|
48
|
-
shareId: string;
|
|
49
|
-
}>;
|
|
50
44
|
}
|
|
51
45
|
export declare const chatApiClient: ChatApi;
|
|
52
46
|
export default chatApiClient;
|
package/dist/types/api/runs.d.ts
CHANGED
|
@@ -54,11 +54,6 @@ export interface ThreadSummary {
|
|
|
54
54
|
lastMessage?: string | null;
|
|
55
55
|
menuItem?: string;
|
|
56
56
|
}
|
|
57
|
-
export interface SharedThreadSummary extends ThreadSummary {
|
|
58
|
-
sharedByUserId: string;
|
|
59
|
-
sharedAt: string;
|
|
60
|
-
shareId: string;
|
|
61
|
-
}
|
|
62
57
|
export interface ThreadInfo {
|
|
63
58
|
threadId: string;
|
|
64
59
|
title: string;
|
|
@@ -69,20 +64,6 @@ export interface ThreadInfo {
|
|
|
69
64
|
lastMessage?: string | null;
|
|
70
65
|
menuItem?: string;
|
|
71
66
|
}
|
|
72
|
-
export interface ThreadShareTarget {
|
|
73
|
-
type: "user";
|
|
74
|
-
value: string;
|
|
75
|
-
id: string;
|
|
76
|
-
label: string;
|
|
77
|
-
secondaryLabel?: string;
|
|
78
|
-
}
|
|
79
|
-
export interface ThreadShareResponse {
|
|
80
|
-
shareId: string;
|
|
81
|
-
threadId: string;
|
|
82
|
-
sharedWithUserId: string;
|
|
83
|
-
sharedAt: string;
|
|
84
|
-
createdAt: string;
|
|
85
|
-
}
|
|
86
67
|
export interface AgentSummary {
|
|
87
68
|
id: string;
|
|
88
69
|
name: string;
|
package/dist/types/core.d.ts
CHANGED
|
@@ -74,12 +74,6 @@ export interface ThreadsContextValue {
|
|
|
74
74
|
deleteThread: (threadId: string) => Promise<void>;
|
|
75
75
|
updateThread: (threadId: string, updates: Partial<ThreadSummary>) => Promise<void>;
|
|
76
76
|
refreshThreads: () => Promise<void>;
|
|
77
|
-
refreshSharedThreads: () => Promise<void>;
|
|
78
|
-
shareThread: (threadId: string, sharedWithUserId: string) => Promise<void>;
|
|
79
|
-
unshareThread: (threadId: string, shareId: string) => Promise<void>;
|
|
80
|
-
shareInFlight: boolean;
|
|
81
|
-
shareStatus: string | null;
|
|
82
|
-
clearShareStatus: () => void;
|
|
83
77
|
}
|
|
84
78
|
export interface ThreadStateContextValue {
|
|
85
79
|
threadId: string | null;
|
|
@@ -2,11 +2,15 @@ import { TemporalMetadata, Role } from "./primitives";
|
|
|
2
2
|
/**
|
|
3
3
|
* Content Block Types (Aligned with backend/LangChain)
|
|
4
4
|
*/
|
|
5
|
-
export type MessagePartType = "text" | "image_url" | "file" | "
|
|
5
|
+
export type MessagePartType = "text" | "image_url" | "file" | "reasoning";
|
|
6
6
|
export interface TextPart {
|
|
7
7
|
type: "text";
|
|
8
8
|
text: string;
|
|
9
9
|
}
|
|
10
|
+
export interface ReasoningPart {
|
|
11
|
+
type: "reasoning";
|
|
12
|
+
reasoning: string;
|
|
13
|
+
}
|
|
10
14
|
export interface ImagePart {
|
|
11
15
|
type: "image_url";
|
|
12
16
|
image_url: {
|
|
@@ -35,7 +39,7 @@ export interface InterruptAlternative {
|
|
|
35
39
|
label: string;
|
|
36
40
|
value?: any;
|
|
37
41
|
}
|
|
38
|
-
export type MessagePart = TextPart | ImagePart | FilePart;
|
|
42
|
+
export type MessagePart = TextPart | ImagePart | FilePart | ReasoningPart;
|
|
39
43
|
/**
|
|
40
44
|
* Message object (Unified structure)
|
|
41
45
|
*/
|
|
@@ -122,7 +122,7 @@ export type TaskStartEvent = {
|
|
|
122
122
|
export type MessageStreamEvent = ToolProgressEvent | {
|
|
123
123
|
type: "messages/partial";
|
|
124
124
|
messages: Array<{
|
|
125
|
-
content: string;
|
|
125
|
+
content: string | any[];
|
|
126
126
|
id: string;
|
|
127
127
|
type: string;
|
|
128
128
|
responseMetadata?: Record<string, unknown>;
|