@hsafa/ui-sdk 0.4.9 → 0.5.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/index.d.cts CHANGED
@@ -182,6 +182,7 @@ interface HsafaChatProps {
182
182
  onFinish?: (message: any) => void;
183
183
  currentChat?: string;
184
184
  onChatChanged?: (chatId: string) => void;
185
+ templateParams?: Record<string, unknown>;
185
186
  }
186
187
  type EditProcessContent = {
187
188
  title?: string;
@@ -262,6 +263,8 @@ interface UseHsafaAgentConfig {
262
263
  controlledChatId?: string;
263
264
  /** Optional callback when chat id changes */
264
265
  onChatIdChange?: (chatId: string) => void;
266
+ /** Optional templating parameters merged into request body for server-side templating */
267
+ templateParams?: Record<string, any>;
265
268
  }
266
269
  interface HsafaAgentAPI {
267
270
  /** Current input text */
@@ -607,7 +610,7 @@ declare function HsafaProvider({ baseUrl, dir, theme, children }: HsafaProviderP
607
610
  */
608
611
  declare function useHsafa(): HsafaContextValue;
609
612
 
610
- declare function HsafaChat({ agentId, theme, primaryColor, primaryColorDark, primaryColorLight, backgroundColor, borderColor, textColor, accentColor, baseUrl, initialMessages, onMessagesChange, defaultOpen, floatingButtonPosition, HsafaTools, HsafaUI, componentAboveInput, editProcessContent, presetPrompts, onStart, onFinish, currentChat, onChatChanged, }: HsafaChatProps & {
613
+ declare function HsafaChat({ agentId, theme, primaryColor, primaryColorDark, primaryColorLight, backgroundColor, borderColor, textColor, accentColor, baseUrl, initialMessages, onMessagesChange, defaultOpen, floatingButtonPosition, HsafaTools, HsafaUI, componentAboveInput, editProcessContent, presetPrompts, onStart, onFinish, currentChat, onChatChanged, templateParams, }: HsafaChatProps & {
611
614
  baseUrl?: string;
612
615
  initialMessages?: any[];
613
616
  onMessagesChange?: (messages: any[], chatId?: string) => void;
package/dist/index.d.ts CHANGED
@@ -182,6 +182,7 @@ interface HsafaChatProps {
182
182
  onFinish?: (message: any) => void;
183
183
  currentChat?: string;
184
184
  onChatChanged?: (chatId: string) => void;
185
+ templateParams?: Record<string, unknown>;
185
186
  }
186
187
  type EditProcessContent = {
187
188
  title?: string;
@@ -262,6 +263,8 @@ interface UseHsafaAgentConfig {
262
263
  controlledChatId?: string;
263
264
  /** Optional callback when chat id changes */
264
265
  onChatIdChange?: (chatId: string) => void;
266
+ /** Optional templating parameters merged into request body for server-side templating */
267
+ templateParams?: Record<string, any>;
265
268
  }
266
269
  interface HsafaAgentAPI {
267
270
  /** Current input text */
@@ -607,7 +610,7 @@ declare function HsafaProvider({ baseUrl, dir, theme, children }: HsafaProviderP
607
610
  */
608
611
  declare function useHsafa(): HsafaContextValue;
609
612
 
610
- declare function HsafaChat({ agentId, theme, primaryColor, primaryColorDark, primaryColorLight, backgroundColor, borderColor, textColor, accentColor, baseUrl, initialMessages, onMessagesChange, defaultOpen, floatingButtonPosition, HsafaTools, HsafaUI, componentAboveInput, editProcessContent, presetPrompts, onStart, onFinish, currentChat, onChatChanged, }: HsafaChatProps & {
613
+ declare function HsafaChat({ agentId, theme, primaryColor, primaryColorDark, primaryColorLight, backgroundColor, borderColor, textColor, accentColor, baseUrl, initialMessages, onMessagesChange, defaultOpen, floatingButtonPosition, HsafaTools, HsafaUI, componentAboveInput, editProcessContent, presetPrompts, onStart, onFinish, currentChat, onChatChanged, templateParams, }: HsafaChatProps & {
611
614
  baseUrl?: string;
612
615
  initialMessages?: any[];
613
616
  onMessagesChange?: (messages: any[], chatId?: string) => void;