@flamingo-stack/openframe-frontend-core 0.0.351-snapshot.20260701140524 → 0.0.351
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-ED72ZQV7.cjs → chunk-46Z3O6SN.cjs} +5 -5
- package/dist/{chunk-ED72ZQV7.cjs.map → chunk-46Z3O6SN.cjs.map} +1 -1
- package/dist/{chunk-N7BREY67.js → chunk-4WVVMKMC.js} +4 -4
- package/dist/{chunk-IM5HXLFT.js → chunk-5F45BY24.js} +2 -2
- package/dist/{chunk-42PSJKMY.cjs → chunk-63ISTNQW.cjs} +25 -25
- package/dist/{chunk-42PSJKMY.cjs.map → chunk-63ISTNQW.cjs.map} +1 -1
- package/dist/{chunk-HSZJGPVA.js → chunk-A6YFD2SK.js} +116 -173
- package/dist/chunk-A6YFD2SK.js.map +1 -0
- package/dist/{chunk-K2NJ5VHQ.cjs → chunk-BMQ5CBFD.cjs} +62 -62
- package/dist/{chunk-K2NJ5VHQ.cjs.map → chunk-BMQ5CBFD.cjs.map} +1 -1
- package/dist/{chunk-3QWEET5C.js → chunk-DJZ64AF6.js} +2 -2
- package/dist/{chunk-TM455OW5.js → chunk-EKU6D26E.js} +4 -4
- package/dist/{chunk-FU5KF6MA.cjs → chunk-GJZL72ON.cjs} +7 -7
- package/dist/{chunk-FU5KF6MA.cjs.map → chunk-GJZL72ON.cjs.map} +1 -1
- package/dist/{chunk-QP7TLRLH.cjs → chunk-HMUIRZ46.cjs} +115 -172
- package/dist/chunk-HMUIRZ46.cjs.map +1 -0
- package/dist/{chunk-JQGLBAGS.js → chunk-JBWB3U3P.js} +2 -2
- package/dist/{chunk-FQ4VGHPO.js → chunk-MLW25MGY.js} +2 -2
- package/dist/{chunk-HPVOWKIO.cjs → chunk-NEIOYJIE.cjs} +15 -15
- package/dist/{chunk-HPVOWKIO.cjs.map → chunk-NEIOYJIE.cjs.map} +1 -1
- package/dist/{chunk-IHXJKIFM.cjs → chunk-NIRMBPFP.cjs} +12 -12
- package/dist/{chunk-IHXJKIFM.cjs.map → chunk-NIRMBPFP.cjs.map} +1 -1
- package/dist/{chunk-M247JWGY.js → chunk-Q3VK7WI2.js} +4 -4
- package/dist/{chunk-DY4Y7QQB.cjs → chunk-QGBJKB6V.cjs} +31 -31
- package/dist/{chunk-DY4Y7QQB.cjs.map → chunk-QGBJKB6V.cjs.map} +1 -1
- package/dist/{chunk-T2ARJIH6.cjs → chunk-TH3HPNMO.cjs} +56 -56
- package/dist/{chunk-T2ARJIH6.cjs.map → chunk-TH3HPNMO.cjs.map} +1 -1
- package/dist/{chunk-RTKRXPPG.cjs → chunk-UQFTSFIF.cjs} +26 -26
- package/dist/{chunk-RTKRXPPG.cjs.map → chunk-UQFTSFIF.cjs.map} +1 -1
- package/dist/{chunk-7CTSKYAV.js → chunk-VY6AAUCK.js} +2 -2
- package/dist/{chunk-3SYTPXCP.cjs → chunk-VZ7TICMR.cjs} +37 -37
- package/dist/{chunk-3SYTPXCP.cjs.map → chunk-VZ7TICMR.cjs.map} +1 -1
- package/dist/{chunk-GGCOLMNS.js → chunk-WB2EWYSF.js} +2 -2
- package/dist/{chunk-ZRLPXSZC.cjs → chunk-XZVVLO4V.cjs} +9 -9
- package/dist/{chunk-ZRLPXSZC.cjs.map → chunk-XZVVLO4V.cjs.map} +1 -1
- package/dist/{chunk-66D3JL6J.js → chunk-YBL3JURC.js} +4 -4
- package/dist/{chunk-ONMA32BY.js → chunk-YIFJJCFB.js} +2 -2
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/approval-batch-message.d.ts +1 -7
- package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
- package/dist/components/chat/approval-request-message.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/tool-call-blocks.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +0 -6
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +120 -120
- package/dist/components/index.js +9 -9
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/approval-batch-message.tsx +27 -82
- package/src/components/chat/approval-request-message.tsx +19 -27
- package/src/components/chat/chat-message-enhanced.tsx +0 -3
- package/src/components/chat/tool-call-blocks.tsx +6 -17
- package/src/components/chat/tool-execution-display.tsx +8 -23
- package/src/components/chat/types/component.types.ts +0 -6
- package/src/stories/ToolExecutionDisplay.stories.tsx +1 -1
- package/dist/chunk-HSZJGPVA.js.map +0 -1
- package/dist/chunk-QP7TLRLH.cjs.map +0 -1
- package/src/stories/ApprovalBatchMessage.stories.tsx +0 -169
- package/src/stories/ApprovalBatchMessageClient.stories.tsx +0 -172
- package/src/stories/ApprovalRequestMessage.stories.tsx +0 -95
- package/src/stories/ToolExecutionDisplayClient.stories.tsx +0 -64
- /package/dist/{chunk-N7BREY67.js.map → chunk-4WVVMKMC.js.map} +0 -0
- /package/dist/{chunk-IM5HXLFT.js.map → chunk-5F45BY24.js.map} +0 -0
- /package/dist/{chunk-3QWEET5C.js.map → chunk-DJZ64AF6.js.map} +0 -0
- /package/dist/{chunk-TM455OW5.js.map → chunk-EKU6D26E.js.map} +0 -0
- /package/dist/{chunk-JQGLBAGS.js.map → chunk-JBWB3U3P.js.map} +0 -0
- /package/dist/{chunk-FQ4VGHPO.js.map → chunk-MLW25MGY.js.map} +0 -0
- /package/dist/{chunk-M247JWGY.js.map → chunk-Q3VK7WI2.js.map} +0 -0
- /package/dist/{chunk-7CTSKYAV.js.map → chunk-VY6AAUCK.js.map} +0 -0
- /package/dist/{chunk-GGCOLMNS.js.map → chunk-WB2EWYSF.js.map} +0 -0
- /package/dist/{chunk-66D3JL6J.js.map → chunk-YBL3JURC.js.map} +0 -0
- /package/dist/{chunk-ONMA32BY.js.map → chunk-YIFJJCFB.js.map} +0 -0
|
@@ -515,30 +515,27 @@ function Tag({
|
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
// src/components/chat/approval-request-message.tsx
|
|
518
|
-
import {
|
|
518
|
+
import { CheckCircle, XCircle } from "lucide-react";
|
|
519
519
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
520
520
|
function ApprovalFieldList({ fields }) {
|
|
521
|
-
return /* @__PURE__ */ jsx2("dl", { className: "flex flex-col gap-2.5 mt-
|
|
521
|
+
return /* @__PURE__ */ jsx2("dl", { className: "flex flex-col gap-2.5 mt-1", children: fields.map((f, i) => /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-0.5", children: [
|
|
522
522
|
/* @__PURE__ */ jsx2("dt", { className: "font-['DM_Sans'] font-semibold text-[11px] uppercase tracking-wide text-ods-text-tertiary leading-4", children: f.label }),
|
|
523
|
-
/* @__PURE__ */ jsx2("dd", { className: "text-
|
|
523
|
+
/* @__PURE__ */ jsx2("dd", { className: "font-['DM_Sans'] text-sm text-ods-text-primary leading-5 whitespace-pre-wrap break-words", children: f.value })
|
|
524
524
|
] }, i)) });
|
|
525
525
|
}
|
|
526
526
|
function ApprovalCardBody({
|
|
527
527
|
data
|
|
528
528
|
}) {
|
|
529
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-
|
|
530
|
-
/* @__PURE__ */ jsxs2("div", { className: "bg-ods-bg border border-ods-border rounded-md p-
|
|
531
|
-
/* @__PURE__ */ jsx2("code", { className: "text-
|
|
529
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1", children: [
|
|
530
|
+
/* @__PURE__ */ jsxs2("div", { className: "bg-ods-bg border border-ods-border rounded-md p-3 flex gap-2 items-start max-h-32 overflow-y-auto", children: [
|
|
531
|
+
/* @__PURE__ */ jsx2("code", { className: "font-['DM_Sans'] font-medium text-sm text-ods-text-primary flex-1 leading-5 whitespace-pre-wrap break-words", children: data.command }),
|
|
532
532
|
data.icon && /* @__PURE__ */ jsx2("div", { className: "w-4 h-4 shrink-0 text-ods-text-tertiary", children: data.icon })
|
|
533
533
|
] }),
|
|
534
|
-
data.fields && data.fields.length > 0 ? /* @__PURE__ */ jsx2(ApprovalFieldList, { fields: data.fields }) : data.explanation && /* @__PURE__ */ jsx2("p", { className: "text-
|
|
534
|
+
data.fields && data.fields.length > 0 ? /* @__PURE__ */ jsx2(ApprovalFieldList, { fields: data.fields }) : data.explanation && /* @__PURE__ */ jsx2("p", { className: "font-['DM_Sans'] font-medium text-sm text-ods-text-secondary leading-5 whitespace-pre-line break-words", children: data.explanation })
|
|
535
535
|
] });
|
|
536
536
|
}
|
|
537
537
|
var ApprovalRequestMessage = forwardRef(
|
|
538
|
-
|
|
539
|
-
// can forward it uniformly); the legacy single-command card has no
|
|
540
|
-
// icon/divider to vary, so it renders identically for admin and client today.
|
|
541
|
-
({ className, data, onApprove, onReject, status = "pending", assistantType: _assistantType, ...props }, ref) => {
|
|
538
|
+
({ className, data, onApprove, onReject, status = "pending", ...props }, ref) => {
|
|
542
539
|
const [isProcessing, setIsProcessing] = useState(false);
|
|
543
540
|
const handleApprove = async () => {
|
|
544
541
|
setIsProcessing(true);
|
|
@@ -561,13 +558,13 @@ var ApprovalRequestMessage = forwardRef(
|
|
|
561
558
|
{
|
|
562
559
|
ref,
|
|
563
560
|
className: cn(
|
|
564
|
-
"bg-ods-card border border-ods-border rounded-md p-
|
|
561
|
+
"bg-ods-card border border-ods-border rounded-md p-4 mb-2 flex flex-col gap-4",
|
|
565
562
|
className
|
|
566
563
|
),
|
|
567
564
|
...props,
|
|
568
565
|
children: [
|
|
569
566
|
/* @__PURE__ */ jsx2(ApprovalCardBody, { data }),
|
|
570
|
-
status === "pending" ? /* @__PURE__ */ jsxs2("div", { className: "flex gap-
|
|
567
|
+
status === "pending" ? /* @__PURE__ */ jsxs2("div", { className: "flex gap-4 items-center", children: [
|
|
571
568
|
/* @__PURE__ */ jsx2(
|
|
572
569
|
Button,
|
|
573
570
|
{
|
|
@@ -577,8 +574,8 @@ var ApprovalRequestMessage = forwardRef(
|
|
|
577
574
|
disabled: isProcessing,
|
|
578
575
|
className: cn(
|
|
579
576
|
"bg-ods-accent hover:bg-ods-accent/90",
|
|
580
|
-
"text-
|
|
581
|
-
"px-
|
|
577
|
+
"font-mono font-medium md:!text-sm text-ods-bg uppercase tracking-[-0.28px]",
|
|
578
|
+
"px-2 py-1 h-auto"
|
|
582
579
|
),
|
|
583
580
|
children: "Approve"
|
|
584
581
|
}
|
|
@@ -592,13 +589,20 @@ var ApprovalRequestMessage = forwardRef(
|
|
|
592
589
|
disabled: isProcessing,
|
|
593
590
|
className: cn(
|
|
594
591
|
"bg-ods-card border-ods-border",
|
|
595
|
-
"text-
|
|
596
|
-
"hover:bg-ods-bg px-
|
|
592
|
+
"font-mono font-medium md:!text-sm text-ods-text-primary uppercase tracking-[-0.28px]",
|
|
593
|
+
"hover:bg-ods-bg px-2 py-1 h-auto"
|
|
597
594
|
),
|
|
598
595
|
children: "Reject"
|
|
599
596
|
}
|
|
600
597
|
)
|
|
601
|
-
] }) : /* @__PURE__ */ jsx2("div", { className: "flex", children:
|
|
598
|
+
] }) : /* @__PURE__ */ jsx2("div", { className: "flex", children: /* @__PURE__ */ jsx2(
|
|
599
|
+
Tag,
|
|
600
|
+
{
|
|
601
|
+
label: status === "approved" ? "Approved" : "Rejected",
|
|
602
|
+
variant: status === "approved" ? "success" : "error",
|
|
603
|
+
icon: status === "approved" ? /* @__PURE__ */ jsx2(CheckCircle, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx2(XCircle, { className: "w-4 h-4" })
|
|
604
|
+
}
|
|
605
|
+
) })
|
|
602
606
|
]
|
|
603
607
|
}
|
|
604
608
|
);
|
|
@@ -767,11 +771,10 @@ function formatToolResult(value) {
|
|
|
767
771
|
|
|
768
772
|
// src/components/chat/tool-call-blocks.tsx
|
|
769
773
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
770
|
-
var CODE_PRE_CLASS = "bg-ods-bg border border-ods-border rounded-md p-[var(--spacing-system-sf)] w-full max-h-64 overflow-auto text-xs leading-5 text-ods-text-primary font-mono whitespace-pre";
|
|
771
774
|
function ArgRow({ argKey, value }) {
|
|
772
775
|
const formatted = formatToolArgValue(value);
|
|
773
776
|
if (formatted.kind === "inline") {
|
|
774
|
-
return /* @__PURE__ */ jsxs3("div", { className: "flex gap-
|
|
777
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex gap-1 items-start w-full", children: [
|
|
775
778
|
/* @__PURE__ */ jsxs3("span", { className: "shrink-0 text-ods-text-secondary", children: [
|
|
776
779
|
argKey,
|
|
777
780
|
":"
|
|
@@ -779,41 +782,40 @@ function ArgRow({ argKey, value }) {
|
|
|
779
782
|
/* @__PURE__ */ jsx4("span", { className: "flex-1 min-w-0 text-ods-text-primary break-all", children: formatted.text })
|
|
780
783
|
] });
|
|
781
784
|
}
|
|
782
|
-
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-
|
|
785
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1 items-start w-full", children: [
|
|
783
786
|
/* @__PURE__ */ jsxs3("span", { className: "text-ods-text-secondary", children: [
|
|
784
787
|
argKey,
|
|
785
788
|
":"
|
|
786
789
|
] }),
|
|
787
|
-
/* @__PURE__ */ jsx4("pre", { className:
|
|
790
|
+
/* @__PURE__ */ jsx4("pre", { className: "bg-ods-bg border border-ods-border rounded-md p-3 w-full max-h-64 overflow-auto text-xs leading-5 text-ods-text-primary font-mono whitespace-pre", children: /* @__PURE__ */ jsx4("code", { children: formatted.text }) })
|
|
788
791
|
] });
|
|
789
792
|
}
|
|
790
793
|
function ResultBlock({ result, className }) {
|
|
791
794
|
const formatted = formatToolResult(result);
|
|
792
795
|
if (!formatted.text) return null;
|
|
793
796
|
if (formatted.kind === "inline") {
|
|
794
|
-
return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col gap-
|
|
797
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col gap-1 items-start w-full", className), children: [
|
|
795
798
|
/* @__PURE__ */ jsx4("span", { className: "text-ods-text-secondary", children: "Result:" }),
|
|
796
799
|
/* @__PURE__ */ jsx4("span", { className: "text-ods-text-primary break-all", children: formatted.text })
|
|
797
800
|
] });
|
|
798
801
|
}
|
|
799
|
-
return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col gap-
|
|
802
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn("flex flex-col gap-1 items-start w-full", className), children: [
|
|
800
803
|
/* @__PURE__ */ jsx4("span", { className: "text-ods-text-secondary", children: "Result:" }),
|
|
801
|
-
/* @__PURE__ */ jsx4("pre", { className:
|
|
804
|
+
/* @__PURE__ */ jsx4("pre", { className: "bg-ods-bg border border-ods-border rounded-md p-3 w-full max-h-64 overflow-auto text-xs leading-5 text-ods-text-primary font-mono whitespace-pre", children: /* @__PURE__ */ jsx4("code", { children: formatted.text }) })
|
|
802
805
|
] });
|
|
803
806
|
}
|
|
804
807
|
|
|
805
808
|
// src/components/chat/approval-batch-message.tsx
|
|
806
809
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
807
810
|
var COMMAND_BODY_KEYS = new Set(COMMAND_BODY_ARG_KEYS);
|
|
808
|
-
function renderStatusTag(status
|
|
809
|
-
const suffix = isClient && resolvedByName ? ` by ${resolvedByName}` : "";
|
|
811
|
+
function renderStatusTag(status) {
|
|
810
812
|
if (status === "approved") {
|
|
811
|
-
return /* @__PURE__ */ jsx5(Tag, { label:
|
|
813
|
+
return /* @__PURE__ */ jsx5(Tag, { label: "Approved", variant: "success", icon: /* @__PURE__ */ jsx5(CheckCircleIcon, { className: "w-4 h-4" }) });
|
|
812
814
|
}
|
|
813
815
|
if (status === "cancelled") {
|
|
814
|
-
return /* @__PURE__ */ jsx5(Tag, { label:
|
|
816
|
+
return /* @__PURE__ */ jsx5(Tag, { label: "Cancelled", variant: "grey", icon: /* @__PURE__ */ jsx5(XmarkIcon, { className: "w-4 h-4" }) });
|
|
815
817
|
}
|
|
816
|
-
return /* @__PURE__ */ jsx5(Tag, { label:
|
|
818
|
+
return /* @__PURE__ */ jsx5(Tag, { label: "Rejected", variant: "error", icon: /* @__PURE__ */ jsx5(XmarkCircleIcon, { className: "w-4 h-4" }) });
|
|
817
819
|
}
|
|
818
820
|
function getArgEntries(call) {
|
|
819
821
|
const args = call.toolCallArguments;
|
|
@@ -829,66 +831,47 @@ function ExecutionStatusIcon({
|
|
|
829
831
|
if (execution.success === false) return /* @__PURE__ */ jsx5(XmarkCircleIcon, { className: "w-4 h-4 text-ods-error" });
|
|
830
832
|
return /* @__PURE__ */ jsx5(CheckCircleIcon, { className: "w-4 h-4 text-ods-success" });
|
|
831
833
|
}
|
|
832
|
-
function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExecutionStatus
|
|
834
|
+
function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExecutionStatus }) {
|
|
833
835
|
const command = getCommandText(call);
|
|
834
836
|
const args = getArgEntries(call);
|
|
835
837
|
const toolType = call.toolType || "OPENFRAME";
|
|
836
838
|
const { innerRef, containerStyle } = useCollapsible({ expanded });
|
|
837
839
|
const result = execution?.status === "done" ? execution.result : void 0;
|
|
838
840
|
const hasExpandableBody = args.length > 0 || typeof result === "string" && result.length > 0;
|
|
839
|
-
return /* @__PURE__ */ jsxs4(
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
/* @__PURE__ */ jsxs4(
|
|
851
|
-
"button",
|
|
852
|
-
{
|
|
853
|
-
type: "button",
|
|
854
|
-
onClick: onToggle,
|
|
855
|
-
className: "flex gap-[var(--spacing-system-xsf)] items-start w-full p-[var(--spacing-system-sf)] cursor-pointer text-left",
|
|
856
|
-
children: [
|
|
857
|
-
!isClient && /* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx5(ToolIcon, { toolType, size: 16 }) }),
|
|
858
|
-
/* @__PURE__ */ jsx5(
|
|
859
|
-
"div",
|
|
860
|
-
{
|
|
861
|
-
className: cn(
|
|
862
|
-
"flex-1 min-w-0 text-h6",
|
|
863
|
-
expanded ? "text-ods-text-primary whitespace-pre-wrap break-all" : "text-ods-text-secondary line-clamp-2 max-h-10 break-all"
|
|
864
|
-
),
|
|
865
|
-
children: command
|
|
866
|
-
}
|
|
867
|
-
),
|
|
868
|
-
showExecutionStatus && /* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx5(ExecutionStatusIcon, { batchStatus, execution }) }),
|
|
869
|
-
/* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx5(ExpandChevron, { expanded }) })
|
|
870
|
-
]
|
|
871
|
-
}
|
|
872
|
-
),
|
|
873
|
-
/* @__PURE__ */ jsx5("div", { className: "w-full", style: containerStyle, children: /* @__PURE__ */ jsx5("div", { ref: innerRef, children: hasExpandableBody && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-0 items-start w-full text-h6 px-[var(--spacing-system-sf)] pb-[var(--spacing-system-sf)] bg-ods-card", children: [
|
|
874
|
-
args.map(([key, value]) => /* @__PURE__ */ jsx5(ArgRow, { argKey: key, value }, key)),
|
|
875
|
-
result && /* @__PURE__ */ jsx5(
|
|
876
|
-
ResultBlock,
|
|
841
|
+
return /* @__PURE__ */ jsxs4("div", { className: "bg-ods-card border-b border-ods-border last:border-b-0 flex flex-col items-start w-full", children: [
|
|
842
|
+
/* @__PURE__ */ jsxs4(
|
|
843
|
+
"button",
|
|
844
|
+
{
|
|
845
|
+
type: "button",
|
|
846
|
+
onClick: onToggle,
|
|
847
|
+
className: "flex gap-2 items-start w-full p-3 cursor-pointer text-left",
|
|
848
|
+
children: [
|
|
849
|
+
/* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx5(ToolIcon, { toolType, size: 16 }) }),
|
|
850
|
+
/* @__PURE__ */ jsx5(
|
|
851
|
+
"div",
|
|
877
852
|
{
|
|
878
|
-
|
|
879
|
-
|
|
853
|
+
className: cn(
|
|
854
|
+
"flex-1 min-w-0 font-medium text-sm leading-5",
|
|
855
|
+
expanded ? "text-ods-text-primary whitespace-pre-wrap break-all" : "text-ods-text-secondary line-clamp-2 max-h-10 break-all"
|
|
856
|
+
),
|
|
857
|
+
children: command
|
|
880
858
|
}
|
|
881
|
-
)
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
859
|
+
),
|
|
860
|
+
showExecutionStatus && /* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx5(ExecutionStatusIcon, { batchStatus, execution }) }),
|
|
861
|
+
/* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx5(ExpandChevron, { expanded }) })
|
|
862
|
+
]
|
|
863
|
+
}
|
|
864
|
+
),
|
|
865
|
+
/* @__PURE__ */ jsx5("div", { className: "w-full", style: containerStyle, children: /* @__PURE__ */ jsx5("div", { ref: innerRef, children: hasExpandableBody && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2 items-start w-full text-sm font-medium leading-5 p-3 bg-ods-card", children: [
|
|
866
|
+
args.map(([key, value]) => /* @__PURE__ */ jsx5(ArgRow, { argKey: key, value }, key)),
|
|
867
|
+
result && /* @__PURE__ */ jsx5(ResultBlock, { result })
|
|
868
|
+
] }) }) })
|
|
869
|
+
] });
|
|
886
870
|
}
|
|
887
871
|
var ApprovalBatchMessage = forwardRef2(
|
|
888
|
-
({ className, data, onApprove, onReject, status = "pending", maxBodyHeight, resolvedByName, showExecutionStatus = true,
|
|
872
|
+
({ className, data, onApprove, onReject, status = "pending", maxBodyHeight, resolvedByName, showExecutionStatus = true, ...props }, ref) => {
|
|
889
873
|
const [expandedId, setExpandedId] = useState3(null);
|
|
890
874
|
const [isProcessing, setIsProcessing] = useState3(false);
|
|
891
|
-
const isClient = assistantType === "fae";
|
|
892
875
|
const explanations = data.toolCalls.map((c) => c.toolExplanation?.trim()).filter((s) => !!s);
|
|
893
876
|
const handleApprove = async () => {
|
|
894
877
|
setIsProcessing(true);
|
|
@@ -912,10 +895,7 @@ var ApprovalBatchMessage = forwardRef2(
|
|
|
912
895
|
{
|
|
913
896
|
ref,
|
|
914
897
|
className: cn(
|
|
915
|
-
"flex flex-col mb-
|
|
916
|
-
// ADMIN: one framed card. CLIENT (Fae): frameless container — the
|
|
917
|
-
// bordered command box(es) + button/status row stacked 16px apart.
|
|
918
|
-
isClient ? "gap-[var(--spacing-system-mf)]" : "bg-ods-card border border-ods-border rounded-md overflow-hidden",
|
|
898
|
+
"bg-ods-card border border-ods-border rounded-md overflow-hidden flex flex-col mb-2",
|
|
919
899
|
className
|
|
920
900
|
),
|
|
921
901
|
...props,
|
|
@@ -923,11 +903,7 @@ var ApprovalBatchMessage = forwardRef2(
|
|
|
923
903
|
/* @__PURE__ */ jsx5(
|
|
924
904
|
"div",
|
|
925
905
|
{
|
|
926
|
-
className: cn(
|
|
927
|
-
"flex flex-col",
|
|
928
|
-
isClient && "gap-[var(--spacing-system-mf)]",
|
|
929
|
-
maxBodyHeight != null && "overflow-y-auto overscroll-contain"
|
|
930
|
-
),
|
|
906
|
+
className: cn("flex flex-col", maxBodyHeight != null && "overflow-y-auto overscroll-contain"),
|
|
931
907
|
style: maxBodyHeight != null ? { maxHeight: maxBodyHeight } : void 0,
|
|
932
908
|
children: data.toolCalls.map((call) => /* @__PURE__ */ jsx5(
|
|
933
909
|
ToolCallRow,
|
|
@@ -939,65 +915,53 @@ var ApprovalBatchMessage = forwardRef2(
|
|
|
939
915
|
),
|
|
940
916
|
batchStatus: status,
|
|
941
917
|
execution: data.executions?.[call.toolExecutionRequestId],
|
|
942
|
-
showExecutionStatus
|
|
943
|
-
isClient
|
|
918
|
+
showExecutionStatus
|
|
944
919
|
},
|
|
945
920
|
call.toolExecutionRequestId
|
|
946
921
|
))
|
|
947
922
|
}
|
|
948
923
|
),
|
|
949
|
-
showFooterBlock && /* @__PURE__ */ jsxs4(
|
|
950
|
-
"
|
|
951
|
-
{
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
924
|
+
showFooterBlock && /* @__PURE__ */ jsxs4("div", { className: "bg-ods-card flex flex-col gap-2 items-start justify-center p-3", children: [
|
|
925
|
+
explanations.length > 0 && /* @__PURE__ */ jsx5("ul", { className: "list-disc pl-5 text-sm font-medium text-ods-text-primary leading-5 w-full", children: explanations.map((expl, i) => /* @__PURE__ */ jsx5("li", { children: expl }, i)) }),
|
|
926
|
+
status === "pending" ? /* @__PURE__ */ jsxs4("div", { className: "flex gap-2 items-center", children: [
|
|
927
|
+
/* @__PURE__ */ jsx5(
|
|
928
|
+
Button,
|
|
929
|
+
{
|
|
930
|
+
size: "small-legacy",
|
|
931
|
+
variant: "accent",
|
|
932
|
+
onClick: handleApprove,
|
|
933
|
+
disabled: isProcessing,
|
|
934
|
+
className: cn(
|
|
935
|
+
"bg-ods-accent hover:bg-ods-accent/90",
|
|
936
|
+
"font-mono font-medium md:!text-sm text-ods-bg uppercase tracking-[-0.28px]",
|
|
937
|
+
"px-2 py-1 h-auto"
|
|
938
|
+
),
|
|
939
|
+
children: "Approve"
|
|
940
|
+
}
|
|
957
941
|
),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
"bg-ods-accent hover:bg-ods-accent/90",
|
|
970
|
-
"text-h5 text-ods-bg",
|
|
971
|
-
"px-[var(--spacing-system-xsf)] h-8"
|
|
972
|
-
),
|
|
973
|
-
children: "Approve"
|
|
974
|
-
}
|
|
942
|
+
/* @__PURE__ */ jsx5(
|
|
943
|
+
Button,
|
|
944
|
+
{
|
|
945
|
+
size: "small-legacy",
|
|
946
|
+
variant: "outline",
|
|
947
|
+
onClick: handleReject,
|
|
948
|
+
disabled: isProcessing,
|
|
949
|
+
className: cn(
|
|
950
|
+
"bg-ods-card border-ods-border",
|
|
951
|
+
"font-mono font-medium md:!text-sm text-ods-text-primary uppercase tracking-[-0.28px]",
|
|
952
|
+
"hover:bg-ods-bg px-2 py-1 h-auto"
|
|
975
953
|
),
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
),
|
|
988
|
-
children: "Reject"
|
|
989
|
-
}
|
|
990
|
-
)
|
|
991
|
-
] }) : /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-[var(--spacing-system-xsf)]", children: [
|
|
992
|
-
renderStatusTag(status, isClient, resolvedByName),
|
|
993
|
-
!isClient && resolvedByName && /* @__PURE__ */ jsxs4("span", { className: "text-h6 text-ods-text-secondary", children: [
|
|
994
|
-
"by ",
|
|
995
|
-
resolvedByName
|
|
996
|
-
] })
|
|
997
|
-
] })
|
|
998
|
-
]
|
|
999
|
-
}
|
|
1000
|
-
)
|
|
954
|
+
children: "Reject"
|
|
955
|
+
}
|
|
956
|
+
)
|
|
957
|
+
] }) : /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
958
|
+
renderStatusTag(status),
|
|
959
|
+
resolvedByName && /* @__PURE__ */ jsxs4("span", { className: "text-h6 text-ods-text-secondary", children: [
|
|
960
|
+
"by ",
|
|
961
|
+
resolvedByName
|
|
962
|
+
] })
|
|
963
|
+
] })
|
|
964
|
+
] })
|
|
1001
965
|
]
|
|
1002
966
|
}
|
|
1003
967
|
);
|
|
@@ -4372,10 +4336,9 @@ import { forwardRef as forwardRef10, useMemo as useMemo4, useState as useState9
|
|
|
4372
4336
|
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4373
4337
|
var COMMAND_BODY_KEYS2 = new Set(COMMAND_BODY_ARG_KEYS);
|
|
4374
4338
|
var ToolExecutionDisplay = forwardRef10(
|
|
4375
|
-
({ className, message: message2,
|
|
4339
|
+
({ className, message: message2, ...props }, ref) => {
|
|
4376
4340
|
const [expanded, setExpanded] = useState9(false);
|
|
4377
4341
|
const { innerRef, containerStyle } = useCollapsible({ expanded });
|
|
4378
|
-
const isClient = assistantType === "fae";
|
|
4379
4342
|
const isExecuting = message2.type === "EXECUTING_TOOL";
|
|
4380
4343
|
const isExecuted = message2.type === "EXECUTED_TOOL";
|
|
4381
4344
|
const integratedToolType = message2.integratedToolType || "OPENFRAME";
|
|
@@ -4406,8 +4369,6 @@ var ToolExecutionDisplay = forwardRef10(
|
|
|
4406
4369
|
{
|
|
4407
4370
|
ref,
|
|
4408
4371
|
className: cn(
|
|
4409
|
-
// The command running block keeps its bordered box in both chats
|
|
4410
|
-
// (Figma 1972-6109). CLIENT (Fae) only drops the tool icon below.
|
|
4411
4372
|
"bg-ods-card border border-ods-border rounded-[6px] overflow-hidden w-full flex flex-col",
|
|
4412
4373
|
className
|
|
4413
4374
|
),
|
|
@@ -4420,12 +4381,12 @@ var ToolExecutionDisplay = forwardRef10(
|
|
|
4420
4381
|
className: "flex gap-[var(--spacing-system-xs)] items-start p-[var(--spacing-system-s)] cursor-pointer text-left w-full",
|
|
4421
4382
|
onClick: () => setExpanded((prev) => !prev),
|
|
4422
4383
|
children: [
|
|
4423
|
-
|
|
4384
|
+
/* @__PURE__ */ jsx21("div", { className: "flex items-center justify-center shrink-0 w-5 h-5", children: /* @__PURE__ */ jsx21(ToolIcon, { toolType: integratedToolType, size: 16 }) }),
|
|
4424
4385
|
/* @__PURE__ */ jsx21(
|
|
4425
4386
|
"div",
|
|
4426
4387
|
{
|
|
4427
4388
|
className: cn(
|
|
4428
|
-
"flex-1 min-w-0 text-
|
|
4389
|
+
"flex-1 min-w-0 text-sm font-medium leading-5",
|
|
4429
4390
|
expanded ? "text-ods-text-primary whitespace-pre-wrap break-all" : "text-ods-text-secondary line-clamp-2 max-h-10 break-all"
|
|
4430
4391
|
),
|
|
4431
4392
|
children: previewText
|
|
@@ -4436,28 +4397,13 @@ var ToolExecutionDisplay = forwardRef10(
|
|
|
4436
4397
|
]
|
|
4437
4398
|
}
|
|
4438
4399
|
),
|
|
4439
|
-
/* @__PURE__ */ jsx21("div", { className: "w-full", style: containerStyle, children: /* @__PURE__ */ jsx21("div", { ref: innerRef, children: hasBody && /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-
|
|
4400
|
+
/* @__PURE__ */ jsx21("div", { className: "w-full", style: containerStyle, children: /* @__PURE__ */ jsx21("div", { ref: innerRef, children: hasBody && /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2 items-start w-full text-sm font-medium leading-5 p-3 bg-ods-card", children: [
|
|
4440
4401
|
argEntries.map(([key, value]) => /* @__PURE__ */ jsx21(ArgRow, { argKey: key, value }, key)),
|
|
4441
|
-
hasResult && /* @__PURE__ */ jsx21(
|
|
4442
|
-
|
|
4443
|
-
{
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
}
|
|
4447
|
-
),
|
|
4448
|
-
isExecuting && /* @__PURE__ */ jsxs17(
|
|
4449
|
-
"div",
|
|
4450
|
-
{
|
|
4451
|
-
className: cn(
|
|
4452
|
-
"flex flex-col gap-[var(--spacing-system-xxs)] items-start w-full",
|
|
4453
|
-
argEntries.length > 0 && "mt-[var(--spacing-system-xsf)]"
|
|
4454
|
-
),
|
|
4455
|
-
children: [
|
|
4456
|
-
/* @__PURE__ */ jsx21("span", { className: "text-ods-text-secondary", children: "Result:" }),
|
|
4457
|
-
/* @__PURE__ */ jsx21(DotsLoaderIcon, { size: 16, className: "text-ods-text-secondary" })
|
|
4458
|
-
]
|
|
4459
|
-
}
|
|
4460
|
-
)
|
|
4402
|
+
hasResult && /* @__PURE__ */ jsx21(ResultBlock, { result: message2.result }),
|
|
4403
|
+
isExecuting && /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1 items-start w-full", children: [
|
|
4404
|
+
/* @__PURE__ */ jsx21("span", { className: "text-ods-text-secondary", children: "Result:" }),
|
|
4405
|
+
/* @__PURE__ */ jsx21(DotsLoaderIcon, { size: 16, className: "text-ods-text-secondary" })
|
|
4406
|
+
] })
|
|
4461
4407
|
] }) }) })
|
|
4462
4408
|
]
|
|
4463
4409
|
}
|
|
@@ -5213,8 +5159,7 @@ var ChatMessageEnhanced = forwardRef11(
|
|
|
5213
5159
|
return /* @__PURE__ */ jsx24(
|
|
5214
5160
|
ToolExecutionDisplay,
|
|
5215
5161
|
{
|
|
5216
|
-
message: segment.data
|
|
5217
|
-
assistantType
|
|
5162
|
+
message: segment.data
|
|
5218
5163
|
},
|
|
5219
5164
|
index
|
|
5220
5165
|
);
|
|
@@ -5225,8 +5170,7 @@ var ChatMessageEnhanced = forwardRef11(
|
|
|
5225
5170
|
data: segment.data,
|
|
5226
5171
|
status: segment.status,
|
|
5227
5172
|
onApprove: segment.onApprove,
|
|
5228
|
-
onReject: segment.onReject
|
|
5229
|
-
assistantType
|
|
5173
|
+
onReject: segment.onReject
|
|
5230
5174
|
},
|
|
5231
5175
|
index
|
|
5232
5176
|
);
|
|
@@ -5238,8 +5182,7 @@ var ChatMessageEnhanced = forwardRef11(
|
|
|
5238
5182
|
status: segment.status,
|
|
5239
5183
|
resolvedByName: segment.resolvedByName,
|
|
5240
5184
|
onApprove: segment.onApprove,
|
|
5241
|
-
onReject: segment.onReject
|
|
5242
|
-
assistantType
|
|
5185
|
+
onReject: segment.onReject
|
|
5243
5186
|
},
|
|
5244
5187
|
index
|
|
5245
5188
|
);
|
|
@@ -50449,4 +50392,4 @@ export {
|
|
|
50449
50392
|
LogsList,
|
|
50450
50393
|
assets
|
|
50451
50394
|
};
|
|
50452
|
-
//# sourceMappingURL=chunk-
|
|
50395
|
+
//# sourceMappingURL=chunk-A6YFD2SK.js.map
|