@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/index.es.js
CHANGED
|
@@ -40,7 +40,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
40
40
|
* @generated
|
|
41
41
|
* @see https://github.com/webgptorg/promptbook
|
|
42
42
|
*/
|
|
43
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
43
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-53';
|
|
44
44
|
/**
|
|
45
45
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
46
46
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -13559,9 +13559,7 @@ function createSerpSearchToolFunction(toolName, resultLabel) {
|
|
|
13559
13559
|
const searchEngine = new SerpSearchEngine();
|
|
13560
13560
|
const results = await searchEngine.search(query, searchOptions);
|
|
13561
13561
|
return spaceTrim$1((block) => `
|
|
13562
|
-
${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0
|
|
13563
|
-
? ''
|
|
13564
|
-
: ` with options ${JSON.stringify(searchOptions)}`}:
|
|
13562
|
+
${resultLabel} results for "${query}"${Object.keys(searchOptions).length === 0 ? '' : ` with options ${JSON.stringify(searchOptions)}`}:
|
|
13565
13563
|
|
|
13566
13564
|
${block(results
|
|
13567
13565
|
.map((result) => spaceTrim$1(`
|
|
@@ -18279,8 +18277,9 @@ function createInheritanceCapability(content) {
|
|
|
18279
18277
|
iconName = 'SquareArrowUpRight';
|
|
18280
18278
|
}
|
|
18281
18279
|
if (isVoidPseudoAgentReference(reference)) {
|
|
18282
|
-
label = VOID_PSEUDO_AGENT_REFERENCE;
|
|
18280
|
+
label = VOID_PSEUDO_AGENT_REFERENCE; // <- {Void} label
|
|
18283
18281
|
iconName = 'ShieldAlert';
|
|
18282
|
+
return null; // <- Note: Do not show `{Void}` in capabilities, it's only used for internal logic
|
|
18284
18283
|
}
|
|
18285
18284
|
return {
|
|
18286
18285
|
type: 'inheritance',
|
|
@@ -22582,7 +22581,8 @@ function useChatCompleteNotification(messages, soundSystem) {
|
|
|
22582
22581
|
if (currentSnapshot.lastMessageSender === 'USER' || !currentSnapshot.isLastMessageComplete) {
|
|
22583
22582
|
return;
|
|
22584
22583
|
}
|
|
22585
|
-
const isSameMessageCompletionTransition = previousSnapshot.lastMessageKey === currentSnapshot.lastMessageKey &&
|
|
22584
|
+
const isSameMessageCompletionTransition = previousSnapshot.lastMessageKey === currentSnapshot.lastMessageKey &&
|
|
22585
|
+
!previousSnapshot.isLastMessageComplete;
|
|
22586
22586
|
const isCompletedReplyAppended = previousSnapshot.lastMessageSender === 'USER' &&
|
|
22587
22587
|
areMessageKeyListsSequentialPrefix(previousSnapshot.messageKeys, currentSnapshot.messageKeys);
|
|
22588
22588
|
const isIncompletePlaceholderReplacedByCompletedReply = !previousSnapshot.isLastMessageComplete &&
|
|
@@ -26469,8 +26469,7 @@ function createOrganicOctopusBodyPoints(options) {
|
|
|
26469
26469
|
const surfaceWave = Math.sin(angle * 3 + shapePhase + timeMs / 1200) * 0.62 +
|
|
26470
26470
|
Math.sin(angle * 5 - shapePhase * 0.7 - timeMs / 910) * 0.38;
|
|
26471
26471
|
const breathingWave = Math.sin(timeMs / 960 + shapePhase + angle * 0.45) * wobbleAmplitude;
|
|
26472
|
-
const radius = bodyRadius *
|
|
26473
|
-
(1 + upperFactor * 0.12 + lowerFactor * 0.08 + surfaceWave * 0.05) +
|
|
26472
|
+
const radius = bodyRadius * (1 + upperFactor * 0.12 + lowerFactor * 0.08 + surfaceWave * 0.05) +
|
|
26474
26473
|
tentacleWave +
|
|
26475
26474
|
breathingWave;
|
|
26476
26475
|
return {
|
|
@@ -26525,7 +26524,9 @@ function createOrganicOctopusTentacleShapes(options) {
|
|
|
26525
26524
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26526
26525
|
const { size, centerX, centerY, bodyRadius, horizontalStretch, tentacleCount, shapePhase, createRandom, timeMs, saltPrefix, bodyPoints, variation, } = options;
|
|
26527
26526
|
const baseY = centerY + bodyRadius * 0.74;
|
|
26528
|
-
const lowerBodyAnchorPoints = bodyPoints
|
|
26527
|
+
const lowerBodyAnchorPoints = bodyPoints
|
|
26528
|
+
? resolveTentacleBodyAnchorPoints(bodyPoints, centerY + bodyRadius * 0.04)
|
|
26529
|
+
: null;
|
|
26529
26530
|
const flowLengthScale = (_a = variation === null || variation === void 0 ? void 0 : variation.flowLengthScale) !== null && _a !== void 0 ? _a : 1;
|
|
26530
26531
|
const lateralReachScale = (_b = variation === null || variation === void 0 ? void 0 : variation.lateralReachScale) !== null && _b !== void 0 ? _b : 1;
|
|
26531
26532
|
const tipReachScale = (_c = variation === null || variation === void 0 ? void 0 : variation.tipReachScale) !== null && _c !== void 0 ? _c : 1;
|
|
@@ -26602,7 +26603,9 @@ function createOrganicOctopusTentacleShapes(options) {
|
|
|
26602
26603
|
* @private shared geometry helper of `octopus3AvatarVisual`
|
|
26603
26604
|
*/
|
|
26604
26605
|
function resolveTentacleBodyAnchorPoints(bodyPoints, lowerBodyThresholdY) {
|
|
26605
|
-
const lowerBodyPoints = bodyPoints
|
|
26606
|
+
const lowerBodyPoints = bodyPoints
|
|
26607
|
+
.filter((bodyPoint) => bodyPoint.y >= lowerBodyThresholdY)
|
|
26608
|
+
.sort((leftPoint, rightPoint) => leftPoint.x - rightPoint.x);
|
|
26606
26609
|
if (lowerBodyPoints.length >= 2) {
|
|
26607
26610
|
return lowerBodyPoints;
|
|
26608
26611
|
}
|
|
@@ -26670,8 +26673,7 @@ function sampleOrganicTentacleRibbonPoints(tentacleShape) {
|
|
|
26670
26673
|
const tangentX = nextPoint.x - previousPoint.x;
|
|
26671
26674
|
const tangentY = nextPoint.y - previousPoint.y;
|
|
26672
26675
|
const tangentLength = Math.hypot(tangentX, tangentY) || 1;
|
|
26673
|
-
const width = tentacleShape.baseWidth +
|
|
26674
|
-
(tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
26676
|
+
const width = tentacleShape.baseWidth + (tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
26675
26677
|
return {
|
|
26676
26678
|
x: point.x,
|
|
26677
26679
|
y: point.y,
|
|
@@ -26696,10 +26698,8 @@ function resolveOrganicEyeMotion(options) {
|
|
|
26696
26698
|
const autonomousOffsetY = Math.cos(timeMs / 940 + phase) * radiusY * autonomousDriftRatioY;
|
|
26697
26699
|
const interactionBlend = Math.min(1, interaction.intensity * 0.9);
|
|
26698
26700
|
return {
|
|
26699
|
-
pupilOffsetX: autonomousOffsetX * (1 - interactionBlend) +
|
|
26700
|
-
|
|
26701
|
-
pupilOffsetY: autonomousOffsetY * (1 - interactionBlend) +
|
|
26702
|
-
interaction.gazeY * radiusY * (0.16 + interactionBlend * 0.16),
|
|
26701
|
+
pupilOffsetX: autonomousOffsetX * (1 - interactionBlend) + interaction.gazeX * radiusX * (0.18 + interactionBlend * 0.18),
|
|
26702
|
+
pupilOffsetY: autonomousOffsetY * (1 - interactionBlend) + interaction.gazeY * radiusY * (0.16 + interactionBlend * 0.16),
|
|
26703
26703
|
};
|
|
26704
26704
|
}
|
|
26705
26705
|
/**
|
|
@@ -26746,7 +26746,7 @@ const OUTLINE_GLYPHS = ['#', '%', '@'];
|
|
|
26746
26746
|
*
|
|
26747
26747
|
* @private helper of `asciiOctopusAvatarVisual`
|
|
26748
26748
|
*/
|
|
26749
|
-
const ATMOSPHERE_GLYPHS = ['.', ':', '
|
|
26749
|
+
const ATMOSPHERE_GLYPHS = ['.', ':', "'", '`'];
|
|
26750
26750
|
/**
|
|
26751
26751
|
* AsciiOctopus avatar visual.
|
|
26752
26752
|
*
|
|
@@ -26853,7 +26853,9 @@ function resolveAsciiGlyph(options) {
|
|
|
26853
26853
|
return resolveAtmosphereGlyph(point, layout, palette, noise, timeMs);
|
|
26854
26854
|
}
|
|
26855
26855
|
const isInsideBody = isPointInsidePolygon(point, layout.bodyPoints);
|
|
26856
|
-
const bodyEdgeDistance = isInsideBody
|
|
26856
|
+
const bodyEdgeDistance = isInsideBody
|
|
26857
|
+
? getDistanceToPolyline(point, layout.bodyPoints, true)
|
|
26858
|
+
: Number.POSITIVE_INFINITY;
|
|
26857
26859
|
const tentacleCoverage = measureTentacleCoverage(point, layout.sampledTentacles, cellWidth);
|
|
26858
26860
|
if (isInsideBody || tentacleCoverage) {
|
|
26859
26861
|
return resolveOctopusSurfaceGlyph({
|
|
@@ -26930,7 +26932,8 @@ function resolveMouthGlyph(point, layout, palette, cellHeight) {
|
|
|
26930
26932
|
if (mouthDistance > cellHeight * 0.38) {
|
|
26931
26933
|
return null;
|
|
26932
26934
|
}
|
|
26933
|
-
const horizontalProgress = clamp01((point.x - layout.mouthPoints[0].x) /
|
|
26935
|
+
const horizontalProgress = clamp01((point.x - layout.mouthPoints[0].x) /
|
|
26936
|
+
(layout.mouthPoints[layout.mouthPoints.length - 1].x - layout.mouthPoints[0].x));
|
|
26934
26937
|
let character = '-';
|
|
26935
26938
|
if (horizontalProgress < 0.28) {
|
|
26936
26939
|
character = '\\';
|
|
@@ -26955,7 +26958,7 @@ function resolveMouthGlyph(point, layout, palette, cellHeight) {
|
|
|
26955
26958
|
* @private helper of `asciiOctopusAvatarVisual`
|
|
26956
26959
|
*/
|
|
26957
26960
|
function resolveOctopusSurfaceGlyph(options) {
|
|
26958
|
-
const { point, layout, palette, isInsideBody, bodyEdgeDistance, tentacleCoverage, cellHeight, noise, timeMs
|
|
26961
|
+
const { point, layout, palette, isInsideBody, bodyEdgeDistance, tentacleCoverage, cellHeight, noise, timeMs } = options;
|
|
26959
26962
|
const isTentacleDominant = tentacleCoverage !== null && (!isInsideBody || point.y > layout.centerY + layout.bodyRadius * 0.08);
|
|
26960
26963
|
if (isTentacleDominant && tentacleCoverage) {
|
|
26961
26964
|
const isSuckerBand = tentacleCoverage.progress > 0.24 && tentacleCoverage.progress < 0.82 && noise > 0.78;
|
|
@@ -27126,7 +27129,9 @@ function createAsciiOctopusLayout(size, timeMs, createRandom, staticRandom, inte
|
|
|
27126
27129
|
};
|
|
27127
27130
|
const mouthPoints = sampleQuadraticBezierPoints({ x: centerX - size * 0.074, y: centerY + size * 0.092 }, {
|
|
27128
27131
|
x: centerX,
|
|
27129
|
-
y: centerY +
|
|
27132
|
+
y: centerY +
|
|
27133
|
+
size * (0.142 + Math.sin(timeMs / 620 + shapePhase) * 0.016) +
|
|
27134
|
+
interaction.gazeY * size * 0.012,
|
|
27130
27135
|
}, { x: centerX + size * 0.074, y: centerY + size * 0.092 }, 12);
|
|
27131
27136
|
let leftBound = Number.POSITIVE_INFINITY;
|
|
27132
27137
|
let rightBound = Number.NEGATIVE_INFINITY;
|
|
@@ -27388,8 +27393,7 @@ const fractalAvatarVisual = {
|
|
|
27388
27393
|
size,
|
|
27389
27394
|
centerX: centerX + (layerRandom() - 0.5) * size * 0.08,
|
|
27390
27395
|
centerY: centerY + (layerRandom() - 0.5) * size * 0.08,
|
|
27391
|
-
rotation: layerRandom() * Math.PI * 2 +
|
|
27392
|
-
Math.sin(timeMs / (1700 + layerIndex * 280) + layerIndex) * 0.14,
|
|
27396
|
+
rotation: layerRandom() * Math.PI * 2 + Math.sin(timeMs / (1700 + layerIndex * 280) + layerIndex) * 0.14,
|
|
27393
27397
|
scale: size * (0.19 + layerIndex * 0.055 + layerRandom() * 0.045),
|
|
27394
27398
|
horizontalStretch: 0.74 + layerRandom() * 0.9,
|
|
27395
27399
|
verticalStretch: 0.74 + layerRandom() * 0.9,
|
|
@@ -27458,7 +27462,14 @@ function drawFractalBackground(context, size, palette, timeMs, haloRotation) {
|
|
|
27458
27462
|
function createDragonCurveTurns(order) {
|
|
27459
27463
|
let turns = [];
|
|
27460
27464
|
for (let iteration = 0; iteration < order; iteration++) {
|
|
27461
|
-
turns = [
|
|
27465
|
+
turns = [
|
|
27466
|
+
...turns,
|
|
27467
|
+
1,
|
|
27468
|
+
...turns
|
|
27469
|
+
.slice()
|
|
27470
|
+
.reverse()
|
|
27471
|
+
.map((turn) => (turn === 1 ? -1 : 1)),
|
|
27472
|
+
];
|
|
27462
27473
|
}
|
|
27463
27474
|
return turns;
|
|
27464
27475
|
}
|
|
@@ -27502,7 +27513,7 @@ function createDragonCurvePoints(turnSequence) {
|
|
|
27502
27513
|
* @private helper of `fractalAvatarVisual`
|
|
27503
27514
|
*/
|
|
27504
27515
|
function transformDragonCurvePoints(points, options) {
|
|
27505
|
-
const { size, centerX, centerY, rotation, scale, horizontalStretch, verticalStretch, warpAmplitude, warpPhase, mirrorX, mirrorY, timeMs } = options;
|
|
27516
|
+
const { size, centerX, centerY, rotation, scale, horizontalStretch, verticalStretch, warpAmplitude, warpPhase, mirrorX, mirrorY, timeMs, } = options;
|
|
27506
27517
|
const bounds = getPointBounds(points);
|
|
27507
27518
|
const width = Math.max(1, bounds.maxX - bounds.minX);
|
|
27508
27519
|
const height = Math.max(1, bounds.maxY - bounds.minY);
|
|
@@ -27519,7 +27530,10 @@ function transformDragonCurvePoints(points, options) {
|
|
|
27519
27530
|
const rotatedY = normalizedX * sine + normalizedY * cosine;
|
|
27520
27531
|
return {
|
|
27521
27532
|
x: centerX + rotatedX + Math.sin(progress * Math.PI * 2 + warpPhase) * localWarp,
|
|
27522
|
-
y: centerY +
|
|
27533
|
+
y: centerY +
|
|
27534
|
+
rotatedY +
|
|
27535
|
+
Math.cos(progress * Math.PI * 3 + warpPhase * 0.6) * localWarp +
|
|
27536
|
+
(progress - 0.5) * size * 0.02,
|
|
27523
27537
|
};
|
|
27524
27538
|
});
|
|
27525
27539
|
}
|
|
@@ -28706,8 +28720,7 @@ function drawTentacleSuckers(context, tentacleShape, palette) {
|
|
|
28706
28720
|
const tangentLength = Math.hypot(tangentX, tangentY) || 1;
|
|
28707
28721
|
const normalX = (-tangentY / tangentLength) * undersideDirection;
|
|
28708
28722
|
const normalY = (tangentX / tangentLength) * undersideDirection;
|
|
28709
|
-
const width = tentacleShape.baseWidth +
|
|
28710
|
-
(tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
28723
|
+
const width = tentacleShape.baseWidth + (tentacleShape.tipWidth - tentacleShape.baseWidth) * Math.pow(progress, 1.1);
|
|
28711
28724
|
const suckerX = point.x + normalX * width * 0.52;
|
|
28712
28725
|
const suckerY = point.y + normalY * width * 0.52;
|
|
28713
28726
|
const rotation = Math.atan2(normalY, normalX);
|
|
@@ -28745,7 +28758,8 @@ function drawMantleCurrents(context, centerX, centerY, size, palette, timeMs, sh
|
|
|
28745
28758
|
context.moveTo(centerX + horizontalOffset * 0.3, centerY - size * (0.11 + morphologyProfile.body.verticalStretch * 0.02));
|
|
28746
28759
|
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));
|
|
28747
28760
|
context.strokeStyle = currentIndex % 2 === 0 ? `${palette.highlight}30` : `${palette.accent}26`;
|
|
28748
|
-
context.lineWidth =
|
|
28761
|
+
context.lineWidth =
|
|
28762
|
+
size * (0.0075 + currentIndex * 0.00065 + morphologyProfile.tentacles.baseWidthScale * 0.0005);
|
|
28749
28763
|
context.lineCap = 'round';
|
|
28750
28764
|
context.stroke();
|
|
28751
28765
|
}
|
|
@@ -28905,7 +28919,10 @@ const pixelArtAvatarVisual = {
|
|
|
28905
28919
|
: rowIndex > pixelGridSize - emblemHeight - 1
|
|
28906
28920
|
? colorStops.length
|
|
28907
28921
|
: 3)))];
|
|
28908
|
-
if (columnIndex === 0 &&
|
|
28922
|
+
if (columnIndex === 0 &&
|
|
28923
|
+
rowIndex >= cheekInset &&
|
|
28924
|
+
rowIndex <= pixelGridSize - cheekInset - 1 &&
|
|
28925
|
+
random() < 0.4) {
|
|
28909
28926
|
continue;
|
|
28910
28927
|
}
|
|
28911
28928
|
drawPixel(context, panelX + columnIndex * pixelSize, panelY + rowIndex * pixelSize, pixelSize, color);
|
|
@@ -29057,7 +29074,7 @@ const ACTIVE_POINTER_BOUNDS_REFRESH_MS = 120;
|
|
|
29057
29074
|
* @private shared component for in-repository avatar previews
|
|
29058
29075
|
*/
|
|
29059
29076
|
function Avatar(props) {
|
|
29060
|
-
const { avatarDefinition, visualId, surface = 'framed', size = DEFAULT_AVATAR_SIZE, title, className, style } = props;
|
|
29077
|
+
const { avatarDefinition, visualId, surface = 'framed', size = DEFAULT_AVATAR_SIZE, title, className, style, } = props;
|
|
29061
29078
|
const canvasRef = useRef(null);
|
|
29062
29079
|
const animationStartRef = useRef(null);
|
|
29063
29080
|
const interactionRuntimeStateRef = useRef(createAvatarInteractionRuntimeState());
|
|
@@ -29160,14 +29177,7 @@ function Avatar(props) {
|
|
|
29160
29177
|
releaseAnimationListener();
|
|
29161
29178
|
releasePointerTracking === null || releasePointerTracking === void 0 ? void 0 : releasePointerTracking();
|
|
29162
29179
|
};
|
|
29163
|
-
}, [
|
|
29164
|
-
avatarDefinitionKey,
|
|
29165
|
-
isVisible,
|
|
29166
|
-
resolvedAvatarRenderDefinition,
|
|
29167
|
-
size,
|
|
29168
|
-
surface,
|
|
29169
|
-
visualId,
|
|
29170
|
-
]);
|
|
29180
|
+
}, [avatarDefinitionKey, isVisible, resolvedAvatarRenderDefinition, size, surface, visualId]);
|
|
29171
29181
|
return (jsx("canvas", { ref: canvasRef, title: title || `${resolvedAvatarRenderDefinition.avatarDefinition.agentName} avatar`, className: className, style: {
|
|
29172
29182
|
width: size,
|
|
29173
29183
|
height: size,
|
|
@@ -39901,7 +39911,9 @@ function createDeepSearchAgentInstructions(toolDescription) {
|
|
|
39901
39911
|
* @private helper of `OpenAiAgentKitExecutionTools`
|
|
39902
39912
|
*/
|
|
39903
39913
|
function buildDeepSearchToolInput(rawInput) {
|
|
39904
|
-
const input = rawInput && typeof rawInput === 'object'
|
|
39914
|
+
const input = rawInput && typeof rawInput === 'object'
|
|
39915
|
+
? rawInput
|
|
39916
|
+
: {};
|
|
39905
39917
|
const query = typeof input.query === 'string' ? input.query.trim() : '';
|
|
39906
39918
|
const additionalHints = Object.entries(input)
|
|
39907
39919
|
.filter(([key, value]) => key !== 'query' && value !== undefined && value !== null && String(value).trim() !== '')
|
|
@@ -42342,8 +42354,7 @@ class AgentLlmExecutionTools {
|
|
|
42342
42354
|
console.info('[🤰]', 'Prepared OpenAI Assistant prompt', {
|
|
42343
42355
|
agent: this.title,
|
|
42344
42356
|
toolNames: (_b = (_a = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.tools) === null || _a === void 0 ? void 0 : _a.map((tool) => tool.name)) !== null && _b !== void 0 ? _b : [],
|
|
42345
|
-
knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements
|
|
42346
|
-
.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
|
|
42357
|
+
knowledgeSourcesCount: (_d = (_c = promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools.modelRequirements.knowledgeSources) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0,
|
|
42347
42358
|
});
|
|
42348
42359
|
}
|
|
42349
42360
|
return assistant.callChatModelStream(promptWithAgentModelRequirementsForOpenAiAssistantExecutionTools, options.onProgress, options.streamOptions);
|
|
@@ -47623,9 +47634,7 @@ const ChatMessageItem = memo(
|
|
|
47623
47634
|
borderRadius: '50%',
|
|
47624
47635
|
} })), isAvatarTooltipVisible && (participant === null || participant === void 0 ? void 0 : participant.agentSource) && avatarTooltipPosition && (jsx(AvatarProfileTooltip, { ref: tooltipRef, agentSource: participant.agentSource, position: avatarTooltipPosition }))] })), jsxs("div", { className: classNames(styles$5.messageStack, chatCssClassNames.messageStack), children: [shouldShowParticipantLabel && participantLabel && (jsx("div", { className: styles$5.participantLabel, children: participantLabel })), jsxs("div", { className: classNames(styles$5.messageText, isReplyActionEnabled && styles$5.replyEnabledMessageText, isReplySwipeArmed && styles$5.replySwipeActive, isAgentArticleMode && styles$5.articleModeAgentMessageText, chatCssClassNames.messageContent), style: {
|
|
47625
47636
|
'--message-bg-color': isAgentArticleMode ? articleModeBackgroundColor : color.toHex(),
|
|
47626
|
-
'--message-text-color': isAgentArticleMode
|
|
47627
|
-
? articleModeTextColor
|
|
47628
|
-
: colorOfText.toHex(),
|
|
47637
|
+
'--message-text-color': isAgentArticleMode ? articleModeTextColor : colorOfText.toHex(),
|
|
47629
47638
|
'--chat-message-swipe-offset': swipeTranslation,
|
|
47630
47639
|
}, onPointerDown: handleReplyPointerDown, onPointerMove: handleReplyPointerMove, onPointerUp: handleReplyPointerEnd, onPointerCancel: resetReplySwipe, children: [isReplyActionEnabled && (jsx("div", { className: classNames(styles$5.replySwipeIndicator, isMe && styles$5.replySwipeIndicatorRight, isReplySwipeArmed && styles$5.replySwipeIndicatorActive), "aria-hidden": "true", children: jsx(Reply, { className: styles$5.replySwipeIndicatorIcon }) })), !shouldRenderArticleActionsBar && renderMessageReadAndCopyControls(), message.isVoiceCall && (jsx("div", { className: styles$5.voiceCallIndicator, children: jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: 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 && (jsx(ChatReplyPreview, { label: replyPreviewLabel, senderLabel: replySenderLabel, previewText: replyPreviewText, className: styles$5.replyBubblePreview })), jsx("div", { ref: contentWithoutButtonsRef, children: jsx(ChatMessageRichContent, { content: message.content, contentSegments: contentSegments, streamingFeaturePlaceholderKind: streamingFeaturePlaceholderKind, onCreateAgent: onCreateAgent, mode: mode }) }), message.attachments && message.attachments.length > 0 && (jsx("div", { className: styles$5.attachments, children: message.attachments.map((attachment, index) => (jsxs("a", { href: attachment.url, target: "_blank", rel: "noopener noreferrer", className: styles$5.attachment, title: attachment.name, children: [jsx("span", { className: styles$5.attachmentIcon, children: "\uD83D\uDCCE" }), jsx("span", { className: styles$5.attachmentName, children: attachment.name })] }, index))) })), jsx(ChatMessageToolCallChips, { chips: toolCallChips, onToolCallClick: onToolCallClick }), citationFootnoteRenderModel.footnotes.length > 0 && (jsx("div", { className: styles$5.citationFootnotes, children: citationFootnoteRenderModel.footnotes.map((footnote) => (jsxs("div", { className: styles$5.citationFootnoteItem, children: [jsx("span", { className: styles$5.citationFootnoteNumber, children: footnote.number }), jsx(SourceChip, { citation: footnote.citation, onClick: onCitationClick, isCitationIdVisible: false })] }, `citation-footnote-${footnote.number}-${footnote.citation.source}`))) })), transitiveCitations.length > 0 && (jsx("div", { className: styles$5.sourceCitations, children: transitiveCitations.map((citation, index) => (jsx(SourceChip, { citation: citation, suffix: `by ${citation.origin.label}`, onClick: onCitationClick }, `team-source-${citation.source}-${index}`))) })), shouldShowButtons && (jsx("div", { className: styles$5.messageButtons, children: renderableButtons.map(({ button, buttonIndex }) => (jsx("button", { type: "button", className: classNames(styles$5.messageButton, button.type === 'action' && styles$5.actionMessageButton), onClick: (event) => {
|
|
47631
47640
|
event.stopPropagation();
|
|
@@ -49446,7 +49455,10 @@ function renderGenericToolCallDetails(options) {
|
|
|
49446
49455
|
* @private function of ChatToolCallModal
|
|
49447
49456
|
*/
|
|
49448
49457
|
function isSearchToolCallName(toolName) {
|
|
49449
|
-
return toolName === 'web_search' ||
|
|
49458
|
+
return (toolName === 'web_search' ||
|
|
49459
|
+
toolName === 'deep_search' ||
|
|
49460
|
+
toolName === 'useSearchEngine' ||
|
|
49461
|
+
toolName === 'search');
|
|
49450
49462
|
}
|
|
49451
49463
|
/**
|
|
49452
49464
|
* Checks whether a tool name should use the time renderer.
|