@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.
Files changed (120) hide show
  1. package/dist/ai-chat.capability.d.ts +2 -0
  2. package/dist/ai-chat.capability.d.ts.map +1 -0
  3. package/dist/ai-chat.feature.d.ts +1 -6
  4. package/dist/ai-chat.feature.d.ts.map +1 -1
  5. package/dist/ai-chat.operations.d.ts +217 -223
  6. package/dist/ai-chat.operations.d.ts.map +1 -1
  7. package/dist/browser/context/index.js +415 -0
  8. package/dist/browser/core/index.js +336 -0
  9. package/dist/browser/index.js +2291 -0
  10. package/dist/browser/presentation/components/index.js +974 -0
  11. package/dist/browser/presentation/hooks/index.js +556 -0
  12. package/dist/browser/presentation/index.js +1520 -0
  13. package/dist/browser/providers/index.js +51 -0
  14. package/dist/context/chat.test.d.ts +2 -0
  15. package/dist/context/chat.test.d.ts.map +1 -0
  16. package/dist/context/context-builder.d.ts +37 -36
  17. package/dist/context/context-builder.d.ts.map +1 -1
  18. package/dist/context/file-operations.d.ts +64 -67
  19. package/dist/context/file-operations.d.ts.map +1 -1
  20. package/dist/context/index.d.ts +7 -4
  21. package/dist/context/index.d.ts.map +1 -0
  22. package/dist/context/index.js +409 -4
  23. package/dist/context/workspace-context.d.ts +84 -87
  24. package/dist/context/workspace-context.d.ts.map +1 -1
  25. package/dist/core/chat-service.d.ts +56 -60
  26. package/dist/core/chat-service.d.ts.map +1 -1
  27. package/dist/core/conversation-store.d.ts +60 -61
  28. package/dist/core/conversation-store.d.ts.map +1 -1
  29. package/dist/core/index.d.ts +7 -4
  30. package/dist/core/index.d.ts.map +1 -0
  31. package/dist/core/index.js +330 -3
  32. package/dist/core/message-types.d.ts +94 -97
  33. package/dist/core/message-types.d.ts.map +1 -1
  34. package/dist/docs/ai-chat.docblock.d.ts +2 -0
  35. package/dist/docs/ai-chat.docblock.d.ts.map +1 -0
  36. package/dist/docs/index.d.ts +7 -0
  37. package/dist/docs/index.d.ts.map +1 -0
  38. package/dist/events.d.ts +103 -109
  39. package/dist/events.d.ts.map +1 -1
  40. package/dist/index.d.ts +16 -21
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +2286 -23
  43. package/dist/node/context/index.js +410 -0
  44. package/dist/node/core/index.js +331 -0
  45. package/dist/node/index.js +2286 -0
  46. package/dist/node/presentation/components/index.js +969 -0
  47. package/dist/node/presentation/hooks/index.js +551 -0
  48. package/dist/node/presentation/index.js +1515 -0
  49. package/dist/node/providers/index.js +46 -0
  50. package/dist/presentation/components/ChatContainer.d.ts +7 -16
  51. package/dist/presentation/components/ChatContainer.d.ts.map +1 -1
  52. package/dist/presentation/components/ChatInput.d.ts +17 -30
  53. package/dist/presentation/components/ChatInput.d.ts.map +1 -1
  54. package/dist/presentation/components/ChatMessage.d.ts +9 -19
  55. package/dist/presentation/components/ChatMessage.d.ts.map +1 -1
  56. package/dist/presentation/components/CodePreview.d.ts +20 -35
  57. package/dist/presentation/components/CodePreview.d.ts.map +1 -1
  58. package/dist/presentation/components/ContextIndicator.d.ts +11 -21
  59. package/dist/presentation/components/ContextIndicator.d.ts.map +1 -1
  60. package/dist/presentation/components/ModelPicker.d.ts +21 -32
  61. package/dist/presentation/components/ModelPicker.d.ts.map +1 -1
  62. package/dist/presentation/components/index.d.ts +10 -7
  63. package/dist/presentation/components/index.d.ts.map +1 -0
  64. package/dist/presentation/components/index.js +968 -7
  65. package/dist/presentation/hooks/index.d.ts +6 -3
  66. package/dist/presentation/hooks/index.d.ts.map +1 -0
  67. package/dist/presentation/hooks/index.js +550 -3
  68. package/dist/presentation/hooks/use-chat.test.d.ts +2 -0
  69. package/dist/presentation/hooks/use-chat.test.d.ts.map +1 -0
  70. package/dist/presentation/hooks/useChat.d.ts +50 -54
  71. package/dist/presentation/hooks/useChat.d.ts.map +1 -1
  72. package/dist/presentation/hooks/useProviders.d.ts +21 -25
  73. package/dist/presentation/hooks/useProviders.d.ts.map +1 -1
  74. package/dist/presentation/index.d.ts +8 -11
  75. package/dist/presentation/index.d.ts.map +1 -0
  76. package/dist/presentation/index.js +1515 -12
  77. package/dist/providers/chat-utilities.d.ts +18 -7
  78. package/dist/providers/chat-utilities.d.ts.map +1 -1
  79. package/dist/providers/index.d.ts +8 -3
  80. package/dist/providers/index.d.ts.map +1 -0
  81. package/dist/providers/index.js +45 -3
  82. package/dist/schema.d.ts +195 -200
  83. package/dist/schema.d.ts.map +1 -1
  84. package/package.json +123 -34
  85. package/dist/ai-chat.feature.js +0 -102
  86. package/dist/ai-chat.feature.js.map +0 -1
  87. package/dist/ai-chat.operations.js +0 -172
  88. package/dist/ai-chat.operations.js.map +0 -1
  89. package/dist/context/context-builder.js +0 -148
  90. package/dist/context/context-builder.js.map +0 -1
  91. package/dist/context/file-operations.js +0 -175
  92. package/dist/context/file-operations.js.map +0 -1
  93. package/dist/context/workspace-context.js +0 -124
  94. package/dist/context/workspace-context.js.map +0 -1
  95. package/dist/core/chat-service.js +0 -227
  96. package/dist/core/chat-service.js.map +0 -1
  97. package/dist/core/conversation-store.js +0 -109
  98. package/dist/core/conversation-store.js.map +0 -1
  99. package/dist/events.js +0 -98
  100. package/dist/events.js.map +0 -1
  101. package/dist/presentation/components/ChatContainer.js +0 -63
  102. package/dist/presentation/components/ChatContainer.js.map +0 -1
  103. package/dist/presentation/components/ChatInput.js +0 -149
  104. package/dist/presentation/components/ChatInput.js.map +0 -1
  105. package/dist/presentation/components/ChatMessage.js +0 -136
  106. package/dist/presentation/components/ChatMessage.js.map +0 -1
  107. package/dist/presentation/components/CodePreview.js +0 -127
  108. package/dist/presentation/components/CodePreview.js.map +0 -1
  109. package/dist/presentation/components/ContextIndicator.js +0 -97
  110. package/dist/presentation/components/ContextIndicator.js.map +0 -1
  111. package/dist/presentation/components/ModelPicker.js +0 -202
  112. package/dist/presentation/components/ModelPicker.js.map +0 -1
  113. package/dist/presentation/hooks/useChat.js +0 -172
  114. package/dist/presentation/hooks/useChat.js.map +0 -1
  115. package/dist/presentation/hooks/useProviders.js +0 -41
  116. package/dist/presentation/hooks/useProviders.js.map +0 -1
  117. package/dist/providers/chat-utilities.js +0 -17
  118. package/dist/providers/chat-utilities.js.map +0 -1
  119. package/dist/schema.js +0 -100
  120. 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
