@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.
- package/dist/component/component.d.ts +20 -2
- package/dist/component/component.js +95 -80
- package/dist/intelliweave-wordpress.zip +0 -0
- package/dist/node/node.d.ts +21 -4
- package/dist/node/node.js +21 -21
- package/dist/react/react.d.ts +10 -0
- package/dist/react/react.js +53 -38
- package/dist/script-tag/script-tag.js +95 -80
- package/dist/webpack/index.d.ts +23 -4
- package/dist/webpack/index.js +48 -33
- package/package.json +3 -1
|
@@ -1023,6 +1023,10 @@ ConfigFormat extends ChatBaseConfig = ChatBaseConfig> {
|
|
|
1023
1023
|
resetConversation(): void;
|
|
1024
1024
|
/** Trim message list */
|
|
1025
1025
|
trimMessages(): Promise<void>;
|
|
1026
|
+
/** Extract the most useful provider error message from the OpenAI and Anthropic SDK error shapes. */
|
|
1027
|
+
protected getProviderErrorMessage(err: any): string;
|
|
1028
|
+
/** Wrap raw provider errors in a standard Error while preserving the original cause for debugging. */
|
|
1029
|
+
protected createProviderError(providerName: string, err: any): Error;
|
|
1026
1030
|
/** Register a tool. */
|
|
1027
1031
|
registerTool(tool: ChatBaseToolConfig): TokenWindowGroupItem<ChatBaseToolConfig>;
|
|
1028
1032
|
/** Find a tool based on the AI-safe name */
|
|
@@ -1124,6 +1128,8 @@ interface WebWeaverGPTConfig {
|
|
|
1124
1128
|
instructions?: string;
|
|
1125
1129
|
/** Introduction message, used in the automatic UI */
|
|
1126
1130
|
introductionMessage?: string;
|
|
1131
|
+
/** Hidden prompt that the built-in UI runs when the chat opens for the first time */
|
|
1132
|
+
autoStartPrompt?: string;
|
|
1127
1133
|
/** URL to the logo image to display in the chat UI */
|
|
1128
1134
|
logo?: string;
|
|
1129
1135
|
/** Background color or gradient or image for the chat UI */
|
|
@@ -1182,6 +1188,8 @@ interface WebWeaverGPTConfig {
|
|
|
1182
1188
|
onCreateProvider?: (config: ChatBaseConfig) => ChatBase;
|
|
1183
1189
|
/** Subagents */
|
|
1184
1190
|
subagents?: SubAgentConfig[];
|
|
1191
|
+
/** Configuration cache key */
|
|
1192
|
+
cacheKey?: string;
|
|
1185
1193
|
}
|
|
1186
1194
|
/** Configuration for the IntelliWeave initialization */
|
|
1187
1195
|
interface IntelliWeaveConfig extends Partial<WebWeaverGPTConfig> {
|
|
@@ -1376,6 +1384,8 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1376
1384
|
private _uiSessionStartTime?;
|
|
1377
1385
|
/** Embedded action blocks already handled for each streamed message section */
|
|
1378
1386
|
private _handledEmbeddedActionBlocks;
|
|
1387
|
+
/** True once the auto-start prompt has been sent for the current conversation */
|
|
1388
|
+
private _autoStartPromptHasRun;
|
|
1379
1389
|
/** If opened by mobile swipe from the collapsed tab, swipe-close should return to collapsed tab */
|
|
1380
1390
|
private _returnToCollapsedOnSwipeClose;
|
|
1381
1391
|
/** Suppress the next container click event (used after a swipe-close to prevent re-opening) */
|
|
@@ -1418,6 +1428,12 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1418
1428
|
private applyConfigStylesAndAttributes;
|
|
1419
1429
|
/** Called on update */
|
|
1420
1430
|
onUpdate(): void;
|
|
1431
|
+
/** Get the hidden auto-start prompt from attributes, global config, or the loaded hub config. */
|
|
1432
|
+
private getAutoStartPrompt;
|
|
1433
|
+
/** Wrap the creator's prompt so the model knows this is a hidden first-open instruction. */
|
|
1434
|
+
private buildAutoStartPromptMessage;
|
|
1435
|
+
/** Run the auto-start prompt if the chat is open, loaded, and has not already run. */
|
|
1436
|
+
private maybeRunAutoStartPrompt;
|
|
1421
1437
|
/** True when a config value explicitly enables a feature flag. */
|
|
1422
1438
|
private isTruthyFeatureFlag;
|
|
1423
1439
|
/** True when the current hub config or explicit attribute should remove the powered-by footer. */
|
|
@@ -1480,10 +1496,12 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1480
1496
|
private _isProcessing;
|
|
1481
1497
|
/** The element which will receive the current message from the AI */
|
|
1482
1498
|
currentOutputElement?: HTMLElement;
|
|
1483
|
-
/** Process input text from the user */
|
|
1484
|
-
processInput(inputText: string): Promise<void>;
|
|
1499
|
+
/** Process input text from the user. Set hideInputMessage to send a hidden prompt (e.g. the auto-start opener) without rendering a user bubble. */
|
|
1500
|
+
processInput(inputText: string, hideInputMessage?: boolean): Promise<void>;
|
|
1485
1501
|
/** Called when the AI responds with some text */
|
|
1486
1502
|
onAIMessage(messages: TokenWindowGroupItemParams<unknown>[], isPartial: boolean): Promise<void>;
|
|
1503
|
+
/** Convert markdown to HTML (remark-gfm enables GFM tables, strikethrough, etc.) */
|
|
1504
|
+
private renderMarkdown;
|
|
1487
1505
|
/** Updates a text element */
|
|
1488
1506
|
updateTextElement(elementID: string, text: string): boolean;
|
|
1489
1507
|
/** Execute supported hidden embedded actions from assistant text. */
|