@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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/providers/index.ts
|
|
5
|
+
import {
|
|
6
|
+
createProvider,
|
|
7
|
+
createProviderFromEnv,
|
|
8
|
+
getAvailableProviders,
|
|
9
|
+
DEFAULT_MODELS,
|
|
10
|
+
MODELS,
|
|
11
|
+
getModelsForProvider,
|
|
12
|
+
getModelInfo,
|
|
13
|
+
getRecommendedModels,
|
|
14
|
+
getDefaultModel,
|
|
15
|
+
validateProvider,
|
|
16
|
+
hasCredentials,
|
|
17
|
+
getEnvVarName,
|
|
18
|
+
isOllamaRunning,
|
|
19
|
+
listOllamaModels
|
|
20
|
+
} from "@contractspec/lib.ai-providers";
|
|
21
|
+
|
|
22
|
+
// src/providers/chat-utilities.ts
|
|
23
|
+
function supportsLocalMode(provider) {
|
|
24
|
+
return provider === "ollama";
|
|
25
|
+
}
|
|
26
|
+
function isStudioAvailable(provider) {
|
|
27
|
+
return provider !== "ollama";
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
validateProvider,
|
|
31
|
+
supportsLocalMode,
|
|
32
|
+
listOllamaModels,
|
|
33
|
+
isStudioAvailable,
|
|
34
|
+
isOllamaRunning,
|
|
35
|
+
hasCredentials,
|
|
36
|
+
getRecommendedModels,
|
|
37
|
+
getModelsForProvider,
|
|
38
|
+
getModelInfo,
|
|
39
|
+
getEnvVarName,
|
|
40
|
+
getDefaultModel,
|
|
41
|
+
getAvailableProviders,
|
|
42
|
+
createProviderFromEnv,
|
|
43
|
+
createProvider,
|
|
44
|
+
MODELS,
|
|
45
|
+
DEFAULT_MODELS
|
|
46
|
+
};
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Show scroll-to-bottom button when scrolled up */
|
|
9
|
-
showScrollButton?: boolean;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ChatContainerProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Show scroll-to-bottom button when scrolled up */
|
|
6
|
+
showScrollButton?: boolean;
|
|
10
7
|
}
|
|
11
8
|
/**
|
|
12
9
|
* Container component for chat messages with scrolling
|
|
13
10
|
*/
|
|
14
|
-
declare function ChatContainer({
|
|
15
|
-
children,
|
|
16
|
-
className,
|
|
17
|
-
showScrollButton
|
|
18
|
-
}: ChatContainerProps): react_jsx_runtime0.JSX.Element;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { ChatContainer };
|
|
11
|
+
export declare function ChatContainer({ children, className, showScrollButton, }: ChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
12
|
//# sourceMappingURL=ChatContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainer.d.ts","
|
|
1
|
+
{"version":3,"file":"ChatContainer.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/ChatContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,gBAAuB,GACxB,EAAE,kBAAkB,2CA6EpB"}
|
|
@@ -1,35 +1,22 @@
|
|
|
1
|
-
import { ChatAttachment } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
showAttachments?: boolean;
|
|
18
|
-
/** Max attachments allowed */
|
|
19
|
-
maxAttachments?: number;
|
|
1
|
+
import type { ChatAttachment } from '../../core/message-types';
|
|
2
|
+
export interface ChatInputProps {
|
|
3
|
+
/** Called when a message is sent */
|
|
4
|
+
onSend: (content: string, attachments?: ChatAttachment[]) => void;
|
|
5
|
+
/** Whether input is disabled (e.g., during streaming) */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Whether currently loading/streaming */
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
/** Placeholder text */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Additional class name */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Show attachment button */
|
|
14
|
+
showAttachments?: boolean;
|
|
15
|
+
/** Max attachments allowed */
|
|
16
|
+
maxAttachments?: number;
|
|
20
17
|
}
|
|
21
18
|
/**
|
|
22
19
|
* Chat input component with attachment support
|
|
23
20
|
*/
|
|
24
|
-
declare function ChatInput({
|
|
25
|
-
onSend,
|
|
26
|
-
disabled,
|
|
27
|
-
isLoading,
|
|
28
|
-
placeholder,
|
|
29
|
-
className,
|
|
30
|
-
showAttachments,
|
|
31
|
-
maxAttachments
|
|
32
|
-
}: ChatInputProps): react_jsx_runtime0.JSX.Element;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { ChatInput };
|
|
21
|
+
export declare function ChatInput({ onSend, disabled, isLoading, placeholder, className, showAttachments, maxAttachments, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
35
22
|
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/ChatInput.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IAClE,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8BAA8B;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,QAAgB,EAChB,SAAiB,EACjB,WAAiC,EACjC,SAAS,EACT,eAAsB,EACtB,cAAkB,GACnB,EAAE,cAAc,2CAgLhB"}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import { ChatMessage as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
showCopy?: boolean;
|
|
10
|
-
/** Show avatar */
|
|
11
|
-
showAvatar?: boolean;
|
|
1
|
+
import type { ChatMessage as ChatMessageType } from '../../core/message-types';
|
|
2
|
+
export interface ChatMessageProps {
|
|
3
|
+
message: ChatMessageType;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Show copy button */
|
|
6
|
+
showCopy?: boolean;
|
|
7
|
+
/** Show avatar */
|
|
8
|
+
showAvatar?: boolean;
|
|
12
9
|
}
|
|
13
10
|
/**
|
|
14
11
|
* Chat message component
|
|
15
12
|
*/
|
|
16
|
-
declare function ChatMessage({
|
|
17
|
-
message,
|
|
18
|
-
className,
|
|
19
|
-
showCopy,
|
|
20
|
-
showAvatar
|
|
21
|
-
}: ChatMessageProps): react_jsx_runtime0.JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { ChatMessage };
|
|
13
|
+
export declare function ChatMessage({ message, className, showCopy, showAvatar, }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
24
14
|
//# sourceMappingURL=ChatMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.d.ts","
|
|
1
|
+
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/ChatMessage.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG/E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAqED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,SAAS,EACT,QAAe,EACf,UAAiB,GAClB,EAAE,gBAAgB,2CA2HlB"}
|
|
@@ -1,40 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
showDownload?: boolean;
|
|
21
|
-
/** Max height before scroll */
|
|
22
|
-
maxHeight?: number;
|
|
1
|
+
export interface CodePreviewProps {
|
|
2
|
+
/** Code content */
|
|
3
|
+
code: string;
|
|
4
|
+
/** Programming language */
|
|
5
|
+
language?: string;
|
|
6
|
+
/** File name */
|
|
7
|
+
filename?: string;
|
|
8
|
+
/** Additional class name */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Show copy button */
|
|
11
|
+
showCopy?: boolean;
|
|
12
|
+
/** Show execute button (for applicable languages) */
|
|
13
|
+
showExecute?: boolean;
|
|
14
|
+
/** Called when execute is clicked */
|
|
15
|
+
onExecute?: (code: string) => void;
|
|
16
|
+
/** Show download button */
|
|
17
|
+
showDownload?: boolean;
|
|
18
|
+
/** Max height before scroll */
|
|
19
|
+
maxHeight?: number;
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
25
22
|
* Code preview component with syntax highlighting placeholder
|
|
26
23
|
*/
|
|
27
|
-
declare function CodePreview({
|
|
28
|
-
code,
|
|
29
|
-
language,
|
|
30
|
-
filename,
|
|
31
|
-
className,
|
|
32
|
-
showCopy,
|
|
33
|
-
showExecute,
|
|
34
|
-
onExecute,
|
|
35
|
-
showDownload,
|
|
36
|
-
maxHeight
|
|
37
|
-
}: CodePreviewProps): react_jsx_runtime0.JSX.Element;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { CodePreview };
|
|
24
|
+
export declare function CodePreview({ code, language, filename, className, showCopy, showExecute, onExecute, showDownload, maxHeight, }: CodePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
40
25
|
//# sourceMappingURL=CodePreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodePreview.d.ts","
|
|
1
|
+
{"version":3,"file":"CodePreview.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/CodePreview.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qCAAqC;IACrC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,2BAA2B;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0BD;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAiB,EACjB,QAAQ,EACR,SAAS,EACT,QAAe,EACf,WAAmB,EACnB,SAAS,EACT,YAAoB,EACpB,SAAe,GAChB,EAAE,gBAAgB,2CA0GlB"}
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import { WorkspaceSummary } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className?: string;
|
|
12
|
-
/** Show details */
|
|
13
|
-
showDetails?: boolean;
|
|
1
|
+
import type { WorkspaceSummary } from '../../context/workspace-context';
|
|
2
|
+
export interface ContextIndicatorProps {
|
|
3
|
+
/** Workspace summary */
|
|
4
|
+
summary?: WorkspaceSummary;
|
|
5
|
+
/** Whether context is active */
|
|
6
|
+
active?: boolean;
|
|
7
|
+
/** Additional class name */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Show details */
|
|
10
|
+
showDetails?: boolean;
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
13
|
* Indicator showing active workspace context
|
|
17
14
|
*/
|
|
18
|
-
declare function ContextIndicator({
|
|
19
|
-
summary,
|
|
20
|
-
active,
|
|
21
|
-
className,
|
|
22
|
-
showDetails
|
|
23
|
-
}: ContextIndicatorProps): react_jsx_runtime0.JSX.Element;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { ContextIndicator };
|
|
15
|
+
export declare function ContextIndicator({ summary, active, className, showDetails, }: ContextIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
26
16
|
//# sourceMappingURL=ContextIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextIndicator.d.ts","
|
|
1
|
+
{"version":3,"file":"ContextIndicator.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/ContextIndicator.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,gCAAgC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,MAAc,EACd,SAAS,EACT,WAAkB,GACnB,EAAE,qBAAqB,2CAsFvB"}
|
|
@@ -1,39 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/presentation/components/ModelPicker.d.ts
|
|
5
|
-
interface ModelSelection {
|
|
6
|
-
provider: ProviderName;
|
|
7
|
-
model: string;
|
|
8
|
-
mode: ProviderMode;
|
|
9
|
-
}
|
|
10
|
-
interface ModelPickerProps {
|
|
11
|
-
/** Currently selected provider/model */
|
|
12
|
-
value: ModelSelection;
|
|
13
|
-
/** Called when selection changes */
|
|
14
|
-
onChange: (value: ModelSelection) => void;
|
|
15
|
-
/** Available providers (with availability info) */
|
|
16
|
-
availableProviders?: {
|
|
1
|
+
import { type ProviderMode, type ProviderName } from '@contractspec/lib.ai-providers';
|
|
2
|
+
export interface ModelSelection {
|
|
17
3
|
provider: ProviderName;
|
|
18
|
-
|
|
4
|
+
model: string;
|
|
19
5
|
mode: ProviderMode;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
}
|
|
7
|
+
export interface ModelPickerProps {
|
|
8
|
+
/** Currently selected provider/model */
|
|
9
|
+
value: ModelSelection;
|
|
10
|
+
/** Called when selection changes */
|
|
11
|
+
onChange: (value: ModelSelection) => void;
|
|
12
|
+
/** Available providers (with availability info) */
|
|
13
|
+
availableProviders?: {
|
|
14
|
+
provider: ProviderName;
|
|
15
|
+
available: boolean;
|
|
16
|
+
mode: ProviderMode;
|
|
17
|
+
reason?: string;
|
|
18
|
+
}[];
|
|
19
|
+
/** Additional class name */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Compact mode (smaller) */
|
|
22
|
+
compact?: boolean;
|
|
26
23
|
}
|
|
27
24
|
/**
|
|
28
25
|
* Model picker component for selecting AI provider and model
|
|
29
26
|
*/
|
|
30
|
-
declare function ModelPicker({
|
|
31
|
-
value,
|
|
32
|
-
onChange,
|
|
33
|
-
availableProviders,
|
|
34
|
-
className,
|
|
35
|
-
compact
|
|
36
|
-
}: ModelPickerProps): react_jsx_runtime0.JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { ModelPicker };
|
|
27
|
+
export declare function ModelPicker({ value, onChange, availableProviders, className, compact, }: ModelPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
39
28
|
//# sourceMappingURL=ModelPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelPicker.d.ts","
|
|
1
|
+
{"version":3,"file":"ModelPicker.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/ModelPicker.tsx"],"names":[],"mappings":"AAeA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,KAAK,EAAE,cAAc,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,mDAAmD;IACnD,kBAAkB,CAAC,EAAE;QACnB,QAAQ,EAAE,YAAY,CAAC;QACvB,SAAS,EAAE,OAAO,CAAC;QACnB,IAAI,EAAE,YAAY,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA2BD;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,OAAe,GAChB,EAAE,gBAAgB,2CA2JlB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
1
|
+
/**
|
|
2
|
+
* React components for AI Chat UI
|
|
3
|
+
*/
|
|
4
|
+
export { ChatContainer } from './ChatContainer';
|
|
5
|
+
export { ChatMessage } from './ChatMessage';
|
|
6
|
+
export { ChatInput } from './ChatInput';
|
|
7
|
+
export { ModelPicker } from './ModelPicker';
|
|
8
|
+
export { ContextIndicator } from './ContextIndicator';
|
|
9
|
+
export { CodePreview } from './CodePreview';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|