- id: string;
18
- type: 'file' | 'image' | 'code' | 'spec';
19
- name: string;
20
- content?: string;
21
- mimeType?: string;
22
- size?: number;
23
- path?: string;
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
- id: string;
30
- language: string;
31
- code: string;
32
- filename?: string;
33
- startLine?: number;
34
- endLine?: number;
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
- id: string;
41
- name: string;
42
- args: Record<string, unknown>;
43
- result?: unknown;
44
- status: 'pending' | 'running' | 'completed' | 'error';
45
- error?: string;
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
- id: string;
52
- title: string;
53
- url?: string;
54
- snippet?: string;
55
- type: 'file' | 'spec' | 'doc' | 'web';
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
- id: string;
62
- conversationId: string;
63
- role: ChatRole;
64
- content: string;
65
- status: MessageStatus;
66
- createdAt: Date;
67
- updatedAt: Date;
68
- attachments?: ChatAttachment[];
69
- codeBlocks?: ChatCodeBlock[];
70
- toolCalls?: ChatToolCall[];
71
- sources?: ChatSource[];
72
- reasoning?: string;
73
- usage?: {
74
- inputTokens: number;
75
- outputTokens: number;
76
- };
77
- error?: {
78
- code: string;
79
- message: string;
80
- };
81
- metadata?: Record<string, unknown>;
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
- id: string;
92
- title?: string;
93
- status: ConversationStatus;
94
- createdAt: Date;
95
- updatedAt: Date;
96
- provider: string;
97
- model: string;
98
- workspacePath?: string;
99
- contextFiles?: string[];
100
- messages: ChatMessage[];
101
- summary?: string;
102
- metadata?: Record<string, unknown>;
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
- conversationId?: string;
109
- content: string;
110
- attachments?: ChatAttachment[];
111
- systemPrompt?: string;
112
- maxTokens?: number;
113
- temperature?: number;
114
- stream?: boolean;
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
- type: 'text' | 'reasoning' | 'tool_call' | 'source' | 'error' | 'done';
121
- content?: string;
122
- toolCall?: ChatToolCall;
123
- source?: ChatSource;
124
- error?: {
125
- code: string;
126
- message: string;
127
- };
128
- usage?: {
129
- inputTokens: number;
130
- outputTokens: number;
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
- message: ChatMessage;
138
- conversation: ChatConversation;
135
+ export interface SendMessageResult {
136
+ message: ChatMessage;
137
+ conversation: ChatConversation;
139
138
  }
140
139
  /**
141
140
  * Streaming result
142
141
  */
143
- interface StreamMessageResult {
144
- conversationId: string;
145
- messageId: string;
146
- stream: AsyncIterable<ChatStreamChunk>;
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","names":[],"sources":["../../src/core/message-types.ts"],"mappings":";;AAOA;;;;;KAAY,QAAA;;;;KAKA,aAAA;AAKZ;;;AAAA,UAAiB,cAAA;EACf,EAAA;EACA,IAAA;EACA,IAAA;EACA,OAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;AAAA;;AAMF;;UAAiB,aAAA;EACf,EAAA;EACA,QAAA;EACA,IAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;AAAA;;;AAMF;UAAiB,YAAA;EACf,EAAA;EACA,IAAA;EACA,IAAA,EAAM,MAAA;EACN,MAAA;EACA,MAAA;EACA,KAAA;AAAA;;;;UAMe,UAAA;EACf,EAAA;EACA,KAAA;EACA,GAAA;EACA,OAAA;EACA,IAAA;AAAA;;;;UAMe,WAAA;EACf,EAAA;EACA,cAAA;EACA,IAAA,EAAM,QAAA;EACN,OAAA;EACA,MAAA,EAAQ,aAAA;EACR,SAAA,EAAW,IAAA;EACX,SAAA,EAAW,IAAA;EAGX,WAAA,GAAc,cAAA;EACd,UAAA,GAAa,aAAA;EACb,SAAA,GAAY,YAAA;EACZ,OAAA,GAAU,UAAA;EAGV,SAAA;EAGA,KAAA;IACE,WAAA;IACA,YAAA;EAAA;EAIF,KAAA;IACE,IAAA;IACA,OAAA;EAAA;EAIF,QAAA,GAAW,MAAA;AAAA;;;;KAMD,kBAAA;;;;UAKK,gBAA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AQ,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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ai-chat.docblock.d.ts.map
@@ -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,7 @@
1
+ /**
2
+ * AI Chat Documentation
3
+ *
4
+ * Import this module to register AI Chat DocBlocks.
5
+ */
6
+ import './ai-chat.docblock';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -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
- import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
- import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
3
-
4
- //#region src/events.d.ts
5
- declare const MessageSentEvent: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
6
- id: {
7
- type: _contractspec_lib_schema0.FieldType<string, string>;
8
- isOptional: false;
9
- };
10
- role: {
11
- type: _contractspec_lib_schema0.FieldType<string, string>;
12
- isOptional: false;
13
- };
14
- content: {
15
- type: _contractspec_lib_schema0.FieldType<string, string>;
16
- isOptional: false;
17
- };
18
- status: {
19
- type: _contractspec_lib_schema0.FieldType<string, string>;
20
- isOptional: false;
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: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
28
- id: {
29
- type: _contractspec_lib_schema0.FieldType<string, string>;
30
- isOptional: false;
31
- };
32
- role: {
33
- type: _contractspec_lib_schema0.FieldType<string, string>;
34
- isOptional: false;
35
- };
36
- content: {
37
- type: _contractspec_lib_schema0.FieldType<string, string>;
38
- isOptional: false;
39
- };
40
- status: {
41
- type: _contractspec_lib_schema0.FieldType<string, string>;
42
- isOptional: false;
43
- };
44
- createdAt: {
45
- type: _contractspec_lib_schema0.FieldType<Date, string>;
46
- isOptional: false;
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: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
50
- id: {
51
- type: _contractspec_lib_schema0.FieldType<string, string>;
52
- isOptional: false;
53
- };
54
- title: {
55
- type: _contractspec_lib_schema0.FieldType<string, string>;
56
- isOptional: true;
57
- };
58
- status: {
59
- type: _contractspec_lib_schema0.FieldType<string, string>;
60
- isOptional: false;
61
- };
62
- messages: {
63
- type: _contractspec_lib_schema0.SchemaModel<{
64
- id: {
65
- type: _contractspec_lib_schema0.FieldType<string, string>;
66
- isOptional: false;
67
- };
68
- role: {
69
- type: _contractspec_lib_schema0.FieldType<string, string>;
70
- isOptional: false;
71
- };
72
- content: {
73
- type: _contractspec_lib_schema0.FieldType<string, string>;
74
- isOptional: false;
75
- };
76
- status: {
77
- type: _contractspec_lib_schema0.FieldType<string, string>;
78
- isOptional: false;
79
- };
80
- createdAt: {
81
- type: _contractspec_lib_schema0.FieldType<Date, string>;
82
- isOptional: false;
83
- };
84
- }>;
85
- isArray: true;
86
- isOptional: false;
87
- };
88
- provider: {
89
- type: _contractspec_lib_schema0.FieldType<string, string>;
90
- isOptional: false;
91
- };
92
- model: {
93
- type: _contractspec_lib_schema0.FieldType<string, string>;
94
- isOptional: false;
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: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
98
- id: {
99
- type: _contractspec_lib_schema0.FieldType<string, string>;
100
- isOptional: false;
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: _contractspec_lib_contracts0.EventSpec<_contractspec_lib_schema0.SchemaModel<{
104
- code: {
105
- type: _contractspec_lib_schema0.FieldType<string, string>;
106
- isOptional: false;
107
- };
108
- message: {
109
- type: _contractspec_lib_schema0.FieldType<string, string>;
110
- isOptional: false;
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
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","names":[],"sources":["../src/events.ts"],"mappings":";;;;cAIa,gBAAA,EAAgB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAU3B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAEW,oBAAA,EAAoB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAU/B,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAEW,wBAAA,EAAwB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAUnC,yBAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,wBAAA,EAAwB,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAenC,yBAAA,CAAA,SAAA;;;;cAEW,cAAA,EAAc,4BAAA,CAAA,SAAA,2BAAA,WAAA;;UAgBzB,yBAAA,CAAA,SAAA"}
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
- import { FileInfo, SpecInfo, WorkspaceContext, WorkspaceContextConfig, WorkspaceSummary, createWorkspaceContext } from "./context/workspace-context.js";
2
- import { BuiltContext, ContextBuilder, ContextBuilderOptions, ContextEntry, createContextBuilder } from "./context/context-builder.js";
3
- import { FileOperation, FileOperationResult, FileOperations, FileReadResult, FileSystem, FileWriteResult, createNodeFileOperations } from "./context/file-operations.js";
4
- import { AiChatFeature } from "./ai-chat.feature.js";
5
- import { ChatContainer } from "./presentation/components/ChatContainer.js";
6
- import { ChatMessage } from "./presentation/components/ChatMessage.js";
7
- import { ChatInput } from "./presentation/components/ChatInput.js";
8
- import { ModelPicker } from "./presentation/components/ModelPicker.js";
9
- import { ContextIndicator } from "./presentation/components/ContextIndicator.js";
10
- import { CodePreview } from "./presentation/components/CodePreview.js";
11
- import "./presentation/components/index.js";
12
- import { UseChatOptions, UseChatReturn, useChat } from "./presentation/hooks/useChat.js";
13
- import { UseProvidersReturn, useProviders } from "./presentation/hooks/useProviders.js";
14
- import "./presentation/hooks/index.js";
15
- import "./presentation/index.js";
16
- import { isStudioAvailable, supportsLocalMode } from "./providers/chat-utilities.js";
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"}