@flamingo-stack/openframe-frontend-core 0.0.278 → 0.0.279
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-MVUN35FH.js → chunk-6ZMD3KBP.js} +2 -2
- package/dist/{chunk-DO55GWNT.cjs → chunk-776ZURDZ.cjs} +10 -10
- package/dist/{chunk-DO55GWNT.cjs.map → chunk-776ZURDZ.cjs.map} +1 -1
- package/dist/{chunk-5NL62LIF.js → chunk-7ECI5ZVO.js} +2 -2
- package/dist/{chunk-BBDJCXHW.cjs → chunk-7XVVRE53.cjs} +6 -6
- package/dist/{chunk-BBDJCXHW.cjs.map → chunk-7XVVRE53.cjs.map} +1 -1
- package/dist/{chunk-GO45CXT5.js → chunk-AVLSICZO.js} +49 -33
- package/dist/chunk-AVLSICZO.js.map +1 -0
- package/dist/{chunk-L4BJU5CE.cjs → chunk-QP4H2JJN.cjs} +34 -34
- package/dist/{chunk-L4BJU5CE.cjs.map → chunk-QP4H2JJN.cjs.map} +1 -1
- package/dist/{chunk-MDHNLZME.js → chunk-SZG56DA3.js} +2 -2
- package/dist/{chunk-WYQ5VFXA.cjs → chunk-XBTQK32O.cjs} +25 -25
- package/dist/{chunk-WYQ5VFXA.cjs.map → chunk-XBTQK32O.cjs.map} +1 -1
- package/dist/{chunk-737ZLQ2T.js → chunk-YK6FFIVG.js} +2 -2
- package/dist/{chunk-7LTWNUHB.cjs → chunk-Z53YSXDD.cjs} +149 -133
- package/dist/chunk-Z53YSXDD.cjs.map +1 -0
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.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/types/api.types.d.ts +7 -2
- package/dist/components/chat/types/api.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/types/processing.types.d.ts +1 -0
- package/dist/components/chat/types/processing.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chunk-parser.d.ts.map +1 -1
- package/dist/components/chat/utils/history-merge.d.ts +8 -0
- package/dist/components/chat/utils/history-merge.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts +5 -3
- 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/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/index.cjs +53 -53
- package/dist/components/index.js +4 -4
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +52 -52
- package/dist/components/tickets/index.js +3 -3
- 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-realtime-chunk-processor.ts +34 -21
- package/src/components/chat/types/api.types.ts +7 -2
- package/src/components/chat/types/message.types.ts +10 -0
- package/src/components/chat/types/network.types.ts +2 -0
- package/src/components/chat/types/processing.types.ts +1 -1
- package/src/components/chat/utils/__tests__/history-merge.test.ts +70 -0
- package/src/components/chat/utils/chunk-parser.ts +12 -1
- package/src/components/chat/utils/history-merge.ts +22 -2
- package/src/components/chat/utils/message-segment-accumulator.ts +10 -4
- package/src/components/chat/utils/process-historical-messages.ts +4 -1
- package/dist/chunk-7LTWNUHB.cjs.map +0 -1
- package/dist/chunk-GO45CXT5.js.map +0 -1
- /package/dist/{chunk-MVUN35FH.js.map → chunk-6ZMD3KBP.js.map} +0 -0
- /package/dist/{chunk-5NL62LIF.js.map → chunk-7ECI5ZVO.js.map} +0 -0
- /package/dist/{chunk-MDHNLZME.js.map → chunk-SZG56DA3.js.map} +0 -0
- /package/dist/{chunk-737ZLQ2T.js.map → chunk-YK6FFIVG.js.map} +0 -0
|
@@ -2669,6 +2669,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
2669
2669
|
{
|
|
2670
2670
|
data: segment.data,
|
|
2671
2671
|
status: segment.status,
|
|
2672
|
+
resolvedByName: segment.resolvedByName,
|
|
2672
2673
|
onApprove: segment.onApprove,
|
|
2673
2674
|
onReject: segment.onReject
|
|
2674
2675
|
},
|
|
@@ -34909,13 +34910,16 @@ function parseChunkToAction(chunk) {
|
|
|
34909
34910
|
approvalType
|
|
34910
34911
|
};
|
|
34911
34912
|
}
|
|
34912
|
-
case MESSAGE_TYPE.APPROVAL_RESULT:
|
|
34913
|
+
case MESSAGE_TYPE.APPROVAL_RESULT: {
|
|
34914
|
+
const resolvedByName = typeof data.resolvedByName === "string" ? data.resolvedByName : typeof data.displayName === "string" ? data.displayName : void 0;
|
|
34913
34915
|
return {
|
|
34914
34916
|
action: "approval_result",
|
|
34915
34917
|
requestId: data.approvalRequestId || data.approval_request_id || "",
|
|
34916
34918
|
approved: data.approved === true,
|
|
34917
|
-
approvalType: data.approvalType || "CLIENT"
|
|
34919
|
+
approvalType: data.approvalType || "CLIENT",
|
|
34920
|
+
resolvedByName
|
|
34918
34921
|
};
|
|
34922
|
+
}
|
|
34919
34923
|
case MESSAGE_TYPE.ERROR:
|
|
34920
34924
|
return {
|
|
34921
34925
|
action: "error",
|
|
@@ -35220,7 +35224,7 @@ var MessageSegmentAccumulator = class {
|
|
|
35220
35224
|
* `executions` is forwarded as-is. On upsert, a new `executions` object
|
|
35221
35225
|
* overrides the existing one (so the latest replay wins).
|
|
35222
35226
|
*/
|
|
35223
|
-
addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions) {
|
|
35227
|
+
addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions, resolvedByName) {
|
|
35224
35228
|
const existingIndex = this.segments.findIndex(
|
|
35225
35229
|
(s) => s.type === "approval_batch" && s.data.approvalRequestId === approvalRequestId
|
|
35226
35230
|
);
|
|
@@ -35236,6 +35240,7 @@ var MessageSegmentAccumulator = class {
|
|
|
35236
35240
|
...mergedExecutions ? { executions: mergedExecutions } : {}
|
|
35237
35241
|
},
|
|
35238
35242
|
status,
|
|
35243
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( existing.resolvedByName)),
|
|
35239
35244
|
onApprove: this.callbacks.onApprove,
|
|
35240
35245
|
onReject: this.callbacks.onReject
|
|
35241
35246
|
};
|
|
@@ -35250,6 +35255,7 @@ var MessageSegmentAccumulator = class {
|
|
|
35250
35255
|
...executions ? { executions } : {}
|
|
35251
35256
|
},
|
|
35252
35257
|
status,
|
|
35258
|
+
resolvedByName,
|
|
35253
35259
|
onApprove: this.callbacks.onApprove,
|
|
35254
35260
|
onReject: this.callbacks.onReject
|
|
35255
35261
|
};
|
|
@@ -35282,15 +35288,17 @@ var MessageSegmentAccumulator = class {
|
|
|
35282
35288
|
return { segment, pendingData: pendingApproval || null };
|
|
35283
35289
|
}
|
|
35284
35290
|
/**
|
|
35285
|
-
* Update status of an existing approval segment (single or batch)
|
|
35291
|
+
* Update status of an existing approval segment (single or batch).
|
|
35292
|
+
* `resolvedByName` (when provided) is stamped onto the matching batch segment so the
|
|
35293
|
+
* resolved card shows "by {name}"; omit it to leave any existing value untouched.
|
|
35286
35294
|
*/
|
|
35287
|
-
updateApprovalStatus(requestId, status) {
|
|
35295
|
+
updateApprovalStatus(requestId, status, resolvedByName) {
|
|
35288
35296
|
this.segments = this.segments.map((segment) => {
|
|
35289
35297
|
if (segment.type === "approval_request" && segment.data.requestId === requestId) {
|
|
35290
35298
|
return { ...segment, status };
|
|
35291
35299
|
}
|
|
35292
35300
|
if (segment.type === "approval_batch" && segment.data.approvalRequestId === requestId) {
|
|
35293
|
-
return { ...segment, status };
|
|
35301
|
+
return { ...segment, status, resolvedByName: _nullishCoalesce(resolvedByName, () => ( segment.resolvedByName)) };
|
|
35294
35302
|
}
|
|
35295
35303
|
return segment;
|
|
35296
35304
|
});
|
|
@@ -35390,13 +35398,14 @@ var MessageSegmentAccumulator = class {
|
|
|
35390
35398
|
break;
|
|
35391
35399
|
}
|
|
35392
35400
|
case "approval_batch": {
|
|
35393
|
-
const { data, status } = segment;
|
|
35401
|
+
const { data, status, resolvedByName } = segment;
|
|
35394
35402
|
this.addApprovalBatch(
|
|
35395
35403
|
data.approvalRequestId,
|
|
35396
35404
|
data.approvalType,
|
|
35397
35405
|
data.toolCalls,
|
|
35398
35406
|
status,
|
|
35399
|
-
data.executions
|
|
35407
|
+
data.executions,
|
|
35408
|
+
resolvedByName
|
|
35400
35409
|
);
|
|
35401
35410
|
break;
|
|
35402
35411
|
}
|
|
@@ -35482,11 +35491,13 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35482
35491
|
const action = parseChunkToAction(chunk);
|
|
35483
35492
|
if (!action) return;
|
|
35484
35493
|
const accumulator = accumulatorRef.current;
|
|
35494
|
+
const streamSeq = chunk && typeof chunk === "object" && typeof chunk.streamSeq === "number" ? chunk.streamSeq : void 0;
|
|
35495
|
+
const emitSegments = (s, meta) => _optionalChain([callbacks, 'access', _832 => _832.onSegmentsUpdate, 'optionalCall', _833 => _833(s, streamSeq != null ? { ...meta, streamSeq } : meta)]);
|
|
35485
35496
|
if (action.action === "direct_message") sawDirectMessageRef.current = true;
|
|
35486
35497
|
if ((directModeFlagRef.current || sawDirectMessageRef.current) && !DIRECT_MODE_ALLOWED.has(action.action)) {
|
|
35487
35498
|
if (isInStreamRef.current) {
|
|
35488
35499
|
isInStreamRef.current = false;
|
|
35489
|
-
_optionalChain([callbacks, 'access',
|
|
35500
|
+
_optionalChain([callbacks, 'access', _834 => _834.onStreamEnd, 'optionalCall', _835 => _835()]);
|
|
35490
35501
|
accumulator.resetSegments();
|
|
35491
35502
|
}
|
|
35492
35503
|
return;
|
|
@@ -35495,32 +35506,32 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35495
35506
|
case "message_start":
|
|
35496
35507
|
isInStreamRef.current = true;
|
|
35497
35508
|
hasEverStreamedRef.current = true;
|
|
35498
|
-
_optionalChain([callbacks, 'access',
|
|
35509
|
+
_optionalChain([callbacks, 'access', _836 => _836.onStreamStart, 'optionalCall', _837 => _837()]);
|
|
35499
35510
|
accumulator.resetSegments();
|
|
35500
35511
|
break;
|
|
35501
35512
|
case "message_end":
|
|
35502
35513
|
isInStreamRef.current = false;
|
|
35503
|
-
_optionalChain([callbacks, 'access',
|
|
35514
|
+
_optionalChain([callbacks, 'access', _838 => _838.onStreamEnd, 'optionalCall', _839 => _839()]);
|
|
35504
35515
|
accumulator.resetSegments();
|
|
35505
35516
|
break;
|
|
35506
35517
|
case "metadata":
|
|
35507
|
-
_optionalChain([callbacks, 'access',
|
|
35518
|
+
_optionalChain([callbacks, 'access', _840 => _840.onMetadata, 'optionalCall', _841 => _841(action)]);
|
|
35508
35519
|
break;
|
|
35509
35520
|
case "text": {
|
|
35510
35521
|
const segments = accumulator.appendText(action.text);
|
|
35511
35522
|
if (isInStreamRef.current || !hasEverStreamedRef.current) {
|
|
35512
|
-
|
|
35523
|
+
emitSegments(segments);
|
|
35513
35524
|
} else {
|
|
35514
|
-
|
|
35525
|
+
emitSegments([{ type: "text", text: action.text }], { append: true });
|
|
35515
35526
|
}
|
|
35516
35527
|
break;
|
|
35517
35528
|
}
|
|
35518
35529
|
case "thinking": {
|
|
35519
35530
|
const segments = accumulator.appendThinking(action.text);
|
|
35520
35531
|
if (isInStreamRef.current || !hasEverStreamedRef.current) {
|
|
35521
|
-
|
|
35532
|
+
emitSegments(segments);
|
|
35522
35533
|
} else {
|
|
35523
|
-
|
|
35534
|
+
emitSegments([{ type: "thinking", text: action.text }], { append: true });
|
|
35524
35535
|
}
|
|
35525
35536
|
break;
|
|
35526
35537
|
}
|
|
@@ -35530,7 +35541,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35530
35541
|
break;
|
|
35531
35542
|
}
|
|
35532
35543
|
const segments = accumulator.addToolExecution(action.segment);
|
|
35533
|
-
|
|
35544
|
+
emitSegments(segments);
|
|
35534
35545
|
break;
|
|
35535
35546
|
}
|
|
35536
35547
|
case "approval_request": {
|
|
@@ -35544,10 +35555,10 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35544
35555
|
approvalType,
|
|
35545
35556
|
status
|
|
35546
35557
|
);
|
|
35547
|
-
|
|
35558
|
+
emitSegments(segments);
|
|
35548
35559
|
} else {
|
|
35549
35560
|
pendingEscalatedRef.current.set(requestId, { command, explanation, approvalType });
|
|
35550
|
-
_optionalChain([callbacks, 'access',
|
|
35561
|
+
_optionalChain([callbacks, 'access', _842 => _842.onEscalatedApproval, 'optionalCall', _843 => _843(requestId, { command, explanation, approvalType })]);
|
|
35551
35562
|
}
|
|
35552
35563
|
break;
|
|
35553
35564
|
}
|
|
@@ -35559,20 +35570,20 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35559
35570
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
35560
35571
|
pendingEscalatedRef.current.set(requestId, {
|
|
35561
35572
|
command: summary,
|
|
35562
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
35573
|
+
explanation: _optionalChain([required, 'optionalAccess', _844 => _844.toolExplanation]),
|
|
35563
35574
|
approvalType,
|
|
35564
35575
|
toolCalls
|
|
35565
35576
|
});
|
|
35566
|
-
_optionalChain([callbacks, 'access',
|
|
35577
|
+
_optionalChain([callbacks, 'access', _845 => _845.onEscalatedApproval, 'optionalCall', _846 => _846(requestId, {
|
|
35567
35578
|
command: summary,
|
|
35568
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
35579
|
+
explanation: _optionalChain([required, 'optionalAccess', _847 => _847.toolExplanation]),
|
|
35569
35580
|
approvalType
|
|
35570
35581
|
})]);
|
|
35571
35582
|
break;
|
|
35572
35583
|
}
|
|
35573
35584
|
if (batchApprovalsEnabled) {
|
|
35574
35585
|
const segments2 = accumulator.addApprovalBatch(requestId, approvalType, toolCalls, status);
|
|
35575
|
-
|
|
35586
|
+
emitSegments(segments2);
|
|
35576
35587
|
break;
|
|
35577
35588
|
}
|
|
35578
35589
|
let segments = accumulator.getSegments();
|
|
@@ -35586,16 +35597,16 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35586
35597
|
status
|
|
35587
35598
|
);
|
|
35588
35599
|
}
|
|
35589
|
-
|
|
35600
|
+
emitSegments(segments);
|
|
35590
35601
|
break;
|
|
35591
35602
|
}
|
|
35592
35603
|
case "approval_result": {
|
|
35593
|
-
const { requestId, approved, approvalType } = action;
|
|
35604
|
+
const { requestId, approved, approvalType, resolvedByName } = action;
|
|
35594
35605
|
const escalatedData = pendingEscalatedRef.current.get(requestId);
|
|
35595
35606
|
const status = approved ? "approved" : "rejected";
|
|
35596
35607
|
if (escalatedData) {
|
|
35597
35608
|
pendingEscalatedRef.current.delete(requestId);
|
|
35598
|
-
_optionalChain([callbacks, 'access',
|
|
35609
|
+
_optionalChain([callbacks, 'access', _848 => _848.onEscalatedApprovalResult, 'optionalCall', _849 => _849(requestId, approved, {
|
|
35599
35610
|
command: escalatedData.command,
|
|
35600
35611
|
explanation: escalatedData.explanation,
|
|
35601
35612
|
approvalType: escalatedData.approvalType
|
|
@@ -35606,9 +35617,11 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35606
35617
|
requestId,
|
|
35607
35618
|
escalatedData.approvalType,
|
|
35608
35619
|
escalatedData.toolCalls,
|
|
35609
|
-
status
|
|
35620
|
+
status,
|
|
35621
|
+
void 0,
|
|
35622
|
+
resolvedByName
|
|
35610
35623
|
);
|
|
35611
|
-
|
|
35624
|
+
emitSegments(segments);
|
|
35612
35625
|
} else {
|
|
35613
35626
|
let segments = accumulator.getSegments();
|
|
35614
35627
|
for (const call of escalatedData.toolCalls) {
|
|
@@ -35621,7 +35634,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35621
35634
|
status
|
|
35622
35635
|
);
|
|
35623
35636
|
}
|
|
35624
|
-
|
|
35637
|
+
emitSegments(segments);
|
|
35625
35638
|
}
|
|
35626
35639
|
} else {
|
|
35627
35640
|
const segments = accumulator.addApprovalRequest(
|
|
@@ -35631,37 +35644,37 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35631
35644
|
escalatedData.approvalType,
|
|
35632
35645
|
status
|
|
35633
35646
|
);
|
|
35634
|
-
|
|
35647
|
+
emitSegments(segments);
|
|
35635
35648
|
}
|
|
35636
35649
|
} else {
|
|
35637
|
-
accumulator.updateApprovalStatus(requestId, status);
|
|
35650
|
+
accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
35638
35651
|
if (!callbacks.onApprovalResolved) {
|
|
35639
|
-
|
|
35652
|
+
emitSegments(accumulator.getSegments());
|
|
35640
35653
|
}
|
|
35641
35654
|
}
|
|
35642
|
-
_optionalChain([callbacks, 'access',
|
|
35655
|
+
_optionalChain([callbacks, 'access', _850 => _850.onApprovalResolved, 'optionalCall', _851 => _851(requestId, status, approvalType, resolvedByName)]);
|
|
35643
35656
|
break;
|
|
35644
35657
|
}
|
|
35645
35658
|
case "error": {
|
|
35646
35659
|
let message2;
|
|
35647
|
-
if ("details" in action && _optionalChain([action, 'optionalAccess',
|
|
35660
|
+
if ("details" in action && _optionalChain([action, 'optionalAccess', _852 => _852.details])) {
|
|
35648
35661
|
try {
|
|
35649
|
-
message2 = _optionalChain([JSON, 'access',
|
|
35662
|
+
message2 = _optionalChain([JSON, 'access', _853 => _853.parse, 'call', _854 => _854(action.details), 'optionalAccess', _855 => _855.error, 'optionalAccess', _856 => _856.message]);
|
|
35650
35663
|
} catch (e35) {
|
|
35651
35664
|
message2 = action.details;
|
|
35652
35665
|
}
|
|
35653
35666
|
}
|
|
35654
35667
|
const segments = accumulator.addError(action.error, message2);
|
|
35655
|
-
|
|
35656
|
-
_optionalChain([callbacks, 'access',
|
|
35668
|
+
emitSegments(segments);
|
|
35669
|
+
_optionalChain([callbacks, 'access', _857 => _857.onError, 'optionalCall', _858 => _858(action.error, message2)]);
|
|
35657
35670
|
break;
|
|
35658
35671
|
}
|
|
35659
35672
|
case "system": {
|
|
35660
|
-
_optionalChain([callbacks, 'access',
|
|
35673
|
+
_optionalChain([callbacks, 'access', _859 => _859.onSystemMessage, 'optionalCall', _860 => _860(action.text)]);
|
|
35661
35674
|
break;
|
|
35662
35675
|
}
|
|
35663
35676
|
case "direct_message": {
|
|
35664
|
-
_optionalChain([callbacks, 'access',
|
|
35677
|
+
_optionalChain([callbacks, 'access', _861 => _861.onDirectMessage, 'optionalCall', _862 => _862(action.text, {
|
|
35665
35678
|
ownerType: action.ownerType,
|
|
35666
35679
|
displayName: action.displayName,
|
|
35667
35680
|
userId: action.userId
|
|
@@ -35669,29 +35682,29 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35669
35682
|
break;
|
|
35670
35683
|
}
|
|
35671
35684
|
case "message_request":
|
|
35672
|
-
_optionalChain([callbacks, 'access',
|
|
35685
|
+
_optionalChain([callbacks, 'access', _863 => _863.onUserMessage, 'optionalCall', _864 => _864(action.text, {
|
|
35673
35686
|
ownerType: action.ownerType,
|
|
35674
35687
|
displayName: action.displayName,
|
|
35675
35688
|
userId: action.userId
|
|
35676
35689
|
})]);
|
|
35677
35690
|
break;
|
|
35678
35691
|
case "token_usage":
|
|
35679
|
-
_optionalChain([callbacks, 'access',
|
|
35692
|
+
_optionalChain([callbacks, 'access', _865 => _865.onTokenUsage, 'optionalCall', _866 => _866(action.data)]);
|
|
35680
35693
|
break;
|
|
35681
35694
|
case "context_compaction_start": {
|
|
35682
35695
|
const standalone = !isInStreamRef.current;
|
|
35683
35696
|
const segments = accumulator.addContextCompaction();
|
|
35684
|
-
|
|
35697
|
+
emitSegments(segments, standalone ? { append: true, isCompacting: true } : void 0);
|
|
35685
35698
|
break;
|
|
35686
35699
|
}
|
|
35687
35700
|
case "context_compaction_end": {
|
|
35688
35701
|
const standalone = !isInStreamRef.current;
|
|
35689
35702
|
const segments = accumulator.completeContextCompaction(action.summary);
|
|
35690
|
-
|
|
35703
|
+
emitSegments(segments, standalone ? { append: true, isCompacting: true } : void 0);
|
|
35691
35704
|
break;
|
|
35692
35705
|
}
|
|
35693
35706
|
case "dialog_closed":
|
|
35694
|
-
_optionalChain([callbacks, 'access',
|
|
35707
|
+
_optionalChain([callbacks, 'access', _867 => _867.onDialogClosed, 'optionalCall', _868 => _868()]);
|
|
35695
35708
|
break;
|
|
35696
35709
|
default:
|
|
35697
35710
|
break;
|
|
@@ -35709,8 +35722,8 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35709
35722
|
sawDirectMessageRef.current = false;
|
|
35710
35723
|
}, []);
|
|
35711
35724
|
const updateApprovalStatus = _react.useCallback.call(void 0,
|
|
35712
|
-
(requestId, status) => {
|
|
35713
|
-
return accumulatorRef.current.updateApprovalStatus(requestId, status);
|
|
35725
|
+
(requestId, status, resolvedByName) => {
|
|
35726
|
+
return accumulatorRef.current.updateApprovalStatus(requestId, status, resolvedByName);
|
|
35714
35727
|
},
|
|
35715
35728
|
[]
|
|
35716
35729
|
);
|
|
@@ -35753,7 +35766,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
35753
35766
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
35754
35767
|
if (!cancelled) setCommands(next);
|
|
35755
35768
|
} catch (err) {
|
|
35756
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
35769
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _869 => _869.name]) !== "AbortError") {
|
|
35757
35770
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
35758
35771
|
}
|
|
35759
35772
|
} finally {
|
|
@@ -35772,7 +35785,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
35772
35785
|
const query = _reactquery.useQuery.call(void 0, {
|
|
35773
35786
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
35774
35787
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
35775
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
35788
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _870 => _870.enabled]), () => ( true)),
|
|
35776
35789
|
staleTime: Infinity,
|
|
35777
35790
|
gcTime: Infinity
|
|
35778
35791
|
});
|
|
@@ -35793,7 +35806,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
35793
35806
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
35794
35807
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
35795
35808
|
return new Promise((resolve, reject) => {
|
|
35796
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
35809
|
+
if (_optionalChain([signal, 'optionalAccess', _871 => _871.aborted])) {
|
|
35797
35810
|
reject(new Error("Upload cancelled"));
|
|
35798
35811
|
return;
|
|
35799
35812
|
}
|
|
@@ -35807,7 +35820,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
35807
35820
|
xhr.removeEventListener("error", handleError);
|
|
35808
35821
|
xhr.removeEventListener("abort", handleAbort);
|
|
35809
35822
|
xhr.removeEventListener("timeout", handleTimeout);
|
|
35810
|
-
_optionalChain([signal, 'optionalAccess',
|
|
35823
|
+
_optionalChain([signal, 'optionalAccess', _872 => _872.removeEventListener, 'call', _873 => _873("abort", handleSignalAbort)]);
|
|
35811
35824
|
if (xhr.readyState !== XMLHttpRequest.DONE) xhr.abort();
|
|
35812
35825
|
};
|
|
35813
35826
|
const handleProgress = (event) => {
|
|
@@ -35843,7 +35856,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
35843
35856
|
const handleSignalAbort = () => {
|
|
35844
35857
|
xhr.abort();
|
|
35845
35858
|
};
|
|
35846
|
-
_optionalChain([signal, 'optionalAccess',
|
|
35859
|
+
_optionalChain([signal, 'optionalAccess', _874 => _874.addEventListener, 'call', _875 => _875("abort", handleSignalAbort, { once: true })]);
|
|
35847
35860
|
xhr.upload.addEventListener("progress", handleProgress);
|
|
35848
35861
|
xhr.addEventListener("load", handleLoad);
|
|
35849
35862
|
xhr.addEventListener("error", handleError);
|
|
@@ -35887,12 +35900,12 @@ function useChatAttachments() {
|
|
|
35887
35900
|
try {
|
|
35888
35901
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
35889
35902
|
} catch (err) {
|
|
35890
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35903
|
+
if (_optionalChain([ctrl, 'optionalAccess', _876 => _876.signal, 'access', _877 => _877.aborted])) return;
|
|
35891
35904
|
throw new Error(
|
|
35892
35905
|
`Could not read file content: ${err instanceof Error ? err.message : String(err)}`
|
|
35893
35906
|
);
|
|
35894
35907
|
}
|
|
35895
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35908
|
+
if (_optionalChain([ctrl, 'optionalAccess', _878 => _878.signal, 'access', _879 => _879.aborted])) return;
|
|
35896
35909
|
if (!sniffed) {
|
|
35897
35910
|
throw new Error("Unrecognized file format");
|
|
35898
35911
|
}
|
|
@@ -35906,7 +35919,7 @@ function useChatAttachments() {
|
|
|
35906
35919
|
const urlResp = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
35907
35920
|
method: "POST",
|
|
35908
35921
|
headers: { "Content-Type": "application/json" },
|
|
35909
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
35922
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _880 => _880.signal]),
|
|
35910
35923
|
body: JSON.stringify({
|
|
35911
35924
|
fileName: att.file.name,
|
|
35912
35925
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -35932,9 +35945,9 @@ function useChatAttachments() {
|
|
|
35932
35945
|
(pct) => {
|
|
35933
35946
|
updateOne(att.id, { progress: pct });
|
|
35934
35947
|
},
|
|
35935
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
35948
|
+
_optionalChain([ctrl, 'optionalAccess', _881 => _881.signal])
|
|
35936
35949
|
);
|
|
35937
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35950
|
+
if (_optionalChain([ctrl, 'optionalAccess', _882 => _882.signal, 'access', _883 => _883.aborted])) return;
|
|
35938
35951
|
updateOne(att.id, {
|
|
35939
35952
|
status: "ready",
|
|
35940
35953
|
progress: 100,
|
|
@@ -35942,7 +35955,7 @@ function useChatAttachments() {
|
|
|
35942
35955
|
viewToken: mintData.viewToken
|
|
35943
35956
|
});
|
|
35944
35957
|
} catch (err) {
|
|
35945
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35958
|
+
if (_optionalChain([ctrl, 'optionalAccess', _884 => _884.signal, 'access', _885 => _885.aborted])) return;
|
|
35946
35959
|
const message2 = err instanceof Error ? err.message : String(err);
|
|
35947
35960
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message2 });
|
|
35948
35961
|
} finally {
|
|
@@ -36093,7 +36106,7 @@ var ANON_DEFAULTS = {
|
|
|
36093
36106
|
function useResolveChatIdentity(enabled) {
|
|
36094
36107
|
const runtime = _chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, );
|
|
36095
36108
|
const url = runtime.endpoints.identityUrl;
|
|
36096
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkZSUNQJROcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
36109
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkZSUNQJROcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _886 => _886.email]), () => ( null));
|
|
36097
36110
|
const [data, setData] = _react.useState.call(void 0, ANON_DEFAULTS);
|
|
36098
36111
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, enabled);
|
|
36099
36112
|
_react.useEffect.call(void 0, () => {
|
|
@@ -36181,7 +36194,7 @@ function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
|
|
|
36181
36194
|
yield chunk;
|
|
36182
36195
|
}
|
|
36183
36196
|
} catch (err) {
|
|
36184
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
36197
|
+
if (_optionalChain([err, 'optionalAccess', _887 => _887.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
36185
36198
|
return;
|
|
36186
36199
|
}
|
|
36187
36200
|
const errorMessage = err instanceof Error ? err.message : "An error occurred";
|
|
@@ -36232,7 +36245,7 @@ function useChat({
|
|
|
36232
36245
|
const onMessagesChangeRef = _react.useRef.call(void 0, onMessagesChange);
|
|
36233
36246
|
onMessagesChangeRef.current = onMessagesChange;
|
|
36234
36247
|
_react.useEffect.call(void 0, () => {
|
|
36235
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
36248
|
+
_optionalChain([onMessagesChangeRef, 'access', _888 => _888.current, 'optionalCall', _889 => _889(messages)]);
|
|
36236
36249
|
}, [messages]);
|
|
36237
36250
|
const {
|
|
36238
36251
|
streamMessage,
|
|
@@ -36269,7 +36282,7 @@ function useChat({
|
|
|
36269
36282
|
name: "You",
|
|
36270
36283
|
content: text,
|
|
36271
36284
|
timestamp: /* @__PURE__ */ new Date(),
|
|
36272
|
-
..._optionalChain([options, 'optionalAccess',
|
|
36285
|
+
..._optionalChain([options, 'optionalAccess', _890 => _890.hidden]) ? { hidden: true } : {}
|
|
36273
36286
|
};
|
|
36274
36287
|
addMessage(userMessage);
|
|
36275
36288
|
setIsTyping(true);
|
|
@@ -36331,7 +36344,7 @@ function useChat({
|
|
|
36331
36344
|
currentTextSegment = "";
|
|
36332
36345
|
}
|
|
36333
36346
|
const seg = segment;
|
|
36334
|
-
const proposalId = _optionalChain([seg, 'access',
|
|
36347
|
+
const proposalId = _optionalChain([seg, 'access', _891 => _891.data, 'optionalAccess', _892 => _892.requestId]);
|
|
36335
36348
|
const updateApprovalMessage = (transform) => {
|
|
36336
36349
|
setMessages((prev) => {
|
|
36337
36350
|
for (let i = prev.length - 1; i >= 0; i--) {
|
|
@@ -36340,7 +36353,7 @@ function useChat({
|
|
|
36340
36353
|
if (!Array.isArray(m.content)) continue;
|
|
36341
36354
|
const segments = m.content;
|
|
36342
36355
|
const hasMatch = segments.some(
|
|
36343
|
-
(s) => s.type === "approval_request" && _optionalChain([s, 'access',
|
|
36356
|
+
(s) => s.type === "approval_request" && _optionalChain([s, 'access', _893 => _893.data, 'optionalAccess', _894 => _894.requestId]) === proposalId
|
|
36344
36357
|
);
|
|
36345
36358
|
if (!hasMatch) continue;
|
|
36346
36359
|
const next = [...prev];
|
|
@@ -36382,11 +36395,11 @@ function useChat({
|
|
|
36382
36395
|
if (!Array.isArray(m.content)) continue;
|
|
36383
36396
|
const segments = m.content;
|
|
36384
36397
|
const hasMatch = segments.some(
|
|
36385
|
-
(s) => s.type === "approval_request" && _optionalChain([s, 'access',
|
|
36398
|
+
(s) => s.type === "approval_request" && _optionalChain([s, 'access', _895 => _895.data, 'optionalAccess', _896 => _896.requestId]) === decision.proposalId
|
|
36386
36399
|
);
|
|
36387
36400
|
if (!hasMatch) continue;
|
|
36388
36401
|
const flipped = segments.map(
|
|
36389
|
-
(s) => s.type === "approval_request" && _optionalChain([s, 'access',
|
|
36402
|
+
(s) => s.type === "approval_request" && _optionalChain([s, 'access', _897 => _897.data, 'optionalAccess', _898 => _898.requestId]) === decision.proposalId ? { ...s, status: decision.action } : s
|
|
36390
36403
|
);
|
|
36391
36404
|
const next = [...prev];
|
|
36392
36405
|
next[i] = { ...m, content: flipped };
|
|
@@ -36548,8 +36561,8 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36548
36561
|
})),
|
|
36549
36562
|
{ role: "user", content: message2 }
|
|
36550
36563
|
];
|
|
36551
|
-
const targetPath = _optionalChain([extra, 'optionalAccess',
|
|
36552
|
-
const requestBody = _optionalChain([extra, 'optionalAccess',
|
|
36564
|
+
const targetPath = _optionalChain([extra, 'optionalAccess', _899 => _899.approvalAction]) ? endpoints.approvalToolUrl : endpoints.chatStreamUrl;
|
|
36565
|
+
const requestBody = _optionalChain([extra, 'optionalAccess', _900 => _900.approvalAction]) ? {
|
|
36553
36566
|
proposal_id: extra.approvalAction.proposalId,
|
|
36554
36567
|
action: extra.approvalAction.action,
|
|
36555
36568
|
messages: currentMessages.filter((m) => (m.role === "user" || m.role === "assistant") && !m.hidden).map((m) => ({
|
|
@@ -36558,8 +36571,8 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36558
36571
|
}))
|
|
36559
36572
|
} : {
|
|
36560
36573
|
messages: apiMessages,
|
|
36561
|
-
..._optionalChain([extra, 'optionalAccess',
|
|
36562
|
-
..._optionalChain([extra, 'optionalAccess',
|
|
36574
|
+
..._optionalChain([extra, 'optionalAccess', _901 => _901.commandOverride]) ? { commandOverride: extra.commandOverride } : {},
|
|
36575
|
+
..._optionalChain([extra, 'optionalAccess', _902 => _902.pendingAttachments]) && extra.pendingAttachments.length > 0 ? { pendingAttachments: extra.pendingAttachments } : {}
|
|
36563
36576
|
};
|
|
36564
36577
|
const response = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, targetPath, {
|
|
36565
36578
|
method: "POST",
|
|
@@ -36569,7 +36582,7 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36569
36582
|
if (!response.ok) {
|
|
36570
36583
|
throw new Error(`Chat request failed: ${response.status}`);
|
|
36571
36584
|
}
|
|
36572
|
-
const reader = _optionalChain([response, 'access',
|
|
36585
|
+
const reader = _optionalChain([response, 'access', _903 => _903.body, 'optionalAccess', _904 => _904.getReader, 'call', _905 => _905()]);
|
|
36573
36586
|
if (!reader) throw new Error("No response body");
|
|
36574
36587
|
const decoder = new TextDecoder();
|
|
36575
36588
|
let buffer = "";
|
|
@@ -36652,7 +36665,7 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36652
36665
|
const toolName = typeof meta.tool_name === "string" ? meta.tool_name : void 0;
|
|
36653
36666
|
const result = _nullishCoalesce(meta.result, () => ( null));
|
|
36654
36667
|
const card = _nullishCoalesce(meta.card, () => ( null));
|
|
36655
|
-
if (_optionalChain([card, 'optionalAccess',
|
|
36668
|
+
if (_optionalChain([card, 'optionalAccess', _906 => _906.ref, 'optionalAccess', _907 => _907.id]) && _optionalChain([card, 'optionalAccess', _908 => _908.type])) {
|
|
36656
36669
|
const existing = _nullishCoalesce(refsMapRef.current.get(sendIdx), () => ( {}));
|
|
36657
36670
|
const key = buildChatRefKey(card.type, card.ref.id);
|
|
36658
36671
|
refsMapRef.current.set(sendIdx, { ...existing, [key]: card.ref });
|
|
@@ -36665,8 +36678,8 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36665
36678
|
willAutoContinue: meta.willAutoContinue === true,
|
|
36666
36679
|
...toolName ? { toolName } : {},
|
|
36667
36680
|
...result ? { result } : {},
|
|
36668
|
-
..._optionalChain([card, 'optionalAccess',
|
|
36669
|
-
..._optionalChain([card, 'optionalAccess',
|
|
36681
|
+
..._optionalChain([card, 'optionalAccess', _909 => _909.marker]) ? { marker: card.marker } : {},
|
|
36682
|
+
..._optionalChain([card, 'optionalAccess', _910 => _910.ref]) ? { cardRef: card.ref } : {},
|
|
36670
36683
|
...typeof meta.receiptText === "string" ? { receiptText: meta.receiptText } : {},
|
|
36671
36684
|
proposalId: typeof meta.proposalId === "string" ? meta.proposalId : void 0
|
|
36672
36685
|
};
|
|
@@ -36785,7 +36798,7 @@ var DEFAULT_CHAT_SOURCE = "embed";
|
|
|
36785
36798
|
var chatStorageKey = (source) => {
|
|
36786
36799
|
const base = `mingo-chat-${source}-v${CHAT_STORAGE_VERSION}`;
|
|
36787
36800
|
const auth = _chunkZSUNQJROcjs.getEmbedProxyAuth.call(void 0, );
|
|
36788
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
36801
|
+
if (_optionalChain([auth, 'optionalAccess', _911 => _911.email])) {
|
|
36789
36802
|
return `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}`;
|
|
36790
36803
|
}
|
|
36791
36804
|
return base;
|
|
@@ -36840,7 +36853,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36840
36853
|
const { active = true } = runtimeOptions;
|
|
36841
36854
|
const runtime = _chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, );
|
|
36842
36855
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
36843
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
36856
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _912 => _912.tableIdForDocumentType]), () => ( _chunkHR4CVAVHcjs.defaultTableIdForDocumentType));
|
|
36844
36857
|
const persistedRef = _react.useRef.call(void 0, null);
|
|
36845
36858
|
if (persistedRef.current === null) {
|
|
36846
36859
|
pruneStaleChatStorage(source);
|
|
@@ -36945,7 +36958,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36945
36958
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
36946
36959
|
sources = sourcesMapRef.current.get(lookupIdx);
|
|
36947
36960
|
chatRefs = _nullishCoalesce(m.chatRefs, () => ( refsMapRef.current.get(lookupIdx)));
|
|
36948
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([metaMapRef, 'access',
|
|
36961
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([metaMapRef, 'access', _913 => _913.current, 'access', _914 => _914.get, 'call', _915 => _915(lookupIdx), 'optionalAccess', _916 => _916.scrollAnchor]), () => ( void 0));
|
|
36949
36962
|
}
|
|
36950
36963
|
return {
|
|
36951
36964
|
id: m.id,
|
|
@@ -36993,7 +37006,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36993
37006
|
);
|
|
36994
37007
|
return;
|
|
36995
37008
|
}
|
|
36996
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
37009
|
+
const refSlug = typeof _optionalChain([reference, 'access', _917 => _917.metadata, 'optionalAccess', _918 => _918.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
36997
37010
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
36998
37011
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
36999
37012
|
const text = `/${cmdId} display "${escaped}"`;
|
|
@@ -37065,18 +37078,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
37065
37078
|
clearMessages,
|
|
37066
37079
|
streamingPhase,
|
|
37067
37080
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
37068
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37069
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37070
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37081
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _919 => _919.provider]), () => ( null)),
|
|
37082
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _920 => _920.modelLabel]), () => ( null)),
|
|
37083
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _921 => _921.contextWindowMaxTokens]), () => ( null)),
|
|
37071
37084
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
37072
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37085
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _922 => _922.inputTokens]), () => ( null)),
|
|
37073
37086
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
37074
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37087
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _923 => _923.outputTokens]), () => ( null)),
|
|
37075
37088
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
37076
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37089
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _924 => _924.cacheHitRatePct]), () => ( null)),
|
|
37077
37090
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
37078
37091
|
* token counts). null until the trailing usage frame lands. */
|
|
37079
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37092
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _925 => _925.breakdown]), () => ( null)),
|
|
37080
37093
|
// ─── Dialog management — stubs for v1 ────────────────────────────────
|
|
37081
37094
|
// Guide mode currently keeps its history in `localStorage` opaquely
|
|
37082
37095
|
// under the hood (`runtime.source` namespaced key). Surfacing that
|
|
@@ -37134,15 +37147,15 @@ var noopRejectRequest = async (_id, _reason) => {
|
|
|
37134
37147
|
|
|
37135
37148
|
// src/components/chat/utils/process-historical-messages.ts
|
|
37136
37149
|
function getOwnerDisplayName(owner) {
|
|
37137
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
37150
|
+
if (_optionalChain([owner, 'optionalAccess', _926 => _926.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
37138
37151
|
const { firstName, lastName } = owner.user;
|
|
37139
37152
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
37140
37153
|
if (name) return name;
|
|
37141
37154
|
}
|
|
37142
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
37155
|
+
return _optionalChain([owner, 'optionalAccess', _927 => _927.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
37143
37156
|
}
|
|
37144
37157
|
function getOwnerAvatar(owner) {
|
|
37145
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
37158
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _928 => _928.user, 'optionalAccess', _929 => _929.image, 'optionalAccess', _930 => _930.imageUrl]), () => ( void 0));
|
|
37146
37159
|
}
|
|
37147
37160
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
37148
37161
|
messageDataArray.forEach((data) => {
|
|
@@ -37205,10 +37218,10 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
37205
37218
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
37206
37219
|
return;
|
|
37207
37220
|
}
|
|
37208
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
37221
|
+
const isUserMessage = _optionalChain([msg, 'access', _931 => _931.owner, 'optionalAccess', _932 => _932.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _933 => _933.owner, 'optionalAccess', _934 => _934.type]) === OWNER_TYPE.ADMIN;
|
|
37209
37222
|
if (isUserMessage) {
|
|
37210
37223
|
flushAssistantMessage();
|
|
37211
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
37224
|
+
const userAuthorType = _optionalChain([msg, 'access', _935 => _935.owner, 'optionalAccess', _936 => _936.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
37212
37225
|
messageDataArray.forEach((data) => {
|
|
37213
37226
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
37214
37227
|
processedMessages.push({
|
|
@@ -37233,7 +37246,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
37233
37246
|
});
|
|
37234
37247
|
const nextMsg = messages[index + 1];
|
|
37235
37248
|
const isLastMessage = index === messages.length - 1;
|
|
37236
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
37249
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _937 => _937.owner, 'optionalAccess', _938 => _938.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _939 => _939.owner, 'optionalAccess', _940 => _940.type]) === OWNER_TYPE.ADMIN);
|
|
37237
37250
|
if (isLastMessage || nextIsFromUser) {
|
|
37238
37251
|
flushAssistantMessage();
|
|
37239
37252
|
}
|
|
@@ -37343,7 +37356,7 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37343
37356
|
}
|
|
37344
37357
|
}
|
|
37345
37358
|
} else {
|
|
37346
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
37359
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _941 => _941.set, 'call', _942 => _942(data.approvalRequestId, {
|
|
37347
37360
|
command: data.command || "",
|
|
37348
37361
|
explanation: data.explanation,
|
|
37349
37362
|
approvalType,
|
|
@@ -37356,14 +37369,17 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37356
37369
|
if ("approvalRequestId" in data && data.approvalRequestId) {
|
|
37357
37370
|
const existingStatus = approvalStatuses[data.approvalRequestId];
|
|
37358
37371
|
const status = existingStatus || (data.approved ? "approved" : "rejected");
|
|
37359
|
-
const
|
|
37360
|
-
|
|
37372
|
+
const resolvedByName = "resolvedByName" in data ? data.resolvedByName : void 0;
|
|
37373
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _943 => _943.get, 'call', _944 => _944(data.approvalRequestId)]);
|
|
37374
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _945 => _945.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
37361
37375
|
if (batchApprovalsEnabled) {
|
|
37362
37376
|
accumulator.addApprovalBatch(
|
|
37363
37377
|
data.approvalRequestId,
|
|
37364
37378
|
escalatedData.approvalType,
|
|
37365
37379
|
escalatedData.toolCalls,
|
|
37366
|
-
status
|
|
37380
|
+
status,
|
|
37381
|
+
void 0,
|
|
37382
|
+
resolvedByName
|
|
37367
37383
|
);
|
|
37368
37384
|
} else {
|
|
37369
37385
|
for (const call of escalatedData.toolCalls) {
|
|
@@ -37377,7 +37393,7 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37377
37393
|
);
|
|
37378
37394
|
}
|
|
37379
37395
|
}
|
|
37380
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
37396
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _946 => _946.delete, 'call', _947 => _947(data.approvalRequestId)]);
|
|
37381
37397
|
break;
|
|
37382
37398
|
}
|
|
37383
37399
|
if (escalatedData) {
|
|
@@ -37386,10 +37402,10 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37386
37402
|
explanation: escalatedData.explanation,
|
|
37387
37403
|
approvalType: escalatedData.approvalType
|
|
37388
37404
|
});
|
|
37389
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
37405
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _948 => _948.delete, 'call', _949 => _949(data.approvalRequestId)]);
|
|
37390
37406
|
}
|
|
37391
37407
|
const before = accumulator.getSegments();
|
|
37392
|
-
const after = accumulator.updateApprovalStatus(data.approvalRequestId, status);
|
|
37408
|
+
const after = accumulator.updateApprovalStatus(data.approvalRequestId, status, resolvedByName);
|
|
37393
37409
|
const updatedExisting = before.some((s, i) => after[i] !== s);
|
|
37394
37410
|
if (updatedExisting) break;
|
|
37395
37411
|
accumulator.processApprovalResult(
|
|
@@ -37402,9 +37418,9 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37402
37418
|
case MESSAGE_TYPE.ERROR:
|
|
37403
37419
|
if ("error" in data) {
|
|
37404
37420
|
let message2;
|
|
37405
|
-
if ("details" in data && _optionalChain([data, 'optionalAccess',
|
|
37421
|
+
if ("details" in data && _optionalChain([data, 'optionalAccess', _950 => _950.details])) {
|
|
37406
37422
|
try {
|
|
37407
|
-
message2 = _optionalChain([JSON, 'access',
|
|
37423
|
+
message2 = _optionalChain([JSON, 'access', _951 => _951.parse, 'call', _952 => _952(data.details), 'optionalAccess', _953 => _953.error, 'optionalAccess', _954 => _954.message]);
|
|
37408
37424
|
} catch (e42) {
|
|
37409
37425
|
message2 = data.details;
|
|
37410
37426
|
}
|
|
@@ -37487,10 +37503,10 @@ function processHistoricalMessagesWithErrors(messages, options = {}) {
|
|
|
37487
37503
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
37488
37504
|
return;
|
|
37489
37505
|
}
|
|
37490
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
37506
|
+
const isUserMessage = _optionalChain([msg, 'access', _955 => _955.owner, 'optionalAccess', _956 => _956.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _957 => _957.owner, 'optionalAccess', _958 => _958.type]) === OWNER_TYPE.ADMIN;
|
|
37491
37507
|
if (isUserMessage) {
|
|
37492
37508
|
flushAssistantMessage();
|
|
37493
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
37509
|
+
const userAuthorType = _optionalChain([msg, 'access', _959 => _959.owner, 'optionalAccess', _960 => _960.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
37494
37510
|
messageDataArray.forEach((data) => {
|
|
37495
37511
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
37496
37512
|
processedMessages.push({
|
|
@@ -37515,7 +37531,7 @@ function processHistoricalMessagesWithErrors(messages, options = {}) {
|
|
|
37515
37531
|
});
|
|
37516
37532
|
const nextMsg = messages[index + 1];
|
|
37517
37533
|
const isLastMessage = index === messages.length - 1;
|
|
37518
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
37534
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _961 => _961.owner, 'optionalAccess', _962 => _962.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _963 => _963.owner, 'optionalAccess', _964 => _964.type]) === OWNER_TYPE.ADMIN);
|
|
37519
37535
|
if (isLastMessage || nextIsFromUser) {
|
|
37520
37536
|
flushAssistantMessage();
|
|
37521
37537
|
}
|
|
@@ -37853,7 +37869,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37853
37869
|
}, [active, fetchDialogs, loadDialogsPage]);
|
|
37854
37870
|
const sendMessage = _react.useCallback.call(void 0,
|
|
37855
37871
|
async (text, sendOptions) => {
|
|
37856
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
37872
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _965 => _965.hidden]), () => ( false));
|
|
37857
37873
|
setMessages((prev) => [
|
|
37858
37874
|
...prev,
|
|
37859
37875
|
{
|
|
@@ -38017,11 +38033,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
38017
38033
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
38018
38034
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
38019
38035
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
38020
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
38021
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
38022
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
38023
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
38024
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
38036
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _966 => _966.provider]), () => ( modelProvider)), () => ( null)),
|
|
38037
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _967 => _967.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
38038
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _968 => _968.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _969 => _969.contextWindowMaxTokens]))), () => ( null)),
|
|
38039
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _970 => _970.inputTokensSize]), () => ( null)),
|
|
38040
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _971 => _971.outputTokensSize]), () => ( null)),
|
|
38025
38041
|
currentCacheHitRatePct: null,
|
|
38026
38042
|
currentUsageBreakdown: null,
|
|
38027
38043
|
// Dialog management
|
|
@@ -38269,7 +38285,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
38269
38285
|
break;
|
|
38270
38286
|
case "approval_batch": {
|
|
38271
38287
|
const allDone = !!segment.data.executions && segment.data.toolCalls.every(
|
|
38272
|
-
(c) => _optionalChain([segment, 'access',
|
|
38288
|
+
(c) => _optionalChain([segment, 'access', _972 => _972.data, 'access', _973 => _973.executions, 'optionalAccess', _974 => _974[c.toolExecutionRequestId], 'optionalAccess', _975 => _975.status]) === "done"
|
|
38273
38289
|
);
|
|
38274
38290
|
if (segment.status !== "rejected" && !allDone) {
|
|
38275
38291
|
hasIncompleteState = true;
|
|
@@ -38337,20 +38353,20 @@ function mergeHistoryWithRealtime(input) {
|
|
|
38337
38353
|
const seqCoverageKnown = realtimeSeenStreamSeq > 0 && historyMaxStreamSeq > 0;
|
|
38338
38354
|
const historyCoversRealtime = seqCoverageKnown ? historyMaxStreamSeq >= realtimeSeenStreamSeq : null;
|
|
38339
38355
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
38340
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
38341
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
38356
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _976 => _976.role]) === "assistant" ? trailing : null;
|
|
38357
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _977 => _977.content, 'access', _978 => _978.find, 'call', _979 => _979((s) => s.type === "approval_batch"), 'optionalAccess', _980 => _980.data, 'optionalAccess', _981 => _981.approvalRequestId]), () => ( null)) : null;
|
|
38342
38358
|
let processedToUse = processedHistory;
|
|
38343
38359
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
38344
38360
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
38345
38361
|
if (historyBatchId) {
|
|
38346
38362
|
const batchTwins = existingMessages.filter(
|
|
38347
38363
|
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some(
|
|
38348
|
-
(s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
38364
|
+
(s) => s.type === "approval_batch" && _optionalChain([s, 'access', _982 => _982.data, 'optionalAccess', _983 => _983.approvalRequestId]) === historyBatchId
|
|
38349
38365
|
)
|
|
38350
38366
|
);
|
|
38351
38367
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
38352
38368
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
38353
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
38369
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _984 => _984.content])) ? historyTrailingAssistant.content.length : 0;
|
|
38354
38370
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
38355
38371
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
38356
38372
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -38366,16 +38382,16 @@ function mergeHistoryWithRealtime(input) {
|
|
|
38366
38382
|
if (pinnedSyntheticIds.has(m.id)) return true;
|
|
38367
38383
|
if (droppedSyntheticIds.has(m.id)) return false;
|
|
38368
38384
|
if (processedIds.has(m.id)) return false;
|
|
38369
|
-
if (_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
38385
|
+
if (_optionalChain([rawHistoryIds, 'optionalAccess', _985 => _985.has, 'call', _986 => _986(m.id)])) return false;
|
|
38370
38386
|
if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
|
|
38371
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
38387
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _987 => _987.timestamp, 'optionalAccess', _988 => _988.getTime, 'call', _989 => _989()]), () => ( 0))) <= historyFetchedAt;
|
|
38372
38388
|
return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
|
|
38373
38389
|
}
|
|
38374
38390
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
38375
38391
|
if (m.role === "assistant" && trailingAssistantText && assistantAnswerText(m.content) === trailingAssistantText) {
|
|
38376
38392
|
return false;
|
|
38377
38393
|
}
|
|
38378
|
-
const covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
38394
|
+
const covered = typeof m.streamSeq === "number" && historyMaxStreamSeq > 0 ? historyMaxStreamSeq >= m.streamSeq : historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _990 => _990.timestamp, 'optionalAccess', _991 => _991.getTime, 'call', _992 => _992()]), () => ( 0))) <= historyFetchedAt;
|
|
38379
38395
|
if (covered) return false;
|
|
38380
38396
|
}
|
|
38381
38397
|
return true;
|
|
@@ -38595,7 +38611,7 @@ function useChatDialogManager({
|
|
|
38595
38611
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
38596
38612
|
if (restoreTarget) {
|
|
38597
38613
|
try {
|
|
38598
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
38614
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _993 => _993(restoreTarget.id)]);
|
|
38599
38615
|
} catch (err) {
|
|
38600
38616
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
38601
38617
|
return;
|
|
@@ -38994,7 +39010,7 @@ function EmbeddableChatInner({
|
|
|
38994
39010
|
}),
|
|
38995
39011
|
[commandsUrl]
|
|
38996
39012
|
);
|
|
38997
|
-
const userName = _optionalChain([identityUser, 'optionalAccess',
|
|
39013
|
+
const userName = _optionalChain([identityUser, 'optionalAccess', _994 => _994.firstName, 'optionalAccess', _995 => _995.trim, 'call', _996 => _996()]) || _optionalChain([identityUser, 'optionalAccess', _997 => _997.name, 'optionalAccess', _998 => _998.split, 'call', _999 => _999(" "), 'access', _1000 => _1000[0], 'optionalAccess', _1001 => _1001.trim, 'call', _1002 => _1002()]) || void 0;
|
|
38998
39014
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
38999
39015
|
if (modes) return modes;
|
|
39000
39016
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -39003,17 +39019,17 @@ function EmbeddableChatInner({
|
|
|
39003
39019
|
const mingoCaps = _react.useMemo.call(void 0, () => {
|
|
39004
39020
|
if (mingoState) {
|
|
39005
39021
|
return {
|
|
39006
|
-
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39007
|
-
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39008
|
-
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39009
|
-
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39022
|
+
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _1003 => _1003.canRename]), () => ( false)),
|
|
39023
|
+
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _1004 => _1004.canArchive]), () => ( false)),
|
|
39024
|
+
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _1005 => _1005.fetchArchivedDialogs]),
|
|
39025
|
+
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _1006 => _1006.unarchiveDialog])
|
|
39010
39026
|
};
|
|
39011
39027
|
}
|
|
39012
39028
|
return {
|
|
39013
|
-
canRename: !!_optionalChain([effectiveModes, 'access',
|
|
39014
|
-
canArchive: !!_optionalChain([effectiveModes, 'access',
|
|
39015
|
-
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access',
|
|
39016
|
-
unarchiveDialog: _optionalChain([effectiveModes, 'access',
|
|
39029
|
+
canRename: !!_optionalChain([effectiveModes, 'access', _1007 => _1007.mingo, 'optionalAccess', _1008 => _1008.renameDialog]),
|
|
39030
|
+
canArchive: !!_optionalChain([effectiveModes, 'access', _1009 => _1009.mingo, 'optionalAccess', _1010 => _1010.archiveDialog]),
|
|
39031
|
+
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _1011 => _1011.mingo, 'optionalAccess', _1012 => _1012.fetchArchivedDialogs]),
|
|
39032
|
+
unarchiveDialog: _optionalChain([effectiveModes, 'access', _1013 => _1013.mingo, 'optionalAccess', _1014 => _1014.unarchiveDialog])
|
|
39017
39033
|
};
|
|
39018
39034
|
}, [mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
39019
39035
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
@@ -39025,7 +39041,7 @@ function EmbeddableChatInner({
|
|
|
39025
39041
|
if (controlledActiveMode === void 0) {
|
|
39026
39042
|
setUncontrolledActiveMode(next);
|
|
39027
39043
|
}
|
|
39028
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
39044
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _1015 => _1015(next)]);
|
|
39029
39045
|
},
|
|
39030
39046
|
[controlledActiveMode, onActiveModeChange]
|
|
39031
39047
|
);
|
|
@@ -39232,9 +39248,9 @@ function EmbeddableChatInner({
|
|
|
39232
39248
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
39233
39249
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
39234
39250
|
if (chatLoading) return void 0;
|
|
39235
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
39251
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _1016 => _1016.sources]);
|
|
39236
39252
|
if (!sources || sources.length === 0) return void 0;
|
|
39237
|
-
const content = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
39253
|
+
const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _1017 => _1017.content]) || "";
|
|
39238
39254
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map(
|
|
39239
39255
|
(m) => parseInt(m[1], 10)
|
|
39240
39256
|
);
|
|
@@ -39281,7 +39297,7 @@ function EmbeddableChatInner({
|
|
|
39281
39297
|
ChatPanelHeader,
|
|
39282
39298
|
{
|
|
39283
39299
|
showBack: hasConversation || guideCanReturnToMingo,
|
|
39284
|
-
title: hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
39300
|
+
title: hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _1018 => _1018.title]) || "New Chat" : isGuideEmpty ? "Mingo Guide" : "Current Chats",
|
|
39285
39301
|
backAriaLabel: hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo",
|
|
39286
39302
|
isArchivedView: isViewingArchived,
|
|
39287
39303
|
onBack: hasConversation ? handleBack : () => handleActiveModeChange("mingo"),
|
|
@@ -39386,10 +39402,10 @@ function EmbeddableChatInner({
|
|
|
39386
39402
|
subtitle: _nullishCoalesce(emptyStateGreeting, () => ( void 0)),
|
|
39387
39403
|
...guideWelcome,
|
|
39388
39404
|
onQuickAction: (action) => {
|
|
39389
|
-
_optionalChain([chatInputRef, 'access',
|
|
39405
|
+
_optionalChain([chatInputRef, 'access', _1019 => _1019.current, 'optionalAccess', _1020 => _1020.setValue, 'call', _1021 => _1021(
|
|
39390
39406
|
_nullishCoalesce(action.prompt, () => ( action.label))
|
|
39391
39407
|
)]);
|
|
39392
|
-
_optionalChain([chatInputRef, 'access',
|
|
39408
|
+
_optionalChain([chatInputRef, 'access', _1022 => _1022.current, 'optionalAccess', _1023 => _1023.focus, 'call', _1024 => _1024()]);
|
|
39393
39409
|
},
|
|
39394
39410
|
children: (chipCommands.length > 0 || !commandsLoaded) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "shrink-0 overflow-hidden rounded-md border border-ods-border", children: [
|
|
39395
39411
|
!commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -40233,4 +40249,4 @@ function EmbeddableChatInner({
|
|
|
40233
40249
|
|
|
40234
40250
|
|
|
40235
40251
|
exports.Label = Label; exports.AllowedDomainsInput = AllowedDomainsInput; exports.Autocomplete = Autocomplete; exports.CheckboxBlock = CheckboxBlock; exports.CheckboxWithDescription = CheckboxWithDescription; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.DatePicker = DatePicker; exports.DatePickerInput = DatePickerInput; exports.DatePickerInputSimple = DatePickerInputSimple; exports.HoneypotField = HoneypotField; exports.ProgressBar = ProgressBar; exports.InfoCard = InfoCard; exports.InfoRow = InfoRow; exports.InputTrigger = InputTrigger; exports.InteractiveCard = InteractiveCard; exports.MediaTypeSelector = MediaTypeSelector; exports.noDataIconClasses = noDataIconClasses; exports.noDataActionsVariants = noDataActionsVariants; exports.NoDataMessage = NoDataMessage; exports.NoDataAction = NoDataAction; exports.NoDataActions = NoDataActions; exports.NoData = NoData; exports.PageLoader = PageLoader; exports.CompactPageLoader = CompactPageLoader; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.RadioGroupBlock = RadioGroupBlock; exports.Switch = Switch; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.TagsInput = TagsInput; exports.TagsManager = TagsManager; exports.Textarea = Textarea; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.AspectRatio = AspectRatio; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.ImageGalleryModal = ImageGalleryModal; exports.Modal = Modal2; exports.ModalContent = ModalContent2; exports.ModalHeader = ModalHeader2; exports.ModalTitle = ModalTitle2; exports.ModalFooter = ModalFooter2; exports.Modal2 = Modal; exports.ModalContent2 = ModalContent; exports.ModalHeader2 = ModalHeader; exports.ModalTitle2 = ModalTitle; exports.ModalFooter2 = ModalFooter; exports.Separator = Separator2; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetPortal = SheetPortal; exports.SheetOverlay = SheetOverlay; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.MenubarMenu = MenubarMenu; exports.MenubarGroup = MenubarGroup; exports.MenubarPortal = MenubarPortal; exports.MenubarSub = MenubarSub; exports.MenubarRadioGroup = MenubarRadioGroup; exports.Menubar = Menubar; exports.MenubarTrigger = MenubarTrigger; exports.MenubarSubTrigger = MenubarSubTrigger; exports.MenubarSubContent = MenubarSubContent; exports.MenubarContent = MenubarContent; exports.MenubarItem = MenubarItem; exports.MenubarCheckboxItem = MenubarCheckboxItem; exports.MenubarRadioItem = MenubarRadioItem; exports.MenubarLabel = MenubarLabel; exports.MenubarSeparator = MenubarSeparator; exports.MenubarShortcut = MenubarShortcut; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuViewport = NavigationMenuViewport; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.TabContent = TabContent; exports.TabNavigation = TabNavigation; exports.getTabById = getTabById; exports.getTabComponent = getTabComponent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.Progress = Progress; exports.ReleaseChangelogSection = ReleaseChangelogSection; exports.StatusIndicator = StatusIndicator; exports.HoverDropdown = HoverDropdown; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.ColorSwatch = ColorSwatch; exports.getPlatformAccentColor = getPlatformAccentColor; exports.getCurrentPlatform = getCurrentPlatform; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.remarkCardLinks = remarkCardLinks; exports.BlockCard = BlockCard; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.ChatQuickAction = ChatQuickAction; exports.ChatQuickActionRow = ChatQuickActionRow; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.GuideModeBanner = GuideModeBanner; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.COMPACT_HEADER_BUTTON = COMPACT_HEADER_BUTTON; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.FlamingoLogo = FlamingoLogo; exports.OpenmspLogo = OpenmspLogo; exports.PlatformBadge = PlatformBadge; exports.AdminContentCard = AdminContentCard; exports.getProxiedImageUrl = getProxiedImageUrl2; exports.WhatIShippedCard = WhatIShippedCard; exports.WhatIShippedCardSkeleton = WhatIShippedCardSkeleton; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.ProductReleaseCard = ProductReleaseCard; exports.ProductReleaseCardSkeleton = ProductReleaseCardSkeleton; exports.formatReleaseDate = formatReleaseDate; exports.formatDateShort = formatDateShort; exports.formatDateSlashUTC = formatDateSlashUTC; exports.resolveReleaseCover = resolveReleaseCover; exports.releaseTypeToBadgeColor = releaseTypeToBadgeColor; exports.defaultBuildProductReleaseCardProps = defaultBuildProductReleaseCardProps; exports.buildProductReleaseCardProps = buildProductReleaseCardProps; exports.BlogCardSkeleton = BlogCardSkeleton; exports.BlogCard = BlogCard; exports.CaseStudyCardSkeleton = CaseStudyCardSkeleton; exports.CaseStudyCard = CaseStudyCard; exports.CustomerInterviewCardSkeleton = CustomerInterviewCardSkeleton; exports.CustomerInterviewCard = CustomerInterviewCard; exports.formatInvestorUpdatePeriod = formatInvestorUpdatePeriod; exports.InvestorUpdateCardSkeleton = InvestorUpdateCardSkeleton; exports.InvestorUpdateCard = InvestorUpdateCard; exports.RoadmapVoteButton = RoadmapVoteButton; exports.getStatusColorScheme = getStatusColorScheme; exports.CUSTOM_ITEM_ID = CUSTOM_ITEM_ID; exports.getTaskTypeLabel = getTaskTypeLabel; exports.TaskTypeIcon = TaskTypeIcon; exports.RoadmapCardSkeleton = RoadmapCardSkeleton; exports.RoadmapCard = RoadmapCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.ProgramCardSkeleton = ProgramCardSkeleton; exports.ProgramCard = ProgramCard; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.extractItems = extractItems; exports.extractItemId = extractItemId; exports.useChatCardItem = useChatCardItem; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.buildChatRefKey = buildChatRefKey; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.transformEventToProgram = transformEventToProgram; exports.transformPodcastToProgram = transformPodcastToProgram; exports.transformWebinarToProgram = transformWebinarToProgram; exports.useChunkCatchup = useChunkCatchup; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.parseChunkToAction = parseChunkToAction; exports.isControlChunk = isControlChunk; exports.isErrorChunk = isErrorChunk; exports.isMetadataChunk = isMetadataChunk; exports.extractTextFromChunk = extractTextFromChunk; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.useRealtimeChunkProcessor = useRealtimeChunkProcessor; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.flattenAssistantContent = flattenAssistantContent; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.useSseChatAdapter = useSseChatAdapter; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useUnifiedChat = useUnifiedChat; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.clickupTaskUrl = clickupTaskUrl; exports.EmbeddableChat = EmbeddableChat; exports.FilterCheckboxItem = FilterCheckboxItem; exports.TagKeyValueFilter = TagKeyValueFilter; exports.FilterModal = FilterModal; exports.PageContainer = PageContainer; exports.ListPageContainer = ListPageContainer; exports.DetailPageContainer = DetailPageContainer; exports.FormPageContainer = FormPageContainer; exports.ContentPageContainer = ContentPageContainer; exports.ListPageLayout = ListPageLayout; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.ToggleGroup = ToggleGroup; exports.ToggleGroupItem = ToggleGroupItem; exports.delay = delay; exports.generateRandomString = generateRandomString; exports.truncateString = truncateString; exports.serializeJsonLd = serializeJsonLd; exports.deepClone = deepClone; exports.getSlackCommunityJoinUrl = getSlackCommunityJoinUrl; exports.OS_PLATFORMS = OS_PLATFORMS; exports.DEFAULT_OS_PLATFORM = DEFAULT_OS_PLATFORM; exports.isValidEmailDomain = isValidEmailDomain; exports.validateEmailDomain = validateEmailDomain; exports.validateEmailDomainList = validateEmailDomainList; exports.cleanEmailDomain = cleanEmailDomain; exports.getConfidenceColorClass = getConfidenceColorClass; exports.getConfidenceLevel = getConfidenceLevel; exports.getConfidenceBorderClass = getConfidenceBorderClass; exports.getConfidenceTextClass = getConfidenceTextClass; exports.getConfidenceBgClass = getConfidenceBgClass; exports.getConfidenceLabel = getConfidenceLabel; exports.DEV_SECTION_PARAM_KEYS = DEV_SECTION_PARAM_KEYS; exports.normalizeToolType = normalizeToolType; exports.normalizeToolTypeWithFallback = normalizeToolTypeWithFallback; exports.toToolLabel = toToolLabel; exports.isValidToolType = isValidToolType; exports.getToolTypeAliases = getToolTypeAliases; exports.getToolLabel = getToolLabel; exports.ShellTypeValues = ShellTypeValues; exports.SHELL_TYPES = SHELL_TYPES; exports.shellLabels = shellLabels; exports.getShellLabel = getShellLabel; exports.getShellIcon = getShellIcon; exports.OSTypeValues = OSTypeValues; exports.OS_TYPES = OS_TYPES; exports.osLabels = osLabels; exports.normalizeOSType = normalizeOSType; exports.getOSLabel = getOSLabel; exports.getOSIcon = getOSIcon; exports.getOSTypeDefinition = getOSTypeDefinition; exports.getOSPlatformId = getOSPlatformId; exports.isOSPlatform = isOSPlatform; exports.getCountryPhoneData = getCountryPhoneData; exports.getCountryByCode = getCountryByCode; exports.validatePhoneNumber = validatePhoneNumber; exports.formatPhoneE164 = formatPhoneE164; exports.GENERIC_EMAIL_DOMAINS = GENERIC_EMAIL_DOMAINS; exports.extractDomainFromEmail = extractDomainFromEmail; exports.normalizeDomain = normalizeDomain; exports.isGenericDomain = isGenericDomain; exports.hasGenericEmailDomain = hasGenericEmailDomain; exports.isGenericWebsiteDomain = isGenericWebsiteDomain; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.readLeadingDecisionFrame = readLeadingDecisionFrame; exports.AVAILABLE_SVG_ICONS = AVAILABLE_SVG_ICONS; exports.releaseTypeOptions = releaseTypeOptions; exports.releaseStatusOptions = releaseStatusOptions; exports.changelogLabels = changelogLabels; exports.SEMVER_REGEX = SEMVER_REGEX; exports.TASK_TYPE_LABELS = TASK_TYPE_LABELS; exports.TASK_TYPE_TEXT_COLORS = TASK_TYPE_TEXT_COLORS; exports.TMCG_ROLES = TMCG_ROLES; exports.TMCG_ROLE_DISPLAY_NAMES = TMCG_ROLE_DISPLAY_NAMES; exports.TMCG_SOCIAL_PLATFORMS = TMCG_SOCIAL_PLATFORMS; exports.ROADMAP_STATUS_OPTIONS = ROADMAP_STATUS_OPTIONS; exports.DELIVERY_TASK_TYPE_OPTIONS = DELIVERY_TASK_TYPE_OPTIONS; exports.TICKET_STATUS_OPTIONS = TICKET_STATUS_OPTIONS; exports.OPENFRAME_DEV_SECTIONS = OPENFRAME_DEV_SECTIONS; exports.scrollElementIntoView = scrollElementIntoView; exports.canonicalContentRefType = canonicalContentRefType; exports.buildListUrl = buildListUrl; exports.CONTENT_REF_GROUPS = CONTENT_REF_GROUPS; exports.getContentRefLabel = getContentRefLabel; exports.getContentRefLabelOrTitleCase = getContentRefLabelOrTitleCase; exports.orderContentRefTypes = orderContentRefTypes; exports.buildSuggestionUrl = buildSuggestionUrl; exports.BenefitCard = BenefitCard; exports.BenefitCardGrid = BenefitCardGrid; exports.BrandAssociationCard = BrandAssociationCard; exports.BrandAssociationGrid = BrandAssociationGrid; exports.BulletList = BulletList; exports.ChevronButton = ChevronButton; exports.CircularProgress = CircularProgress; exports.CheckIcon = CheckIcon2; exports.XIcon = XIcon; exports.MinusIcon = MinusIcon; exports.CheckCircleIcon = CheckCircleIcon2; exports.XCircleIcon = XCircleIcon; exports.FloatingTooltip = FloatingTooltip; exports.DashboardInfoCard = DashboardInfoCard; exports.OSTypeBadge = OSTypeBadge; exports.OSTypeIcon = OSTypeIcon; exports.OSTypeLabel = OSTypeLabel; exports.DeviceCard = DeviceCard; exports.DeviceCardCompact = DeviceCardCompact; exports.FeatureCardGrid = FeatureCardGrid; exports.FeatureList = FeatureList; exports.TruncateText = TruncateText; exports.HighlightCard = HighlightCard; exports.HighlightCardGrid = HighlightCardGrid; exports.IconsBlock = IconsBlock; exports.DropdownButton = DropdownButton; exports.MoreActionsMenu = MoreActionsMenu; exports.OrganizationCard = OrganizationCard; exports.ServiceCard = ServiceCard; exports.Slider = Slider; exports.TabSelector = TabSelector; exports.TitleContentBlock = TitleContentBlock; exports.ContentLoader = ContentLoader; exports.CardLoader = CardLoader; exports.FormLoader = FormLoader; exports.DetailLoader = DetailLoader; exports.ListLoader = ListLoader; exports.Pagination = Pagination; exports.PaginationContent = PaginationContent; exports.PaginationItem = PaginationItem; exports.PaginationLink = PaginationLink; exports.PaginationEllipsis = PaginationEllipsis; exports.PaginationPrevious = PaginationPrevious; exports.PaginationNext = PaginationNext; exports.init_pagination = init_pagination; exports.CursorPagination = CursorPagination; exports.CursorPaginationSimple = CursorPaginationSimple; exports.TableEmptyState = TableEmptyState; exports.DynamicThemeProvider = DynamicThemeProvider; exports.useDynamicTheme = useDynamicTheme; exports.THEME_STORAGE_KEY = THEME_STORAGE_KEY; exports.THEME_ATTRIBUTE = THEME_ATTRIBUTE; exports.DEFAULT_THEME = DEFAULT_THEME; exports.ThemeProvider = ThemeProvider; exports.useTheme = useTheme; exports.useThemeToggle = useThemeToggle; exports.ArrayEntryManager = ArrayEntryManager; exports.ProviderButton = ProviderButton; exports.AuthProvidersList = AuthProvidersList; exports.ChangelogManager = ChangelogManager; exports.ChangelogSectionsManager = ChangelogSectionsManager; exports.ClickUpTasksManager = ClickUpTasksManager; exports.CommandBox = CommandBox; exports.ErrorBoundary = ErrorBoundary; exports.SectionSelector = SectionSelector; exports.FigmaPrototypeViewer = FigmaPrototypeViewer; exports.FiltersDropdown = FiltersDropdown; exports.useFiltersDropdown = useFiltersDropdown; exports.GitHubReleasesManager = GitHubReleasesManager; exports.KnowledgeBaseLinksManager = KnowledgeBaseLinksManager; exports.LoadingProvider = LoadingProvider; exports.useLoading = useLoading; exports.MediaGalleryManager = MediaGalleryManager; exports.MoreAboutButton = MoreAboutButton; exports.OSTypeBadgeGroup = OSTypeBadgeGroup; exports.ParallaxImageShowcase = ParallaxImageShowcase; exports.PathsDisplay = PathsDisplay; exports.OPENFRAME_PATHS = OPENFRAME_PATHS; exports.getOpenFramePaths = getOpenFramePaths; exports.PlatformFilterComponent = PlatformFilterComponent; exports.PushButtonSelector = PushButtonSelector; exports.ReleaseMediaManager = ReleaseMediaManager; exports.SelectButton = SelectButton; exports.SEOEditorPreview = SEOEditorPreview; exports.SocialLinksManager = SocialLinksManager; exports.StartWithOpenFrameButton = StartWithOpenFrameButton; exports.StatusFilterComponent = StatusFilterComponent; exports.TagsSelector = TagsSelector; exports.VideoSourceSelector = VideoSourceSelector; exports.ConfidenceBadge = ConfidenceBadge; exports.TranscriptSummaryEditor = TranscriptSummaryEditor; exports.AIEnrichButton = AIEnrichButton; exports.AIWarningsSection = AIWarningsSection; exports.AIEnrichSection = AIEnrichSection; exports.HighlightVideoSection = HighlightVideoSection; exports.HighlightConfigSection = HighlightConfigSection; exports.EntitySummaryEditor = EntitySummaryEditor; exports.AIStatusIndicator = AIStatusIndicator; exports.AIRequiredBadge = AIRequiredBadge; exports.TranscribeSummarizeSection = TranscribeSummarizeSection; exports.VideoClipsSection = VideoClipsSection; exports.HighlightGenerationSection = HighlightGenerationSection; exports.HighlightVideoPreview = HighlightVideoPreview; exports.TranscribeAndSummarizeCombinedSection = TranscribeAndSummarizeCombinedSection; exports.HighlightVideoCombinedSection = HighlightVideoCombinedSection; exports.ViewToggle = ViewToggle; exports.PolicyConfigurationPanel = PolicyConfigurationPanel; exports.PhoneInput = PhoneInput; exports.WaitlistForm = WaitlistForm; exports.NotificationsProvider = NotificationsProvider; exports.useNotifications = useNotifications; exports.useOptionalNotifications = useOptionalNotifications; exports.NotificationTile = NotificationTile; exports.NotificationDrawer = NotificationDrawer; exports.NotificationPopups = NotificationPopups; exports.ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE = ADMIN_APPROVAL_REQUEST_CONTEXT_TYPE; exports.isApprovalNotification = isApprovalNotification; exports.getApprovalMeta = getApprovalMeta; exports.resolutionToStatus = resolutionToStatus; exports.approvalMetaToBatchData = approvalMetaToBatchData; exports.ApprovalRequestNotificationTile = ApprovalRequestNotificationTile; exports.TimeTrackerProvider = TimeTrackerProvider; exports.useTimeTracker = useTimeTracker; exports.useOptionalTimeTracker = useOptionalTimeTracker; exports.useTrackerClock = useTrackerClock; exports.TimeTrackerPanel = TimeTrackerPanel; exports.HeaderButton = HeaderButton; exports.TimeTrackerHeaderButton = TimeTrackerHeaderButton; exports.BoardColumnHeader = BoardColumnHeader; exports.tintOnDark = tintOnDark; exports.TicketCard = TicketCard; exports.TicketCardSkeleton = TicketCardSkeleton; exports.BoardColumn = BoardColumn; exports.useBoardCollapse = useBoardCollapse; exports.Board = Board; exports.columnFromTicketStatus = columnFromTicketStatus; exports.groupTicketsByStatus = groupTicketsByStatus; exports.TicketStatusConfigList = TicketStatusConfigList; exports.TableHeader = TableHeader; exports.TableCell = TableCell; exports.TableCardSkeleton = TableCardSkeleton; exports.TableRow = TableRow; exports.Table = Table; exports.TableDescriptionCell = TableDescriptionCell; exports.TableTimestampCell = TableTimestampCell; exports.QueryReportTableHeader = QueryReportTableHeader; exports.QueryReportTableRow = QueryReportTableRow; exports.QueryReportTableSkeleton = QueryReportTableSkeleton; exports.deriveColumns = deriveColumns; exports.exportToCSV = exportToCSV; exports.QueryReportTable = QueryReportTable; exports.useDataTableContext = useDataTableContext; exports.DataTableRoot = DataTableRoot; exports.getHideClasses = getHideClasses2; exports.alignJustify = alignJustify; exports.multiSelectFilterFn = multiSelectFilterFn; exports.DataTableHeader = DataTableHeader; exports.DataTableEmpty = DataTableEmpty; exports.ROW_HEIGHT_DESKTOP = ROW_HEIGHT_DESKTOP2; exports.ROW_HEIGHT_MOBILE = ROW_HEIGHT_MOBILE2; exports.DataTableSkeleton = DataTableSkeleton; exports.DataTableRow = DataTableRow; exports.DataTableBody = DataTableBody; exports.DataTableInfiniteFooter = DataTableInfiniteFooter; exports.DataTableCursorFooter = DataTableCursorFooter; exports.DataTableRowCount = DataTableRowCount; exports.useDataTable = useDataTable; exports.DataTable = DataTable; exports.flexRender = _reacttable.flexRender; exports.createColumnHelper = _reacttable.createColumnHelper; exports.getCoreRowModel = _reacttable.getCoreRowModel; exports.getExpandedRowModel = _reacttable.getExpandedRowModel; exports.getFacetedRowModel = _reacttable.getFacetedRowModel; exports.getFacetedUniqueValues = _reacttable.getFacetedUniqueValues; exports.getFilteredRowModel = _reacttable.getFilteredRowModel; exports.getGroupedRowModel = _reacttable.getGroupedRowModel; exports.getPaginationRowModel = _reacttable.getPaginationRowModel; exports.getSortedRowModel = _reacttable.getSortedRowModel; exports.FilterListItem = FilterListItem; exports.FilterList = FilterList; exports.TagSearchInput = TagSearchInput; exports.MarkdownEditor = MarkdownEditor; exports.FileUpload = FileUpload; exports.ImageUploader = ImageUploader; exports.TICKET_STATUS_COLOR_PRESETS = TICKET_STATUS_COLOR_PRESETS; exports.CUSTOM_PRESET_KEY = CUSTOM_PRESET_KEY; exports.DEFAULT_CUSTOM_STATUS_COLOR = DEFAULT_CUSTOM_STATUS_COLOR; exports.ColorPresetSelect = ColorPresetSelect; exports.ColorPickerInput = ColorPickerInput; exports.TicketStatusConfigRow = TicketStatusConfigRow; exports.AssigneeDropdown = AssigneeDropdown; exports.TicketDetailSection = TicketDetailSection; exports.TicketAttachmentsList = TicketAttachmentsList; exports.TicketNoteCard = TicketNoteCard; exports.TicketNotesSection = TicketNotesSection; exports.TicketInfoSection = TicketInfoSection; exports.Header = Header2; exports.HeaderSkeleton = HeaderSkeleton; exports.ClientOnlyHeader = ClientOnlyHeader; exports.MobileNavPanel = MobileNavPanel; exports.SlidingSidebar = SlidingSidebar; exports.StickySectionNav = StickySectionNav; exports.useSectionNavigation = useSectionNavigation; exports.NavigationSidebar = NavigationSidebar; exports.HeaderGlobalSearch = HeaderGlobalSearch; exports.HeaderMingoButton = HeaderMingoButton; exports.HeaderOrganizationFilter = HeaderOrganizationFilter; exports.AppHeader = AppHeader; exports.MobileBurgerMenu = MobileBurgerMenu; exports.useAppLayoutDrawerContainer = useAppLayoutDrawerContainer; exports.AppLayout = AppLayout; exports.AppLayoutDrawerRoot = AppLayoutDrawerRoot; exports.AppLayoutDrawerTrigger = AppLayoutDrawerTrigger; exports.AppLayoutDrawerClose = AppLayoutDrawerClose; exports.AppLayoutDrawerContent = AppLayoutDrawerContent; exports.AppLayoutDrawerHeader = AppLayoutDrawerHeader; exports.AppLayoutDrawerTitle = AppLayoutDrawerTitle; exports.AppLayoutDrawerDescription = AppLayoutDrawerDescription; exports.AppLayoutDrawerBody = AppLayoutDrawerBody; exports.AppLayoutDrawerFooter = AppLayoutDrawerFooter; exports.SoftwareInfo = SoftwareInfo; exports.SoftwareSourceBadge = SoftwareSourceBadge; exports.CveLink = CveLink; exports.ToolBadge = ToolBadge; exports.ShellTypeBadge = ShellTypeBadge; exports.ScriptInfoSection = ScriptInfoSection; exports.ScriptArguments = ScriptArguments; exports.OnboardingStepCard = OnboardingStepCard; exports.OnboardingWalkthrough = OnboardingWalkthrough; exports.LOG_SEVERITY_COLORS = LOG_SEVERITY_COLORS; exports.LOG_SEVERITY_LABELS = LOG_SEVERITY_LABELS; exports.LogSeverityDot = LogSeverityDot; exports.LogsList = LogsList; exports.assets = assets;
|
|
40236
|
-
//# sourceMappingURL=chunk-
|
|
40252
|
+
//# sourceMappingURL=chunk-Z53YSXDD.cjs.map
|