bstp-agent-widget 0.2.87 → 0.2.88
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/agent-widget.js +19960 -19685
- package/dist/agent-widget.js.map +1 -1
- package/dist/bstp-agent-widget.css +1 -1
- package/package.json +2 -1
- package/src/lib/index.d.ts +7 -68
- package/src/types/models/agent-chat-config.ts +2 -9
- package/src/types/models/agent-chat-md-widget-config.ts +1 -1
- package/src/types/models/agent-chat-widget-props.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bstp-agent-widget",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.88",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"vite": "8.0.3"
|
|
130
130
|
},
|
|
131
131
|
"peerDependencies": {
|
|
132
|
+
"@markdown-ui/react": "*",
|
|
132
133
|
"react": "^19.0.0",
|
|
133
134
|
"react-dom": "^19.0.0"
|
|
134
135
|
},
|
package/src/lib/index.d.ts
CHANGED
|
@@ -1,68 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
label: string;
|
|
9
|
-
initialMessage?: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type AgentChatAssistantConfig = AppConfigGenaiAssistant;
|
|
13
|
-
|
|
14
|
-
export type AppConfigGenaiInit = {
|
|
15
|
-
serviceAccount: string;
|
|
16
|
-
serviceKey: string;
|
|
17
|
-
tenantId: number;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type AgentChatConfigValue = {
|
|
21
|
-
assistantId: number;
|
|
22
|
-
assistants?: AppConfigGenaiAssistant[];
|
|
23
|
-
genaiInit?: AppConfigGenaiInit;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export type AgentChatConfigGetter = {
|
|
27
|
-
getAssistantId: () => number | null;
|
|
28
|
-
getAssistants?: () => AppConfigGenaiAssistant[];
|
|
29
|
-
getGenaiInit?: () => AppConfigGenaiInit | null;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type AgentChatConfig = AgentChatConfigValue | AgentChatConfigGetter;
|
|
33
|
-
|
|
34
|
-
export type AgentChatRuntimeValue = {
|
|
35
|
-
customerId: string;
|
|
36
|
-
customerToken: string;
|
|
37
|
-
language?: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type AgentChatRuntimeGetter = {
|
|
41
|
-
getCustomerId: () => string | null;
|
|
42
|
-
getCustomerToken: () => string | null | Promise<string | null>;
|
|
43
|
-
getLanguage?: () => string | null;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type AgentChatRuntime = AgentChatRuntimeValue | AgentChatRuntimeGetter;
|
|
47
|
-
|
|
48
|
-
export type AgentChatWidgetProps = {
|
|
49
|
-
config: AgentChatConfig;
|
|
50
|
-
runtime: AgentChatRuntime;
|
|
51
|
-
theme?: AgentChatWidgetUiOptions;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export type AgentChatExternalConfig = Partial<Pick<AgentChatConfigValue, 'assistantId' | 'assistants'>>;
|
|
55
|
-
|
|
56
|
-
export type MountFromEnvironmentOptions = {
|
|
57
|
-
runtime: AgentChatRuntime;
|
|
58
|
-
environmentUrl?: string;
|
|
59
|
-
theme?: AgentChatWidgetUiOptions;
|
|
60
|
-
config?: AgentChatExternalConfig;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export declare function AgentChatWidget(props: AgentChatWidgetProps): ReactElement;
|
|
64
|
-
export declare function mountAgentChatWidget(container: Element, props: AgentChatWidgetProps): () => void;
|
|
65
|
-
export declare function mountAgentChatWidgetFromEnvironment(
|
|
66
|
-
container: Element,
|
|
67
|
-
options: MountFromEnvironmentOptions,
|
|
68
|
-
): Promise<() => void>;
|
|
1
|
+
export * from './agent-widget';
|
|
2
|
+
export * from './mount-widget';
|
|
3
|
+
export * from '../types/models/agent-chat-widget-props';
|
|
4
|
+
export * from '../types/models/agent-chat-widget-ui';
|
|
5
|
+
export * from '../types/models/agent-chat-config';
|
|
6
|
+
export * from '../types/models/app-config';
|
|
7
|
+
export * from '../types/models/agent-chat-runtime';
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { AppConfigGenaiAssistant,
|
|
2
|
-
|
|
3
|
-
export type AgentChatConfigValue = {
|
|
4
|
-
assistantId: number;
|
|
5
|
-
assistants?: AppConfigGenaiAssistant[];
|
|
6
|
-
genaiInit?: AppConfigGenaiInit;
|
|
7
|
-
};
|
|
1
|
+
import { AppConfigGenaiAssistant, AppConfigGenaiConfig } from './app-config';
|
|
8
2
|
|
|
9
3
|
export type AgentChatConfigGetter = {
|
|
10
4
|
getAssistantId: () => number | null;
|
|
11
5
|
getAssistants?: () => AppConfigGenaiAssistant[];
|
|
12
|
-
getGenaiInit?: () => AppConfigGenaiInit | null;
|
|
13
6
|
};
|
|
14
7
|
|
|
15
|
-
export type AgentChatConfig =
|
|
8
|
+
export type AgentChatConfig = AppConfigGenaiConfig | AgentChatConfigGetter;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AgentChatConfig
|
|
1
|
+
import { AgentChatConfig } from './agent-chat-config';
|
|
2
|
+
import { AppConfigGenaiConfig } from './app-config';
|
|
2
3
|
import { AgentChatRuntime } from './agent-chat-runtime';
|
|
3
4
|
import { AgentChatWidgetUiOptions } from './agent-chat-widget-ui';
|
|
4
5
|
|
|
@@ -8,7 +9,7 @@ export type AgentChatWidgetProps = {
|
|
|
8
9
|
theme?: AgentChatWidgetUiOptions;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
export type AgentChatExternalConfig = Partial<Pick<
|
|
12
|
+
export type AgentChatExternalConfig = Partial<Pick<AppConfigGenaiConfig, 'assistantId' | 'agents'>>;
|
|
12
13
|
|
|
13
14
|
export type MountFromEnvironmentOptions = {
|
|
14
15
|
runtime: AgentChatRuntime;
|