@intelliweave/embedded 2.1.78 → 2.2.80
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/AGENTS.md +12 -0
- package/dist/component/component.d.ts +72 -1
- package/dist/component/component.js +825 -97
- package/dist/intelliweave-wordpress.zip +0 -0
- package/dist/node/node.d.ts +72 -1
- package/dist/node/node.js +23 -23
- package/dist/react/react.d.ts +4 -0
- package/dist/react/react.js +781 -53
- package/dist/script-tag/script-tag.js +825 -97
- package/dist/webpack/index.d.ts +72 -1
- package/dist/webpack/index.js +777 -49
- package/package.json +1 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# IntelliWeave SDK
|
|
2
|
+
IntelliWeave (formerly Web Weaver) is an AI management platform and SDK that allows users to set up AI in their apps and websites. The SDK (this project) is written in
|
|
3
|
+
TypeScript and uses Web Components for the built-in UI. Users of this SDK can choose to use the built-in UI or create their own custom UI by using the `IntelliWeave` class directly.
|
|
4
|
+
|
|
5
|
+
The `WebWeaverEmbed` class is the entry point for the built-in Web Component-based UI.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
- Do not use a linter, it has not been set up yet.
|
|
9
|
+
- Run `npm test` for testing code changes. The tests only cover logic, not UI. Due to the nature of older LLMs, sometimes the tests fail when the AI decides to behave differently. If you encounter this, run the test a second time to make sure.
|
|
10
|
+
- Follow existing code styling
|
|
11
|
+
- Make sure to include comments, even if they are redundant
|
|
12
|
+
- Prefer inline code instead of small functions where possible, unless the code will be extensively reused or is complex enough to warrant abstraction
|
|
@@ -1105,6 +1105,8 @@ interface BuiltInActionFlags {
|
|
|
1105
1105
|
allowChangeRoute?: boolean;
|
|
1106
1106
|
/** Allows the AI to craft an email and use mailto: link */
|
|
1107
1107
|
allowSendEmail?: boolean;
|
|
1108
|
+
/** Allows the AI to trigger hidden embedded emoji effects in the built-in UI */
|
|
1109
|
+
allowEmojiActions?: boolean;
|
|
1108
1110
|
/** Makes the AI only use information from knowledge bases, not general knowledge */
|
|
1109
1111
|
onlyUseKnowledgeBase?: boolean;
|
|
1110
1112
|
}
|
|
@@ -1144,6 +1146,8 @@ interface WebWeaverGPTConfig {
|
|
|
1144
1146
|
offsetX?: number;
|
|
1145
1147
|
/** Vertical offset from edge in pixels (default: 20) - only used when positioningMode is 'fixed' */
|
|
1146
1148
|
offsetY?: number;
|
|
1149
|
+
/** Custom brand name displayed in the panel header kicker (replaces "IntelliWeave"). */
|
|
1150
|
+
brandName?: string;
|
|
1147
1151
|
/** Identifier of an external app or service which manages this persona, if any. (eg. "chatterly") */
|
|
1148
1152
|
managedBy?: string;
|
|
1149
1153
|
/** Voice information */
|
|
@@ -1366,6 +1370,16 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1366
1370
|
private _previousOpenState;
|
|
1367
1371
|
/** Session start time for tracking UI session duration */
|
|
1368
1372
|
private _uiSessionStartTime?;
|
|
1373
|
+
/** Embedded action blocks already handled for each streamed message section */
|
|
1374
|
+
private _handledEmbeddedActionBlocks;
|
|
1375
|
+
/** If opened by mobile swipe from the collapsed tab, swipe-close should return to collapsed tab */
|
|
1376
|
+
private _returnToCollapsedOnSwipeClose;
|
|
1377
|
+
/** Suppress the next container click event (used after a swipe-close to prevent re-opening) */
|
|
1378
|
+
private _suppressNextContainerClick;
|
|
1379
|
+
/** Mobile swipe start point */
|
|
1380
|
+
private _swipeStart?;
|
|
1381
|
+
/** Previous fullscreen state for refreshing mobile scroll containment */
|
|
1382
|
+
private _previousFullscreenState;
|
|
1369
1383
|
/** Constructor */
|
|
1370
1384
|
constructor();
|
|
1371
1385
|
/** Content */
|
|
@@ -1385,10 +1399,14 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1385
1399
|
private _lastPositionY?;
|
|
1386
1400
|
private _lastOffsetX?;
|
|
1387
1401
|
private _lastOffsetY?;
|
|
1402
|
+
private _lastBrandName?;
|
|
1388
1403
|
/** Apply persona-based color variants as CSS variables */
|
|
1389
1404
|
private applyPersonaColorVariants;
|
|
1390
1405
|
/** Parse a color string to RGB (supports hex and rgb/rgba) */
|
|
1391
1406
|
private parseColorToRGB;
|
|
1407
|
+
/** Compute a complementary kicker color via hue-shift (+120°) from a given background color.
|
|
1408
|
+
* Returns null if the color cannot be parsed (so the CSS default is used). */
|
|
1409
|
+
private computeKickerColor;
|
|
1392
1410
|
/** Adjust inner container spacing based on logo aspect ratio */
|
|
1393
1411
|
private adjustLogoPadding;
|
|
1394
1412
|
/** Apply UI styles from config and attributes, prioritizing attributes */
|
|
@@ -1399,6 +1417,48 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1399
1417
|
onDestroy(): void;
|
|
1400
1418
|
/** Called when the container is clicked */
|
|
1401
1419
|
onContainerClick(e: Event): void;
|
|
1420
|
+
/** Open from the floating dock button */
|
|
1421
|
+
onDockOpenClick(e: Event): void;
|
|
1422
|
+
/** Collapse the floating dock into a side tab */
|
|
1423
|
+
onDockCollapseClick(e: Event): void;
|
|
1424
|
+
/** Open from the collapsed side tab — show the dock/circle view first, not the full chat */
|
|
1425
|
+
onCollapsedOpenClick(e: Event): void;
|
|
1426
|
+
/** Collapse from the panel header */
|
|
1427
|
+
onPanelCollapseClick(e: Event): void;
|
|
1428
|
+
/** Toggle fullscreen state for widget layout */
|
|
1429
|
+
onPanelFullscreenClick(e: Event): void;
|
|
1430
|
+
/** Close the panel */
|
|
1431
|
+
onPanelCloseClick(e: Event): void;
|
|
1432
|
+
/** True if the UI cannot be manually closed/collapsed */
|
|
1433
|
+
private isForcedOpen;
|
|
1434
|
+
/** Open the normal panel from the dock button */
|
|
1435
|
+
private openFromDock;
|
|
1436
|
+
/** Refresh the chat scroller after fullscreen transitions, especially for iOS momentum scroll. */
|
|
1437
|
+
private refreshContentScrollability;
|
|
1438
|
+
/** Show the dock/circle view from the collapsed tab (without opening chat) */
|
|
1439
|
+
private showDockFromCollapsed;
|
|
1440
|
+
/** Open the panel from the collapsed tab */
|
|
1441
|
+
private openFromCollapsed;
|
|
1442
|
+
/** Close the panel, returning to the side tab when opened from the tab by swipe */
|
|
1443
|
+
private closePanel;
|
|
1444
|
+
/** Collapse the whole dock into the side tab */
|
|
1445
|
+
private collapseDock;
|
|
1446
|
+
/** Track pointer start for mobile horizontal swipe gestures */
|
|
1447
|
+
onSwipePointerDown(e: PointerEvent): void;
|
|
1448
|
+
/** Reset swipe tracking */
|
|
1449
|
+
onSwipePointerCancel(): void;
|
|
1450
|
+
/** Direction that moves into the viewport from the dock side. */
|
|
1451
|
+
private inwardSwipeDirection;
|
|
1452
|
+
/** Direction that moves back out toward the dock side. */
|
|
1453
|
+
private outwardSwipeDirection;
|
|
1454
|
+
/** True when a pointer release was a horizontal swipe in the requested direction */
|
|
1455
|
+
private didSwipe;
|
|
1456
|
+
/** Open the collapsed tab on mobile inward-swipe */
|
|
1457
|
+
onCollapsedSwipePointerUp(e: PointerEvent): void;
|
|
1458
|
+
/** Open the dock on mobile inward-swipe */
|
|
1459
|
+
onDockSwipePointerUp(e: PointerEvent): void;
|
|
1460
|
+
/** Close the panel on mobile outward-swipe */
|
|
1461
|
+
onPanelSwipePointerUp(e: PointerEvent): void;
|
|
1402
1462
|
/** Called when the logo is clicked */
|
|
1403
1463
|
onLogoClick(e: Event): void;
|
|
1404
1464
|
/** Open the interaction panel */
|
|
@@ -1416,7 +1476,17 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1416
1476
|
/** Called when the AI responds with some text */
|
|
1417
1477
|
onAIMessage(messages: TokenWindowGroupItemParams<unknown>[], isPartial: boolean): Promise<void>;
|
|
1418
1478
|
/** Updates a text element */
|
|
1419
|
-
updateTextElement(elementID: string, text: string):
|
|
1479
|
+
updateTextElement(elementID: string, text: string): boolean;
|
|
1480
|
+
/** Execute supported hidden embedded actions from assistant text. */
|
|
1481
|
+
private runEmbeddedAction;
|
|
1482
|
+
/** Clamp unknown AI-provided numeric values before using them in the DOM. */
|
|
1483
|
+
private clampNumber;
|
|
1484
|
+
/** Keep AI-provided emoji text short enough to render safely as a visual effect. */
|
|
1485
|
+
private normalizeEmojiActionValue;
|
|
1486
|
+
/** Keep AI-provided suggestion text short enough to render safely as a button. */
|
|
1487
|
+
private normalizeSuggestionActionValue;
|
|
1488
|
+
/** Render a bounded burst of emoji particles in the embed overlay. */
|
|
1489
|
+
private showEmojiBurst;
|
|
1420
1490
|
/** Updates an info block element */
|
|
1421
1491
|
updateInfoElement(elementID: string, text: string, iconType: string): void;
|
|
1422
1492
|
/** Called when a suggestion button is clicked */
|
|
@@ -1427,6 +1497,7 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1427
1497
|
onContentScroll(e: Event): void;
|
|
1428
1498
|
/** Displays whitelabeled branding for known apps */
|
|
1429
1499
|
private updateBrandingFor;
|
|
1500
|
+
private updateBrandingText;
|
|
1430
1501
|
}
|
|
1431
1502
|
|
|
1432
1503
|
/**
|