bstp-agent-widget 0.2.8 → 0.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bstp-agent-widget",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/agent-widget.js",
@@ -13,14 +13,12 @@ export type AgentChatGenAiInit = {
13
13
  };
14
14
 
15
15
  export type AgentChatConfigValue = {
16
- baseUrl: string;
17
16
  assistantId: number;
18
17
  assistants?: AgentChatAssistantConfig[];
19
18
  genaiInit?: AgentChatGenAiInit;
20
19
  };
21
20
 
22
21
  export type AgentChatConfigGetter = {
23
- getBaseUrl: () => string | null;
24
22
  getAssistantId: () => number | null;
25
23
  getAssistants?: () => AgentChatAssistantConfig[];
26
24
  getGenaiInit?: () => AgentChatGenAiInit | null;
@@ -42,14 +40,30 @@ export type AgentChatRuntimeGetter = {
42
40
 
43
41
  export type AgentChatRuntime = AgentChatRuntimeValue | AgentChatRuntimeGetter;
44
42
 
43
+ export type AgentChatWidgetFabPosition = {
44
+ bottom?: number;
45
+ right?: number;
46
+ };
47
+
48
+ export type AgentChatWidgetUiOptions = {
49
+ zIndex?: number;
50
+ withinPortal?: boolean;
51
+ fabPosition?: AgentChatWidgetFabPosition;
52
+ };
53
+
45
54
  export type AgentChatWidgetProps = {
46
55
  config: AgentChatConfig;
47
56
  runtime: AgentChatRuntime;
57
+ ui?: AgentChatWidgetUiOptions;
48
58
  };
49
59
 
60
+ export type AgentChatExternalConfig = Partial<Pick<AgentChatConfigValue, 'assistantId' | 'assistants'>>;
61
+
50
62
  export type MountFromEnvironmentOptions = {
51
63
  runtime: AgentChatRuntime;
52
64
  environmentUrl?: string;
65
+ ui?: AgentChatWidgetUiOptions;
66
+ config?: AgentChatExternalConfig;
53
67
  };
54
68
 
55
69
  export declare function AgentChatWidget(props: AgentChatWidgetProps): ReactElement;