@bridgeline-digital/hawkai-assistant 1.0.0-beta.0 → 1.0.0-beta.2
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/README.md +2 -2
- package/dist/api/client.d.ts +4 -1
- package/dist/api/types.d.ts +12 -1
- package/dist/components/App.d.ts +6 -1
- package/dist/contexts/AssistantContext.d.ts +4 -2
- package/dist/hawkai-assistant.js +27 -27
- package/dist/index.js +940 -851
- package/dist/main.d.ts +1 -1
- package/dist/session-manager.d.ts +1 -0
- package/dist/sync.d.ts +8 -0
- package/dist/types.d.ts +3 -2
- package/dist/utilities/logging.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ HawkAI.Assistant.initialize(config: Config): void
|
|
|
79
79
|
| `open` | `boolean` | `false` | Whether the widget starts open. |
|
|
80
80
|
| `display` | `'window' \| 'drawer'` | `'window'` | Layout mode — floating window or a drawer panel. |
|
|
81
81
|
| `position` | `'left' \| 'right'` | `'right'` | Side of the screen for the button and panel. |
|
|
82
|
-
| `theme` | `'light' \| 'dark' \| '
|
|
82
|
+
| `theme` | `'light' \| 'dark' \| 'auto'` | `'auto'` | Color scheme. `'auto'` follows the user's OS preference. |
|
|
83
83
|
| `allowFullScreen` | `boolean` | `true` | Whether the user can expand the widget to full screen. |
|
|
84
84
|
| `allowFileUpload` | `boolean` | `true` | Whether the user can attach files to messages. |
|
|
85
85
|
| `logoUrl` | `string` | — | URL of a logo image shown in the widget header. |
|
|
@@ -110,7 +110,7 @@ HawkAI.Assistant.initialize({
|
|
|
110
110
|
initialMessage: 'Hi! How can I help you today?',
|
|
111
111
|
promptOptions: ['What are your best deals?', 'Track my order', 'Return an item'],
|
|
112
112
|
placeholder: 'Type your question…',
|
|
113
|
-
theme: '
|
|
113
|
+
theme: 'auto',
|
|
114
114
|
colors: {
|
|
115
115
|
primary: {
|
|
116
116
|
default: '#2563eb',
|
package/dist/api/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyTool } from '../types';
|
|
1
|
+
import { AnyTool, Config } from '../types';
|
|
2
2
|
import { AssistantTurn, Turn, UserTurn } from './types';
|
|
3
3
|
export interface SendUserTurnCallbacks {
|
|
4
4
|
onAssistantTurnStart: () => void;
|
|
@@ -8,4 +8,7 @@ export interface SendUserTurnCallbacks {
|
|
|
8
8
|
onToolResult: (toolUseId: string, output: unknown, status: 'success' | 'error') => void;
|
|
9
9
|
}
|
|
10
10
|
export declare const sendUserTurn: (turn: UserTurn, tools: AnyTool[], callbacks: SendUserTurnCallbacks, signal?: AbortSignal) => Promise<void>;
|
|
11
|
+
export declare const getConfiguration: () => Promise<{
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
} & Pick<Config, "ui">>;
|
|
11
14
|
export declare const getConversationHistory: () => Promise<Turn[]>;
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyTool, Config, ToolRenderStatus } from '../types';
|
|
1
|
+
import { AnyTool, Config, ToolRenderStatus, UiConfig } from '../types';
|
|
2
2
|
export type { Config };
|
|
3
3
|
export interface TextDeltaData {
|
|
4
4
|
delta: string;
|
|
@@ -59,6 +59,17 @@ export interface UserTurnRequest {
|
|
|
59
59
|
tools?: ApiTool[];
|
|
60
60
|
stream: true;
|
|
61
61
|
}
|
|
62
|
+
export interface ConfigRequest {
|
|
63
|
+
accountId: string;
|
|
64
|
+
agentId: string;
|
|
65
|
+
action: 'getUIConfig';
|
|
66
|
+
}
|
|
67
|
+
export interface ConfigResponse {
|
|
68
|
+
accountId: string;
|
|
69
|
+
agentId: string;
|
|
70
|
+
tokenLimitReached?: boolean;
|
|
71
|
+
ui?: UiConfig;
|
|
72
|
+
}
|
|
62
73
|
export interface HistoryRequest {
|
|
63
74
|
accountId: string;
|
|
64
75
|
agentId: string;
|
package/dist/components/App.d.ts
CHANGED
|
@@ -14,8 +14,10 @@ interface AssistantContextValue {
|
|
|
14
14
|
updateToolUse: (toolUseId: string, patch: Partial<ToolUse<unknown, unknown>>) => void;
|
|
15
15
|
clearChat: () => void;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface AssistantProviderProps {
|
|
18
18
|
children: ComponentChildren;
|
|
19
|
-
|
|
19
|
+
initialTurns: Turn[];
|
|
20
|
+
}
|
|
21
|
+
export declare const AssistantProvider: FunctionalComponent<AssistantProviderProps>;
|
|
20
22
|
export declare const useAssistant: () => AssistantContextValue;
|
|
21
23
|
export {};
|