@firstlovecenter/ai-chat 0.2.3 → 0.6.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/CHANGELOG.md +57 -0
- package/dist/drizzle/index.cjs +24 -0
- package/dist/drizzle/index.cjs.map +1 -1
- package/dist/drizzle/index.d.cts +36 -1
- package/dist/drizzle/index.d.ts +36 -1
- package/dist/drizzle/index.js +25 -1
- package/dist/drizzle/index.js.map +1 -1
- package/dist/prisma/index.cjs +7 -0
- package/dist/prisma/index.cjs.map +1 -1
- package/dist/prisma/index.d.cts +8 -1
- package/dist/prisma/index.d.ts +8 -1
- package/dist/prisma/index.js +7 -0
- package/dist/prisma/index.js.map +1 -1
- package/dist/server/index.cjs +353 -15
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +50 -4
- package/dist/server/index.d.ts +50 -4
- package/dist/server/index.js +353 -15
- package/dist/server/index.js.map +1 -1
- package/dist/{types-DNwFvL-C.d.cts → types-CQntnyDJ.d.cts} +24 -2
- package/dist/{types-DNwFvL-C.d.ts → types-CQntnyDJ.d.ts} +24 -2
- package/dist/ui/index.cjs +1024 -87
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +24 -12
- package/dist/ui/index.d.ts +24 -12
- package/dist/ui/index.js +1022 -88
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/prisma/chat-models.prisma +7 -0
package/dist/ui/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
4
|
type NarrativeProvider = 'claude' | 'grok' | 'gemini';
|
|
@@ -10,6 +11,21 @@ type AiChatProps$1 = {
|
|
|
10
11
|
};
|
|
11
12
|
declare function AiChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps$1): react_jsx_runtime.JSX.Element;
|
|
12
13
|
|
|
14
|
+
type AiChatSessionSummary = {
|
|
15
|
+
id: number;
|
|
16
|
+
title: string;
|
|
17
|
+
updatedAt: string | null;
|
|
18
|
+
};
|
|
19
|
+
type AiChatProps = {
|
|
20
|
+
userFirstName: string;
|
|
21
|
+
/** Data scope label shown as a chip beneath the input (eg. "All countries"). */
|
|
22
|
+
scopeLabel: string;
|
|
23
|
+
/** User's stored narrative provider, surfaced as the model picker default. */
|
|
24
|
+
initialProvider: 'claude' | 'grok' | 'gemini';
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare function VercelChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
13
29
|
type ChartSpec = {
|
|
14
30
|
type: 'line' | 'bar' | 'stacked_bar' | 'pie';
|
|
15
31
|
x: string;
|
|
@@ -73,17 +89,13 @@ declare function AnswerBlocks({ blocks }: {
|
|
|
73
89
|
blocks: BlockState[];
|
|
74
90
|
}): react_jsx_runtime.JSX.Element;
|
|
75
91
|
|
|
76
|
-
type
|
|
77
|
-
id:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
type AiChatProps = {
|
|
82
|
-
userFirstName: string;
|
|
83
|
-
/** Data scope label shown as a chip beneath the input (eg. "All countries"). */
|
|
84
|
-
scopeLabel: string;
|
|
85
|
-
/** User's stored narrative provider, surfaced as the model picker default. */
|
|
86
|
-
initialProvider: 'claude' | 'grok' | 'gemini';
|
|
92
|
+
type ChatInterfaceDef = {
|
|
93
|
+
id: 'custom' | 'vercel';
|
|
94
|
+
label: string;
|
|
95
|
+
description: string;
|
|
96
|
+
Component: ComponentType<AiChatProps>;
|
|
87
97
|
};
|
|
98
|
+
declare const chatInterfaces: ChatInterfaceDef[];
|
|
99
|
+
declare function getChatInterface(id: string): ChatInterfaceDef;
|
|
88
100
|
|
|
89
|
-
export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, sanitiseBlock };
|
|
101
|
+
export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, type ChatInterfaceDef, VercelChat, chatInterfaces, getChatInterface, sanitiseBlock };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
4
|
type NarrativeProvider = 'claude' | 'grok' | 'gemini';
|
|
@@ -10,6 +11,21 @@ type AiChatProps$1 = {
|
|
|
10
11
|
};
|
|
11
12
|
declare function AiChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps$1): react_jsx_runtime.JSX.Element;
|
|
12
13
|
|
|
14
|
+
type AiChatSessionSummary = {
|
|
15
|
+
id: number;
|
|
16
|
+
title: string;
|
|
17
|
+
updatedAt: string | null;
|
|
18
|
+
};
|
|
19
|
+
type AiChatProps = {
|
|
20
|
+
userFirstName: string;
|
|
21
|
+
/** Data scope label shown as a chip beneath the input (eg. "All countries"). */
|
|
22
|
+
scopeLabel: string;
|
|
23
|
+
/** User's stored narrative provider, surfaced as the model picker default. */
|
|
24
|
+
initialProvider: 'claude' | 'grok' | 'gemini';
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare function VercelChat({ userFirstName, scopeLabel, initialProvider }: AiChatProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
13
29
|
type ChartSpec = {
|
|
14
30
|
type: 'line' | 'bar' | 'stacked_bar' | 'pie';
|
|
15
31
|
x: string;
|
|
@@ -73,17 +89,13 @@ declare function AnswerBlocks({ blocks }: {
|
|
|
73
89
|
blocks: BlockState[];
|
|
74
90
|
}): react_jsx_runtime.JSX.Element;
|
|
75
91
|
|
|
76
|
-
type
|
|
77
|
-
id:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
type AiChatProps = {
|
|
82
|
-
userFirstName: string;
|
|
83
|
-
/** Data scope label shown as a chip beneath the input (eg. "All countries"). */
|
|
84
|
-
scopeLabel: string;
|
|
85
|
-
/** User's stored narrative provider, surfaced as the model picker default. */
|
|
86
|
-
initialProvider: 'claude' | 'grok' | 'gemini';
|
|
92
|
+
type ChatInterfaceDef = {
|
|
93
|
+
id: 'custom' | 'vercel';
|
|
94
|
+
label: string;
|
|
95
|
+
description: string;
|
|
96
|
+
Component: ComponentType<AiChatProps>;
|
|
87
97
|
};
|
|
98
|
+
declare const chatInterfaces: ChatInterfaceDef[];
|
|
99
|
+
declare function getChatInterface(id: string): ChatInterfaceDef;
|
|
88
100
|
|
|
89
|
-
export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, sanitiseBlock };
|
|
101
|
+
export { AiChat, type AiChatProps, type AiChatSessionSummary, AnswerBlocks, type BlockState, type ChatInterfaceDef, VercelChat, chatInterfaces, getChatInterface, sanitiseBlock };
|