@tutti-os/agent-gui 0.0.51 → 0.0.52
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/agent-conversation/index.js +3 -3
- package/dist/agent-message-center/index.js +2 -2
- package/dist/app/renderer/agentactivity.css +40 -19
- package/dist/{chunk-BQVYICR7.js → chunk-2OLYX32K.js} +2 -2
- package/dist/{chunk-23YM25SG.js → chunk-3ZVVFQH5.js} +128 -40
- package/dist/chunk-3ZVVFQH5.js.map +1 -0
- package/dist/{chunk-M7GNA2WD.js → chunk-BFIYBPFD.js} +2 -2
- package/dist/{chunk-RKZMETSQ.js → chunk-PIKG746A.js} +3 -1
- package/dist/chunk-PIKG746A.js.map +1 -0
- package/dist/{chunk-UUY5VEK4.js → chunk-UKDC63WG.js} +2 -2
- package/dist/{chunk-UUY5VEK4.js.map → chunk-UKDC63WG.js.map} +1 -1
- package/dist/context-mention-palette/index.js +2 -2
- package/dist/index.js +5 -5
- package/package.json +13 -13
- package/dist/chunk-23YM25SG.js.map +0 -1
- package/dist/chunk-RKZMETSQ.js.map +0 -1
- /package/dist/{chunk-BQVYICR7.js.map → chunk-2OLYX32K.js.map} +0 -0
- /package/dist/{chunk-M7GNA2WD.js.map → chunk-BFIYBPFD.js.map} +0 -0
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
projectAgentConversationVM,
|
|
7
7
|
reconcileProjectedAgentConversationVM,
|
|
8
8
|
useProjectedAgentConversation
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-3ZVVFQH5.js";
|
|
10
|
+
import "../chunk-PIKG746A.js";
|
|
11
|
+
import "../chunk-UKDC63WG.js";
|
|
12
12
|
import "../chunk-Y35GDLP2.js";
|
|
13
13
|
import "../chunk-LUGELG5V.js";
|
|
14
14
|
import "../chunk-66EQ6EQO.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
approvalOptionDisplayLabel,
|
|
7
7
|
getPromptToolDetails,
|
|
8
8
|
isPromptRequestIdTitle
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-BFIYBPFD.js";
|
|
10
10
|
import {
|
|
11
11
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
12
12
|
PLAN_IMPLEMENTATION_PROMPT,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
extractExitPlanModeOptions,
|
|
26
26
|
isExitPlanSwitchModeInput,
|
|
27
27
|
normalizeAskUserQuestions
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-PIKG746A.js";
|
|
29
29
|
import {
|
|
30
30
|
managedAgentRoundedIconUrl,
|
|
31
31
|
userAvatarPlaceholderUrl,
|
|
@@ -276,6 +276,7 @@
|
|
|
276
276
|
--agent-gui-package-danger: var(--state-danger);
|
|
277
277
|
--agent-gui-accent: var(--agent-gui-package-accent);
|
|
278
278
|
--agent-gui-accent-strong: var(--agent-gui-package-accent-strong);
|
|
279
|
+
--agent-gui-mention-app-color: var(--tutti-purple);
|
|
279
280
|
--agent-gui-success: var(--agent-gui-package-success);
|
|
280
281
|
--agent-gui-warning: var(--agent-gui-package-warning);
|
|
281
282
|
--agent-gui-danger: var(--agent-gui-package-danger);
|
|
@@ -3929,8 +3930,9 @@ aside.workspace-agents-status-panel
|
|
|
3929
3930
|
-webkit-mask-size: 16px 16px;
|
|
3930
3931
|
}
|
|
3931
3932
|
|
|
3932
|
-
[data-agent-mention-kind="workspace-app"].tsh-agent-object-token--entity
|
|
3933
|
-
|
|
3933
|
+
[data-agent-mention-kind="workspace-app"].tsh-agent-object-token--entity,
|
|
3934
|
+
[data-agent-mention-kind="workspace-reference"][data-agent-reference-source="app"].tsh-agent-object-token--entity {
|
|
3935
|
+
color: var(--agent-gui-mention-app-color, var(--tutti-purple));
|
|
3934
3936
|
}
|
|
3935
3937
|
|
|
3936
3938
|
[data-agent-mention-kind="skill"].tsh-agent-object-token--entity,
|
|
@@ -3966,6 +3968,9 @@ aside.workspace-agents-status-panel
|
|
|
3966
3968
|
}
|
|
3967
3969
|
|
|
3968
3970
|
[data-agent-mention-kind="workspace-app"]
|
|
3971
|
+
[data-agent-mention-app-icon="true"]
|
|
3972
|
+
.tsh-agent-object-token__kind-icon,
|
|
3973
|
+
[data-agent-mention-kind="workspace-reference"][data-agent-reference-source="app"]
|
|
3969
3974
|
[data-agent-mention-app-icon="true"]
|
|
3970
3975
|
.tsh-agent-object-token__kind-icon {
|
|
3971
3976
|
display: block;
|
|
@@ -4131,6 +4136,7 @@ aside.workspace-agents-status-panel
|
|
|
4131
4136
|
--agent-gui-accent-strong: var(--agent-gui-package-accent-strong);
|
|
4132
4137
|
--agent-gui-accent-bg: var(--agent-gui-package-accent-bg);
|
|
4133
4138
|
--agent-gui-border-focus: var(--agent-gui-package-border-focus);
|
|
4139
|
+
--agent-gui-mention-app-color: var(--tutti-purple);
|
|
4134
4140
|
--agent-gui-success: var(--agent-gui-package-success);
|
|
4135
4141
|
--agent-gui-warning: var(--agent-gui-package-warning);
|
|
4136
4142
|
--agent-gui-danger: var(--agent-gui-package-danger);
|
|
@@ -5796,29 +5802,34 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5796
5802
|
--agent-message-locator-hit-size: 18px;
|
|
5797
5803
|
--agent-message-locator-center-offset: 10px;
|
|
5798
5804
|
--agent-message-locator-visible-height: 100vh;
|
|
5805
|
+
--agent-message-locator-visible-top-offset: 0px;
|
|
5806
|
+
--agent-message-locator-viewport-height: var(--agent-message-locator-height);
|
|
5799
5807
|
|
|
5800
5808
|
position: sticky;
|
|
5801
5809
|
top: max(
|
|
5802
5810
|
0px,
|
|
5803
5811
|
calc(
|
|
5804
|
-
(
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5812
|
+
var(--agent-message-locator-visible-top-offset) +
|
|
5813
|
+
(
|
|
5814
|
+
(
|
|
5815
|
+
var(--agent-message-locator-visible-height) -
|
|
5816
|
+
var(--agent-message-locator-viewport-height)
|
|
5817
|
+
) /
|
|
5818
|
+
2
|
|
5819
|
+
)
|
|
5809
5820
|
)
|
|
5810
5821
|
);
|
|
5811
5822
|
right: 0;
|
|
5812
5823
|
z-index: 7;
|
|
5813
5824
|
justify-self: stretch;
|
|
5814
5825
|
width: calc(100% + var(--agent-gui-message-locator-inline-offset));
|
|
5815
|
-
height: var(--agent-message-locator-height);
|
|
5826
|
+
height: var(--agent-message-locator-viewport-height);
|
|
5816
5827
|
margin-right: calc(-1 * var(--agent-gui-message-locator-inline-offset));
|
|
5817
|
-
margin-bottom: calc(-1 * var(--agent-message-locator-height));
|
|
5828
|
+
margin-bottom: calc(-1 * var(--agent-message-locator-viewport-height));
|
|
5818
5829
|
pointer-events: none;
|
|
5819
5830
|
}
|
|
5820
5831
|
|
|
5821
|
-
.agent-gui-message-
|
|
5832
|
+
.agent-gui-message-locator__viewport {
|
|
5822
5833
|
position: absolute;
|
|
5823
5834
|
top: 0;
|
|
5824
5835
|
right: calc(
|
|
@@ -5827,17 +5838,30 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5827
5838
|
);
|
|
5828
5839
|
width: var(--agent-message-locator-hit-size);
|
|
5829
5840
|
height: 100%;
|
|
5830
|
-
|
|
5841
|
+
overflow-x: hidden;
|
|
5842
|
+
overflow-y: auto;
|
|
5843
|
+
overscroll-behavior: contain;
|
|
5831
5844
|
pointer-events: auto;
|
|
5845
|
+
scrollbar-width: none;
|
|
5846
|
+
}
|
|
5847
|
+
|
|
5848
|
+
.agent-gui-message-locator__viewport::-webkit-scrollbar {
|
|
5849
|
+
display: none;
|
|
5850
|
+
}
|
|
5851
|
+
|
|
5852
|
+
.agent-gui-message-locator__content {
|
|
5853
|
+
position: relative;
|
|
5854
|
+
min-height: 100%;
|
|
5855
|
+
height: var(--agent-message-locator-height);
|
|
5832
5856
|
}
|
|
5833
5857
|
|
|
5834
5858
|
.agent-gui-message-locator__track-segment {
|
|
5835
5859
|
position: absolute;
|
|
5836
5860
|
top: var(--agent-message-locator-segment-position);
|
|
5837
|
-
|
|
5861
|
+
left: 50%;
|
|
5838
5862
|
width: 1px;
|
|
5839
5863
|
height: 8px;
|
|
5840
|
-
transform: translateX(50%);
|
|
5864
|
+
transform: translateX(-50%);
|
|
5841
5865
|
background: color-mix(
|
|
5842
5866
|
in srgb,
|
|
5843
5867
|
var(--line-2, var(--tutti-line-2)) 82%,
|
|
@@ -5848,10 +5872,7 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5848
5872
|
.agent-gui-message-locator__tick {
|
|
5849
5873
|
position: absolute;
|
|
5850
5874
|
top: var(--agent-message-locator-position);
|
|
5851
|
-
|
|
5852
|
-
var(--agent-message-locator-center-offset) -
|
|
5853
|
-
var(--agent-message-locator-hit-size) / 2
|
|
5854
|
-
);
|
|
5875
|
+
left: 0;
|
|
5855
5876
|
display: grid;
|
|
5856
5877
|
width: var(--agent-message-locator-hit-size);
|
|
5857
5878
|
height: var(--agent-message-locator-hit-size);
|
|
@@ -5924,7 +5945,9 @@ button.agent-gui-node__conversation-section-toggle:hover
|
|
|
5924
5945
|
display: grid;
|
|
5925
5946
|
width: min(360px, calc(100vw - 112px));
|
|
5926
5947
|
max-width: max-content;
|
|
5948
|
+
max-height: calc(var(--agent-message-locator-visible-height) - 32px);
|
|
5927
5949
|
gap: 12px;
|
|
5950
|
+
overflow-y: auto;
|
|
5928
5951
|
padding: 16px;
|
|
5929
5952
|
border: 1px solid
|
|
5930
5953
|
color-mix(in srgb, var(--line-2, var(--tutti-line-2)) 72%, transparent);
|
|
@@ -8318,7 +8341,6 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
|
|
|
8318
8341
|
display: block;
|
|
8319
8342
|
}
|
|
8320
8343
|
|
|
8321
|
-
|
|
8322
8344
|
.workspace-agents-status-panel__detail-subagent-log {
|
|
8323
8345
|
display: flex;
|
|
8324
8346
|
flex-direction: column;
|
|
@@ -8355,7 +8377,6 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
|
|
|
8355
8377
|
color: var(--tutti-status-danger, #c0392b);
|
|
8356
8378
|
}
|
|
8357
8379
|
|
|
8358
|
-
|
|
8359
8380
|
.workspace-agents-status-panel__detail-subagent-name {
|
|
8360
8381
|
color: var(--tutti-text-primary, rgba(0, 0, 0, 0.85));
|
|
8361
8382
|
margin-left: 4px;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-HDBKB5RA.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeAgentSessionMentionTitle
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UKDC63WG.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveAgentMentionFileThumbnailUrl,
|
|
12
12
|
resolveAgentMentionFileVisualKind
|
|
@@ -2134,4 +2134,4 @@ export {
|
|
|
2134
2134
|
AgentFileMentionPalette,
|
|
2135
2135
|
AgentContextMentionPalette
|
|
2136
2136
|
};
|
|
2137
|
-
//# sourceMappingURL=chunk-
|
|
2137
|
+
//# sourceMappingURL=chunk-2OLYX32K.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveWorkspaceFileLinkAction,
|
|
14
14
|
resolveWorkspaceFilePathCandidate,
|
|
15
15
|
resolveWorkspaceLinkAction
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PIKG746A.js";
|
|
17
17
|
import {
|
|
18
18
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
19
19
|
attrsToMentionItem,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
formatAgentMentionMarkdown,
|
|
22
22
|
mentionItemToAttrs,
|
|
23
23
|
parseAgentMentionMarkdown
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UKDC63WG.js";
|
|
25
25
|
import {
|
|
26
26
|
fileChangeCountFromChanges,
|
|
27
27
|
fileChangeEntriesFromChanges,
|
|
@@ -14017,6 +14017,9 @@ var AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX = 280;
|
|
|
14017
14017
|
var AGENT_TRANSCRIPT_TURN_GAP_PX = 12;
|
|
14018
14018
|
var AGENT_TRANSCRIPT_FALLBACK_TURN_COUNT = 3;
|
|
14019
14019
|
var AGENT_MESSAGE_LOCATOR_PANEL_FADE_MS = 160;
|
|
14020
|
+
var AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX = 30;
|
|
14021
|
+
var AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX = 18;
|
|
14022
|
+
var AGENT_MESSAGE_LOCATOR_BOTTOM_SAFE_INSET_MAX_PX = 48;
|
|
14020
14023
|
function transcriptLabelsEqual(previous, next) {
|
|
14021
14024
|
return previous === next || previous.thinkingLabel === next.thinkingLabel && previous.processing === next.processing && previous.turnSummary === next.turnSummary && previous.rawTimelineJson === next.rawTimelineJson && previous.userMessageLocator === next.userMessageLocator && previous.toolCallsLabel === next.toolCallsLabel;
|
|
14022
14025
|
}
|
|
@@ -14260,6 +14263,7 @@ function AgentMessageLocatorRail({
|
|
|
14260
14263
|
onLocate
|
|
14261
14264
|
}) {
|
|
14262
14265
|
const locatorRef = useRef8(null);
|
|
14266
|
+
const locatorViewportRef = useRef8(null);
|
|
14263
14267
|
const closePanelTimeoutRef = useRef8(null);
|
|
14264
14268
|
const [isPanelOpen, setIsPanelOpen] = useState18(false);
|
|
14265
14269
|
const [shouldRenderPanel, setShouldRenderPanel] = useState18(false);
|
|
@@ -14267,7 +14271,7 @@ function AgentMessageLocatorRail({
|
|
|
14267
14271
|
const [selectedKey, setSelectedKey] = useState18(null);
|
|
14268
14272
|
const previousAgentResponseByKeyRef = useRef8(null);
|
|
14269
14273
|
const [unreadAgentResponseKeys, setUnreadAgentResponseKeys] = useState18(/* @__PURE__ */ new Set());
|
|
14270
|
-
const [
|
|
14274
|
+
const [visibleFrame, setVisibleFrame] = useState18(null);
|
|
14271
14275
|
useEffect11(() => {
|
|
14272
14276
|
if (isPanelOpen) {
|
|
14273
14277
|
setShouldRenderPanel(true);
|
|
@@ -14342,18 +14346,18 @@ function AgentMessageLocatorRail({
|
|
|
14342
14346
|
return;
|
|
14343
14347
|
}
|
|
14344
14348
|
let animationFrame = null;
|
|
14345
|
-
const
|
|
14349
|
+
const updateVisibleFrame = () => {
|
|
14346
14350
|
animationFrame = null;
|
|
14347
|
-
const
|
|
14348
|
-
|
|
14349
|
-
(current) => current ===
|
|
14351
|
+
const nextFrame = readMessageLocatorVisibleFrame(scrollParent);
|
|
14352
|
+
setVisibleFrame(
|
|
14353
|
+
(current) => current?.heightPx === nextFrame.heightPx && current.topOffsetPx === nextFrame.topOffsetPx ? current : nextFrame
|
|
14350
14354
|
);
|
|
14351
14355
|
};
|
|
14352
14356
|
const scheduleUpdate = () => {
|
|
14353
14357
|
if (animationFrame !== null) {
|
|
14354
14358
|
return;
|
|
14355
14359
|
}
|
|
14356
|
-
animationFrame = window.requestAnimationFrame(
|
|
14360
|
+
animationFrame = window.requestAnimationFrame(updateVisibleFrame);
|
|
14357
14361
|
};
|
|
14358
14362
|
scheduleUpdate();
|
|
14359
14363
|
const resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(scheduleUpdate);
|
|
@@ -14399,10 +14403,25 @@ function AgentMessageLocatorRail({
|
|
|
14399
14403
|
}
|
|
14400
14404
|
};
|
|
14401
14405
|
}, [items]);
|
|
14406
|
+
useLayoutEffect2(() => {
|
|
14407
|
+
const selectedIndex = selectedKey ? items.findIndex((item) => item.key === selectedKey) : -1;
|
|
14408
|
+
const viewport = locatorViewportRef.current;
|
|
14409
|
+
if (selectedIndex < 0 || !viewport) {
|
|
14410
|
+
return;
|
|
14411
|
+
}
|
|
14412
|
+
const railHeight2 = (items.length - 1) * AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX + AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX;
|
|
14413
|
+
const viewportHeight2 = viewport.clientHeight || Math.min(railHeight2, visibleFrame?.heightPx ?? railHeight2);
|
|
14414
|
+
scrollMessageLocatorViewportToIndex(
|
|
14415
|
+
viewport,
|
|
14416
|
+
selectedIndex,
|
|
14417
|
+
viewportHeight2
|
|
14418
|
+
);
|
|
14419
|
+
}, [items, selectedKey, visibleFrame]);
|
|
14402
14420
|
if (items.length < 2) {
|
|
14403
14421
|
return null;
|
|
14404
14422
|
}
|
|
14405
|
-
const railHeight = (items.length - 1) *
|
|
14423
|
+
const railHeight = (items.length - 1) * AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX + AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX;
|
|
14424
|
+
const viewportHeight = visibleFrame === null ? railHeight : Math.min(railHeight, visibleFrame.heightPx);
|
|
14406
14425
|
const activeOrSelectedKey = activeKey ?? selectedKey;
|
|
14407
14426
|
const markItemRead = (itemKey) => {
|
|
14408
14427
|
setUnreadAgentResponseKeys((currentUnreadKeys) => {
|
|
@@ -14465,41 +14484,68 @@ function AgentMessageLocatorRail({
|
|
|
14465
14484
|
onMouseLeave: closePanelSoon,
|
|
14466
14485
|
style: {
|
|
14467
14486
|
"--agent-message-locator-height": `${railHeight}px`,
|
|
14468
|
-
|
|
14469
|
-
|
|
14487
|
+
"--agent-message-locator-viewport-height": `${viewportHeight}px`,
|
|
14488
|
+
...visibleFrame !== null ? {
|
|
14489
|
+
"--agent-message-locator-visible-height": `${visibleFrame.heightPx}px`,
|
|
14490
|
+
"--agent-message-locator-visible-top-offset": `${visibleFrame.topOffsetPx}px`
|
|
14470
14491
|
} : {}
|
|
14471
14492
|
},
|
|
14472
14493
|
children: [
|
|
14473
|
-
|
|
14494
|
+
/* @__PURE__ */ jsx59(
|
|
14474
14495
|
"div",
|
|
14475
14496
|
{
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14497
|
+
ref: locatorViewportRef,
|
|
14498
|
+
className: "agent-gui-message-locator__viewport",
|
|
14499
|
+
"data-testid": "agent-message-locator-viewport",
|
|
14500
|
+
children: /* @__PURE__ */ jsxs44(
|
|
14501
|
+
"div",
|
|
14502
|
+
{
|
|
14503
|
+
className: "agent-gui-message-locator__content",
|
|
14504
|
+
style: {
|
|
14505
|
+
"--agent-message-locator-height": `${railHeight}px`
|
|
14506
|
+
},
|
|
14507
|
+
children: [
|
|
14508
|
+
items.slice(0, -1).map((item, index) => /* @__PURE__ */ jsx59(
|
|
14509
|
+
"div",
|
|
14510
|
+
{
|
|
14511
|
+
className: "agent-gui-message-locator__track-segment",
|
|
14512
|
+
style: {
|
|
14513
|
+
"--agent-message-locator-segment-position": `${index * AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX + AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX}px`
|
|
14514
|
+
},
|
|
14515
|
+
"aria-hidden": "true"
|
|
14516
|
+
},
|
|
14517
|
+
`segment:${item.key}`
|
|
14518
|
+
)),
|
|
14519
|
+
items.map((item, index) => /* @__PURE__ */ jsx59(
|
|
14520
|
+
"button",
|
|
14521
|
+
{
|
|
14522
|
+
type: "button",
|
|
14523
|
+
className: "agent-gui-message-locator__tick nodrag tsh-desktop-no-drag",
|
|
14524
|
+
style: {
|
|
14525
|
+
"--agent-message-locator-position": `${index * AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX + AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX / 2}px`
|
|
14526
|
+
},
|
|
14527
|
+
"aria-label": item.summary,
|
|
14528
|
+
title: item.summary,
|
|
14529
|
+
"data-selected": item.key === selectedKey ? "true" : void 0,
|
|
14530
|
+
"data-unread-agent-response": unreadAgentResponseKeys.has(item.key) ? "true" : void 0,
|
|
14531
|
+
onClick: () => handleLocateItem(item),
|
|
14532
|
+
onFocus: () => setActiveKey(item.key),
|
|
14533
|
+
onMouseEnter: () => setActiveKey(item.key),
|
|
14534
|
+
children: /* @__PURE__ */ jsx59(
|
|
14535
|
+
"span",
|
|
14536
|
+
{
|
|
14537
|
+
className: "agent-gui-message-locator__dot",
|
|
14538
|
+
"aria-hidden": "true"
|
|
14539
|
+
}
|
|
14540
|
+
)
|
|
14541
|
+
},
|
|
14542
|
+
item.key
|
|
14543
|
+
))
|
|
14544
|
+
]
|
|
14545
|
+
}
|
|
14546
|
+
)
|
|
14547
|
+
}
|
|
14548
|
+
),
|
|
14503
14549
|
shouldRenderPanel ? /* @__PURE__ */ jsx59(
|
|
14504
14550
|
"div",
|
|
14505
14551
|
{
|
|
@@ -14509,6 +14555,7 @@ function AgentMessageLocatorRail({
|
|
|
14509
14555
|
"data-testid": "agent-message-locator-panel",
|
|
14510
14556
|
onMouseEnter: openPanel,
|
|
14511
14557
|
onMouseLeave: closePanelSoon,
|
|
14558
|
+
onWheel: containMessageLocatorPanelWheel,
|
|
14512
14559
|
children: items.map((item) => /* @__PURE__ */ jsx59(
|
|
14513
14560
|
"button",
|
|
14514
14561
|
{
|
|
@@ -14528,6 +14575,47 @@ function AgentMessageLocatorRail({
|
|
|
14528
14575
|
}
|
|
14529
14576
|
);
|
|
14530
14577
|
}
|
|
14578
|
+
function scrollMessageLocatorViewportToIndex(viewport, selectedIndex, viewportHeight) {
|
|
14579
|
+
const selectedTop = selectedIndex * AGENT_MESSAGE_LOCATOR_ITEM_SPACING_PX - AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX / 2;
|
|
14580
|
+
const selectedBottom = selectedTop + AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX;
|
|
14581
|
+
const padding = AGENT_MESSAGE_LOCATOR_HIT_SIZE_PX;
|
|
14582
|
+
const currentTop = viewport.scrollTop;
|
|
14583
|
+
const currentBottom = currentTop + viewportHeight;
|
|
14584
|
+
if (selectedTop < currentTop + padding) {
|
|
14585
|
+
viewport.scrollTop = Math.max(0, selectedTop - padding);
|
|
14586
|
+
return;
|
|
14587
|
+
}
|
|
14588
|
+
if (selectedBottom > currentBottom - padding) {
|
|
14589
|
+
viewport.scrollTop = Math.max(0, selectedBottom - viewportHeight + padding);
|
|
14590
|
+
}
|
|
14591
|
+
}
|
|
14592
|
+
function readMessageLocatorVisibleFrame(scrollParent) {
|
|
14593
|
+
const style = window.getComputedStyle(scrollParent);
|
|
14594
|
+
const topOffsetPx = parseCssPx(style.scrollPaddingTop);
|
|
14595
|
+
const bottomOffsetPx = Math.min(
|
|
14596
|
+
parseCssPx(style.scrollPaddingBottom),
|
|
14597
|
+
AGENT_MESSAGE_LOCATOR_BOTTOM_SAFE_INSET_MAX_PX
|
|
14598
|
+
);
|
|
14599
|
+
return {
|
|
14600
|
+
heightPx: Math.max(
|
|
14601
|
+
0,
|
|
14602
|
+
scrollParent.clientHeight - topOffsetPx - bottomOffsetPx
|
|
14603
|
+
),
|
|
14604
|
+
topOffsetPx
|
|
14605
|
+
};
|
|
14606
|
+
}
|
|
14607
|
+
function parseCssPx(value) {
|
|
14608
|
+
const parsed = Number.parseFloat(value);
|
|
14609
|
+
return Number.isFinite(parsed) ? Math.max(0, parsed) : 0;
|
|
14610
|
+
}
|
|
14611
|
+
function containMessageLocatorPanelWheel(event) {
|
|
14612
|
+
event.stopPropagation();
|
|
14613
|
+
if (event.deltaY === 0) {
|
|
14614
|
+
return;
|
|
14615
|
+
}
|
|
14616
|
+
event.preventDefault();
|
|
14617
|
+
event.currentTarget.scrollTop += event.deltaY;
|
|
14618
|
+
}
|
|
14531
14619
|
function findMessageLocatorScrollParent(locator) {
|
|
14532
14620
|
const timeline = locator.closest(
|
|
14533
14621
|
'[data-testid="agent-gui-timeline"]'
|
|
@@ -14776,4 +14864,4 @@ export {
|
|
|
14776
14864
|
AgentConversationFlow,
|
|
14777
14865
|
useProjectedAgentConversation
|
|
14778
14866
|
};
|
|
14779
|
-
//# sourceMappingURL=chunk-
|
|
14867
|
+
//# sourceMappingURL=chunk-3ZVVFQH5.js.map
|