@contractspec/module.ai-chat 1.57.0 → 1.59.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/dist/ai-chat.capability.d.ts +2 -0
- package/dist/ai-chat.capability.d.ts.map +1 -0
- package/dist/ai-chat.feature.d.ts +1 -6
- package/dist/ai-chat.feature.d.ts.map +1 -1
- package/dist/ai-chat.operations.d.ts +217 -223
- package/dist/ai-chat.operations.d.ts.map +1 -1
- package/dist/browser/context/index.js +415 -0
- package/dist/browser/core/index.js +336 -0
- package/dist/browser/index.js +2291 -0
- package/dist/browser/presentation/components/index.js +974 -0
- package/dist/browser/presentation/hooks/index.js +556 -0
- package/dist/browser/presentation/index.js +1520 -0
- package/dist/browser/providers/index.js +51 -0
- package/dist/context/chat.test.d.ts +2 -0
- package/dist/context/chat.test.d.ts.map +1 -0
- package/dist/context/context-builder.d.ts +37 -36
- package/dist/context/context-builder.d.ts.map +1 -1
- package/dist/context/file-operations.d.ts +64 -67
- package/dist/context/file-operations.d.ts.map +1 -1
- package/dist/context/index.d.ts +7 -4
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +409 -4
- package/dist/context/workspace-context.d.ts +84 -87
- package/dist/context/workspace-context.d.ts.map +1 -1
- package/dist/core/chat-service.d.ts +56 -60
- package/dist/core/chat-service.d.ts.map +1 -1
- package/dist/core/conversation-store.d.ts +60 -61
- package/dist/core/conversation-store.d.ts.map +1 -1
- package/dist/core/index.d.ts +7 -4
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +330 -3
- package/dist/core/message-types.d.ts +94 -97
- package/dist/core/message-types.d.ts.map +1 -1
- package/dist/docs/ai-chat.docblock.d.ts +2 -0
- package/dist/docs/ai-chat.docblock.d.ts.map +1 -0
- package/dist/docs/index.d.ts +7 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/events.d.ts +103 -109
- package/dist/events.d.ts.map +1 -1
- package/dist/index.d.ts +16 -21
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2286 -23
- package/dist/node/context/index.js +410 -0
- package/dist/node/core/index.js +331 -0
- package/dist/node/index.js +2286 -0
- package/dist/node/presentation/components/index.js +969 -0
- package/dist/node/presentation/hooks/index.js +551 -0
- package/dist/node/presentation/index.js +1515 -0
- package/dist/node/providers/index.js +46 -0
- package/dist/presentation/components/ChatContainer.d.ts +7 -16
- package/dist/presentation/components/ChatContainer.d.ts.map +1 -1
- package/dist/presentation/components/ChatInput.d.ts +17 -30
- package/dist/presentation/components/ChatInput.d.ts.map +1 -1
- package/dist/presentation/components/ChatMessage.d.ts +9 -19
- package/dist/presentation/components/ChatMessage.d.ts.map +1 -1
- package/dist/presentation/components/CodePreview.d.ts +20 -35
- package/dist/presentation/components/CodePreview.d.ts.map +1 -1
- package/dist/presentation/components/ContextIndicator.d.ts +11 -21
- package/dist/presentation/components/ContextIndicator.d.ts.map +1 -1
- package/dist/presentation/components/ModelPicker.d.ts +21 -32
- package/dist/presentation/components/ModelPicker.d.ts.map +1 -1
- package/dist/presentation/components/index.d.ts +10 -7
- package/dist/presentation/components/index.d.ts.map +1 -0
- package/dist/presentation/components/index.js +968 -7
- package/dist/presentation/hooks/index.d.ts +6 -3
- package/dist/presentation/hooks/index.d.ts.map +1 -0
- package/dist/presentation/hooks/index.js +550 -3
- package/dist/presentation/hooks/use-chat.test.d.ts +2 -0
- package/dist/presentation/hooks/use-chat.test.d.ts.map +1 -0
- package/dist/presentation/hooks/useChat.d.ts +50 -54
- package/dist/presentation/hooks/useChat.d.ts.map +1 -1
- package/dist/presentation/hooks/useProviders.d.ts +21 -25
- package/dist/presentation/hooks/useProviders.d.ts.map +1 -1
- package/dist/presentation/index.d.ts +8 -11
- package/dist/presentation/index.d.ts.map +1 -0
- package/dist/presentation/index.js +1515 -12
- package/dist/providers/chat-utilities.d.ts +18 -7
- package/dist/providers/chat-utilities.d.ts.map +1 -1
- package/dist/providers/index.d.ts +8 -3
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +45 -3
- package/dist/schema.d.ts +195 -200
- package/dist/schema.d.ts.map +1 -1
- package/package.json +123 -34
- package/dist/ai-chat.feature.js +0 -102
- package/dist/ai-chat.feature.js.map +0 -1
- package/dist/ai-chat.operations.js +0 -172
- package/dist/ai-chat.operations.js.map +0 -1
- package/dist/context/context-builder.js +0 -148
- package/dist/context/context-builder.js.map +0 -1
- package/dist/context/file-operations.js +0 -175
- package/dist/context/file-operations.js.map +0 -1
- package/dist/context/workspace-context.js +0 -124
- package/dist/context/workspace-context.js.map +0 -1
- package/dist/core/chat-service.js +0 -227
- package/dist/core/chat-service.js.map +0 -1
- package/dist/core/conversation-store.js +0 -109
- package/dist/core/conversation-store.js.map +0 -1
- package/dist/events.js +0 -98
- package/dist/events.js.map +0 -1
- package/dist/presentation/components/ChatContainer.js +0 -63
- package/dist/presentation/components/ChatContainer.js.map +0 -1
- package/dist/presentation/components/ChatInput.js +0 -149
- package/dist/presentation/components/ChatInput.js.map +0 -1
- package/dist/presentation/components/ChatMessage.js +0 -136
- package/dist/presentation/components/ChatMessage.js.map +0 -1
- package/dist/presentation/components/CodePreview.js +0 -127
- package/dist/presentation/components/CodePreview.js.map +0 -1
- package/dist/presentation/components/ContextIndicator.js +0 -97
- package/dist/presentation/components/ContextIndicator.js.map +0 -1
- package/dist/presentation/components/ModelPicker.js +0 -202
- package/dist/presentation/components/ModelPicker.js.map +0 -1
- package/dist/presentation/hooks/useChat.js +0 -172
- package/dist/presentation/hooks/useChat.js.map +0 -1
- package/dist/presentation/hooks/useProviders.js +0 -41
- package/dist/presentation/hooks/useProviders.js.map +0 -1
- package/dist/providers/chat-utilities.js +0 -17
- package/dist/providers/chat-utilities.js.map +0 -1
- package/dist/schema.js +0 -100
- package/dist/schema.js.map +0 -1
|
@@ -1,150 +1,147 @@
|
|
|
1
|
-
//#region src/core/message-types.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Message and conversation types for AI Chat
|
|
4
3
|
*/
|
|
5
4
|
/**
|
|
6
5
|
* Role of a message participant
|
|
7
6
|
*/
|
|
8
|
-
type ChatRole = 'user' | 'assistant' | 'system';
|
|
7
|
+
export type ChatRole = 'user' | 'assistant' | 'system';
|
|
9
8
|
/**
|
|
10
9
|
* Status of a message
|
|
11
10
|
*/
|
|
12
|
-
type MessageStatus = 'pending' | 'streaming' | 'completed' | 'error';
|
|
11
|
+
export type MessageStatus = 'pending' | 'streaming' | 'completed' | 'error';
|
|
13
12
|
/**
|
|
14
13
|
* Attachment type for messages
|
|
15
14
|
*/
|
|
16
|
-
interface ChatAttachment {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
export interface ChatAttachment {
|
|
16
|
+
id: string;
|
|
17
|
+
type: 'file' | 'image' | 'code' | 'spec';
|
|
18
|
+
name: string;
|
|
19
|
+
content?: string;
|
|
20
|
+
mimeType?: string;
|
|
21
|
+
size?: number;
|
|
22
|
+
path?: string;
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* Code block within a message
|
|
27
26
|
*/
|
|
28
|
-
interface ChatCodeBlock {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
export interface ChatCodeBlock {
|
|
28
|
+
id: string;
|
|
29
|
+
language: string;
|
|
30
|
+
code: string;
|
|
31
|
+
filename?: string;
|
|
32
|
+
startLine?: number;
|
|
33
|
+
endLine?: number;
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* Tool call information
|
|
38
37
|
*/
|
|
39
|
-
interface ChatToolCall {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
export interface ChatToolCall {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
args: Record<string, unknown>;
|
|
42
|
+
result?: unknown;
|
|
43
|
+
status: 'pending' | 'running' | 'completed' | 'error';
|
|
44
|
+
error?: string;
|
|
46
45
|
}
|
|
47
46
|
/**
|
|
48
47
|
* Source/citation in a message
|
|
49
48
|
*/
|
|
50
|
-
interface ChatSource {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
export interface ChatSource {
|
|
50
|
+
id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
snippet?: string;
|
|
54
|
+
type: 'file' | 'spec' | 'doc' | 'web';
|
|
56
55
|
}
|
|
57
56
|
/**
|
|
58
57
|
* A single chat message
|
|
59
58
|
*/
|
|
60
|
-
interface ChatMessage {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
59
|
+
export interface ChatMessage {
|
|
60
|
+
id: string;
|
|
61
|
+
conversationId: string;
|
|
62
|
+
role: ChatRole;
|
|
63
|
+
content: string;
|
|
64
|
+
status: MessageStatus;
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
updatedAt: Date;
|
|
67
|
+
attachments?: ChatAttachment[];
|
|
68
|
+
codeBlocks?: ChatCodeBlock[];
|
|
69
|
+
toolCalls?: ChatToolCall[];
|
|
70
|
+
sources?: ChatSource[];
|
|
71
|
+
reasoning?: string;
|
|
72
|
+
usage?: {
|
|
73
|
+
inputTokens: number;
|
|
74
|
+
outputTokens: number;
|
|
75
|
+
};
|
|
76
|
+
error?: {
|
|
77
|
+
code: string;
|
|
78
|
+
message: string;
|
|
79
|
+
};
|
|
80
|
+
metadata?: Record<string, unknown>;
|
|
82
81
|
}
|
|
83
82
|
/**
|
|
84
83
|
* Conversation status
|
|
85
84
|
*/
|
|
86
|
-
type ConversationStatus = 'active' | 'archived' | 'deleted';
|
|
85
|
+
export type ConversationStatus = 'active' | 'archived' | 'deleted';
|
|
87
86
|
/**
|
|
88
87
|
* A conversation containing multiple messages
|
|
89
88
|
*/
|
|
90
|
-
interface ChatConversation {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
89
|
+
export interface ChatConversation {
|
|
90
|
+
id: string;
|
|
91
|
+
title?: string;
|
|
92
|
+
status: ConversationStatus;
|
|
93
|
+
createdAt: Date;
|
|
94
|
+
updatedAt: Date;
|
|
95
|
+
provider: string;
|
|
96
|
+
model: string;
|
|
97
|
+
workspacePath?: string;
|
|
98
|
+
contextFiles?: string[];
|
|
99
|
+
messages: ChatMessage[];
|
|
100
|
+
summary?: string;
|
|
101
|
+
metadata?: Record<string, unknown>;
|
|
103
102
|
}
|
|
104
103
|
/**
|
|
105
104
|
* Options for sending a message
|
|
106
105
|
*/
|
|
107
|
-
interface SendMessageOptions {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
export interface SendMessageOptions {
|
|
107
|
+
conversationId?: string;
|
|
108
|
+
content: string;
|
|
109
|
+
attachments?: ChatAttachment[];
|
|
110
|
+
systemPrompt?: string;
|
|
111
|
+
maxTokens?: number;
|
|
112
|
+
temperature?: number;
|
|
113
|
+
stream?: boolean;
|
|
115
114
|
}
|
|
116
115
|
/**
|
|
117
116
|
* Streaming chunk from AI response
|
|
118
117
|
*/
|
|
119
|
-
interface ChatStreamChunk {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
118
|
+
export interface ChatStreamChunk {
|
|
119
|
+
type: 'text' | 'reasoning' | 'tool_call' | 'source' | 'error' | 'done';
|
|
120
|
+
content?: string;
|
|
121
|
+
toolCall?: ChatToolCall;
|
|
122
|
+
source?: ChatSource;
|
|
123
|
+
error?: {
|
|
124
|
+
code: string;
|
|
125
|
+
message: string;
|
|
126
|
+
};
|
|
127
|
+
usage?: {
|
|
128
|
+
inputTokens: number;
|
|
129
|
+
outputTokens: number;
|
|
130
|
+
};
|
|
132
131
|
}
|
|
133
132
|
/**
|
|
134
133
|
* Result of sending a message
|
|
135
134
|
*/
|
|
136
|
-
interface SendMessageResult {
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
export interface SendMessageResult {
|
|
136
|
+
message: ChatMessage;
|
|
137
|
+
conversation: ChatConversation;
|
|
139
138
|
}
|
|
140
139
|
/**
|
|
141
140
|
* Streaming result
|
|
142
141
|
*/
|
|
143
|
-
interface StreamMessageResult {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
export interface StreamMessageResult {
|
|
143
|
+
conversationId: string;
|
|
144
|
+
messageId: string;
|
|
145
|
+
stream: AsyncIterable<ChatStreamChunk>;
|
|
147
146
|
}
|
|
148
|
-
//#endregion
|
|
149
|
-
export { ChatAttachment, ChatCodeBlock, ChatConversation, ChatMessage, ChatRole, ChatSource, ChatStreamChunk, ChatToolCall, ConversationStatus, MessageStatus, SendMessageOptions, SendMessageResult, StreamMessageResult };
|
|
150
147
|
//# sourceMappingURL=message-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-types.d.ts","
|
|
1
|
+
{"version":3,"file":"message-types.d.ts","sourceRoot":"","sources":["../../src/core/message-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEvD;;GAEG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EG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,KAAK,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,gBAAgB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-chat.docblock.d.ts","sourceRoot":"","sources":["../../src/docs/ai-chat.docblock.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,oBAAoB,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,115 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
createdAt: {
|
|
23
|
-
type: _contractspec_lib_schema0.FieldType<Date, string>;
|
|
24
|
-
isOptional: false;
|
|
25
|
-
};
|
|
1
|
+
export declare const MessageSentEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
2
|
+
id: {
|
|
3
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
4
|
+
isOptional: false;
|
|
5
|
+
};
|
|
6
|
+
role: {
|
|
7
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
8
|
+
isOptional: false;
|
|
9
|
+
};
|
|
10
|
+
content: {
|
|
11
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
12
|
+
isOptional: false;
|
|
13
|
+
};
|
|
14
|
+
status: {
|
|
15
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
16
|
+
isOptional: false;
|
|
17
|
+
};
|
|
18
|
+
createdAt: {
|
|
19
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
20
|
+
isOptional: false;
|
|
21
|
+
};
|
|
26
22
|
}>>;
|
|
27
|
-
declare const MessageReceivedEvent:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
23
|
+
export declare const MessageReceivedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
24
|
+
id: {
|
|
25
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
26
|
+
isOptional: false;
|
|
27
|
+
};
|
|
28
|
+
role: {
|
|
29
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
30
|
+
isOptional: false;
|
|
31
|
+
};
|
|
32
|
+
content: {
|
|
33
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
status: {
|
|
37
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
38
|
+
isOptional: false;
|
|
39
|
+
};
|
|
40
|
+
createdAt: {
|
|
41
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
42
|
+
isOptional: false;
|
|
43
|
+
};
|
|
48
44
|
}>>;
|
|
49
|
-
declare const ConversationCreatedEvent:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
45
|
+
export declare const ConversationCreatedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
46
|
+
id: {
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
title: {
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
status: {
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
messages: {
|
|
59
|
+
type: import("@contractspec/lib.schema").SchemaModel<{
|
|
60
|
+
id: {
|
|
61
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
62
|
+
isOptional: false;
|
|
63
|
+
};
|
|
64
|
+
role: {
|
|
65
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
66
|
+
isOptional: false;
|
|
67
|
+
};
|
|
68
|
+
content: {
|
|
69
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
70
|
+
isOptional: false;
|
|
71
|
+
};
|
|
72
|
+
status: {
|
|
73
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
74
|
+
isOptional: false;
|
|
75
|
+
};
|
|
76
|
+
createdAt: {
|
|
77
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
78
|
+
isOptional: false;
|
|
79
|
+
};
|
|
80
|
+
}>;
|
|
81
|
+
isArray: true;
|
|
82
|
+
isOptional: false;
|
|
83
|
+
};
|
|
84
|
+
provider: {
|
|
85
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
86
|
+
isOptional: false;
|
|
87
|
+
};
|
|
88
|
+
model: {
|
|
89
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
90
|
+
isOptional: false;
|
|
91
|
+
};
|
|
96
92
|
}>>;
|
|
97
|
-
declare const ConversationDeletedEvent:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
export declare const ConversationDeletedEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
94
|
+
id: {
|
|
95
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
96
|
+
isOptional: false;
|
|
97
|
+
};
|
|
102
98
|
}>>;
|
|
103
|
-
declare const ChatErrorEvent:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
export declare const ChatErrorEvent: import("@contractspec/lib.contracts").EventSpec<import("@contractspec/lib.schema").SchemaModel<{
|
|
100
|
+
code: {
|
|
101
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
104
|
+
message: {
|
|
105
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
106
|
+
isOptional: false;
|
|
107
|
+
};
|
|
112
108
|
}>>;
|
|
113
|
-
//#endregion
|
|
114
|
-
export { ChatErrorEvent, ConversationCreatedEvent, ConversationDeletedEvent, MessageReceivedEvent, MessageSentEvent };
|
|
115
109
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;GAU3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;GAU/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUnC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;GAenC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;GAgBzB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import { ChatModelInfo, ChatProvider, ChatProviderConfig, ChatProviderMode, ChatProviderName, DEFAULT_MODELS, MODELS, ModelCapabilities, ProviderAvailability, createProvider, createProviderFromEnv, getAvailableProviders, getDefaultModel, getEnvVarName, getModelInfo, getModelsForProvider, getRecommendedModels, hasCredentials, isOllamaRunning, listOllamaModels, validateProvider } from "./providers/index.js";
|
|
18
|
-
import { ChatConversationModel, ChatMessageModel, ListConversationsOutputModel, SendMessageInputModel, SendMessageOutputModel } from "./schema.js";
|
|
19
|
-
import { DeleteConversationContract, GetConversationContract, ListConversationsContract, ListProvidersContract, ScanContextContract, SendMessageContract, StreamMessageContract } from "./ai-chat.operations.js";
|
|
20
|
-
import { ChatErrorEvent, ConversationCreatedEvent, ConversationDeletedEvent, MessageReceivedEvent, MessageSentEvent } from "./events.js";
|
|
21
|
-
export { AiChatFeature, BuiltContext, ChatContainer, ChatConversationModel, ChatErrorEvent, ChatInput, ChatMessage, ChatMessage as ChatMessageComponent, ChatMessageModel, ChatModelInfo, ChatProvider, ChatProviderConfig, ChatProviderMode, ChatProviderName, CodePreview, ContextBuilder, ContextBuilderOptions, ContextEntry, ContextIndicator, ConversationCreatedEvent, ConversationDeletedEvent, DEFAULT_MODELS, DeleteConversationContract, FileInfo, FileOperation, FileOperationResult, FileOperations, FileReadResult, FileSystem, FileWriteResult, GetConversationContract, ListConversationsContract, ListConversationsOutputModel, ListProvidersContract, MODELS, MessageReceivedEvent, MessageSentEvent, ModelCapabilities, ModelPicker, ProviderAvailability, ScanContextContract, SendMessageContract, SendMessageInputModel, SendMessageOutputModel, SpecInfo, StreamMessageContract, UseChatOptions, UseChatReturn, UseProvidersReturn, WorkspaceContext, WorkspaceContextConfig, WorkspaceSummary, createContextBuilder, createNodeFileOperations, createProvider, createProviderFromEnv, createWorkspaceContext, getAvailableProviders, getDefaultModel, getEnvVarName, getModelInfo, getModelsForProvider, getRecommendedModels, hasCredentials, isOllamaRunning, isStudioAvailable, listOllamaModels, supportsLocalMode, useChat, useProviders, validateProvider };
|
|
1
|
+
/**
|
|
2
|
+
* @contractspec/module.ai-chat
|
|
3
|
+
*
|
|
4
|
+
* ContractSpec Vibe Coding Chat - AI-powered conversational coding assistant.
|
|
5
|
+
*/
|
|
6
|
+
export { AiChatFeature } from './ai-chat.feature';
|
|
7
|
+
export * from './presentation';
|
|
8
|
+
export * from './providers';
|
|
9
|
+
export * from './context';
|
|
10
|
+
export * from './schema';
|
|
11
|
+
export * from './ai-chat.operations';
|
|
12
|
+
export * from './events';
|
|
13
|
+
export * from './ai-chat.feature';
|
|
14
|
+
export { ChatContainer, ChatMessage as ChatMessageComponent, ChatInput, } from './presentation/components';
|
|
15
|
+
export { useChat, useProviders } from './presentation/hooks';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAG1B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EACL,aAAa,EACb,WAAW,IAAI,oBAAoB,EACnC,SAAS,GACV,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|