@opengeni/react 0.34.2 → 0.35.2
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/{chunk-GZ4KR67U.js → chunk-ALA3UGWB.js} +2 -2
- package/dist/chunk-ATSTR5P3.js +138 -0
- package/dist/chunk-ATSTR5P3.js.map +1 -0
- package/dist/{chunk-L7R5RK6A.js → chunk-AXQQ2V2I.js} +1312 -926
- package/dist/chunk-AXQQ2V2I.js.map +1 -0
- package/dist/{chunk-KZRUYCL4.js → chunk-FT2TXNGZ.js} +5 -2
- package/dist/chunk-FT2TXNGZ.js.map +1 -0
- package/dist/{chunk-TCCE5ZU5.js → chunk-J2RVJ6JX.js} +39 -9
- package/dist/chunk-J2RVJ6JX.js.map +1 -0
- package/dist/{chunk-4QOQ2DSR.js → chunk-LAKLF4PA.js} +14 -1
- package/dist/chunk-LAKLF4PA.js.map +1 -0
- package/dist/{chunk-A2WITZTI.js → chunk-OKKMZDQF.js} +3 -2
- package/dist/chunk-OKKMZDQF.js.map +1 -0
- package/dist/{chunk-MS3FBZ6A.js → chunk-PVW56EVR.js} +105 -62
- package/dist/chunk-PVW56EVR.js.map +1 -0
- package/dist/components/chat-composer.d.ts +2 -1
- package/dist/components/composer.d.ts +8 -2
- package/dist/components/copy-button.d.ts +4 -2
- package/dist/components/tip-follow.d.ts +3 -0
- package/dist/composer.d.ts +2 -1
- package/dist/composer.js +4 -3
- package/dist/hooks/use-turn-queue.d.ts +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +105 -101
- package/dist/index.js.map +1 -1
- package/dist/lib/format.d.ts +2 -0
- package/dist/machines.js +2 -2
- package/dist/session-ui.js +4 -3
- package/dist/session.js +4 -4
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/parsers.d.ts +5 -0
- package/dist/timeline/projection.d.ts +1 -12
- package/dist/timeline/tool-display-name.d.ts +17 -6
- package/dist/workstream-control-event.d.ts +6 -0
- package/package.json +2 -2
- package/src/components/chat-composer.tsx +1 -1
- package/src/components/composer-transcription-control.tsx +70 -57
- package/src/components/composer.tsx +197 -126
- package/src/components/copy-button.tsx +27 -8
- package/src/components/message-timeline.tsx +385 -71
- package/src/components/tip-follow.ts +15 -0
- package/src/composer.ts +1 -1
- package/src/hooks/use-composer.ts +7 -1
- package/src/hooks/use-turn-queue.ts +4 -0
- package/src/index.ts +2 -1
- package/src/lib/format.ts +14 -0
- package/src/timeline/index.ts +2 -0
- package/src/timeline/parsers.ts +18 -1
- package/src/timeline/projection.ts +51 -20
- package/src/timeline/registry.ts +15 -2
- package/src/timeline/shared.tsx +30 -28
- package/src/timeline/tool-display-name.ts +30 -11
- package/src/timeline/tool-renderers.tsx +347 -16
- package/src/timeline/turn-summary.tsx +5 -2
- package/src/workstream-control-event.ts +6 -0
- package/dist/chunk-4QOQ2DSR.js.map +0 -1
- package/dist/chunk-A2WITZTI.js.map +0 -1
- package/dist/chunk-KZRUYCL4.js.map +0 -1
- package/dist/chunk-L7R5RK6A.js.map +0 -1
- package/dist/chunk-MS3FBZ6A.js.map +0 -1
- package/dist/chunk-TCCE5ZU5.js.map +0 -1
- /package/dist/{chunk-GZ4KR67U.js.map → chunk-ALA3UGWB.js.map} +0 -0
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
shouldSteerOnKey,
|
|
3
3
|
shouldSubmitOnKey
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FT2TXNGZ.js";
|
|
5
5
|
import {
|
|
6
6
|
groupPickerRowsByBillingClass
|
|
7
7
|
} from "./chunk-U255M5EZ.js";
|
|
8
|
+
import {
|
|
9
|
+
Tooltip,
|
|
10
|
+
TooltipContent,
|
|
11
|
+
TooltipProvider,
|
|
12
|
+
TooltipTrigger
|
|
13
|
+
} from "./chunk-ATSTR5P3.js";
|
|
8
14
|
import {
|
|
9
15
|
cn
|
|
10
16
|
} from "./chunk-TK7G6XLT.js";
|
|
@@ -12,7 +18,7 @@ import {
|
|
|
12
18
|
composerSubmissionErrorMessage,
|
|
13
19
|
formatBytes,
|
|
14
20
|
formatRelativeTime
|
|
15
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LAKLF4PA.js";
|
|
16
22
|
|
|
17
23
|
// src/hooks/use-transcription.ts
|
|
18
24
|
import {
|
|
@@ -751,6 +757,9 @@ function errorCode(error) {
|
|
|
751
757
|
return "unknown";
|
|
752
758
|
}
|
|
753
759
|
|
|
760
|
+
// src/workstream-control-event.ts
|
|
761
|
+
var OPEN_WORKSTREAM_CONTROL_EVENT = "opengeni:open-workstream-control";
|
|
762
|
+
|
|
754
763
|
// src/commands/registry.ts
|
|
755
764
|
function parseCommandLine(value) {
|
|
756
765
|
if (value[0] !== "/") {
|
|
@@ -1340,6 +1349,7 @@ import {
|
|
|
1340
1349
|
} from "lucide-react";
|
|
1341
1350
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "motion/react";
|
|
1342
1351
|
import {
|
|
1352
|
+
cloneElement,
|
|
1343
1353
|
createContext,
|
|
1344
1354
|
forwardRef,
|
|
1345
1355
|
useCallback as useCallback4,
|
|
@@ -1351,7 +1361,13 @@ import {
|
|
|
1351
1361
|
useState as useState4
|
|
1352
1362
|
} from "react";
|
|
1353
1363
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1354
|
-
|
|
1364
|
+
function ComposerTip({
|
|
1365
|
+
tip,
|
|
1366
|
+
children
|
|
1367
|
+
}) {
|
|
1368
|
+
if (!tip) return children;
|
|
1369
|
+
return cloneElement(children, { title: tip });
|
|
1370
|
+
}
|
|
1355
1371
|
var defaultChatComposerMessages = {
|
|
1356
1372
|
messagePlaceholder: "Message the agent\u2026",
|
|
1357
1373
|
pausedPlaceholder: "Sending will resume this workstream\u2026",
|
|
@@ -1413,6 +1429,20 @@ var defaultChatComposerMessages = {
|
|
|
1413
1429
|
formatBytes,
|
|
1414
1430
|
formatRelativeTime
|
|
1415
1431
|
};
|
|
1432
|
+
function applyComposerTextareaHeight(textarea, maxPx = 220) {
|
|
1433
|
+
if (textarea.scrollHeight > textarea.clientHeight + 1) {
|
|
1434
|
+
textarea.style.height = `${Math.min(textarea.scrollHeight, maxPx)}px`;
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1437
|
+
const before = textarea.offsetHeight;
|
|
1438
|
+
textarea.style.height = "auto";
|
|
1439
|
+
const nextPx = Math.min(textarea.scrollHeight, maxPx);
|
|
1440
|
+
if (Math.abs(nextPx - before) < 1) {
|
|
1441
|
+
textarea.style.height = `${before}px`;
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
textarea.style.height = `${nextPx}px`;
|
|
1445
|
+
}
|
|
1416
1446
|
function useChatComposerController({
|
|
1417
1447
|
delivery,
|
|
1418
1448
|
draft,
|
|
@@ -1516,13 +1546,30 @@ function useChatComposerController({
|
|
|
1516
1546
|
},
|
|
1517
1547
|
[]
|
|
1518
1548
|
);
|
|
1549
|
+
const resizeInputRafRef = useRef4(null);
|
|
1519
1550
|
const resizeInput = useCallback4(() => {
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1551
|
+
if (resizeInputRafRef.current !== null) {
|
|
1552
|
+
return;
|
|
1553
|
+
}
|
|
1554
|
+
resizeInputRafRef.current = requestAnimationFrame(() => {
|
|
1555
|
+
resizeInputRafRef.current = null;
|
|
1556
|
+
const textarea = textareaRef.current;
|
|
1557
|
+
if (!textarea) {
|
|
1558
|
+
return;
|
|
1559
|
+
}
|
|
1560
|
+
applyComposerTextareaHeight(textarea, 220);
|
|
1561
|
+
});
|
|
1524
1562
|
}, []);
|
|
1525
1563
|
useEffect3(() => resizeInput(), [delivery.value, resizeInput]);
|
|
1564
|
+
useEffect3(
|
|
1565
|
+
() => () => {
|
|
1566
|
+
if (resizeInputRafRef.current !== null) {
|
|
1567
|
+
cancelAnimationFrame(resizeInputRafRef.current);
|
|
1568
|
+
resizeInputRafRef.current = null;
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1571
|
+
[]
|
|
1572
|
+
);
|
|
1526
1573
|
const handlers = useMemo4(
|
|
1527
1574
|
() => ({
|
|
1528
1575
|
notice: (next) => {
|
|
@@ -1729,7 +1776,7 @@ function isRecord2(value) {
|
|
|
1729
1776
|
return typeof value === "object" && value !== null;
|
|
1730
1777
|
}
|
|
1731
1778
|
var Root = forwardRef(function ComposerRoot({ controller, children, className, style, ...props }, forwardedRef) {
|
|
1732
|
-
return /* @__PURE__ */ jsx3(ComposerContext.Provider, { value: controller, children: /* @__PURE__ */ jsxs3(
|
|
1779
|
+
return /* @__PURE__ */ jsx3(ComposerContext.Provider, { value: controller, children: /* @__PURE__ */ jsx3(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs3(
|
|
1733
1780
|
"div",
|
|
1734
1781
|
{
|
|
1735
1782
|
...props,
|
|
@@ -1742,7 +1789,7 @@ var Root = forwardRef(function ComposerRoot({ controller, children, className, s
|
|
|
1742
1789
|
/* @__PURE__ */ jsx3(ComposerAnnouncements, {})
|
|
1743
1790
|
]
|
|
1744
1791
|
}
|
|
1745
|
-
) });
|
|
1792
|
+
) }) });
|
|
1746
1793
|
});
|
|
1747
1794
|
var Frame = forwardRef(function ComposerFrame({ className, ...props }, ref) {
|
|
1748
1795
|
return /* @__PURE__ */ jsx3("div", { ...props, ref, className: cn("relative", className) });
|
|
@@ -1947,6 +1994,7 @@ var AttachButton = forwardRef(
|
|
|
1947
1994
|
function ComposerAttachButton({ accept, multiple = true, className, "aria-label": ariaLabel, title, children, ...props }, ref) {
|
|
1948
1995
|
const controller = useComposerController();
|
|
1949
1996
|
if (!controller.attachments) return null;
|
|
1997
|
+
const tip = title ?? controller.messages.attachFiles;
|
|
1950
1998
|
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
1951
1999
|
/* @__PURE__ */ jsx3(
|
|
1952
2000
|
"input",
|
|
@@ -1959,7 +2007,7 @@ var AttachButton = forwardRef(
|
|
|
1959
2007
|
onChange: controller.handleFileChange
|
|
1960
2008
|
}
|
|
1961
2009
|
),
|
|
1962
|
-
/* @__PURE__ */ jsx3(
|
|
2010
|
+
/* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
|
|
1963
2011
|
"button",
|
|
1964
2012
|
{
|
|
1965
2013
|
...props,
|
|
@@ -1967,8 +2015,7 @@ var AttachButton = forwardRef(
|
|
|
1967
2015
|
type: "button",
|
|
1968
2016
|
disabled: controller.disabled,
|
|
1969
2017
|
onClick: () => controller.fileInputRef.current?.click(),
|
|
1970
|
-
"aria-label": ariaLabel ??
|
|
1971
|
-
title: title ?? controller.messages.attachFiles,
|
|
2018
|
+
"aria-label": ariaLabel ?? tip,
|
|
1972
2019
|
className: cn(
|
|
1973
2020
|
"inline-flex size-8 items-center justify-center rounded-og-md",
|
|
1974
2021
|
"text-og-fg-muted transition-colors duration-150 hover:bg-og-surface-2 hover:text-og-fg",
|
|
@@ -1977,7 +2024,7 @@ var AttachButton = forwardRef(
|
|
|
1977
2024
|
),
|
|
1978
2025
|
children: children ?? /* @__PURE__ */ jsx3(PaperclipIcon, { className: "size-4" })
|
|
1979
2026
|
}
|
|
1980
|
-
)
|
|
2027
|
+
) })
|
|
1981
2028
|
] });
|
|
1982
2029
|
}
|
|
1983
2030
|
);
|
|
@@ -2010,7 +2057,8 @@ var PauseButton = forwardRef(
|
|
|
2010
2057
|
const controller = useComposerController();
|
|
2011
2058
|
if (!controller.effectiveControl || controller.paused || !controller.hasControl) return null;
|
|
2012
2059
|
const busy = controller.pausing || controller.resuming;
|
|
2013
|
-
|
|
2060
|
+
const tip = title ?? controller.messages.pauseTitle;
|
|
2061
|
+
return /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
|
|
2014
2062
|
"button",
|
|
2015
2063
|
{
|
|
2016
2064
|
...props,
|
|
@@ -2019,7 +2067,6 @@ var PauseButton = forwardRef(
|
|
|
2019
2067
|
onClick: () => void controller.pause(),
|
|
2020
2068
|
disabled: busy,
|
|
2021
2069
|
"aria-label": ariaLabel ?? controller.messages.pauseAriaLabel,
|
|
2022
|
-
title: title ?? controller.messages.pauseTitle,
|
|
2023
2070
|
className: cn(
|
|
2024
2071
|
"inline-flex size-8 items-center justify-center rounded-og-md border border-og-border pointer-coarse:size-11",
|
|
2025
2072
|
"bg-og-surface-2 text-og-fg-muted transition-colors duration-150",
|
|
@@ -2029,13 +2076,14 @@ var PauseButton = forwardRef(
|
|
|
2029
2076
|
),
|
|
2030
2077
|
children: children ?? (busy ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-3.5 animate-og-spin" }) : /* @__PURE__ */ jsx3(PauseIcon, { className: "size-3.5 fill-current" }))
|
|
2031
2078
|
}
|
|
2032
|
-
);
|
|
2079
|
+
) });
|
|
2033
2080
|
}
|
|
2034
2081
|
);
|
|
2035
2082
|
var SendButton = forwardRef(
|
|
2036
2083
|
function ComposerSendButton({ className, "aria-label": ariaLabel, title, children, ...props }, ref) {
|
|
2037
2084
|
const controller = useComposerController();
|
|
2038
|
-
|
|
2085
|
+
const tip = title ?? (controller.paused ? controller.messages.sendAndResumeTitle : controller.messages.sendTitle);
|
|
2086
|
+
return /* @__PURE__ */ jsx3(ComposerTip, { tip, children: /* @__PURE__ */ jsx3(
|
|
2039
2087
|
"button",
|
|
2040
2088
|
{
|
|
2041
2089
|
...props,
|
|
@@ -2043,8 +2091,8 @@ var SendButton = forwardRef(
|
|
|
2043
2091
|
type: "button",
|
|
2044
2092
|
onClick: () => void controller.submit("queue"),
|
|
2045
2093
|
disabled: !controller.canSubmit,
|
|
2094
|
+
"data-og-tip": tip,
|
|
2046
2095
|
"aria-label": ariaLabel ?? (controller.paused ? controller.messages.sendAndResumeAriaLabel : controller.messages.sendMessageAriaLabel),
|
|
2047
|
-
title: title ?? (controller.paused ? controller.messages.sendAndResumeTitle : controller.messages.sendTitle),
|
|
2048
2096
|
className: cn(
|
|
2049
2097
|
"inline-flex size-8 items-center justify-center rounded-og-md pointer-coarse:size-11",
|
|
2050
2098
|
"bg-og-accent text-og-accent-fg shadow-og-sm",
|
|
@@ -2055,7 +2103,7 @@ var SendButton = forwardRef(
|
|
|
2055
2103
|
),
|
|
2056
2104
|
children: children ?? (controller.sending ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-4 animate-og-spin" }) : /* @__PURE__ */ jsx3(ArrowUpIcon, { className: "size-4" }))
|
|
2057
2105
|
}
|
|
2058
|
-
);
|
|
2106
|
+
) });
|
|
2059
2107
|
}
|
|
2060
2108
|
);
|
|
2061
2109
|
function Help() {
|
|
@@ -2216,20 +2264,25 @@ function WorkstreamPausedStrip({
|
|
|
2216
2264
|
},
|
|
2217
2265
|
`${entry.kind}-${entry.sessionId ?? "workspace"}-${entry.revision}`
|
|
2218
2266
|
)) }),
|
|
2219
|
-
broaderOptions.length > 0 ? /* @__PURE__ */ jsx3("div", { className: "mt-2 flex flex-wrap gap-1.5", children: broaderOptions.map((option) => /* @__PURE__ */
|
|
2220
|
-
|
|
2267
|
+
broaderOptions.length > 0 ? /* @__PURE__ */ jsx3("div", { className: "mt-2 flex flex-wrap gap-1.5", children: broaderOptions.map((option) => /* @__PURE__ */ jsx3(
|
|
2268
|
+
ComposerTip,
|
|
2221
2269
|
{
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2270
|
+
tip: option.impactCopy,
|
|
2271
|
+
children: /* @__PURE__ */ jsxs3(
|
|
2272
|
+
"button",
|
|
2273
|
+
{
|
|
2274
|
+
type: "button",
|
|
2275
|
+
disabled: busy,
|
|
2276
|
+
onClick: () => onResumeOption(option),
|
|
2277
|
+
className: "rounded-og-md border border-og-border bg-og-surface-1 px-2 py-1 text-og-xs text-og-fg-muted hover:bg-og-surface-2 hover:text-og-fg pointer-coarse:min-h-10",
|
|
2278
|
+
children: [
|
|
2279
|
+
/* @__PURE__ */ jsx3("span", { className: "block font-medium", children: option.scope === "workspace" ? messages.resumeWorkspace : messages.resumeFromSession }),
|
|
2280
|
+
/* @__PURE__ */ jsx3("span", { className: "block text-[10px] text-og-fg-subtle", children: option.selectedStateAfter === "active" ? messages.sessionCanRun : messages.stillPausedBy(
|
|
2281
|
+
option.remainingPrimaryBlocker?.displayName ?? messages.narrowerPause
|
|
2282
|
+
) })
|
|
2283
|
+
]
|
|
2284
|
+
}
|
|
2285
|
+
)
|
|
2233
2286
|
},
|
|
2234
2287
|
`${option.scope}-${option.targetId ?? "selected"}`
|
|
2235
2288
|
)) }) : null
|
|
@@ -2357,30 +2410,19 @@ function AttachmentChips({
|
|
|
2357
2410
|
) : attachment.contentType.startsWith("image/") ? /* @__PURE__ */ jsx3(ImageIcon, { className: "size-4 shrink-0 text-og-fg-muted" }) : /* @__PURE__ */ jsx3(FileIcon, { className: "size-4 shrink-0 text-og-fg-muted" }),
|
|
2358
2411
|
/* @__PURE__ */ jsxs3("div", { className: "min-w-0 flex-1", children: [
|
|
2359
2412
|
/* @__PURE__ */ jsx3("div", { className: "truncate font-medium text-og-fg", children: attachment.name }),
|
|
2360
|
-
/* @__PURE__ */ jsx3(
|
|
2361
|
-
"div",
|
|
2362
|
-
{
|
|
2363
|
-
className: cn(
|
|
2364
|
-
"truncate text-og-xs",
|
|
2365
|
-
failed ? "text-og-status-failed" : "text-og-fg-subtle"
|
|
2366
|
-
),
|
|
2367
|
-
title: failed ? statusText : void 0,
|
|
2368
|
-
children: statusText
|
|
2369
|
-
}
|
|
2370
|
-
)
|
|
2413
|
+
failed ? /* @__PURE__ */ jsx3(ComposerTip, { tip: statusText, children: /* @__PURE__ */ jsx3("div", { className: "truncate text-og-xs text-og-status-failed", children: statusText }) }) : /* @__PURE__ */ jsx3("div", { className: "truncate text-og-xs text-og-fg-subtle", children: statusText })
|
|
2371
2414
|
] }),
|
|
2372
2415
|
attachment.status === "uploading" ? /* @__PURE__ */ jsx3(LoaderCircleIcon, { className: "size-3.5 shrink-0 animate-og-spin" }) : null,
|
|
2373
|
-
failed && onRetry ? /* @__PURE__ */ jsx3(
|
|
2416
|
+
failed && onRetry ? /* @__PURE__ */ jsx3(ComposerTip, { tip: messages.retryUpload, children: /* @__PURE__ */ jsx3(
|
|
2374
2417
|
"button",
|
|
2375
2418
|
{
|
|
2376
2419
|
type: "button",
|
|
2377
2420
|
onClick: () => onRetry(attachment.id),
|
|
2378
2421
|
className: "shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10",
|
|
2379
2422
|
"aria-label": messages.retryAttachment(attachment.name),
|
|
2380
|
-
title: messages.retryUpload,
|
|
2381
2423
|
children: /* @__PURE__ */ jsx3(RotateCwIcon, { className: "size-3.5" })
|
|
2382
2424
|
}
|
|
2383
|
-
) : null,
|
|
2425
|
+
) }) : null,
|
|
2384
2426
|
/* @__PURE__ */ jsx3(
|
|
2385
2427
|
"button",
|
|
2386
2428
|
{
|
|
@@ -2444,6 +2486,12 @@ import { LoaderCircleIcon as LoaderCircleIcon2, MicIcon, SquareIcon, XIcon as XI
|
|
|
2444
2486
|
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "motion/react";
|
|
2445
2487
|
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
2446
2488
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2489
|
+
function Tip({ tip, children }) {
|
|
2490
|
+
return /* @__PURE__ */ jsxs4(Tooltip, { children: [
|
|
2491
|
+
/* @__PURE__ */ jsx4(TooltipTrigger, { asChild: true, children }),
|
|
2492
|
+
/* @__PURE__ */ jsx4(TooltipContent, { side: "top", children: tip })
|
|
2493
|
+
] });
|
|
2494
|
+
}
|
|
2447
2495
|
var defaultMessages = {
|
|
2448
2496
|
start: "Start voice input",
|
|
2449
2497
|
stop: "Stop and transcribe",
|
|
@@ -2540,14 +2588,13 @@ function ComposerTranscriptionControl({
|
|
|
2540
2588
|
)
|
|
2541
2589
|
] }),
|
|
2542
2590
|
status === "recording" ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
2543
|
-
/* @__PURE__ */ jsx4(
|
|
2591
|
+
/* @__PURE__ */ jsx4(Tip, { tip: messages.cancel, children: /* @__PURE__ */ jsx4(
|
|
2544
2592
|
"button",
|
|
2545
2593
|
{
|
|
2546
2594
|
type: "button",
|
|
2547
2595
|
onClick: () => transcription.cancel(),
|
|
2548
2596
|
"aria-label": messages.cancel,
|
|
2549
2597
|
"aria-keyshortcuts": "Escape",
|
|
2550
|
-
title: messages.cancel,
|
|
2551
2598
|
className: cn(
|
|
2552
2599
|
"inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
|
|
2553
2600
|
"text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
|
|
@@ -2555,14 +2602,13 @@ function ComposerTranscriptionControl({
|
|
|
2555
2602
|
),
|
|
2556
2603
|
children: /* @__PURE__ */ jsx4(XIcon2, { className: "size-3.5" })
|
|
2557
2604
|
}
|
|
2558
|
-
),
|
|
2559
|
-
/* @__PURE__ */ jsx4(
|
|
2605
|
+
) }),
|
|
2606
|
+
/* @__PURE__ */ jsx4(Tip, { tip: messages.stop, children: /* @__PURE__ */ jsx4(
|
|
2560
2607
|
"button",
|
|
2561
2608
|
{
|
|
2562
2609
|
type: "button",
|
|
2563
2610
|
onClick: () => transcription.stop(),
|
|
2564
2611
|
"aria-label": messages.stop,
|
|
2565
|
-
title: messages.stop,
|
|
2566
2612
|
className: cn(
|
|
2567
2613
|
"inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
|
|
2568
2614
|
"bg-og-fg text-og-bg transition-colors duration-150 motion-reduce:transition-none",
|
|
@@ -2570,12 +2616,12 @@ function ComposerTranscriptionControl({
|
|
|
2570
2616
|
),
|
|
2571
2617
|
children: /* @__PURE__ */ jsx4(SquareIcon, { className: "size-2.5 fill-current" })
|
|
2572
2618
|
}
|
|
2573
|
-
)
|
|
2619
|
+
) })
|
|
2574
2620
|
] }) : status === "transcribing" ? /* @__PURE__ */ jsx4("span", { className: "og-shimmer-text px-1.5 text-og-xs font-medium whitespace-nowrap", children: messages.transcribing }) : /* @__PURE__ */ jsx4("span", { className: "px-1.5 text-og-xs text-og-fg-muted whitespace-nowrap", children: messages.requestingPermission })
|
|
2575
2621
|
]
|
|
2576
2622
|
},
|
|
2577
2623
|
status === "transcribing" ? "transcribing" : "capture"
|
|
2578
|
-
) : /* @__PURE__ */ jsx4(
|
|
2624
|
+
) : /* @__PURE__ */ jsx4(Tip, { tip: idleLabel, children: /* @__PURE__ */ jsx4(
|
|
2579
2625
|
motion3.button,
|
|
2580
2626
|
{
|
|
2581
2627
|
type: "button",
|
|
@@ -2587,25 +2633,22 @@ function ComposerTranscriptionControl({
|
|
|
2587
2633
|
"aria-label": idleLabel,
|
|
2588
2634
|
"aria-pressed": false,
|
|
2589
2635
|
"aria-disabled": unavailableMessage !== null,
|
|
2590
|
-
title: idleLabel,
|
|
2591
2636
|
className: cn(
|
|
2592
2637
|
"inline-flex size-8 shrink-0 items-center justify-center rounded-og-md pointer-coarse:size-11",
|
|
2593
2638
|
"text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
|
|
2594
2639
|
unavailableMessage ? "cursor-not-allowed opacity-45" : "hover:bg-og-surface-2 hover:text-og-fg"
|
|
2595
2640
|
),
|
|
2596
2641
|
children: /* @__PURE__ */ jsx4(MicIcon, { className: "size-4" })
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
status === "error" && errorMessage3 ? /* @__PURE__ */ jsx4(
|
|
2642
|
+
}
|
|
2643
|
+
) }, "idle") }),
|
|
2644
|
+
status === "error" && errorMessage3 ? /* @__PURE__ */ jsx4(Tip, { tip: errorMessage3, children: /* @__PURE__ */ jsx4(
|
|
2601
2645
|
"span",
|
|
2602
2646
|
{
|
|
2603
2647
|
"aria-hidden": "true",
|
|
2604
|
-
title: errorMessage3,
|
|
2605
2648
|
className: "max-w-40 truncate text-og-xs text-og-status-failed max-sm:max-w-24",
|
|
2606
2649
|
children: errorMessage3
|
|
2607
2650
|
}
|
|
2608
|
-
) : null,
|
|
2651
|
+
) }) : null,
|
|
2609
2652
|
/* @__PURE__ */ jsx4("span", { className: "sr-only", role: status === "error" ? "alert" : "status", "aria-live": "polite", children: announcement })
|
|
2610
2653
|
]
|
|
2611
2654
|
}
|
|
@@ -2721,6 +2764,7 @@ export {
|
|
|
2721
2764
|
appendFinalTranscript,
|
|
2722
2765
|
useTranscription,
|
|
2723
2766
|
useVoiceInput,
|
|
2767
|
+
OPEN_WORKSTREAM_CONTROL_EVENT,
|
|
2724
2768
|
parseCommandLine,
|
|
2725
2769
|
hasPermission,
|
|
2726
2770
|
matchCommand,
|
|
@@ -2731,7 +2775,6 @@ export {
|
|
|
2731
2775
|
useSlashCommands,
|
|
2732
2776
|
CommandPalette,
|
|
2733
2777
|
ModelPicker,
|
|
2734
|
-
OPEN_WORKSTREAM_CONTROL_EVENT,
|
|
2735
2778
|
defaultChatComposerMessages,
|
|
2736
2779
|
useChatComposerController,
|
|
2737
2780
|
useChatComposer,
|
|
@@ -2756,4 +2799,4 @@ export {
|
|
|
2756
2799
|
Status,
|
|
2757
2800
|
ComposerTranscriptionControl
|
|
2758
2801
|
};
|
|
2759
|
-
//# sourceMappingURL=chunk-
|
|
2802
|
+
//# sourceMappingURL=chunk-PVW56EVR.js.map
|