@flamingo-stack/openframe-frontend-core 0.0.354 → 0.0.355-snapshot.20260701201047
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-AN7YCTF4.js → chunk-2YYYGBLE.js} +3 -3
- package/dist/{chunk-5RYGC2HA.cjs → chunk-3PUFWBRR.cjs} +29 -29
- package/dist/{chunk-5RYGC2HA.cjs.map → chunk-3PUFWBRR.cjs.map} +1 -1
- package/dist/{chunk-RERV3ALE.cjs → chunk-44F5VCCJ.cjs} +7 -7
- package/dist/{chunk-RERV3ALE.cjs.map → chunk-44F5VCCJ.cjs.map} +1 -1
- package/dist/{chunk-LPJKRZRD.js → chunk-5NV6U7SX.js} +2 -2
- package/dist/{chunk-SH5ZPAVK.js → chunk-64EZVZZQ.js} +4 -4
- package/dist/{chunk-U5MQW3PH.js → chunk-7RQM23VH.js} +2 -2
- package/dist/{chunk-GPX5I7FT.cjs → chunk-B7NOIJR3.cjs} +2 -2
- package/dist/chunk-B7NOIJR3.cjs.map +1 -0
- package/dist/{chunk-HD4S7ITV.cjs → chunk-CR6ZUBNF.cjs} +40 -40
- package/dist/{chunk-HD4S7ITV.cjs.map → chunk-CR6ZUBNF.cjs.map} +1 -1
- package/dist/{chunk-XXVNJDZV.cjs → chunk-CVDJ6S4Y.cjs} +5 -5
- package/dist/{chunk-XXVNJDZV.cjs.map → chunk-CVDJ6S4Y.cjs.map} +1 -1
- package/dist/{chunk-MHWK6CDS.cjs → chunk-EBQNKU66.cjs} +19 -19
- package/dist/{chunk-MHWK6CDS.cjs.map → chunk-EBQNKU66.cjs.map} +1 -1
- package/dist/{chunk-LNJ4QIAN.cjs → chunk-F3GFL65H.cjs} +31 -31
- package/dist/{chunk-LNJ4QIAN.cjs.map → chunk-F3GFL65H.cjs.map} +1 -1
- package/dist/{chunk-NJ4R2IJY.js → chunk-FFFOXYA7.js} +6 -6
- package/dist/{chunk-5CTJCJV3.js → chunk-H6ZKXS32.js} +3 -3
- package/dist/{chunk-HEXR3TGX.js → chunk-HTR5P2PT.js} +2 -2
- package/dist/{chunk-3XNJWYLX.cjs → chunk-IEXRQXJM.cjs} +15 -15
- package/dist/{chunk-3XNJWYLX.cjs.map → chunk-IEXRQXJM.cjs.map} +1 -1
- package/dist/{chunk-OQ75ZMB7.cjs → chunk-IYO2PQRQ.cjs} +747 -723
- package/dist/chunk-IYO2PQRQ.cjs.map +1 -0
- package/dist/{chunk-SJ3O2463.js → chunk-KV7UDCIW.js} +5 -5
- package/dist/{chunk-DFZ74LGW.js → chunk-MSMWCG6V.js} +3 -3
- package/dist/{chunk-O6HI537F.cjs → chunk-PDZOVPTI.cjs} +12 -12
- package/dist/{chunk-O6HI537F.cjs.map → chunk-PDZOVPTI.cjs.map} +1 -1
- package/dist/{chunk-2RX6DW5A.cjs → chunk-PGDL4GI7.cjs} +73 -73
- package/dist/{chunk-2RX6DW5A.cjs.map → chunk-PGDL4GI7.cjs.map} +1 -1
- package/dist/{chunk-RYROZ7HM.cjs → chunk-QCG3MBP6.cjs} +3 -3
- package/dist/{chunk-RYROZ7HM.cjs.map → chunk-QCG3MBP6.cjs.map} +1 -1
- package/dist/{chunk-SJBFKX6U.js → chunk-QSVG54VM.js} +29 -5
- package/dist/chunk-QSVG54VM.js.map +1 -0
- package/dist/{chunk-4XFFHXCQ.js → chunk-SBMDCLK4.js} +6 -6
- package/dist/{chunk-JGAAUUD7.js → chunk-UJ4ENR2O.js} +2 -2
- package/dist/chunk-UJ4ENR2O.js.map +1 -0
- package/dist/{chunk-3MUALDLX.js → chunk-VTFPRVGI.js} +5 -5
- package/dist/{chunk-J5RQ4T5L.cjs → chunk-VXZWKYM4.cjs} +70 -70
- package/dist/{chunk-J5RQ4T5L.cjs.map → chunk-VXZWKYM4.cjs.map} +1 -1
- package/dist/{chunk-NJRZK3KL.cjs → chunk-YUSVGYRV.cjs} +39 -39
- package/dist/{chunk-NJRZK3KL.cjs.map → chunk-YUSVGYRV.cjs.map} +1 -1
- package/dist/{chunk-BWT6O7K5.js → chunk-ZDTARDIT.js} +2 -2
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +5 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +4 -2
- package/dist/components/chat/tool-call-blocks.d.ts +9 -0
- package/dist/components/chat/tool-call-blocks.d.ts.map +1 -1
- package/dist/components/chat/utils/tool-call-helpers.d.ts +7 -0
- package/dist/components/chat/utils/tool-call-helpers.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +126 -124
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +5 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +4 -2
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/approval-batch-message.tsx +22 -6
- package/src/components/chat/tool-call-blocks.tsx +14 -0
- package/src/components/chat/utils/tool-call-helpers.ts +16 -0
- package/src/stories/ApprovalBatchMessageClient.stories.tsx +4 -0
- package/src/types/tool.types.ts +1 -1
- package/dist/chunk-GPX5I7FT.cjs.map +0 -1
- package/dist/chunk-JGAAUUD7.js.map +0 -1
- package/dist/chunk-OQ75ZMB7.cjs.map +0 -1
- package/dist/chunk-SJBFKX6U.js.map +0 -1
- /package/dist/{chunk-AN7YCTF4.js.map → chunk-2YYYGBLE.js.map} +0 -0
- /package/dist/{chunk-LPJKRZRD.js.map → chunk-5NV6U7SX.js.map} +0 -0
- /package/dist/{chunk-SH5ZPAVK.js.map → chunk-64EZVZZQ.js.map} +0 -0
- /package/dist/{chunk-U5MQW3PH.js.map → chunk-7RQM23VH.js.map} +0 -0
- /package/dist/{chunk-NJ4R2IJY.js.map → chunk-FFFOXYA7.js.map} +0 -0
- /package/dist/{chunk-5CTJCJV3.js.map → chunk-H6ZKXS32.js.map} +0 -0
- /package/dist/{chunk-HEXR3TGX.js.map → chunk-HTR5P2PT.js.map} +0 -0
- /package/dist/{chunk-SJ3O2463.js.map → chunk-KV7UDCIW.js.map} +0 -0
- /package/dist/{chunk-DFZ74LGW.js.map → chunk-MSMWCG6V.js.map} +0 -0
- /package/dist/{chunk-4XFFHXCQ.js.map → chunk-SBMDCLK4.js.map} +0 -0
- /package/dist/{chunk-3MUALDLX.js.map → chunk-VTFPRVGI.js.map} +0 -0
- /package/dist/{chunk-BWT6O7K5.js.map → chunk-ZDTARDIT.js.map} +0 -0
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import { ToolIcon } from "../tool-icon"
|
|
|
9
9
|
import { CheckCircleIcon, DotsLoaderIcon, XmarkCircleIcon, XmarkIcon } from "../icons-v2-generated"
|
|
10
10
|
import { ExpandChevron } from "./expand-chevron"
|
|
11
11
|
import { useCollapsible } from "./hooks/use-collapsible"
|
|
12
|
-
import { ArgRow, ResultBlock } from "./tool-call-blocks"
|
|
12
|
+
import { ArgRow, CommandBlock, ResultBlock } from "./tool-call-blocks"
|
|
13
13
|
import type {
|
|
14
14
|
AssistantType,
|
|
15
15
|
ApprovalBatchExecutionState,
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
} from "./types"
|
|
19
19
|
import {
|
|
20
20
|
COMMAND_BODY_ARG_KEYS,
|
|
21
|
+
getCommandBody,
|
|
21
22
|
getCommandText,
|
|
22
23
|
} from "./utils/tool-call-helpers"
|
|
23
24
|
|
|
@@ -114,7 +115,13 @@ function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExe
|
|
|
114
115
|
const toolType = (call.toolType as ToolType) || ("OPENFRAME" as ToolType)
|
|
115
116
|
const { innerRef, containerStyle } = useCollapsible({ expanded })
|
|
116
117
|
const result = execution?.status === "done" ? execution.result : undefined
|
|
117
|
-
|
|
118
|
+
// CLIENT (Fae): the collapsed line shows the human-readable `toolExplanation`
|
|
119
|
+
// and the raw command moves into the expanded body (Figma 1972-6100). Falls
|
|
120
|
+
// back to the command when no explanation is present. ADMIN is unchanged.
|
|
121
|
+
const explanation = call.toolExplanation?.trim()
|
|
122
|
+
const headerText = isClient && explanation ? explanation : command
|
|
123
|
+
const commandBody = isClient ? getCommandBody(call.toolCallArguments) : undefined
|
|
124
|
+
const hasExpandableBody = !!commandBody || args.length > 0 || (typeof result === "string" && result.length > 0)
|
|
118
125
|
|
|
119
126
|
return (
|
|
120
127
|
<div
|
|
@@ -146,7 +153,7 @@ function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExe
|
|
|
146
153
|
: "text-ods-text-secondary line-clamp-2 max-h-10 break-all",
|
|
147
154
|
)}
|
|
148
155
|
>
|
|
149
|
-
{
|
|
156
|
+
{headerText}
|
|
150
157
|
</div>
|
|
151
158
|
{showExecutionStatus && (
|
|
152
159
|
<div className="flex items-center justify-center shrink-0 w-5 h-5">
|
|
@@ -162,6 +169,12 @@ function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExe
|
|
|
162
169
|
<div ref={innerRef}>
|
|
163
170
|
{hasExpandableBody && (
|
|
164
171
|
<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">
|
|
172
|
+
{commandBody && (
|
|
173
|
+
<CommandBlock
|
|
174
|
+
command={commandBody}
|
|
175
|
+
className={args.length > 0 || result ? "mb-[var(--spacing-system-xsf)]" : undefined}
|
|
176
|
+
/>
|
|
177
|
+
)}
|
|
165
178
|
{args.map(([key, value]) => (
|
|
166
179
|
<ArgRow key={key} argKey={key} value={value} />
|
|
167
180
|
))}
|
|
@@ -185,9 +198,12 @@ const ApprovalBatchMessage = forwardRef<HTMLDivElement, ApprovalBatchMessageProp
|
|
|
185
198
|
const [isProcessing, setIsProcessing] = useState(false)
|
|
186
199
|
const isClient = assistantType === "fae"
|
|
187
200
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
// CLIENT (Fae) promotes each tool's `toolExplanation` to the command row's
|
|
202
|
+
// header, so the footer must NOT repeat it as bullets. ADMIN keeps the
|
|
203
|
+
// explanation bullets in the footer.
|
|
204
|
+
const explanations = isClient
|
|
205
|
+
? []
|
|
206
|
+
: data.toolCalls.map((c) => c.toolExplanation?.trim()).filter((s): s is string => !!s)
|
|
191
207
|
|
|
192
208
|
const handleApprove = async () => {
|
|
193
209
|
setIsProcessing(true)
|
|
@@ -67,3 +67,17 @@ export function ResultBlock({ result, className }: { result: string | undefined
|
|
|
67
67
|
</div>
|
|
68
68
|
)
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Raw command/script body as an unlabeled code block. Used by the CLIENT (Fae)
|
|
73
|
+
* card in the expanded state, where the collapsed line shows the human-readable
|
|
74
|
+
* `toolExplanation` and the actual command moves into the body (Figma 1972-6100).
|
|
75
|
+
*/
|
|
76
|
+
export function CommandBlock({ command, className }: { command: string; className?: string }) {
|
|
77
|
+
if (!command) return null
|
|
78
|
+
return (
|
|
79
|
+
<pre className={cn(CODE_PRE_CLASS, className)}>
|
|
80
|
+
<code>{command}</code>
|
|
81
|
+
</pre>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
@@ -42,6 +42,22 @@ export function getCommandText(call: PendingToolCallData): string {
|
|
|
42
42
|
})
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* The raw command/query/script body only (first {@link COMMAND_BODY_ARG_KEYS}
|
|
47
|
+
* match), with no title/name fallback. Used by the CLIENT (Fae) card to show
|
|
48
|
+
* the command in the expanded body once the collapsed line switches to the
|
|
49
|
+
* human-readable `toolExplanation`.
|
|
50
|
+
*/
|
|
51
|
+
export function getCommandBody(args?: Record<string, unknown> | null): string | undefined {
|
|
52
|
+
if (args && typeof args === 'object') {
|
|
53
|
+
for (const key of COMMAND_BODY_ARG_KEYS) {
|
|
54
|
+
const candidate = args[key]
|
|
55
|
+
if (typeof candidate === 'string' && candidate.trim()) return candidate
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return undefined
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
export type FormattedArgValue =
|
|
46
62
|
| { kind: 'inline'; text: string }
|
|
47
63
|
| { kind: 'block'; text: string; language: 'json' | 'text' }
|
|
@@ -30,6 +30,10 @@ const toolCall: PendingToolCallData = {
|
|
|
30
30
|
toolExecutionRequestId: REQUEST_ID,
|
|
31
31
|
toolName: "run_script",
|
|
32
32
|
toolTitle: "Run Script",
|
|
33
|
+
// Human-readable description shown as the collapsed row header (CLIENT);
|
|
34
|
+
// the raw command moves into the expanded body (Figma 1972-6100).
|
|
35
|
+
toolExplanation:
|
|
36
|
+
"Collects today's system, application, and security event logs and exports them to a CSV file.",
|
|
33
37
|
toolType: "TACTICAL_RMM",
|
|
34
38
|
requiresApproval: true,
|
|
35
39
|
approvalType: "CLIENT",
|
package/src/types/tool.types.ts
CHANGED
|
@@ -31,7 +31,7 @@ export const toolLabels: Record<ToolType, string> = {
|
|
|
31
31
|
OPENFRAME: 'OpenFrame',
|
|
32
32
|
OPENFRAME_CHAT: 'OpenFrame Chat',
|
|
33
33
|
OPENFRAME_CLIENT: 'OpenFrame Client',
|
|
34
|
-
OPENFRAME_RMM: '
|
|
34
|
+
OPENFRAME_RMM: 'RMM',
|
|
35
35
|
OSQUERY: 'Osquery',
|
|
36
36
|
SYSTEM: 'System'
|
|
37
37
|
}
|