@promptbook/components 0.112.0-51 → 0.112.0-53
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/esm/index.es.js +58 -46
- package/esm/index.es.js.map +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +58 -46
- package/umd/index.umd.js.map +1 -1
- package/umd/src/version.d.ts +1 -1
package/esm/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-52`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* @generated
|
|
31
31
|
* @see https://github.com/webgptorg/promptbook
|
|
32
32
|
*/
|
|
33
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
33
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-53';
|
|
34
34
|
/**
|
|
35
35
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
36
36
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -13549,9 +13549,7 @@
|
|
|
13549
13549
|
const searchEngine = new SerpSearchEngine();
|
|
13550
13550
|
const results = await searchEngine.search(query, searchOptions);
|
|
13551
13551
|
return spacetrim.spaceTrim((block) => `
|
|
13552
|
-
${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0
|
|
13553
|
-
? ''
|
|
13554
|
-
: ` with options ${JSON.stringify(searchOptions)}`}:
|
|
13552
|
+
${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0 ? '' : ` with options ${JSON.stringify(searchOptions)}`}:
|
|
13555
13553
|
|
|
13556
13554
|
${block(results
|
|
13557
13555
|
.map((result) => spacetrim.spaceTrim(`
|
|
@@ -18269,8 +18267,9 @@
|
|
|
18269
18267
|
iconName = 'SquareArrowUpRight';
|
|
18270
18268
|
}
|
|
18271
18269
|
if (isVoidPseudoAgentReference(reference)) {
|
|
18272
|
-
label = VOID_PSEUDO_AGENT_REFERENCE;
|
|
18270
|
+
label = VOID_PSEUDO_AGENT_REFERENCE; // <- {Void} label
|
|
18273
18271
|
iconName = 'ShieldAlert';
|
|
18272
|
+
return null; // <- Note: Do not show `{Void}` in capabilities, it's only used for internal logic
|
|
18274
18273
|
}
|
|
18275
18274
|
return {
|
|
18276
18275
|
type: 'inheritance',
|
|
@@ -22572,7 +22571,8 @@
|
|
|
22572
22571
|
if (currentSnapshot.lastMessageSender === 'USER' || !currentSnapshot.isLastMessageComplete) {
|
|
22573
22572
|
return;
|
|
22574
22573
|
}
|
|
22575
|
-
const isSameMessageCompletionTransition = previousSnapshot.lastMessageKey === currentSnapshot.lastMessageKey &&
|
|
22574
|
+
const isSameMessageCompletionTransition = previousSnapshot.lastMessageKey === currentSnapshot.lastMessageKey &&
|
|
22575
|
+
!previousSnapshot.isLastMessageComplete;
|
|
22576
22576
|
const isCompletedReplyAppended = previousSnapshot.lastMessageSender === 'USER' &&
|
|
22577
22577
|
areMessageKeyListsSequentialPrefix(previousSnapshot.messageKeys, currentSnapshot.messageKeys);
|
|
22578
22578
|
const isIncompletePlaceholderReplacedByCompletedReply = !previousSnapshot.isLastMessageComplete &&
|
|
@@ -26459,8 +26459,7 @@
|
|
|
26459
26459
|
const surfaceWave = Math.sin(angle * 3 + shapePhase + timeMs / 1200) * 0.62 +
|
|
26460
26460
|
Math.sin(angle * 5 - shapePhase * 0.7 - timeMs / 910) * 0.38;
|
|
26461
26461
|
const breathingWave = Math.sin(timeMs / 960 + shapePhase + angle * 0.45) * wobbleAmplitude;
|
|
26462
|
-
const radius = bodyRadius *
|
|
26463
|
-
(1 + upperFactor * 0.12 + lowerFactor * 0.08 + surfaceWave * 0.05) +
|
|
26462
|
+
const radius = bodyRadius * (1 + upperFactor * 0.12 + lowerFactor * 0.08 + surfaceWave * 0.05) +
|
|
26464
26463
|
tentacleWave +
|
|
26465
26464
|
breathingWave;
|
|
26466
26465
|
return {
|
|
@@ -26515,7 +26514,9 @@
|
|
|
26515
26514
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26516
26515
|
const { size, centerX, centerY, bodyRadius, horizontalStretch, tentacleCount, shapePhase, createRandom, timeMs, saltPrefix, bodyPoints, variation, } = options;
|
|
26517
26516
|
const baseY = centerY + bodyRadius * 0.74;
|
|
26518
|
-
const lowerBodyAnchorPoints = bodyPoints
|
|
26517
|
+
const lowerBodyAnchorPoints = bodyPoints
|
|
26518
|
+
? resolveTentacleBodyAnchorPoints(bodyPoints, centerY + bodyRadius * 0.04)
|
|
26519
|
+
: null;
|
|
26519
26520
|
const flowLengthScale = (_a = variation === null || variation === void 0 ? void 0 : variation.flowLengthScale) !== null && _a !== void 0 ? _a : 1;
|
|
26520
26521
|
const lateralReachScale = (_b = variation === null || variation === void 0 ? void 0 : variation.lateralReachScale) !== null && _b !== void 0 ? _b : 1;
|
|
26521
26522
|
const tipReachScale = (_c = variation === null || variation === void 0 ? void 0 : variation.tipReachScale) !== null && _c !== void 0 ? _c : 1;
|
|
@@ -26592,7 +26593,9 @@
|
|
|
26592
26593
|
* @private shared geometry helper of `octopus3AvatarVisual`
|
|
26593
26594
|
*/
|
|
26594
26595
|
function resolveTentacleBodyAnchorPoints(bodyPoints, lowerBodyThresholdY) {
|
|
26595
|
-
const lowerBodyPoints = bodyPoints
|
|
26596
|
+
const lowerBodyPoints = bodyPoints
|
|
26597
|
+
.filter((bodyPoint) => bodyPoint.y >= lowerBodyThresholdY)
|
|
26598
|
+
.sort((leftPoint, rightPoint) => leftPoint.x - rightPoint.x);
|
|
26596
26599
|
if (lowerBodyPoints.length >= 2) {
|
|
26597
26600
|
return lowerBodyPoints;
|
|
26598
26601
|
}
|
|
@@ -26660,8 +26663,7 @@
|
|
|
26660
26663
|
const tangentX = nextPoint.x - previousPoint.x;
|
|
26661
26664
|
const tangentY = nextPoint.y - previousPoint.y;
|
|
26662
26665
|
const tangentLength = Math.hypot(tangentX, tangentY) || 1;
|
|
26663
|
-
const width = tentacleShape.baseWidth +
|
|
26664
|
-
(tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
26666
|
+
const width = tentacleShape.baseWidth + (tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
26665
26667
|
return {
|
|
26666
26668
|
x: point.x,
|
|
26667
26669
|
y: point.y,
|
|
@@ -26686,10 +26688,8 @@
|
|
|
26686
26688
|
const autonomousOffsetY = Math.cos(timeMs / 940 + phase) * radiusY * autonomousDriftRatioY;
|
|
26687
26689
|
const interactionBlend = Math.min(1, interaction.intensity * 0.9);
|
|
26688
26690
|
return {
|
|
26689
|
-
pupilOffsetX: autonomousOffsetX * (1 - interactionBlend) +
|
|
26690
|
-
|
|
26691
|
-
pupilOffsetY: autonomousOffsetY * (1 - interactionBlend) +
|
|
26692
|
-
interaction.gazeY * radiusY * (0.16 + interactionBlend * 0.16),
|
|
26691
|
+
pupilOffsetX: autonomousOffsetX * (1 - interactionBlend) + interaction.gazeX * radiusX * (0.18 + interactionBlend * 0.18),
|
|
26692
|
+
pupilOffsetY: autonomousOffsetY * (1 - interactionBlend) + interaction.gazeY * radiusY * (0.16 + interactionBlend * 0.16),
|
|
26693
26693
|
};
|
|
26694
26694
|
}
|
|
26695
26695
|
/**
|
|
@@ -26736,7 +26736,7 @@
|
|
|
26736
26736
|
*
|
|
26737
26737
|
* @private helper of `asciiOctopusAvatarVisual`
|
|
26738
26738
|
*/
|
|
26739
|
-
const ATMOSPHERE_GLYPHS = ['.', ':', '
|
|
26739
|
+
const ATMOSPHERE_GLYPHS = ['.', ':', "'", '`'];
|
|
26740
26740
|
/**
|
|
26741
26741
|
* AsciiOctopus avatar visual.
|
|
26742
26742
|
*
|
|
@@ -26843,7 +26843,9 @@
|
|
|
26843
26843
|
return resolveAtmosphereGlyph(point, layout, palette, noise, timeMs);
|
|
26844
26844
|
}
|
|
26845
26845
|
const isInsideBody = isPointInsidePolygon(point, layout.bodyPoints);
|
|
26846
|
-
const bodyEdgeDistance = isInsideBody
|
|
26846
|
+
const bodyEdgeDistance = isInsideBody
|
|
26847
|
+
? getDistanceToPolyline(point, layout.bodyPoints, true)
|
|
26848
|
+
: Number.POSITIVE_INFINITY;
|
|
26847
26849
|
const tentacleCoverage = measureTentacleCoverage(point, layout.sampledTentacles, cellWidth);
|
|
26848
26850
|
if (isInsideBody || tentacleCoverage) {
|
|
26849
26851
|
return resolveOctopusSurfaceGlyph({
|
|
@@ -26920,7 +26922,8 @@
|
|
|
26920
26922
|
if (mouthDistance > cellHeight * 0.38) {
|
|
26921
26923
|
return null;
|
|
26922
26924
|
}
|
|
26923
|
-
const horizontalProgress = clamp01((point.x - layout.mouthPoints[0].x) /
|
|
26925
|
+
const horizontalProgress = clamp01((point.x - layout.mouthPoints[0].x) /
|
|
26926
|
+
(layout.mouthPoints[layout.mouthPoints.length - 1].x - layout.mouthPoints[0].x));
|
|
26924
26927
|
let character = '-';
|
|
26925
26928
|
if (horizontalProgress < 0.28) {
|
|
26926
26929
|
character = '\\';
|
|
@@ -26945,7 +26948,7 @@
|
|
|
26945
26948
|
* @private helper of `asciiOctopusAvatarVisual`
|
|
26946
26949
|
*/
|
|
26947
26950
|
function resolveOctopusSurfaceGlyph(options) {
|
|
26948
|
-
const { point, layout, palette, isInsideBody, bodyEdgeDistance, tentacleCoverage, cellHeight, noise, timeMs
|
|
26951
|
+
const { point, layout, palette, isInsideBody, bodyEdgeDistance, tentacleCoverage, cellHeight, noise, timeMs } = options;
|
|
26949
26952
|
const isTentacleDominant = tentacleCoverage !== null && (!isInsideBody || point.y > layout.centerY + layout.bodyRadius * 0.08);
|
|
26950
26953
|
if (isTentacleDominant && tentacleCoverage) {
|
|
26951
26954
|
const isSuckerBand = tentacleCoverage.progress > 0.24 && tentacleCoverage.progress < 0.82 && noise > 0.78;
|
|
@@ -27116,7 +27119,9 @@
|
|
|
27116
27119
|
};
|
|
27117
27120
|
const mouthPoints = sampleQuadraticBezierPoints({ x: centerX - size * 0.074, y: centerY + size * 0.092 }, {
|
|
27118
27121
|
x: centerX,
|
|
27119
|
-
y: centerY +
|
|
27122
|
+
y: centerY +
|
|
27123
|
+
size * (0.142 + Math.sin(timeMs / 620 + shapePhase) * 0.016) +
|
|
27124
|
+
interaction.gazeY * size * 0.012,
|
|
27120
27125
|
}, { x: centerX + size * 0.074, y: centerY + size * 0.092 }, 12);
|
|
27121
27126
|
let leftBound = Number.POSITIVE_INFINITY;
|
|
27122
27127
|
let rightBound = Number.NEGATIVE_INFINITY;
|
|
@@ -27378,8 +27383,7 @@
|
|
|
27378
27383
|
size,
|
|
27379
27384
|
centerX: centerX + (layerRandom() - 0.5) * size * 0.08,
|
|
27380
27385
|
centerY: centerY + (layerRandom() - 0.5) * size * 0.08,
|
|
27381
|
-
rotation: layerRandom() * Math.PI * 2 +
|
|
27382
|
-
Math.sin(timeMs / (1700 + layerIndex * 280) + layerIndex) * 0.14,
|
|
27386
|
+
rotation: layerRandom() * Math.PI * 2 + Math.sin(timeMs / (1700 + layerIndex * 280) + layerIndex) * 0.14,
|
|
27383
27387
|
scale: size * (0.19 + layerIndex * 0.055 + layerRandom() * 0.045),
|
|
27384
27388
|
horizontalStretch: 0.74 + layerRandom() * 0.9,
|
|
27385
27389
|
verticalStretch: 0.74 + layerRandom() * 0.9,
|
|
@@ -27448,7 +27452,14 @@
|
|
|
27448
27452
|
function createDragonCurveTurns(order) {
|
|
27449
27453
|
let turns = [];
|
|
27450
27454
|
for (let iteration = 0; iteration < order; iteration++) {
|
|
27451
|
-
turns = [
|
|
27455
|
+
turns = [
|
|
27456
|
+
...turns,
|
|
27457
|
+
1,
|
|
27458
|
+
...turns
|
|
27459
|
+
.slice()
|
|
27460
|
+
.reverse()
|
|
27461
|
+
.map((turn) => (turn === 1 ? -1 : 1)),
|
|
27462
|
+
];
|
|
27452
27463
|
}
|
|
27453
27464
|
return turns;
|
|
27454
27465
|
}
|
|
@@ -27492,7 +27503,7 @@
|
|
|
27492
27503
|
* @private helper of `fractalAvatarVisual`
|
|
27493
27504
|
*/
|
|
27494
27505
|
function transformDragonCurvePoints(points, options) {
|
|
27495
|
-
const { size, centerX, centerY, rotation, scale, horizontalStretch, verticalStretch, warpAmplitude, warpPhase, mirrorX, mirrorY, timeMs } = options;
|
|
27506
|
+
const { size, centerX, centerY, rotation, scale, horizontalStretch, verticalStretch, warpAmplitude, warpPhase, mirrorX, mirrorY, timeMs, } = options;
|
|
27496
27507
|
const bounds = getPointBounds(points);
|
|
27497
27508
|
const width = Math.max(1, bounds.maxX - bounds.minX);
|
|
27498
27509
|
const height = Math.max(1, bounds.maxY - bounds.minY);
|
|
@@ -27509,7 +27520,10 @@
|
|
|
27509
27520
|
const rotatedY = normalizedX * sine + normalizedY * cosine;
|
|
27510
27521
|
return {
|
|
27511
27522
|
x: centerX + rotatedX + Math.sin(progress * Math.PI * 2 + warpPhase) * localWarp,
|
|
27512
|
-
y: centerY +
|
|
27523
|
+
y: centerY +
|
|
27524
|
+
rotatedY +
|
|
27525
|
+
Math.cos(progress * Math.PI * 3 + warpPhase * 0.6) * localWarp +
|
|
27526
|
+
(progress - 0.5) * size * 0.02,
|
|
27513
27527
|
};
|
|
27514
27528
|
});
|
|
27515
27529
|
}
|
|
@@ -28696,8 +28710,7 @@
|
|
|
28696
28710
|
const tangentLength = Math.hypot(tangentX, tangentY) || 1;
|
|
28697
28711
|
const normalX = (-tangentY / tangentLength) * undersideDirection;
|
|
28698
28712
|
const normalY = (tangentX / tangentLength) * undersideDirection;
|
|
28699
|
-
const width = tentacleShape.baseWidth +
|
|
28700
|
-
(tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
28713
|
+
const width = tentacleShape.baseWidth + (tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
28701
28714
|
const suckerX = point.x + normalX * width * 0.52;
|
|
28702
28715
|
const suckerY = point.y + normalY * width * 0.52;
|
|
28703
28716
|
const rotation = Math.atan2(normalY, normalX);
|
|
@@ -28735,7 +28748,8 @@
|
|
|
28735
28748
|
context.moveTo(centerX + horizontalOffset * 0.3, centerY - size * (0.11 + morphologyProfile.body.verticalStretch * 0.02));
|
|
28736
28749
|
context.bezierCurveTo(centerX + horizontalOffset - sway * 0.25, centerY - size * 0.04, centerX + horizontalOffset + sway, centerY + size * 0.06, centerX + horizontalOffset * 0.7 + sway * 0.46, centerY + size * (0.16 + morphologyProfile.body.verticalStretch * 0.035));
|
|
28737
28750
|
context.strokeStyle = currentIndex % 2 === 0 ? `${palette.highlight}30` : `${palette.accent}26`;
|
|
28738
|
-
context.lineWidth =
|
|
28751
|
+
context.lineWidth =
|
|
28752
|
+
size * (0.0075 + currentIndex * 0.00065 + morphologyProfile.tentacles.baseWidthScale * 0.0005);
|
|
28739
28753
|
context.lineCap = 'round';
|
|
28740
28754
|
context.stroke();
|
|
28741
28755
|
}
|
|
@@ -28895,7 +28909,10 @@
|
|
|
28895
28909
|
: rowIndex > pixelGridSize - emblemHeight - 1
|
|
28896
28910
|
? colorStops.length
|
|
28897
28911
|
: 3)))];
|
|
28898
|
-
if (columnIndex === 0 &&
|
|
28912
|
+
if (columnIndex === 0 &&
|
|
28913
|
+
rowIndex >= cheekInset &&
|
|
28914
|
+
rowIndex <= pixelGridSize - cheekInset - 1 &&
|
|
28915
|
+
random() < 0.4) {
|
|
28899
28916
|
continue;
|
|
28900
28917
|
}
|
|
28901
28918
|
drawPixel(context, panelX + columnIndex * pixelSize, panelY + rowIndex * pixelSize, pixelSize, color);
|
|
@@ -29047,7 +29064,7 @@
|
|
|
29047
29064
|
* @private shared component for in-repository avatar previews
|
|
29048
29065
|
*/
|
|
29049
29066
|
function Avatar(props) {
|
|
29050
|
-
const { avatarDefinition, visualId, surface = 'framed', size = DEFAULT_AVATAR_SIZE, title, className, style } = props;
|
|
29067
|
+
const { avatarDefinition, visualId, surface = 'framed', size = DEFAULT_AVATAR_SIZE, title, className, style, } = props;
|
|
29051
29068
|
const canvasRef = react.useRef(null);
|
|
29052
29069
|
const animationStartRef = react.useRef(null);
|
|
29053
29070
|
const interactionRuntimeStateRef = react.useRef(createAvatarInteractionRuntimeState());
|
|
@@ -29150,14 +29167,7 @@
|
|
|
29150
29167
|
releaseAnimationListener();
|
|
29151
29168
|
releasePointerTracking === null || releasePointerTracking === void 0 ? void 0 : releasePointerTracking();
|
|
29152
29169
|
};
|
|
29153
|
-
}, [
|
|
29154
|
-
avatarDefinitionKey,
|
|
29155
|
-
isVisible,
|
|
29156
|
-
resolvedAvatarRenderDefinition,
|
|
29157
|
-
size,
|
|
29158
|
-
surface,
|
|
29159
|
-
visualId,
|
|
29160
|
-
]);
|
|
29170
|
+
}, [avatarDefinitionKey, isVisible, resolvedAvatarRenderDefinition, size, surface, visualId]);
|
|
29161
29171
|
return (jsxRuntime.jsx("canvas", { ref: canvasRef, title: title || `${resolvedAvatarRenderDefinition.avatarDefinition.agentName} avatar`, className: className, style: {
|
|
29162
29172
|
width: size,
|
|
29163
29173
|
height: size,
|
|
@@ -39891,7 +39901,9 @@
|
|
|
39891
39901
|
* @private helper of `OpenAiAgentKitExecutionTools`
|
|
39892
39902
|
*/
|
|
39893
39903
|
function buildDeepSearchToolInput(rawInput) {
|
|
39894
|
-
const input = rawInput && typeof rawInput === 'object'
|
|
39904
|
+
const input = rawInput && typeof rawInput === 'object'
|
|
39905
|
+
? rawInput
|
|
39906
|
+
: {};
|
|
39895
39907
|
const query = typeof input.query === 'string' ? input.query.trim() : '';
|
|
39896
39908
|
const additionalHints = Object.entries(input)
|
|
39897
39909
|
.filter(([key, value]) => key !== 'query' && value !== undefined && value !== null && String(value).trim() !== '')
|
|
@@ -42332,8 +42344,7 @@
|
|
|
42332
42344
|
console.info('[🤰]', 'Prepared OpenAI Assistant prompt', {
|
|
42333
42345
|
agent: this.title,
|
|
42334
42346
|
toolNames: (_b = (_a = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.tools) === null || _a === void 0 ? void 0 : _a.map((tool) => tool.name)) !== null && _b !== void 0 ? _b : [],
|
|
42335
|
-
knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements
|
|
42336
|
-
.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
|
|
42347
|
+
knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
|
|
42337
42348
|
});
|
|
42338
42349
|
}
|
|
42339
42350
|
return assistant.callChatModelStream(promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools, options.onProgress, options.streamOptions);
|
|
@@ -47613,9 +47624,7 @@
|
|
|
47613
47624
|
borderRadius: '50%',
|
|
47614
47625
|
} })), isAvatarTooltipVisible && (participant === null || participant === void 0 ? void 0 : participant.agentSource) && avatarTooltipPosition && (jsxRuntime.jsx(AvatarProfileTooltip, { ref: tooltipRef, agentSource: participant.agentSource, position: avatarTooltipPosition }))] })), jsxRuntime.jsxs("div", { className: classNames(styles$5.messageStack, chatCssClassNames.messageStack), children: [shouldShowParticipantLabel && participantLabel && (jsxRuntime.jsx("div", { className: styles$5.participantLabel, children: participantLabel })), jsxRuntime.jsxs("div", { className: classNames(styles$5.messageText, isReplyActionEnabled && styles$5.replyEnabledMessageText, isReplySwipeArmed && styles$5.replySwipeActive, isAgentArticleMode && styles$5.articleModeAgentMessageText, chatCssClassNames.messageContent), style: {
|
|
47615
47626
|
'--message-bg-color': isAgentArticleMode ? articleModeBackgroundColor : color.toHex(),
|
|
47616
|
-
'--message-text-color': isAgentArticleMode
|
|
47617
|
-
? articleModeTextColor
|
|
47618
|
-
: colorOfText.toHex(),
|
|
47627
|
+
'--message-text-color': isAgentArticleMode ? articleModeTextColor : colorOfText.toHex(),
|
|
47619
47628
|
'--chat-message-swipe-offset': swipeTranslation,
|
|
47620
47629
|
}, onPointerDown: handleReplyPointerDown, onPointerMove: handleReplyPointerMove, onPointerUp: handleReplyPointerEnd, onPointerCancel: resetReplySwipe, children: [isReplyActionEnabled && (jsxRuntime.jsx("div", { className: classNames(styles$5.replySwipeIndicator, isMe && styles$5.replySwipeIndicatorRight, isReplySwipeArmed && styles$5.replySwipeIndicatorActive), "aria-hidden": "true", children: jsxRuntime.jsx(lucideReact.Reply, { className: styles$5.replySwipeIndicatorIcon }) })), !shouldRenderArticleActionsBar && renderMessageReadAndCopyControls(), message.isVoiceCall && (jsxRuntime.jsx("div", { className: styles$5.voiceCallIndicator, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z" }) }) })), replyingToMessage && replyPreviewText && replySenderLabel && (jsxRuntime.jsx(ChatReplyPreview, { label: replyPreviewLabel, senderLabel: replySenderLabel, previewText: replyPreviewText, className: styles$5.replyBubblePreview })), jsxRuntime.jsx("div", { ref: contentWithoutButtonsRef, children: jsxRuntime.jsx(ChatMessageRichContent, { content: message.content, contentSegments: contentSegments, streamingFeaturePlaceholderKind: streamingFeaturePlaceholderKind, onCreateAgent: onCreateAgent, mode: mode }) }), message.attachments && message.attachments.length > 0 && (jsxRuntime.jsx("div", { className: styles$5.attachments, children: message.attachments.map((attachment, index) => (jsxRuntime.jsxs("a", { href: attachment.url, target: "_blank", rel: "noopener noreferrer", className: styles$5.attachment, title: attachment.name, children: [jsxRuntime.jsx("span", { className: styles$5.attachmentIcon, children: "\uD83D\uDCCE" }), jsxRuntime.jsx("span", { className: styles$5.attachmentName, children: attachment.name })] }, index))) })), jsxRuntime.jsx(ChatMessageToolCallChips, { chips: toolCallChips, onToolCallClick: onToolCallClick }), citationFootnoteRenderModel.footnotes.length > 0 && (jsxRuntime.jsx("div", { className: styles$5.citationFootnotes, children: citationFootnoteRenderModel.footnotes.map((footnote) => (jsxRuntime.jsxs("div", { className: styles$5.citationFootnoteItem, children: [jsxRuntime.jsx("span", { className: styles$5.citationFootnoteNumber, children: footnote.number }), jsxRuntime.jsx(SourceChip, { citation: footnote.citation, onClick: onCitationClick, isCitationIdVisible: false })] }, `citation-footnote-${footnote.number}-${footnote.citation.source}`))) })), transitiveCitations.length > 0 && (jsxRuntime.jsx("div", { className: styles$5.sourceCitations, children: transitiveCitations.map((citation, index) => (jsxRuntime.jsx(SourceChip, { citation: citation, suffix: `by ${citation.origin.label}`, onClick: onCitationClick }, `team-source-${citation.source}-${index}`))) })), shouldShowButtons && (jsxRuntime.jsx("div", { className: styles$5.messageButtons, children: renderableButtons.map(({ button, buttonIndex }) => (jsxRuntime.jsx("button", { type: "button", className: classNames(styles$5.messageButton, button.type === 'action' && styles$5.actionMessageButton), onClick: (event) => {
|
|
47621
47630
|
event.stopPropagation();
|
|
@@ -49436,7 +49445,10 @@
|
|
|
49436
49445
|
* @private function of ChatToolCallModal
|
|
49437
49446
|
*/
|
|
49438
49447
|
function isSearchToolCallName(toolName) {
|
|
49439
|
-
return toolName === 'web_search' ||
|
|
49448
|
+
return (toolName === 'web_search' ||
|
|
49449
|
+
toolName === 'deep_search' ||
|
|
49450
|
+
toolName === 'useSearchEngine' ||
|
|
49451
|
+
toolName === 'search');
|
|
49440
49452
|
}
|
|
49441
49453
|
/**
|
|
49442
49454
|
* Checks whether a tool name should use the time renderer.
|