sa2kit 3.4.0 → 3.7.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/business/index.d.mts +2 -7
- package/dist/business/index.d.ts +2 -7
- package/dist/business/index.js +1761 -8045
- package/dist/business/index.js.map +1 -1
- package/dist/business/index.mjs +1169 -7452
- package/dist/business/index.mjs.map +1 -1
- package/dist/business/portfolio/index.d.mts +1 -2
- package/dist/business/portfolio/index.d.ts +1 -2
- package/dist/{chunk-KVYHCGRY.js → chunk-7Z3XR2Y4.js} +552 -263
- package/dist/chunk-7Z3XR2Y4.js.map +1 -0
- package/dist/chunk-XPY45Y75.js +1143 -0
- package/dist/chunk-XPY45Y75.js.map +1 -0
- package/dist/{chunk-YIRPPMCN.mjs → chunk-XSTMLLJV.mjs} +474 -198
- package/dist/chunk-XSTMLLJV.mjs.map +1 -0
- package/dist/chunk-ZJLS5JU5.mjs +1090 -0
- package/dist/chunk-ZJLS5JU5.mjs.map +1 -0
- package/dist/common/aiApi/client/index.d.mts +71 -0
- package/dist/common/aiApi/client/index.d.ts +71 -0
- package/dist/common/aiApi/client/index.js +165 -0
- package/dist/common/aiApi/client/index.js.map +1 -0
- package/dist/common/aiApi/client/index.mjs +151 -0
- package/dist/common/aiApi/client/index.mjs.map +1 -0
- package/dist/common/aiApi/index.d.mts +184 -0
- package/dist/common/aiApi/index.d.ts +184 -0
- package/dist/common/aiApi/index.js +217 -0
- package/dist/common/aiApi/index.mjs +4 -0
- package/dist/common/aiApi/server/index.d.mts +3 -0
- package/dist/common/aiApi/server/index.d.ts +3 -0
- package/dist/common/aiApi/server/index.js +217 -0
- package/dist/common/aiApi/server/index.mjs +4 -0
- package/dist/common/components/index.js +176 -177
- package/dist/common/components/index.mjs +1 -2
- package/dist/common/index.js +2 -3
- package/dist/common/index.mjs +1 -2
- package/dist/{index-BSmd4ikf.d.ts → index-B4wDXFL0.d.mts} +39 -2
- package/dist/{index-r2-zE3iC.d.mts → index-B4wDXFL0.d.ts} +39 -2
- package/dist/{index-DLLPTprx.d.mts → index-B9vXYzok.d.mts} +48 -13
- package/dist/{index-VFDbZxVM.d.ts → index-BZ0MhRau.d.ts} +48 -13
- package/dist/index.d.mts +703 -181
- package/dist/index.d.ts +703 -181
- package/dist/index.js +2921 -7257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2161 -6538
- package/dist/index.mjs.map +1 -1
- package/dist/types-CiqMQ-uu.d.mts +166 -0
- package/dist/types-CiqMQ-uu.d.ts +166 -0
- package/package.json +15 -60
- package/dist/CollisionBalls-DgKtscU2.d.mts +0 -41
- package/dist/CollisionBalls-DgKtscU2.d.ts +0 -41
- package/dist/business/calendar/index.d.mts +0 -6
- package/dist/business/calendar/index.d.ts +0 -6
- package/dist/business/calendar/index.js +0 -7433
- package/dist/business/calendar/index.js.map +0 -1
- package/dist/business/calendar/index.mjs +0 -7257
- package/dist/business/calendar/index.mjs.map +0 -1
- package/dist/business/calendar/routes/index.d.mts +0 -191
- package/dist/business/calendar/routes/index.d.ts +0 -191
- package/dist/business/calendar/routes/index.js +0 -844
- package/dist/business/calendar/routes/index.js.map +0 -1
- package/dist/business/calendar/routes/index.mjs +0 -826
- package/dist/business/calendar/routes/index.mjs.map +0 -1
- package/dist/chunk-3R6JHA6D.js +0 -120
- package/dist/chunk-3R6JHA6D.js.map +0 -1
- package/dist/chunk-4PJM4752.js +0 -4
- package/dist/chunk-4PJM4752.js.map +0 -1
- package/dist/chunk-7PMT4L4I.js +0 -324
- package/dist/chunk-7PMT4L4I.js.map +0 -1
- package/dist/chunk-FY2X3LYR.mjs +0 -3
- package/dist/chunk-FY2X3LYR.mjs.map +0 -1
- package/dist/chunk-GS4SAW25.mjs +0 -116
- package/dist/chunk-GS4SAW25.mjs.map +0 -1
- package/dist/chunk-HL4H2HF6.js +0 -279
- package/dist/chunk-HL4H2HF6.js.map +0 -1
- package/dist/chunk-IJIQUMAK.mjs +0 -272
- package/dist/chunk-IJIQUMAK.mjs.map +0 -1
- package/dist/chunk-KVYHCGRY.js.map +0 -1
- package/dist/chunk-MMDSZIXD.mjs +0 -286
- package/dist/chunk-MMDSZIXD.mjs.map +0 -1
- package/dist/chunk-N2O3OX5Y.mjs +0 -243
- package/dist/chunk-N2O3OX5Y.mjs.map +0 -1
- package/dist/chunk-RRQ2X26Z.js +0 -106
- package/dist/chunk-RRQ2X26Z.js.map +0 -1
- package/dist/chunk-RVNQI6BI.js +0 -249
- package/dist/chunk-RVNQI6BI.js.map +0 -1
- package/dist/chunk-UJUWDF7M.mjs +0 -336
- package/dist/chunk-UJUWDF7M.mjs.map +0 -1
- package/dist/chunk-VCKXK6V5.js +0 -345
- package/dist/chunk-VCKXK6V5.js.map +0 -1
- package/dist/chunk-VIEXDTNF.mjs +0 -100
- package/dist/chunk-VIEXDTNF.mjs.map +0 -1
- package/dist/chunk-YIRPPMCN.mjs.map +0 -1
- package/dist/common/ai/llm/core/index.d.mts +0 -70
- package/dist/common/ai/llm/core/index.d.ts +0 -70
- package/dist/common/ai/llm/core/index.js +0 -54
- package/dist/common/ai/llm/core/index.mjs +0 -5
- package/dist/common/ai/llm/electron/index.d.mts +0 -6
- package/dist/common/ai/llm/electron/index.d.ts +0 -6
- package/dist/common/ai/llm/electron/index.js +0 -67
- package/dist/common/ai/llm/electron/index.mjs +0 -10
- package/dist/common/ai/llm/index.d.mts +0 -3
- package/dist/common/ai/llm/index.d.ts +0 -3
- package/dist/common/ai/llm/index.js +0 -54
- package/dist/common/ai/llm/index.js.map +0 -1
- package/dist/common/ai/llm/index.mjs +0 -5
- package/dist/common/ai/llm/index.mjs.map +0 -1
- package/dist/common/ai/llm/miniapp/index.d.mts +0 -6
- package/dist/common/ai/llm/miniapp/index.d.ts +0 -6
- package/dist/common/ai/llm/miniapp/index.js +0 -59
- package/dist/common/ai/llm/miniapp/index.js.map +0 -1
- package/dist/common/ai/llm/miniapp/index.mjs +0 -6
- package/dist/common/ai/llm/miniapp/index.mjs.map +0 -1
- package/dist/common/ai/llm/rn/index.d.mts +0 -6
- package/dist/common/ai/llm/rn/index.d.ts +0 -6
- package/dist/common/ai/llm/rn/index.js +0 -59
- package/dist/common/ai/llm/rn/index.js.map +0 -1
- package/dist/common/ai/llm/rn/index.mjs +0 -6
- package/dist/common/ai/llm/rn/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/electron/index.d.mts +0 -5
- package/dist/common/ai/llm/ui/electron/index.d.ts +0 -5
- package/dist/common/ai/llm/ui/electron/index.js +0 -22
- package/dist/common/ai/llm/ui/electron/index.js.map +0 -1
- package/dist/common/ai/llm/ui/electron/index.mjs +0 -9
- package/dist/common/ai/llm/ui/electron/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/miniapp/index.d.mts +0 -9
- package/dist/common/ai/llm/ui/miniapp/index.d.ts +0 -9
- package/dist/common/ai/llm/ui/miniapp/index.js +0 -14
- package/dist/common/ai/llm/ui/miniapp/index.js.map +0 -1
- package/dist/common/ai/llm/ui/miniapp/index.mjs +0 -5
- package/dist/common/ai/llm/ui/miniapp/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/rn/index.d.mts +0 -9
- package/dist/common/ai/llm/ui/rn/index.d.ts +0 -9
- package/dist/common/ai/llm/ui/rn/index.js +0 -14
- package/dist/common/ai/llm/ui/rn/index.js.map +0 -1
- package/dist/common/ai/llm/ui/rn/index.mjs +0 -5
- package/dist/common/ai/llm/ui/rn/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/web/index.d.mts +0 -15
- package/dist/common/ai/llm/ui/web/index.d.ts +0 -15
- package/dist/common/ai/llm/ui/web/index.js +0 -21
- package/dist/common/ai/llm/ui/web/index.js.map +0 -1
- package/dist/common/ai/llm/ui/web/index.mjs +0 -8
- package/dist/common/ai/llm/ui/web/index.mjs.map +0 -1
- package/dist/common/ai/llm/web/index.d.mts +0 -6
- package/dist/common/ai/llm/web/index.d.ts +0 -6
- package/dist/common/ai/llm/web/index.js +0 -66
- package/dist/common/ai/llm/web/index.js.map +0 -1
- package/dist/common/ai/llm/web/index.mjs +0 -9
- package/dist/common/ai/llm/web/index.mjs.map +0 -1
- package/dist/index-BMgdH5dL.d.mts +0 -1716
- package/dist/index-IXMAeTtN.d.ts +0 -1716
- package/dist/types-B2rs_jq1.d.mts +0 -38
- package/dist/types-DgACCUpT.d.ts +0 -122
- package/dist/types-DwS2Eg0q.d.ts +0 -38
- package/dist/types-LU_BGSzk.d.mts +0 -122
- /package/dist/common/{ai/llm/core → aiApi}/index.js.map +0 -0
- /package/dist/common/{ai/llm/core → aiApi}/index.mjs.map +0 -0
- /package/dist/common/{ai/llm/electron → aiApi/server}/index.js.map +0 -0
- /package/dist/common/{ai/llm/electron → aiApi/server}/index.mjs.map +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { l as AiClient, q as PromptVariables, d as AiMessage, n as AiChatInputOptions, h as AiChatResponse } from './types-LU_BGSzk.mjs';
|
|
2
|
-
|
|
3
|
-
interface AiChatDialogBaseProps {
|
|
4
|
-
client: AiClient;
|
|
5
|
-
title?: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
systemPrompt?: string;
|
|
8
|
-
template?: string;
|
|
9
|
-
templateVariables?: PromptVariables;
|
|
10
|
-
initialMessages?: AiMessage[];
|
|
11
|
-
requestOptions?: Omit<AiChatInputOptions, 'template' | 'variables'>;
|
|
12
|
-
onResponse?: (response: AiChatResponse) => void;
|
|
13
|
-
onError?: (error: Error) => void;
|
|
14
|
-
}
|
|
15
|
-
interface AiChatDialogProps extends AiChatDialogBaseProps {
|
|
16
|
-
open: boolean;
|
|
17
|
-
onOpenChange?: (open: boolean) => void;
|
|
18
|
-
}
|
|
19
|
-
interface AiUiConfig {
|
|
20
|
-
apiKey: string;
|
|
21
|
-
baseUrl: string;
|
|
22
|
-
model: string;
|
|
23
|
-
systemPrompt: string;
|
|
24
|
-
template: string;
|
|
25
|
-
temperature: number;
|
|
26
|
-
topP: number;
|
|
27
|
-
maxTokens: number;
|
|
28
|
-
}
|
|
29
|
-
interface AiConfigPageProps {
|
|
30
|
-
storageKey?: string;
|
|
31
|
-
initialConfig?: Partial<AiUiConfig>;
|
|
32
|
-
title?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
onSave?: (config: AiUiConfig) => void;
|
|
35
|
-
onChange?: (config: AiUiConfig) => void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type { AiChatDialogBaseProps as A, AiChatDialogProps as a, AiUiConfig as b, AiConfigPageProps as c };
|
package/dist/types-DgACCUpT.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { R as RequestAdapter } from './types-CbTsi9CZ.js';
|
|
2
|
-
|
|
3
|
-
type PromptVariableValue = string | number | boolean | null | undefined;
|
|
4
|
-
type PromptVariables = Record<string, PromptVariableValue>;
|
|
5
|
-
declare const normalizePromptVariables: (variables?: PromptVariables) => Record<string, string>;
|
|
6
|
-
|
|
7
|
-
interface AiProvider {
|
|
8
|
-
id?: string;
|
|
9
|
-
sendChat(request: AiChatRequest, config: ResolvedAiClientConfig): Promise<AiChatResponse>;
|
|
10
|
-
streamChat?(request: AiChatRequest, config: ResolvedAiClientConfig): AsyncIterable<AiChatChunk>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type AiRole = 'system' | 'user' | 'assistant' | 'tool';
|
|
14
|
-
type AiToolChoice = {
|
|
15
|
-
type: 'function';
|
|
16
|
-
function: {
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
type AiToolDefinition = {
|
|
21
|
-
type: 'function';
|
|
22
|
-
function: {
|
|
23
|
-
name: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
parameters?: Record<string, any>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
type AiToolCall = {
|
|
29
|
-
id: string;
|
|
30
|
-
type: 'function';
|
|
31
|
-
function: {
|
|
32
|
-
name: string;
|
|
33
|
-
arguments: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
interface AiMessage {
|
|
37
|
-
role: AiRole;
|
|
38
|
-
content: string;
|
|
39
|
-
name?: string;
|
|
40
|
-
toolCallId?: string;
|
|
41
|
-
toolCalls?: AiToolCall[];
|
|
42
|
-
}
|
|
43
|
-
interface AiUsage {
|
|
44
|
-
promptTokens?: number;
|
|
45
|
-
completionTokens?: number;
|
|
46
|
-
totalTokens?: number;
|
|
47
|
-
}
|
|
48
|
-
interface AiChatRequestOptions {
|
|
49
|
-
model?: string;
|
|
50
|
-
temperature?: number;
|
|
51
|
-
maxTokens?: number;
|
|
52
|
-
topP?: number;
|
|
53
|
-
stop?: string | string[];
|
|
54
|
-
stream?: boolean;
|
|
55
|
-
tools?: AiToolDefinition[];
|
|
56
|
-
toolChoice?: 'auto' | 'none' | AiToolChoice;
|
|
57
|
-
}
|
|
58
|
-
interface AiChatRequest extends AiChatRequestOptions {
|
|
59
|
-
messages: AiMessage[];
|
|
60
|
-
}
|
|
61
|
-
interface AiChatResponse {
|
|
62
|
-
id: string;
|
|
63
|
-
content: string;
|
|
64
|
-
message?: AiMessage;
|
|
65
|
-
usage?: AiUsage;
|
|
66
|
-
raw?: unknown;
|
|
67
|
-
toolCalls?: AiToolCall[];
|
|
68
|
-
}
|
|
69
|
-
interface AiChatChunk {
|
|
70
|
-
id: string;
|
|
71
|
-
content?: string;
|
|
72
|
-
delta?: string;
|
|
73
|
-
toolCalls?: AiToolCall[];
|
|
74
|
-
raw?: unknown;
|
|
75
|
-
}
|
|
76
|
-
interface AiLogger {
|
|
77
|
-
debug?: (message: string, data?: any) => void;
|
|
78
|
-
info?: (message: string, data?: any) => void;
|
|
79
|
-
warn?: (message: string, data?: any) => void;
|
|
80
|
-
error?: (message: string, error?: any) => void;
|
|
81
|
-
}
|
|
82
|
-
interface AiClientConfig {
|
|
83
|
-
apiKey?: string;
|
|
84
|
-
getApiKey?: () => Promise<string> | string;
|
|
85
|
-
baseUrl?: string;
|
|
86
|
-
model?: string;
|
|
87
|
-
headers?: Record<string, string>;
|
|
88
|
-
timeoutMs?: number;
|
|
89
|
-
requestAdapter?: RequestAdapter;
|
|
90
|
-
logger?: AiLogger;
|
|
91
|
-
provider?: AiProvider;
|
|
92
|
-
}
|
|
93
|
-
interface ResolvedAiClientConfig extends AiClientConfig {
|
|
94
|
-
baseUrl: string;
|
|
95
|
-
headers: Record<string, string>;
|
|
96
|
-
timeoutMs: number;
|
|
97
|
-
}
|
|
98
|
-
interface AiClient {
|
|
99
|
-
sendChat(request: AiChatRequest): Promise<AiChatResponse>;
|
|
100
|
-
sendMessage(content: string, options?: AiChatRequestOptions & {
|
|
101
|
-
systemPrompt?: string;
|
|
102
|
-
}): Promise<AiChatResponse>;
|
|
103
|
-
}
|
|
104
|
-
type AiChatStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
105
|
-
interface AiChatInputOptions extends AiChatRequestOptions {
|
|
106
|
-
template?: string;
|
|
107
|
-
variables?: PromptVariables;
|
|
108
|
-
}
|
|
109
|
-
interface AiChatSessionOptions {
|
|
110
|
-
client: AiClient;
|
|
111
|
-
systemPrompt?: string;
|
|
112
|
-
template?: string;
|
|
113
|
-
initialMessages?: AiMessage[];
|
|
114
|
-
}
|
|
115
|
-
interface AiChatSession {
|
|
116
|
-
getMessages(): AiMessage[];
|
|
117
|
-
setSystemPrompt(prompt?: string): void;
|
|
118
|
-
reset(): void;
|
|
119
|
-
sendMessage(input: string, options?: AiChatInputOptions): Promise<AiChatResponse>;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export { type AiRole as A, type PromptVariableValue as P, type ResolvedAiClientConfig as R, type AiToolChoice as a, type AiToolDefinition as b, type AiToolCall as c, type AiMessage as d, type AiUsage as e, type AiChatRequestOptions as f, type AiChatRequest as g, type AiChatResponse as h, type AiChatChunk as i, type AiLogger as j, type AiClientConfig as k, type AiClient as l, type AiChatStatus as m, type AiChatInputOptions as n, type AiChatSessionOptions as o, type AiChatSession as p, type PromptVariables as q, normalizePromptVariables as r, type AiProvider as s };
|
package/dist/types-DwS2Eg0q.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { l as AiClient, q as PromptVariables, d as AiMessage, n as AiChatInputOptions, h as AiChatResponse } from './types-DgACCUpT.js';
|
|
2
|
-
|
|
3
|
-
interface AiChatDialogBaseProps {
|
|
4
|
-
client: AiClient;
|
|
5
|
-
title?: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
systemPrompt?: string;
|
|
8
|
-
template?: string;
|
|
9
|
-
templateVariables?: PromptVariables;
|
|
10
|
-
initialMessages?: AiMessage[];
|
|
11
|
-
requestOptions?: Omit<AiChatInputOptions, 'template' | 'variables'>;
|
|
12
|
-
onResponse?: (response: AiChatResponse) => void;
|
|
13
|
-
onError?: (error: Error) => void;
|
|
14
|
-
}
|
|
15
|
-
interface AiChatDialogProps extends AiChatDialogBaseProps {
|
|
16
|
-
open: boolean;
|
|
17
|
-
onOpenChange?: (open: boolean) => void;
|
|
18
|
-
}
|
|
19
|
-
interface AiUiConfig {
|
|
20
|
-
apiKey: string;
|
|
21
|
-
baseUrl: string;
|
|
22
|
-
model: string;
|
|
23
|
-
systemPrompt: string;
|
|
24
|
-
template: string;
|
|
25
|
-
temperature: number;
|
|
26
|
-
topP: number;
|
|
27
|
-
maxTokens: number;
|
|
28
|
-
}
|
|
29
|
-
interface AiConfigPageProps {
|
|
30
|
-
storageKey?: string;
|
|
31
|
-
initialConfig?: Partial<AiUiConfig>;
|
|
32
|
-
title?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
onSave?: (config: AiUiConfig) => void;
|
|
35
|
-
onChange?: (config: AiUiConfig) => void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type { AiChatDialogBaseProps as A, AiChatDialogProps as a, AiUiConfig as b, AiConfigPageProps as c };
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { R as RequestAdapter } from './types-CbTsi9CZ.mjs';
|
|
2
|
-
|
|
3
|
-
type PromptVariableValue = string | number | boolean | null | undefined;
|
|
4
|
-
type PromptVariables = Record<string, PromptVariableValue>;
|
|
5
|
-
declare const normalizePromptVariables: (variables?: PromptVariables) => Record<string, string>;
|
|
6
|
-
|
|
7
|
-
interface AiProvider {
|
|
8
|
-
id?: string;
|
|
9
|
-
sendChat(request: AiChatRequest, config: ResolvedAiClientConfig): Promise<AiChatResponse>;
|
|
10
|
-
streamChat?(request: AiChatRequest, config: ResolvedAiClientConfig): AsyncIterable<AiChatChunk>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type AiRole = 'system' | 'user' | 'assistant' | 'tool';
|
|
14
|
-
type AiToolChoice = {
|
|
15
|
-
type: 'function';
|
|
16
|
-
function: {
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
type AiToolDefinition = {
|
|
21
|
-
type: 'function';
|
|
22
|
-
function: {
|
|
23
|
-
name: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
parameters?: Record<string, any>;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
type AiToolCall = {
|
|
29
|
-
id: string;
|
|
30
|
-
type: 'function';
|
|
31
|
-
function: {
|
|
32
|
-
name: string;
|
|
33
|
-
arguments: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
interface AiMessage {
|
|
37
|
-
role: AiRole;
|
|
38
|
-
content: string;
|
|
39
|
-
name?: string;
|
|
40
|
-
toolCallId?: string;
|
|
41
|
-
toolCalls?: AiToolCall[];
|
|
42
|
-
}
|
|
43
|
-
interface AiUsage {
|
|
44
|
-
promptTokens?: number;
|
|
45
|
-
completionTokens?: number;
|
|
46
|
-
totalTokens?: number;
|
|
47
|
-
}
|
|
48
|
-
interface AiChatRequestOptions {
|
|
49
|
-
model?: string;
|
|
50
|
-
temperature?: number;
|
|
51
|
-
maxTokens?: number;
|
|
52
|
-
topP?: number;
|
|
53
|
-
stop?: string | string[];
|
|
54
|
-
stream?: boolean;
|
|
55
|
-
tools?: AiToolDefinition[];
|
|
56
|
-
toolChoice?: 'auto' | 'none' | AiToolChoice;
|
|
57
|
-
}
|
|
58
|
-
interface AiChatRequest extends AiChatRequestOptions {
|
|
59
|
-
messages: AiMessage[];
|
|
60
|
-
}
|
|
61
|
-
interface AiChatResponse {
|
|
62
|
-
id: string;
|
|
63
|
-
content: string;
|
|
64
|
-
message?: AiMessage;
|
|
65
|
-
usage?: AiUsage;
|
|
66
|
-
raw?: unknown;
|
|
67
|
-
toolCalls?: AiToolCall[];
|
|
68
|
-
}
|
|
69
|
-
interface AiChatChunk {
|
|
70
|
-
id: string;
|
|
71
|
-
content?: string;
|
|
72
|
-
delta?: string;
|
|
73
|
-
toolCalls?: AiToolCall[];
|
|
74
|
-
raw?: unknown;
|
|
75
|
-
}
|
|
76
|
-
interface AiLogger {
|
|
77
|
-
debug?: (message: string, data?: any) => void;
|
|
78
|
-
info?: (message: string, data?: any) => void;
|
|
79
|
-
warn?: (message: string, data?: any) => void;
|
|
80
|
-
error?: (message: string, error?: any) => void;
|
|
81
|
-
}
|
|
82
|
-
interface AiClientConfig {
|
|
83
|
-
apiKey?: string;
|
|
84
|
-
getApiKey?: () => Promise<string> | string;
|
|
85
|
-
baseUrl?: string;
|
|
86
|
-
model?: string;
|
|
87
|
-
headers?: Record<string, string>;
|
|
88
|
-
timeoutMs?: number;
|
|
89
|
-
requestAdapter?: RequestAdapter;
|
|
90
|
-
logger?: AiLogger;
|
|
91
|
-
provider?: AiProvider;
|
|
92
|
-
}
|
|
93
|
-
interface ResolvedAiClientConfig extends AiClientConfig {
|
|
94
|
-
baseUrl: string;
|
|
95
|
-
headers: Record<string, string>;
|
|
96
|
-
timeoutMs: number;
|
|
97
|
-
}
|
|
98
|
-
interface AiClient {
|
|
99
|
-
sendChat(request: AiChatRequest): Promise<AiChatResponse>;
|
|
100
|
-
sendMessage(content: string, options?: AiChatRequestOptions & {
|
|
101
|
-
systemPrompt?: string;
|
|
102
|
-
}): Promise<AiChatResponse>;
|
|
103
|
-
}
|
|
104
|
-
type AiChatStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
105
|
-
interface AiChatInputOptions extends AiChatRequestOptions {
|
|
106
|
-
template?: string;
|
|
107
|
-
variables?: PromptVariables;
|
|
108
|
-
}
|
|
109
|
-
interface AiChatSessionOptions {
|
|
110
|
-
client: AiClient;
|
|
111
|
-
systemPrompt?: string;
|
|
112
|
-
template?: string;
|
|
113
|
-
initialMessages?: AiMessage[];
|
|
114
|
-
}
|
|
115
|
-
interface AiChatSession {
|
|
116
|
-
getMessages(): AiMessage[];
|
|
117
|
-
setSystemPrompt(prompt?: string): void;
|
|
118
|
-
reset(): void;
|
|
119
|
-
sendMessage(input: string, options?: AiChatInputOptions): Promise<AiChatResponse>;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export { type AiRole as A, type PromptVariableValue as P, type ResolvedAiClientConfig as R, type AiToolChoice as a, type AiToolDefinition as b, type AiToolCall as c, type AiMessage as d, type AiUsage as e, type AiChatRequestOptions as f, type AiChatRequest as g, type AiChatResponse as h, type AiChatChunk as i, type AiLogger as j, type AiClientConfig as k, type AiClient as l, type AiChatStatus as m, type AiChatInputOptions as n, type AiChatSessionOptions as o, type AiChatSession as p, type PromptVariables as q, normalizePromptVariables as r, type AiProvider as s };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|