@flamingo-stack/openframe-frontend-core 0.0.479 → 0.0.480
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-LJWIWLD3.cjs → chunk-2KQSGCXE.cjs} +9 -9
- package/dist/{chunk-LJWIWLD3.cjs.map → chunk-2KQSGCXE.cjs.map} +1 -1
- package/dist/{chunk-WTH5WXOH.js → chunk-3KUF3WZA.js} +2 -2
- package/dist/{chunk-UTCQZ4IP.js → chunk-3RNTIJHB.js} +2 -2
- package/dist/{chunk-I7S4ZLHX.cjs → chunk-3U63ZV3X.cjs} +812 -793
- package/dist/chunk-3U63ZV3X.cjs.map +1 -0
- package/dist/{chunk-VWHYXVRX.js → chunk-DERJNBZP.js} +2 -2
- package/dist/{chunk-AQG6DSFV.js → chunk-DHKIQLI2.js} +2 -2
- package/dist/{chunk-FMSKP2SZ.cjs → chunk-E7VFCW5W.cjs} +11 -11
- package/dist/{chunk-FMSKP2SZ.cjs.map → chunk-E7VFCW5W.cjs.map} +1 -1
- package/dist/{chunk-LZ64BSR5.cjs → chunk-JF24RU23.cjs} +7 -7
- package/dist/{chunk-LZ64BSR5.cjs.map → chunk-JF24RU23.cjs.map} +1 -1
- package/dist/{chunk-THGA7UZZ.js → chunk-JFDSGGAK.js} +231 -212
- package/dist/chunk-JFDSGGAK.js.map +1 -0
- package/dist/{chunk-KXUP44QJ.cjs → chunk-LLFHPCSN.cjs} +31 -31
- package/dist/{chunk-KXUP44QJ.cjs.map → chunk-LLFHPCSN.cjs.map} +1 -1
- package/dist/{chunk-PZYIEVIV.cjs → chunk-MHRVEZCV.cjs} +59 -59
- package/dist/{chunk-PZYIEVIV.cjs.map → chunk-MHRVEZCV.cjs.map} +1 -1
- package/dist/{chunk-MKLZ6SRA.js → chunk-OW55OP63.js} +4 -4
- package/dist/{chunk-XU7AXADL.cjs → chunk-P4TRELZZ.cjs} +26 -26
- package/dist/{chunk-XU7AXADL.cjs.map → chunk-P4TRELZZ.cjs.map} +1 -1
- package/dist/{chunk-M6NVQVZQ.cjs → chunk-Q2M7H2EB.cjs} +62 -62
- package/dist/{chunk-M6NVQVZQ.cjs.map → chunk-Q2M7H2EB.cjs.map} +1 -1
- package/dist/{chunk-RYVF3SQE.js → chunk-QPLNXVEQ.js} +4 -4
- package/dist/{chunk-7URE6XMT.js → chunk-R7UD3W7H.js} +2 -2
- package/dist/{chunk-46C2MVQG.cjs → chunk-S2ESE7RO.cjs} +15 -15
- package/dist/{chunk-46C2MVQG.cjs.map → chunk-S2ESE7RO.cjs.map} +1 -1
- package/dist/{chunk-ECF7DKWA.js → chunk-U77JKQT4.js} +2 -2
- package/dist/{chunk-MXXGD6HW.cjs → chunk-VYPTIGJO.cjs} +37 -37
- package/dist/{chunk-MXXGD6HW.cjs.map → chunk-VYPTIGJO.cjs.map} +1 -1
- package/dist/{chunk-6MQIGRAR.cjs → chunk-VYX4RQMO.cjs} +26 -26
- package/dist/{chunk-6MQIGRAR.cjs.map → chunk-VYX4RQMO.cjs.map} +1 -1
- package/dist/{chunk-5VGG3W43.js → chunk-WFRG5KRR.js} +4 -4
- package/dist/{chunk-JLRAUI7V.cjs → chunk-XMP7D4NB.cjs} +5 -5
- package/dist/{chunk-JLRAUI7V.cjs.map → chunk-XMP7D4NB.cjs.map} +1 -1
- package/dist/{chunk-A56QSYYE.js → chunk-YHUZ4WSI.js} +4 -4
- package/dist/{chunk-4PIISCMH.js → chunk-Z7IFLZ4V.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/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.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-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +6 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +10 -0
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/network.types.d.ts +2 -0
- package/dist/components/chat/types/network.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chunk-parser.d.ts.map +1 -1
- package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.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 +130 -130
- 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/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +1 -0
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +1 -0
- package/src/components/chat/tool-execution-display.tsx +97 -54
- package/src/components/chat/types/component.types.ts +6 -0
- package/src/components/chat/types/message.types.ts +10 -0
- package/src/components/chat/types/network.types.ts +2 -0
- package/src/components/chat/utils/chunk-parser.ts +1 -0
- package/src/components/chat/utils/extract-incomplete-message-state.ts +1 -0
- package/src/components/chat/utils/message-segment-accumulator.ts +3 -0
- package/src/components/chat/utils/process-historical-messages.ts +1 -0
- package/dist/chunk-I7S4ZLHX.cjs.map +0 -1
- package/dist/chunk-THGA7UZZ.js.map +0 -1
- /package/dist/{chunk-WTH5WXOH.js.map → chunk-3KUF3WZA.js.map} +0 -0
- /package/dist/{chunk-UTCQZ4IP.js.map → chunk-3RNTIJHB.js.map} +0 -0
- /package/dist/{chunk-VWHYXVRX.js.map → chunk-DERJNBZP.js.map} +0 -0
- /package/dist/{chunk-AQG6DSFV.js.map → chunk-DHKIQLI2.js.map} +0 -0
- /package/dist/{chunk-MKLZ6SRA.js.map → chunk-OW55OP63.js.map} +0 -0
- /package/dist/{chunk-RYVF3SQE.js.map → chunk-QPLNXVEQ.js.map} +0 -0
- /package/dist/{chunk-7URE6XMT.js.map → chunk-R7UD3W7H.js.map} +0 -0
- /package/dist/{chunk-ECF7DKWA.js.map → chunk-U77JKQT4.js.map} +0 -0
- /package/dist/{chunk-5VGG3W43.js.map → chunk-WFRG5KRR.js.map} +0 -0
- /package/dist/{chunk-A56QSYYE.js.map → chunk-YHUZ4WSI.js.map} +0 -0
- /package/dist/{chunk-4PIISCMH.js.map → chunk-Z7IFLZ4V.js.map} +0 -0
package/package.json
CHANGED
|
@@ -548,6 +548,7 @@ const ChatMessageEnhanced = forwardRef<HTMLDivElement, ChatMessageEnhancedProps>
|
|
|
548
548
|
key={index}
|
|
549
549
|
message={segment.data}
|
|
550
550
|
assistantType={assistantType}
|
|
551
|
+
variant={approvalVariant}
|
|
551
552
|
/>
|
|
552
553
|
)
|
|
553
554
|
} else if (segment.type === 'approval_request') {
|
|
@@ -586,6 +586,7 @@ export function applyToolExecutionToMessages(
|
|
|
586
586
|
data: {
|
|
587
587
|
...toolData,
|
|
588
588
|
toolTitle: toolData.toolTitle ?? seg.data.toolTitle,
|
|
589
|
+
toolExplanation: toolData.toolExplanation ?? seg.data.toolExplanation,
|
|
589
590
|
parameters: toolData.parameters || seg.data.parameters,
|
|
590
591
|
},
|
|
591
592
|
}
|
|
@@ -15,24 +15,47 @@ import type { ToolExecutionDisplayProps } from "./types"
|
|
|
15
15
|
const COMMAND_BODY_KEYS = new Set<string>(COMMAND_BODY_ARG_KEYS)
|
|
16
16
|
|
|
17
17
|
const ToolExecutionDisplay = forwardRef<HTMLDivElement, ToolExecutionDisplayProps>(
|
|
18
|
-
({ className, message, assistantType, ...props }, ref) => {
|
|
18
|
+
({ className, message, assistantType, variant = "admin", ...props }, ref) => {
|
|
19
19
|
const [expanded, setExpanded] = useState(false)
|
|
20
20
|
const { innerRef, containerStyle } = useCollapsible({ expanded })
|
|
21
21
|
const isClient = assistantType === "fae"
|
|
22
|
+
// Render audience (consumer-declared, NOT `assistantType`). The end-client
|
|
23
|
+
// Fae app (`'client'`) gets a static, non-expandable row — just the
|
|
24
|
+
// explanation + status; the command/args/result are admin-only detail the
|
|
25
|
+
// end user doesn't need. Every admin surface keeps the expandable accordion.
|
|
26
|
+
const isClientView = variant === "client"
|
|
22
27
|
|
|
23
28
|
const isExecuting = message.type === "EXECUTING_TOOL"
|
|
24
29
|
const isExecuted = message.type === "EXECUTED_TOOL"
|
|
25
30
|
const integratedToolType = (message.integratedToolType as ToolType) || ("OPENFRAME" as ToolType)
|
|
26
31
|
|
|
27
|
-
// Header
|
|
28
|
-
|
|
32
|
+
// Header text depends on the render audience (the consumer-declared
|
|
33
|
+
// `variant`, NOT `assistantType`: a ticket's Fae client tab on the admin
|
|
34
|
+
// dashboard is still `assistantType === 'fae'`). The end-client Fae app
|
|
35
|
+
// (`variant === 'client'`) reads the human-readable explanation (what/why);
|
|
36
|
+
// every admin surface reads the concise BE-provided title. Each falls back
|
|
37
|
+
// to the other when its preferred field is absent (older backends /
|
|
38
|
+
// EXECUTED rows).
|
|
39
|
+
const previewText =
|
|
40
|
+
variant === "client"
|
|
41
|
+
? message.toolExplanation?.trim()
|
|
42
|
+
: message.toolTitle?.trim()
|
|
29
43
|
|
|
30
44
|
const argEntries = useMemo<Array<[string, unknown]>>(() => {
|
|
31
45
|
if (!message.parameters || typeof message.parameters !== "object") return []
|
|
32
|
-
|
|
33
|
-
([
|
|
46
|
+
const entries = Object.entries(message.parameters).filter(
|
|
47
|
+
([, v]) => v !== null && v !== undefined && v !== "",
|
|
34
48
|
)
|
|
35
|
-
|
|
49
|
+
// The end client (Fae app) never sees the raw command/query/script body —
|
|
50
|
+
// only the secondary args. Every admin surface DOES: surface the command
|
|
51
|
+
// body first (as a labeled `command:` row), then the rest of the args.
|
|
52
|
+
if (variant === "client") {
|
|
53
|
+
return entries.filter(([k]) => !COMMAND_BODY_KEYS.has(k))
|
|
54
|
+
}
|
|
55
|
+
const commandEntries = entries.filter(([k]) => COMMAND_BODY_KEYS.has(k))
|
|
56
|
+
const otherEntries = entries.filter(([k]) => !COMMAND_BODY_KEYS.has(k))
|
|
57
|
+
return [...commandEntries, ...otherEntries]
|
|
58
|
+
}, [message.parameters, variant])
|
|
36
59
|
|
|
37
60
|
const hasResult = isExecuted && typeof message.result === "string" && message.result.length > 0
|
|
38
61
|
const hasBody = argEntries.length > 0 || hasResult || isExecuting
|
|
@@ -44,6 +67,34 @@ const ToolExecutionDisplay = forwardRef<HTMLDivElement, ToolExecutionDisplayProp
|
|
|
44
67
|
return null
|
|
45
68
|
}
|
|
46
69
|
|
|
70
|
+
const headerContent = (
|
|
71
|
+
<>
|
|
72
|
+
{!isClient && (
|
|
73
|
+
<div className="flex items-center justify-center shrink-0 w-5 h-5">
|
|
74
|
+
<ToolIcon toolType={integratedToolType} size={16} />
|
|
75
|
+
</div>
|
|
76
|
+
)}
|
|
77
|
+
<div
|
|
78
|
+
className={cn(
|
|
79
|
+
"flex-1 min-w-0 text-h6",
|
|
80
|
+
isClientView
|
|
81
|
+
? "text-ods-text-primary whitespace-pre-wrap break-words"
|
|
82
|
+
: expanded
|
|
83
|
+
? "text-ods-text-primary whitespace-pre-wrap break-all"
|
|
84
|
+
: "text-ods-text-secondary line-clamp-2 max-h-10 break-all",
|
|
85
|
+
)}
|
|
86
|
+
>
|
|
87
|
+
{previewText}
|
|
88
|
+
</div>
|
|
89
|
+
<div className="flex items-center justify-center shrink-0 w-5 h-5">{renderStatusIcon()}</div>
|
|
90
|
+
{!isClientView && (
|
|
91
|
+
<div className="flex items-center justify-center shrink-0 w-5 h-5">
|
|
92
|
+
<ExpandChevron expanded={expanded} />
|
|
93
|
+
</div>
|
|
94
|
+
)}
|
|
95
|
+
</>
|
|
96
|
+
)
|
|
97
|
+
|
|
47
98
|
return (
|
|
48
99
|
<div
|
|
49
100
|
ref={ref}
|
|
@@ -55,60 +106,52 @@ const ToolExecutionDisplay = forwardRef<HTMLDivElement, ToolExecutionDisplayProp
|
|
|
55
106
|
)}
|
|
56
107
|
{...props}
|
|
57
108
|
>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{!isClient && (
|
|
64
|
-
<div className="flex items-center justify-center shrink-0 w-5 h-5">
|
|
65
|
-
<ToolIcon toolType={integratedToolType} size={16} />
|
|
66
|
-
</div>
|
|
67
|
-
)}
|
|
68
|
-
<div
|
|
69
|
-
className={cn(
|
|
70
|
-
"flex-1 min-w-0 text-h6",
|
|
71
|
-
expanded
|
|
72
|
-
? "text-ods-text-primary whitespace-pre-wrap break-all"
|
|
73
|
-
: "text-ods-text-secondary line-clamp-2 max-h-10 break-all",
|
|
74
|
-
)}
|
|
75
|
-
>
|
|
76
|
-
{previewText}
|
|
77
|
-
</div>
|
|
78
|
-
<div className="flex items-center justify-center shrink-0 w-5 h-5">{renderStatusIcon()}</div>
|
|
79
|
-
<div className="flex items-center justify-center shrink-0 w-5 h-5">
|
|
80
|
-
<ExpandChevron expanded={expanded} />
|
|
109
|
+
{isClientView ? (
|
|
110
|
+
// Client (Fae end-user): static, non-expandable row — no chevron, no
|
|
111
|
+
// body. Just the explanation + status; command/args/result are hidden.
|
|
112
|
+
<div className="flex gap-[var(--spacing-system-xs)] items-start p-[var(--spacing-system-s)] w-full text-left">
|
|
113
|
+
{headerContent}
|
|
81
114
|
</div>
|
|
82
|
-
|
|
115
|
+
) : (
|
|
116
|
+
<>
|
|
117
|
+
<button
|
|
118
|
+
type="button"
|
|
119
|
+
className="flex gap-[var(--spacing-system-xs)] items-start p-[var(--spacing-system-s)] cursor-pointer text-left w-full"
|
|
120
|
+
onClick={() => setExpanded((prev) => !prev)}
|
|
121
|
+
>
|
|
122
|
+
{headerContent}
|
|
123
|
+
</button>
|
|
83
124
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
125
|
+
<div className="w-full" style={containerStyle}>
|
|
126
|
+
<div ref={innerRef}>
|
|
127
|
+
{hasBody && (
|
|
128
|
+
<div className="flex flex-col gap-0 items-start w-full text-h6 p-[var(--spacing-system-sf)] bg-ods-card">
|
|
129
|
+
{argEntries.map(([key, value]) => (
|
|
130
|
+
<ArgRow key={key} argKey={key} value={value} />
|
|
131
|
+
))}
|
|
132
|
+
{hasResult && (
|
|
133
|
+
<ResultBlock
|
|
134
|
+
result={message.result}
|
|
135
|
+
className={argEntries.length > 0 ? "mt-[var(--spacing-system-xsf)]" : undefined}
|
|
136
|
+
/>
|
|
137
|
+
)}
|
|
138
|
+
{isExecuting && (
|
|
139
|
+
<div
|
|
140
|
+
className={cn(
|
|
141
|
+
"flex flex-col gap-[var(--spacing-system-xxs)] items-start w-full",
|
|
142
|
+
argEntries.length > 0 && "mt-[var(--spacing-system-xsf)]",
|
|
143
|
+
)}
|
|
144
|
+
>
|
|
145
|
+
<span className="text-ods-text-secondary">Result:</span>
|
|
146
|
+
<DotsLoaderIcon size={16} className="text-ods-text-secondary" />
|
|
147
|
+
</div>
|
|
102
148
|
)}
|
|
103
|
-
>
|
|
104
|
-
<span className="text-ods-text-secondary">Result:</span>
|
|
105
|
-
<DotsLoaderIcon size={16} className="text-ods-text-secondary" />
|
|
106
149
|
</div>
|
|
107
150
|
)}
|
|
108
151
|
</div>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
152
|
+
</div>
|
|
153
|
+
</>
|
|
154
|
+
)}
|
|
112
155
|
</div>
|
|
113
156
|
)
|
|
114
157
|
},
|
|
@@ -506,6 +506,12 @@ export interface ToolExecutionDisplayProps extends HTMLAttributes<HTMLDivElement
|
|
|
506
506
|
/** Chat identity. `'fae'` (client) hides the tool icon; `'mingo'`/undefined
|
|
507
507
|
* keep the admin layout. */
|
|
508
508
|
assistantType?: AssistantType
|
|
509
|
+
/** Viewer variant — the consumer-declared render audience (NOT derived from
|
|
510
|
+
* `assistantType`, which only says which assistant the dialog belongs to).
|
|
511
|
+
* `'client'` (end-client Fae app) shows the human-readable `toolExplanation`;
|
|
512
|
+
* `'admin'` (default — every dashboard surface, incl. a ticket's Fae client
|
|
513
|
+
* tab) shows the concise `toolTitle`. */
|
|
514
|
+
variant?: ApprovalBlockVariant
|
|
509
515
|
}
|
|
510
516
|
|
|
511
517
|
// ========== Approval Request Message Props ==========
|
|
@@ -50,6 +50,12 @@ export interface ToolExecutionData {
|
|
|
50
50
|
toolFunction: string
|
|
51
51
|
/** Backend-issued human-readable title (mirrors `PendingToolCallData.toolTitle`). */
|
|
52
52
|
toolTitle?: string
|
|
53
|
+
/**
|
|
54
|
+
* Backend-issued human-readable explanation of what the tool is doing and why
|
|
55
|
+
* (mirrors `PendingToolCallData.toolExplanation`). Only sent on `EXECUTING_TOOL`;
|
|
56
|
+
* the accumulator restores it onto the merged `EXECUTED_TOOL` segment.
|
|
57
|
+
*/
|
|
58
|
+
toolExplanation?: string
|
|
53
59
|
parameters?: Record<string, any>
|
|
54
60
|
result?: string
|
|
55
61
|
success?: boolean
|
|
@@ -73,6 +79,8 @@ export interface ExecutingToolState {
|
|
|
73
79
|
toolFunction: string
|
|
74
80
|
/** Mirrors {@link ToolExecutionData.toolTitle}; absent on `EXECUTED_TOOL`. */
|
|
75
81
|
toolTitle?: string
|
|
82
|
+
/** Mirrors {@link ToolExecutionData.toolExplanation}; absent on `EXECUTED_TOOL`. */
|
|
83
|
+
toolExplanation?: string
|
|
76
84
|
parameters?: Record<string, any>
|
|
77
85
|
}
|
|
78
86
|
|
|
@@ -226,6 +234,8 @@ export interface ExecutingToolMessageData extends MessageDataBase {
|
|
|
226
234
|
toolFunction?: string
|
|
227
235
|
/** Backend-issued human-readable title (wire field, mirrors `ChunkData.title`). */
|
|
228
236
|
title?: string
|
|
237
|
+
/** Backend-issued human-readable explanation (what/why) of the tool call. */
|
|
238
|
+
toolExplanation?: string
|
|
229
239
|
parameters?: Record<string, any>
|
|
230
240
|
toolExecutionRequestId?: string
|
|
231
241
|
}
|
|
@@ -44,6 +44,8 @@ export interface ChunkData {
|
|
|
44
44
|
toolFunction?: string
|
|
45
45
|
/** Execution chunks carry the human-readable title as `title`. */
|
|
46
46
|
title?: string
|
|
47
|
+
/** EXECUTING_TOOL chunks carry the tool's human-readable explanation (what/why). */
|
|
48
|
+
toolExplanation?: string
|
|
47
49
|
parameters?: Record<string, any>
|
|
48
50
|
result?: string
|
|
49
51
|
success?: boolean
|
|
@@ -75,6 +75,7 @@ export function parseChunkToAction(chunk: unknown): ParsedChunkAction | null {
|
|
|
75
75
|
integratedToolType: data.integratedToolType || '',
|
|
76
76
|
toolFunction: data.toolFunction || '',
|
|
77
77
|
toolTitle: typeof data.title === 'string' ? data.title : undefined,
|
|
78
|
+
toolExplanation: typeof data.toolExplanation === 'string' ? data.toolExplanation : undefined,
|
|
78
79
|
parameters: data.parameters,
|
|
79
80
|
toolExecutionRequestId: typeof data.toolExecutionRequestId === 'string' ? data.toolExecutionRequestId : undefined,
|
|
80
81
|
}
|
|
@@ -41,6 +41,7 @@ export function extractIncompleteMessageState(
|
|
|
41
41
|
integratedToolType: segment.data.integratedToolType,
|
|
42
42
|
toolFunction: segment.data.toolFunction,
|
|
43
43
|
toolTitle: segment.data.toolTitle,
|
|
44
|
+
toolExplanation: segment.data.toolExplanation,
|
|
44
45
|
parameters: segment.data.parameters,
|
|
45
46
|
})
|
|
46
47
|
hasIncompleteState = true
|
|
@@ -169,6 +169,7 @@ export class MessageSegmentAccumulator {
|
|
|
169
169
|
integratedToolType: toolData.integratedToolType,
|
|
170
170
|
toolFunction: toolData.toolFunction,
|
|
171
171
|
toolTitle: toolData.toolTitle,
|
|
172
|
+
toolExplanation: toolData.toolExplanation,
|
|
172
173
|
parameters: toolData.parameters,
|
|
173
174
|
})
|
|
174
175
|
this.segments.push(segment)
|
|
@@ -195,6 +196,8 @@ export class MessageSegmentAccumulator {
|
|
|
195
196
|
data: {
|
|
196
197
|
...toolData,
|
|
197
198
|
toolTitle: toolData.toolTitle ?? existingExecuting?.data.toolTitle ?? executingTool?.toolTitle,
|
|
199
|
+
toolExplanation:
|
|
200
|
+
toolData.toolExplanation ?? existingExecuting?.data.toolExplanation ?? executingTool?.toolExplanation,
|
|
198
201
|
parameters: toolData.parameters || executingTool?.parameters,
|
|
199
202
|
}
|
|
200
203
|
}
|
|
@@ -284,6 +284,7 @@ function processMessageData(
|
|
|
284
284
|
integratedToolType: data.integratedToolType || '',
|
|
285
285
|
toolFunction: data.toolFunction || '',
|
|
286
286
|
toolTitle: typeof data.title === 'string' ? data.title : undefined,
|
|
287
|
+
toolExplanation: typeof data.toolExplanation === 'string' ? data.toolExplanation : undefined,
|
|
287
288
|
parameters: data.parameters,
|
|
288
289
|
toolExecutionRequestId: data.toolExecutionRequestId,
|
|
289
290
|
},
|