@intelliweave/embedded 2.2.84 → 2.2.86

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.
@@ -768,6 +768,10 @@ ConfigFormat extends ChatBaseConfig = ChatBaseConfig> {
768
768
  resetConversation(): void;
769
769
  /** Trim message list */
770
770
  trimMessages(): Promise<void>;
771
+ /** Extract the most useful provider error message from the OpenAI and Anthropic SDK error shapes. */
772
+ protected getProviderErrorMessage(err: any): string;
773
+ /** Wrap raw provider errors in a standard Error while preserving the original cause for debugging. */
774
+ protected createProviderError(providerName: string, err: any): Error;
771
775
  /** Register a tool. */
772
776
  registerTool(tool: ChatBaseToolConfig): TokenWindowGroupItem<ChatBaseToolConfig>;
773
777
  /** Find a tool based on the AI-safe name */
@@ -869,6 +873,8 @@ interface WebWeaverGPTConfig {
869
873
  instructions?: string;
870
874
  /** Introduction message, used in the automatic UI */
871
875
  introductionMessage?: string;
876
+ /** Hidden prompt that the built-in UI runs when the chat opens for the first time */
877
+ autoStartPrompt?: string;
872
878
  /** URL to the logo image to display in the chat UI */
873
879
  logo?: string;
874
880
  /** Background color or gradient or image for the chat UI */
@@ -927,6 +933,8 @@ interface WebWeaverGPTConfig {
927
933
  onCreateProvider?: (config: ChatBaseConfig) => ChatBase;
928
934
  /** Subagents */
929
935
  subagents?: SubAgentConfig[];
936
+ /** Configuration cache key */
937
+ cacheKey?: string;
930
938
  }
931
939
  /** Configuration for the IntelliWeave initialization */
932
940
  interface IntelliWeaveConfig extends Partial<WebWeaverGPTConfig> {
@@ -1876,6 +1884,8 @@ declare class WebWeaverEmbed extends BaseComponent {
1876
1884
  private _uiSessionStartTime?;
1877
1885
  /** Embedded action blocks already handled for each streamed message section */
1878
1886
  private _handledEmbeddedActionBlocks;
1887
+ /** True once the auto-start prompt has been sent for the current conversation */
1888
+ private _autoStartPromptHasRun;
1879
1889
  /** If opened by mobile swipe from the collapsed tab, swipe-close should return to collapsed tab */
1880
1890
  private _returnToCollapsedOnSwipeClose;
1881
1891
  /** Suppress the next container click event (used after a swipe-close to prevent re-opening) */
@@ -1918,6 +1928,12 @@ declare class WebWeaverEmbed extends BaseComponent {
1918
1928
  private applyConfigStylesAndAttributes;
1919
1929
  /** Called on update */
1920
1930
  onUpdate(): void;
1931
+ /** Get the hidden auto-start prompt from attributes, global config, or the loaded hub config. */
1932
+ private getAutoStartPrompt;
1933
+ /** Wrap the creator's prompt so the model knows this is a hidden first-open instruction. */
1934
+ private buildAutoStartPromptMessage;
1935
+ /** Run the auto-start prompt if the chat is open, loaded, and has not already run. */
1936
+ private maybeRunAutoStartPrompt;
1921
1937
  /** True when a config value explicitly enables a feature flag. */
1922
1938
  private isTruthyFeatureFlag;
1923
1939
  /** True when the current hub config or explicit attribute should remove the powered-by footer. */
@@ -1980,10 +1996,12 @@ declare class WebWeaverEmbed extends BaseComponent {
1980
1996
  private _isProcessing;
1981
1997
  /** The element which will receive the current message from the AI */
1982
1998
  currentOutputElement?: HTMLElement;
1983
- /** Process input text from the user */
1984
- processInput(inputText: string): Promise<void>;
1999
+ /** Process input text from the user. Set hideInputMessage to send a hidden prompt (e.g. the auto-start opener) without rendering a user bubble. */
2000
+ processInput(inputText: string, hideInputMessage?: boolean): Promise<void>;
1985
2001
  /** Called when the AI responds with some text */
1986
2002
  onAIMessage(messages: TokenWindowGroupItemParams<unknown>[], isPartial: boolean): Promise<void>;
2003
+ /** Convert markdown to HTML (remark-gfm enables GFM tables, strikethrough, etc.) */
2004
+ private renderMarkdown;
1987
2005
  /** Updates a text element */
1988
2006
  updateTextElement(elementID: string, text: string): boolean;
1989
2007
  /** Execute supported hidden embedded actions from assistant text. */
@@ -2022,6 +2040,7 @@ interface IntelliWeaveGlobalConfig {
2022
2040
  debug?: boolean;
2023
2041
  context?: string;
2024
2042
  introductionMessage?: string;
2043
+ autoStartPrompt?: string;
2025
2044
  introductionSuggestions?: string[];
2026
2045
  knowledgeBase?: KnowledgeBaseItem[];
2027
2046
  sources?: any[];
@@ -2040,8 +2059,6 @@ interface IntelliWeaveGlobalConfig {
2040
2059
  positionX?: 'left' | 'right';
2041
2060
  /** Vertical position: 'top' or 'bottom' (default: 'bottom') - only used when positioningMode is 'fixed' */
2042
2061
  positionY?: 'top' | 'bottom';
2043
- /** Extra data that will be passed to external knowledge base actions. */
2044
- extra: any;
2045
2062
  /** @deprecated Override the AI system context prefix. This should be controlled from the Hub now. */
2046
2063
  pageSummary?: string | (() => string) | (() => Promise<string>);
2047
2064
  /** List of knowledge base sources */
@@ -2299,6 +2316,8 @@ declare const WebWeaverUI: (props: {
2299
2316
  context?: string;
2300
2317
  /** The introduction message to show when the user first opens the chat. Not needed since it's pulled from the Persona on the hub. */
2301
2318
  introductionMessage?: string;
2319
+ /** Hidden prompt that runs when the user first opens the chat. Not needed since it's pulled from the Persona on the hub. */
2320
+ autoStartPrompt?: string;
2302
2321
  /** Suggestion buttons to show on the first introduction message */
2303
2322
  introductionSuggestions?: string[];
2304
2323
  /** The knowledge base to add to the AI. */