@intelliweave/embedded 2.2.84 → 2.2.85
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/component/component.d.ts +18 -2
- package/dist/component/component.js +81 -77
- package/dist/intelliweave-wordpress.zip +0 -0
- package/dist/node/node.d.ts +19 -4
- package/dist/node/node.js +21 -21
- package/dist/react/react.d.ts +10 -0
- package/dist/react/react.js +39 -35
- package/dist/script-tag/script-tag.js +81 -77
- package/dist/webpack/index.d.ts +21 -4
- package/dist/webpack/index.js +34 -30
- package/package.json +3 -1
package/dist/webpack/index.d.ts
CHANGED
|
@@ -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,8 +1996,8 @@ 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>;
|
|
1987
2003
|
/** Updates a text element */
|
|
@@ -2022,6 +2038,7 @@ interface IntelliWeaveGlobalConfig {
|
|
|
2022
2038
|
debug?: boolean;
|
|
2023
2039
|
context?: string;
|
|
2024
2040
|
introductionMessage?: string;
|
|
2041
|
+
autoStartPrompt?: string;
|
|
2025
2042
|
introductionSuggestions?: string[];
|
|
2026
2043
|
knowledgeBase?: KnowledgeBaseItem[];
|
|
2027
2044
|
sources?: any[];
|
|
@@ -2040,8 +2057,6 @@ interface IntelliWeaveGlobalConfig {
|
|
|
2040
2057
|
positionX?: 'left' | 'right';
|
|
2041
2058
|
/** Vertical position: 'top' or 'bottom' (default: 'bottom') - only used when positioningMode is 'fixed' */
|
|
2042
2059
|
positionY?: 'top' | 'bottom';
|
|
2043
|
-
/** Extra data that will be passed to external knowledge base actions. */
|
|
2044
|
-
extra: any;
|
|
2045
2060
|
/** @deprecated Override the AI system context prefix. This should be controlled from the Hub now. */
|
|
2046
2061
|
pageSummary?: string | (() => string) | (() => Promise<string>);
|
|
2047
2062
|
/** List of knowledge base sources */
|
|
@@ -2299,6 +2314,8 @@ declare const WebWeaverUI: (props: {
|
|
|
2299
2314
|
context?: string;
|
|
2300
2315
|
/** 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
2316
|
introductionMessage?: string;
|
|
2317
|
+
/** Hidden prompt that runs when the user first opens the chat. Not needed since it's pulled from the Persona on the hub. */
|
|
2318
|
+
autoStartPrompt?: string;
|
|
2302
2319
|
/** Suggestion buttons to show on the first introduction message */
|
|
2303
2320
|
introductionSuggestions?: string[];
|
|
2304
2321
|
/** The knowledge base to add to the AI. */
|