@tutti-os/agent-gui 0.0.100 → 0.0.102
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/README.md +31 -0
- package/dist/{AgentGUI-DgBjACOL.d.ts → AgentGUI-BJ3As1gI.d.ts} +17 -36
- package/dist/agent-conversation/index.d.ts +1 -1
- package/dist/agent-conversation/index.js +2 -2
- package/dist/agent-gui.d.ts +3 -3
- package/dist/agent-gui.js +6 -6
- package/dist/agent-message-center/index.js +2 -2
- package/dist/{agentGuiNodeTypes-C-wBSM-Y.d.ts → agentGuiNodeTypes-BH3lz6gn.d.ts} +2 -1
- package/dist/app/renderer/agentactivity.css +2 -37
- package/dist/{chunk-BQJOYTW2.js → chunk-LHKBR77G.js} +474 -487
- package/dist/chunk-LHKBR77G.js.map +1 -0
- package/dist/{chunk-MES7BQWI.js → chunk-MJOQP2ED.js} +28 -97
- package/dist/chunk-MJOQP2ED.js.map +1 -0
- package/dist/{chunk-XFRY2WWB.js → chunk-TDVYZEUI.js} +2 -2
- package/dist/{chunk-FAE7CXZO.js → chunk-W4RYNKWO.js} +2 -2
- package/dist/{chunk-EUW6VPIK.js → chunk-YYE35EZ5.js} +8 -5
- package/dist/{chunk-EUW6VPIK.js.map → chunk-YYE35EZ5.js.map} +1 -1
- package/dist/{chunk-JWHPVETQ.js → chunk-ZPKPIHMZ.js} +44 -11
- package/dist/chunk-ZPKPIHMZ.js.map +1 -0
- package/dist/context-mention-palette/index.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/mention-search.js +1 -1
- package/package.json +12 -12
- package/dist/chunk-BQJOYTW2.js.map +0 -1
- package/dist/chunk-JWHPVETQ.js.map +0 -1
- package/dist/chunk-MES7BQWI.js.map +0 -1
- /package/dist/{chunk-XFRY2WWB.js.map → chunk-TDVYZEUI.js.map} +0 -0
- /package/dist/{chunk-FAE7CXZO.js.map → chunk-W4RYNKWO.js.map} +0 -0
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
useCallback as useCallback4,
|
|
259
259
|
memo,
|
|
260
260
|
useMemo,
|
|
261
|
-
useState as
|
|
261
|
+
useState as useState6
|
|
262
262
|
} from "react";
|
|
263
263
|
import { FileText } from "lucide-react";
|
|
264
264
|
import ReactMarkdown from "react-markdown";
|
|
@@ -999,15 +999,8 @@ function resolveAgentTargetPresentation(input) {
|
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
1001
|
// shared/agentMessageMarkdownRuntime.ts
|
|
1002
|
-
import {
|
|
1003
|
-
startTransition as startTransition2,
|
|
1004
|
-
useEffect as useEffect2,
|
|
1005
|
-
useState as useState2
|
|
1006
|
-
} from "react";
|
|
1007
1002
|
var COLLAPSED_LINE_LIMIT = 8;
|
|
1008
1003
|
var APPROX_CHARS_PER_LINE = 34;
|
|
1009
|
-
var DEFERRED_LONG_MARKDOWN_FALLBACK_DELAY_MS = 80;
|
|
1010
|
-
var DEFERRED_LONG_MARKDOWN_IDLE_TIMEOUT_MS = 700;
|
|
1011
1004
|
function splitStreamingMarkdownBlocks(content) {
|
|
1012
1005
|
const normalized = content.replace(/\r\n?/g, "\n");
|
|
1013
1006
|
if (!normalized) {
|
|
@@ -1100,49 +1093,6 @@ function activateMarkdownLinkFromPointer(event, href, onLinkClick) {
|
|
|
1100
1093
|
}
|
|
1101
1094
|
activateMarkdownLink(event, href, onLinkClick);
|
|
1102
1095
|
}
|
|
1103
|
-
function useDeferredMarkdownRenderReady(contentSignature, shouldDefer) {
|
|
1104
|
-
const [readySignature, setReadySignature] = useState2(
|
|
1105
|
-
shouldDefer ? null : contentSignature
|
|
1106
|
-
);
|
|
1107
|
-
const renderReady = !shouldDefer || readySignature === contentSignature;
|
|
1108
|
-
useEffect2(() => {
|
|
1109
|
-
if (!shouldDefer) {
|
|
1110
|
-
setReadySignature(contentSignature);
|
|
1111
|
-
return;
|
|
1112
|
-
}
|
|
1113
|
-
let canceled = false;
|
|
1114
|
-
let timeoutId = null;
|
|
1115
|
-
let idleCallbackId = null;
|
|
1116
|
-
const markReady = () => {
|
|
1117
|
-
if (canceled) {
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1120
|
-
startTransition2(() => {
|
|
1121
|
-
setReadySignature(contentSignature);
|
|
1122
|
-
});
|
|
1123
|
-
};
|
|
1124
|
-
if ("requestIdleCallback" in window) {
|
|
1125
|
-
idleCallbackId = window.requestIdleCallback(markReady, {
|
|
1126
|
-
timeout: DEFERRED_LONG_MARKDOWN_IDLE_TIMEOUT_MS
|
|
1127
|
-
});
|
|
1128
|
-
} else {
|
|
1129
|
-
timeoutId = setTimeout(
|
|
1130
|
-
markReady,
|
|
1131
|
-
DEFERRED_LONG_MARKDOWN_FALLBACK_DELAY_MS
|
|
1132
|
-
);
|
|
1133
|
-
}
|
|
1134
|
-
return () => {
|
|
1135
|
-
canceled = true;
|
|
1136
|
-
if (idleCallbackId !== null) {
|
|
1137
|
-
window.cancelIdleCallback(idleCallbackId);
|
|
1138
|
-
}
|
|
1139
|
-
if (timeoutId !== null) {
|
|
1140
|
-
clearTimeout(timeoutId);
|
|
1141
|
-
}
|
|
1142
|
-
};
|
|
1143
|
-
}, [contentSignature, shouldDefer]);
|
|
1144
|
-
return renderReady;
|
|
1145
|
-
}
|
|
1146
1096
|
function hashMarkdownProfilerContent(content) {
|
|
1147
1097
|
let hash = 0;
|
|
1148
1098
|
for (let index = 0; index < content.length; index += 1) {
|
|
@@ -1621,7 +1571,7 @@ import {
|
|
|
1621
1571
|
useCallback,
|
|
1622
1572
|
useContext as useContext2,
|
|
1623
1573
|
useRef as useRef2,
|
|
1624
|
-
useState as
|
|
1574
|
+
useState as useState2
|
|
1625
1575
|
} from "react";
|
|
1626
1576
|
import { Check, Copy } from "lucide-react";
|
|
1627
1577
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
@@ -1751,7 +1701,7 @@ function MarkdownPre({
|
|
|
1751
1701
|
}) {
|
|
1752
1702
|
"use memo";
|
|
1753
1703
|
const preRef = useRef2(null);
|
|
1754
|
-
const [copied, setCopied] =
|
|
1704
|
+
const [copied, setCopied] = useState2(false);
|
|
1755
1705
|
const copyResetRef = useRef2(null);
|
|
1756
1706
|
const handleCopy = useCallback(() => {
|
|
1757
1707
|
const text = preRef.current?.textContent?.trim();
|
|
@@ -1784,13 +1734,13 @@ function MarkdownPre({
|
|
|
1784
1734
|
}
|
|
1785
1735
|
|
|
1786
1736
|
// shared/AgentMessageMarkdownMedia.tsx
|
|
1787
|
-
import { useContext as useContext3, useEffect as
|
|
1737
|
+
import { useContext as useContext3, useEffect as useEffect3, useState as useState5 } from "react";
|
|
1788
1738
|
|
|
1789
1739
|
// app/renderer/components/ZoomableImage.tsx
|
|
1790
1740
|
import {
|
|
1791
1741
|
useCallback as useCallback3,
|
|
1792
|
-
useEffect as
|
|
1793
|
-
useState as
|
|
1742
|
+
useEffect as useEffect2,
|
|
1743
|
+
useState as useState4
|
|
1794
1744
|
} from "react";
|
|
1795
1745
|
import { createPortal } from "react-dom";
|
|
1796
1746
|
import {
|
|
@@ -1809,7 +1759,7 @@ import { RotateCcwIcon, ZoomInIcon, ZoomOutIcon } from "lucide-react";
|
|
|
1809
1759
|
import {
|
|
1810
1760
|
useCallback as useCallback2,
|
|
1811
1761
|
useRef as useRef3,
|
|
1812
|
-
useState as
|
|
1762
|
+
useState as useState3
|
|
1813
1763
|
} from "react";
|
|
1814
1764
|
import {
|
|
1815
1765
|
ContextMenu,
|
|
@@ -1900,7 +1850,7 @@ function ConversationImageContextMenu({
|
|
|
1900
1850
|
}) {
|
|
1901
1851
|
const agentHostApi = useOptionalAgentHostApi();
|
|
1902
1852
|
const copyStartedRef = useRef3(false);
|
|
1903
|
-
const [menuResetKey, setMenuResetKey] =
|
|
1853
|
+
const [menuResetKey, setMenuResetKey] = useState3(0);
|
|
1904
1854
|
const copyAndClose = useCallback2(() => {
|
|
1905
1855
|
if (copyStartedRef.current) {
|
|
1906
1856
|
return;
|
|
@@ -2016,12 +1966,12 @@ function ZoomableImage({
|
|
|
2016
1966
|
const agentHostApi = useOptionalAgentHostApi();
|
|
2017
1967
|
const actionSource = typeof src === "string" && src.trim() ? src.trim() : null;
|
|
2018
1968
|
const hasImageActions = Boolean(actionSource && downloadName !== void 0);
|
|
2019
|
-
const [contextMenuPosition, setContextMenuPosition] =
|
|
2020
|
-
const [copyStatus, setCopyStatus] =
|
|
2021
|
-
const [imagePreviewZoom, setImagePreviewZoom] =
|
|
2022
|
-
const [isWheelZooming, setIsWheelZooming] =
|
|
2023
|
-
const [isImagePreviewOpen, setIsImagePreviewOpen] =
|
|
2024
|
-
const [isImagePreviewClosing, setIsImagePreviewClosing] =
|
|
1969
|
+
const [contextMenuPosition, setContextMenuPosition] = useState4(null);
|
|
1970
|
+
const [copyStatus, setCopyStatus] = useState4(null);
|
|
1971
|
+
const [imagePreviewZoom, setImagePreviewZoom] = useState4(1);
|
|
1972
|
+
const [isWheelZooming, setIsWheelZooming] = useState4(false);
|
|
1973
|
+
const [isImagePreviewOpen, setIsImagePreviewOpen] = useState4(false);
|
|
1974
|
+
const [isImagePreviewClosing, setIsImagePreviewClosing] = useState4(false);
|
|
2025
1975
|
const imagePreviewZoomPercent = Math.round(imagePreviewZoom * 100);
|
|
2026
1976
|
const canZoomOut = imagePreviewZoom > IMAGE_PREVIEW_ZOOM_MIN;
|
|
2027
1977
|
const canZoomIn = imagePreviewZoom < IMAGE_PREVIEW_ZOOM_MAX;
|
|
@@ -2051,7 +2001,7 @@ function ZoomableImage({
|
|
|
2051
2001
|
setIsImagePreviewClosing(false);
|
|
2052
2002
|
setIsImagePreviewOpen(true);
|
|
2053
2003
|
};
|
|
2054
|
-
|
|
2004
|
+
useEffect2(() => {
|
|
2055
2005
|
const handleWindowKeyDown = (event) => {
|
|
2056
2006
|
if (!isImagePreviewOpen || event.key !== "Escape") {
|
|
2057
2007
|
return;
|
|
@@ -2648,10 +2598,10 @@ function MarkdownMedia({
|
|
|
2648
2598
|
const shouldEnableZoom = enableZoom && !isInsideLink;
|
|
2649
2599
|
const fallbackMediaKind = typeof src === "string" ? resolveMarkdownMediaKind(src) : null;
|
|
2650
2600
|
const resolvedSrc = typeof src === "string" ? resolveRenderableMarkdownMediaSrc(src) : src;
|
|
2651
|
-
const [state, setState] =
|
|
2601
|
+
const [state, setState] = useState5(
|
|
2652
2602
|
() => canReadWorkspaceImage && workspacePath ? peekCachedMarkdownMediaState(workspacePath) ?? { status: "loading" } : null
|
|
2653
2603
|
);
|
|
2654
|
-
|
|
2604
|
+
useEffect3(() => {
|
|
2655
2605
|
if (!workspacePath || !readWorkspaceImage) {
|
|
2656
2606
|
setState(null);
|
|
2657
2607
|
return;
|
|
@@ -2830,8 +2780,6 @@ function resolveMarkdownImageDownloadName(src, alt) {
|
|
|
2830
2780
|
|
|
2831
2781
|
// shared/AgentMessageMarkdown.tsx
|
|
2832
2782
|
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2833
|
-
var DEFERRED_LONG_MARKDOWN_CHAR_THRESHOLD = 4096;
|
|
2834
|
-
var STREAMING_MARKDOWN_EMERGENCY_PLAIN_CHAR_THRESHOLD = 96e3;
|
|
2835
2783
|
var STREAMING_MARKDOWN_FRAME_MS = 24;
|
|
2836
2784
|
var STREAMING_MARKDOWN_MAX_CHARS_PER_SECOND = 6e3;
|
|
2837
2785
|
var STREAMING_MARKDOWN_TAIL_FLUSH_CHARS = 0;
|
|
@@ -2871,7 +2819,6 @@ function AgentMessageMarkdown({
|
|
|
2871
2819
|
className,
|
|
2872
2820
|
inline = false,
|
|
2873
2821
|
normalizePlainIssueMentionTitle = false,
|
|
2874
|
-
deferLongContentRender = false,
|
|
2875
2822
|
enableImageZoom = false,
|
|
2876
2823
|
previewMode = false,
|
|
2877
2824
|
streaming = false
|
|
@@ -2895,15 +2842,11 @@ function AgentMessageMarkdown({
|
|
|
2895
2842
|
const workspaceRoot = workspaceLinkContext?.workspaceRoot ?? null;
|
|
2896
2843
|
const basePath = workspaceLinkContext?.basePath ?? null;
|
|
2897
2844
|
const workspaceLinkSource = workspaceLinkContext?.source ?? null;
|
|
2898
|
-
const [isExpanded, setIsExpanded] =
|
|
2845
|
+
const [isExpanded, setIsExpanded] = useState6(false);
|
|
2899
2846
|
const resolvedExpandLabel = expandLabel ?? t("agentHost.workspaceAgentMessageExpand");
|
|
2900
2847
|
const shouldCollapse = collapsible && isLikelyLongerThanLineLimit(stabilizedContent);
|
|
2901
2848
|
const isCollapsed = shouldCollapse && !isExpanded;
|
|
2902
2849
|
const ContainerTag = inline ? "span" : "div";
|
|
2903
|
-
const contentSignature = useMemo(
|
|
2904
|
-
() => hashMarkdownProfilerContent(stabilizedContent),
|
|
2905
|
-
[stabilizedContent]
|
|
2906
|
-
);
|
|
2907
2850
|
const normalizedContent = useMemo(
|
|
2908
2851
|
() => linkBareLocalAbsolutePaths(
|
|
2909
2852
|
normalizeLocalPathMarkdownLinks(
|
|
@@ -2917,11 +2860,6 @@ function AgentMessageMarkdown({
|
|
|
2917
2860
|
[normalizePlainIssueMentionTitle, stabilizedContent]
|
|
2918
2861
|
);
|
|
2919
2862
|
const isMentionOnly = isMentionOnlyMarkdownContent(normalizedContent);
|
|
2920
|
-
const shouldDeferMarkdownRender = deferLongContentRender && !inline && content.length >= (streaming ? STREAMING_MARKDOWN_EMERGENCY_PLAIN_CHAR_THRESHOLD : DEFERRED_LONG_MARKDOWN_CHAR_THRESHOLD) && !isExpanded;
|
|
2921
|
-
const markdownRenderReady = useDeferredMarkdownRenderReady(
|
|
2922
|
-
contentSignature,
|
|
2923
|
-
shouldDeferMarkdownRender
|
|
2924
|
-
);
|
|
2925
2863
|
const handleLinkClick = useCallback4(
|
|
2926
2864
|
(href) => {
|
|
2927
2865
|
if (workspaceLinkSource && onLinkAction && (workspaceRoot || basePath)) {
|
|
@@ -3018,7 +2956,7 @@ function AgentMessageMarkdown({
|
|
|
3018
2956
|
"data-agent-mention-only": isMentionOnly ? "true" : void 0,
|
|
3019
2957
|
"data-collapsed": isCollapsed ? "true" : "false",
|
|
3020
2958
|
onClickCapture: handleAnchorClickCapture,
|
|
3021
|
-
children:
|
|
2959
|
+
children: streaming ? /* @__PURE__ */ jsx6(
|
|
3022
2960
|
StreamingMarkdownBlocks,
|
|
3023
2961
|
{
|
|
3024
2962
|
content: normalizedContent,
|
|
@@ -3033,13 +2971,6 @@ function AgentMessageMarkdown({
|
|
|
3033
2971
|
components: markdownComponents,
|
|
3034
2972
|
children: normalizedContent
|
|
3035
2973
|
}
|
|
3036
|
-
) : /* @__PURE__ */ jsx6(
|
|
3037
|
-
"div",
|
|
3038
|
-
{
|
|
3039
|
-
className: "whitespace-pre-wrap [overflow-wrap:anywhere]",
|
|
3040
|
-
"data-workspace-agent-markdown-deferred": "true",
|
|
3041
|
-
children: normalizedContent
|
|
3042
|
-
}
|
|
3043
2974
|
)
|
|
3044
2975
|
}
|
|
3045
2976
|
),
|
|
@@ -3343,9 +3274,9 @@ function MentionLink({
|
|
|
3343
3274
|
import {
|
|
3344
3275
|
forwardRef,
|
|
3345
3276
|
useCallback as useCallback5,
|
|
3346
|
-
useEffect as
|
|
3277
|
+
useEffect as useEffect4,
|
|
3347
3278
|
useRef as useRef4,
|
|
3348
|
-
useState as
|
|
3279
|
+
useState as useState7
|
|
3349
3280
|
} from "react";
|
|
3350
3281
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3351
3282
|
var MIN_THUMB_HEIGHT = 24;
|
|
@@ -3360,12 +3291,12 @@ function CustomScrollbar({
|
|
|
3360
3291
|
"use memo";
|
|
3361
3292
|
const trackRef = useRef4(null);
|
|
3362
3293
|
const dragStateRef = useRef4(null);
|
|
3363
|
-
const [scrollbarState, setScrollbarState] =
|
|
3294
|
+
const [scrollbarState, setScrollbarState] = useState7({
|
|
3364
3295
|
scrollable: false,
|
|
3365
3296
|
thumbHeight: 0,
|
|
3366
3297
|
thumbTop: 0
|
|
3367
3298
|
});
|
|
3368
|
-
const [dragging, setDragging] =
|
|
3299
|
+
const [dragging, setDragging] = useState7(false);
|
|
3369
3300
|
const syncScrollbarState = useCallback5(() => {
|
|
3370
3301
|
const viewport = getViewport();
|
|
3371
3302
|
if (!viewport) {
|
|
@@ -3467,7 +3398,7 @@ function CustomScrollbar({
|
|
|
3467
3398
|
},
|
|
3468
3399
|
[getViewport, scrollbarState.scrollable, scrollbarState.thumbHeight]
|
|
3469
3400
|
);
|
|
3470
|
-
|
|
3401
|
+
useEffect4(() => {
|
|
3471
3402
|
if (!dragging) {
|
|
3472
3403
|
return;
|
|
3473
3404
|
}
|
|
@@ -3492,7 +3423,7 @@ function CustomScrollbar({
|
|
|
3492
3423
|
window.removeEventListener("mouseup", handleMouseUp);
|
|
3493
3424
|
};
|
|
3494
3425
|
}, [dragging, getViewport, syncScrollbarState]);
|
|
3495
|
-
|
|
3426
|
+
useEffect4(() => {
|
|
3496
3427
|
const viewport = getViewport();
|
|
3497
3428
|
if (!viewport) {
|
|
3498
3429
|
setScrollbarState({ scrollable: false, thumbHeight: 0, thumbTop: 0 });
|
|
@@ -3601,7 +3532,7 @@ function clamp(value, min, max) {
|
|
|
3601
3532
|
import {
|
|
3602
3533
|
forwardRef as forwardRef2,
|
|
3603
3534
|
useCallback as useCallback6,
|
|
3604
|
-
useEffect as
|
|
3535
|
+
useEffect as useEffect5,
|
|
3605
3536
|
useImperativeHandle,
|
|
3606
3537
|
useRef as useRef5
|
|
3607
3538
|
} from "react";
|
|
@@ -3671,7 +3602,7 @@ var MessageSquareMoreIcon = forwardRef2(
|
|
|
3671
3602
|
stopAnimation
|
|
3672
3603
|
};
|
|
3673
3604
|
});
|
|
3674
|
-
|
|
3605
|
+
useEffect5(() => {
|
|
3675
3606
|
if (active) {
|
|
3676
3607
|
startAnimation();
|
|
3677
3608
|
return;
|
|
@@ -3809,4 +3740,4 @@ export {
|
|
|
3809
3740
|
AgentMessageMarkdown,
|
|
3810
3741
|
CustomScrollArea
|
|
3811
3742
|
};
|
|
3812
|
-
//# sourceMappingURL=chunk-
|
|
3743
|
+
//# sourceMappingURL=chunk-MJOQP2ED.js.map
|