@flamingo-stack/openframe-frontend-core 0.0.278-snapshot.20260617162149 → 0.0.278
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-7ECI5ZVO.js → chunk-5NL62LIF.js} +2 -2
- package/dist/{chunk-YK6FFIVG.js → chunk-737ZLQ2T.js} +2 -2
- package/dist/{chunk-Z53YSXDD.cjs → chunk-7LTWNUHB.cjs} +133 -149
- package/dist/chunk-7LTWNUHB.cjs.map +1 -0
- package/dist/{chunk-7XVVRE53.cjs → chunk-BBDJCXHW.cjs} +6 -6
- package/dist/{chunk-7XVVRE53.cjs.map → chunk-BBDJCXHW.cjs.map} +1 -1
- package/dist/{chunk-776ZURDZ.cjs → chunk-DO55GWNT.cjs} +10 -10
- package/dist/{chunk-776ZURDZ.cjs.map → chunk-DO55GWNT.cjs.map} +1 -1
- package/dist/{chunk-AVLSICZO.js → chunk-GO45CXT5.js} +33 -49
- package/dist/chunk-GO45CXT5.js.map +1 -0
- package/dist/{chunk-QP4H2JJN.cjs → chunk-L4BJU5CE.cjs} +34 -34
- package/dist/{chunk-QP4H2JJN.cjs.map → chunk-L4BJU5CE.cjs.map} +1 -1
- package/dist/{chunk-SZG56DA3.js → chunk-MDHNLZME.js} +2 -2
- package/dist/{chunk-6ZMD3KBP.js → chunk-MVUN35FH.js} +2 -2
- package/dist/{chunk-XBTQK32O.cjs → chunk-WYQ5VFXA.cjs} +25 -25
- package/dist/{chunk-XBTQK32O.cjs.map → chunk-WYQ5VFXA.cjs.map} +1 -1
- 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 +2 -7
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +0 -10
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/network.types.d.ts +0 -2
- package/dist/components/chat/types/network.types.d.ts.map +1 -1
- package/dist/components/chat/types/processing.types.d.ts +0 -1
- 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 +0 -8
- package/dist/components/chat/utils/history-merge.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts +3 -5
- 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 +0 -1
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +21 -34
- package/src/components/chat/types/api.types.ts +2 -7
- package/src/components/chat/types/message.types.ts +0 -10
- package/src/components/chat/types/network.types.ts +0 -2
- package/src/components/chat/types/processing.types.ts +1 -1
- package/src/components/chat/utils/__tests__/history-merge.test.ts +0 -70
- package/src/components/chat/utils/chunk-parser.ts +1 -12
- package/src/components/chat/utils/history-merge.ts +2 -22
- package/src/components/chat/utils/message-segment-accumulator.ts +4 -10
- package/src/components/chat/utils/process-historical-messages.ts +1 -4
- package/dist/chunk-AVLSICZO.js.map +0 -1
- package/dist/chunk-Z53YSXDD.cjs.map +0 -1
- /package/dist/{chunk-7ECI5ZVO.js.map → chunk-5NL62LIF.js.map} +0 -0
- /package/dist/{chunk-YK6FFIVG.js.map → chunk-737ZLQ2T.js.map} +0 -0
- /package/dist/{chunk-SZG56DA3.js.map → chunk-MDHNLZME.js.map} +0 -0
- /package/dist/{chunk-6ZMD3KBP.js.map → chunk-MVUN35FH.js.map} +0 -0
|
@@ -2669,7 +2669,6 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
2669
2669
|
{
|
|
2670
2670
|
data: segment.data,
|
|
2671
2671
|
status: segment.status,
|
|
2672
|
-
resolvedByName: segment.resolvedByName,
|
|
2673
2672
|
onApprove: segment.onApprove,
|
|
2674
2673
|
onReject: segment.onReject
|
|
2675
2674
|
},
|
|
@@ -34910,16 +34909,13 @@ function parseChunkToAction(chunk) {
|
|
|
34910
34909
|
approvalType
|
|
34911
34910
|
};
|
|
34912
34911
|
}
|
|
34913
|
-
case MESSAGE_TYPE.APPROVAL_RESULT:
|
|
34914
|
-
const resolvedByName = typeof data.resolvedByName === "string" ? data.resolvedByName : typeof data.displayName === "string" ? data.displayName : void 0;
|
|
34912
|
+
case MESSAGE_TYPE.APPROVAL_RESULT:
|
|
34915
34913
|
return {
|
|
34916
34914
|
action: "approval_result",
|
|
34917
34915
|
requestId: data.approvalRequestId || data.approval_request_id || "",
|
|
34918
34916
|
approved: data.approved === true,
|
|
34919
|
-
approvalType: data.approvalType || "CLIENT"
|
|
34920
|
-
resolvedByName
|
|
34917
|
+
approvalType: data.approvalType || "CLIENT"
|
|
34921
34918
|
};
|
|
34922
|
-
}
|
|
34923
34919
|
case MESSAGE_TYPE.ERROR:
|
|
34924
34920
|
return {
|
|
34925
34921
|
action: "error",
|
|
@@ -35224,7 +35220,7 @@ var MessageSegmentAccumulator = class {
|
|
|
35224
35220
|
* `executions` is forwarded as-is. On upsert, a new `executions` object
|
|
35225
35221
|
* overrides the existing one (so the latest replay wins).
|
|
35226
35222
|
*/
|
|
35227
|
-
addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions
|
|
35223
|
+
addApprovalBatch(approvalRequestId, approvalType, toolCalls, status = "pending", executions) {
|
|
35228
35224
|
const existingIndex = this.segments.findIndex(
|
|
35229
35225
|
(s) => s.type === "approval_batch" && s.data.approvalRequestId === approvalRequestId
|
|
35230
35226
|
);
|
|
@@ -35240,7 +35236,6 @@ var MessageSegmentAccumulator = class {
|
|
|
35240
35236
|
...mergedExecutions ? { executions: mergedExecutions } : {}
|
|
35241
35237
|
},
|
|
35242
35238
|
status,
|
|
35243
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( existing.resolvedByName)),
|
|
35244
35239
|
onApprove: this.callbacks.onApprove,
|
|
35245
35240
|
onReject: this.callbacks.onReject
|
|
35246
35241
|
};
|
|
@@ -35255,7 +35250,6 @@ var MessageSegmentAccumulator = class {
|
|
|
35255
35250
|
...executions ? { executions } : {}
|
|
35256
35251
|
},
|
|
35257
35252
|
status,
|
|
35258
|
-
resolvedByName,
|
|
35259
35253
|
onApprove: this.callbacks.onApprove,
|
|
35260
35254
|
onReject: this.callbacks.onReject
|
|
35261
35255
|
};
|
|
@@ -35288,17 +35282,15 @@ var MessageSegmentAccumulator = class {
|
|
|
35288
35282
|
return { segment, pendingData: pendingApproval || null };
|
|
35289
35283
|
}
|
|
35290
35284
|
/**
|
|
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.
|
|
35285
|
+
* Update status of an existing approval segment (single or batch)
|
|
35294
35286
|
*/
|
|
35295
|
-
updateApprovalStatus(requestId, status
|
|
35287
|
+
updateApprovalStatus(requestId, status) {
|
|
35296
35288
|
this.segments = this.segments.map((segment) => {
|
|
35297
35289
|
if (segment.type === "approval_request" && segment.data.requestId === requestId) {
|
|
35298
35290
|
return { ...segment, status };
|
|
35299
35291
|
}
|
|
35300
35292
|
if (segment.type === "approval_batch" && segment.data.approvalRequestId === requestId) {
|
|
35301
|
-
return { ...segment, status
|
|
35293
|
+
return { ...segment, status };
|
|
35302
35294
|
}
|
|
35303
35295
|
return segment;
|
|
35304
35296
|
});
|
|
@@ -35398,14 +35390,13 @@ var MessageSegmentAccumulator = class {
|
|
|
35398
35390
|
break;
|
|
35399
35391
|
}
|
|
35400
35392
|
case "approval_batch": {
|
|
35401
|
-
const { data, status
|
|
35393
|
+
const { data, status } = segment;
|
|
35402
35394
|
this.addApprovalBatch(
|
|
35403
35395
|
data.approvalRequestId,
|
|
35404
35396
|
data.approvalType,
|
|
35405
35397
|
data.toolCalls,
|
|
35406
35398
|
status,
|
|
35407
|
-
data.executions
|
|
35408
|
-
resolvedByName
|
|
35399
|
+
data.executions
|
|
35409
35400
|
);
|
|
35410
35401
|
break;
|
|
35411
35402
|
}
|
|
@@ -35491,13 +35482,11 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35491
35482
|
const action = parseChunkToAction(chunk);
|
|
35492
35483
|
if (!action) return;
|
|
35493
35484
|
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)]);
|
|
35496
35485
|
if (action.action === "direct_message") sawDirectMessageRef.current = true;
|
|
35497
35486
|
if ((directModeFlagRef.current || sawDirectMessageRef.current) && !DIRECT_MODE_ALLOWED.has(action.action)) {
|
|
35498
35487
|
if (isInStreamRef.current) {
|
|
35499
35488
|
isInStreamRef.current = false;
|
|
35500
|
-
_optionalChain([callbacks, 'access',
|
|
35489
|
+
_optionalChain([callbacks, 'access', _832 => _832.onStreamEnd, 'optionalCall', _833 => _833()]);
|
|
35501
35490
|
accumulator.resetSegments();
|
|
35502
35491
|
}
|
|
35503
35492
|
return;
|
|
@@ -35506,32 +35495,32 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35506
35495
|
case "message_start":
|
|
35507
35496
|
isInStreamRef.current = true;
|
|
35508
35497
|
hasEverStreamedRef.current = true;
|
|
35509
|
-
_optionalChain([callbacks, 'access',
|
|
35498
|
+
_optionalChain([callbacks, 'access', _834 => _834.onStreamStart, 'optionalCall', _835 => _835()]);
|
|
35510
35499
|
accumulator.resetSegments();
|
|
35511
35500
|
break;
|
|
35512
35501
|
case "message_end":
|
|
35513
35502
|
isInStreamRef.current = false;
|
|
35514
|
-
_optionalChain([callbacks, 'access',
|
|
35503
|
+
_optionalChain([callbacks, 'access', _836 => _836.onStreamEnd, 'optionalCall', _837 => _837()]);
|
|
35515
35504
|
accumulator.resetSegments();
|
|
35516
35505
|
break;
|
|
35517
35506
|
case "metadata":
|
|
35518
|
-
_optionalChain([callbacks, 'access',
|
|
35507
|
+
_optionalChain([callbacks, 'access', _838 => _838.onMetadata, 'optionalCall', _839 => _839(action)]);
|
|
35519
35508
|
break;
|
|
35520
35509
|
case "text": {
|
|
35521
35510
|
const segments = accumulator.appendText(action.text);
|
|
35522
35511
|
if (isInStreamRef.current || !hasEverStreamedRef.current) {
|
|
35523
|
-
|
|
35512
|
+
_optionalChain([callbacks, 'access', _840 => _840.onSegmentsUpdate, 'optionalCall', _841 => _841(segments)]);
|
|
35524
35513
|
} else {
|
|
35525
|
-
|
|
35514
|
+
_optionalChain([callbacks, 'access', _842 => _842.onSegmentsUpdate, 'optionalCall', _843 => _843([{ type: "text", text: action.text }], { append: true })]);
|
|
35526
35515
|
}
|
|
35527
35516
|
break;
|
|
35528
35517
|
}
|
|
35529
35518
|
case "thinking": {
|
|
35530
35519
|
const segments = accumulator.appendThinking(action.text);
|
|
35531
35520
|
if (isInStreamRef.current || !hasEverStreamedRef.current) {
|
|
35532
|
-
|
|
35521
|
+
_optionalChain([callbacks, 'access', _844 => _844.onSegmentsUpdate, 'optionalCall', _845 => _845(segments)]);
|
|
35533
35522
|
} else {
|
|
35534
|
-
|
|
35523
|
+
_optionalChain([callbacks, 'access', _846 => _846.onSegmentsUpdate, 'optionalCall', _847 => _847([{ type: "thinking", text: action.text }], { append: true })]);
|
|
35535
35524
|
}
|
|
35536
35525
|
break;
|
|
35537
35526
|
}
|
|
@@ -35541,7 +35530,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35541
35530
|
break;
|
|
35542
35531
|
}
|
|
35543
35532
|
const segments = accumulator.addToolExecution(action.segment);
|
|
35544
|
-
|
|
35533
|
+
_optionalChain([callbacks, 'access', _848 => _848.onSegmentsUpdate, 'optionalCall', _849 => _849(segments)]);
|
|
35545
35534
|
break;
|
|
35546
35535
|
}
|
|
35547
35536
|
case "approval_request": {
|
|
@@ -35555,10 +35544,10 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35555
35544
|
approvalType,
|
|
35556
35545
|
status
|
|
35557
35546
|
);
|
|
35558
|
-
|
|
35547
|
+
_optionalChain([callbacks, 'access', _850 => _850.onSegmentsUpdate, 'optionalCall', _851 => _851(segments)]);
|
|
35559
35548
|
} else {
|
|
35560
35549
|
pendingEscalatedRef.current.set(requestId, { command, explanation, approvalType });
|
|
35561
|
-
_optionalChain([callbacks, 'access',
|
|
35550
|
+
_optionalChain([callbacks, 'access', _852 => _852.onEscalatedApproval, 'optionalCall', _853 => _853(requestId, { command, explanation, approvalType })]);
|
|
35562
35551
|
}
|
|
35563
35552
|
break;
|
|
35564
35553
|
}
|
|
@@ -35570,20 +35559,20 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35570
35559
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
35571
35560
|
pendingEscalatedRef.current.set(requestId, {
|
|
35572
35561
|
command: summary,
|
|
35573
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
35562
|
+
explanation: _optionalChain([required, 'optionalAccess', _854 => _854.toolExplanation]),
|
|
35574
35563
|
approvalType,
|
|
35575
35564
|
toolCalls
|
|
35576
35565
|
});
|
|
35577
|
-
_optionalChain([callbacks, 'access',
|
|
35566
|
+
_optionalChain([callbacks, 'access', _855 => _855.onEscalatedApproval, 'optionalCall', _856 => _856(requestId, {
|
|
35578
35567
|
command: summary,
|
|
35579
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
35568
|
+
explanation: _optionalChain([required, 'optionalAccess', _857 => _857.toolExplanation]),
|
|
35580
35569
|
approvalType
|
|
35581
35570
|
})]);
|
|
35582
35571
|
break;
|
|
35583
35572
|
}
|
|
35584
35573
|
if (batchApprovalsEnabled) {
|
|
35585
35574
|
const segments2 = accumulator.addApprovalBatch(requestId, approvalType, toolCalls, status);
|
|
35586
|
-
|
|
35575
|
+
_optionalChain([callbacks, 'access', _858 => _858.onSegmentsUpdate, 'optionalCall', _859 => _859(segments2)]);
|
|
35587
35576
|
break;
|
|
35588
35577
|
}
|
|
35589
35578
|
let segments = accumulator.getSegments();
|
|
@@ -35597,16 +35586,16 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35597
35586
|
status
|
|
35598
35587
|
);
|
|
35599
35588
|
}
|
|
35600
|
-
|
|
35589
|
+
_optionalChain([callbacks, 'access', _860 => _860.onSegmentsUpdate, 'optionalCall', _861 => _861(segments)]);
|
|
35601
35590
|
break;
|
|
35602
35591
|
}
|
|
35603
35592
|
case "approval_result": {
|
|
35604
|
-
const { requestId, approved, approvalType
|
|
35593
|
+
const { requestId, approved, approvalType } = action;
|
|
35605
35594
|
const escalatedData = pendingEscalatedRef.current.get(requestId);
|
|
35606
35595
|
const status = approved ? "approved" : "rejected";
|
|
35607
35596
|
if (escalatedData) {
|
|
35608
35597
|
pendingEscalatedRef.current.delete(requestId);
|
|
35609
|
-
_optionalChain([callbacks, 'access',
|
|
35598
|
+
_optionalChain([callbacks, 'access', _862 => _862.onEscalatedApprovalResult, 'optionalCall', _863 => _863(requestId, approved, {
|
|
35610
35599
|
command: escalatedData.command,
|
|
35611
35600
|
explanation: escalatedData.explanation,
|
|
35612
35601
|
approvalType: escalatedData.approvalType
|
|
@@ -35617,11 +35606,9 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35617
35606
|
requestId,
|
|
35618
35607
|
escalatedData.approvalType,
|
|
35619
35608
|
escalatedData.toolCalls,
|
|
35620
|
-
status
|
|
35621
|
-
void 0,
|
|
35622
|
-
resolvedByName
|
|
35609
|
+
status
|
|
35623
35610
|
);
|
|
35624
|
-
|
|
35611
|
+
_optionalChain([callbacks, 'access', _864 => _864.onSegmentsUpdate, 'optionalCall', _865 => _865(segments)]);
|
|
35625
35612
|
} else {
|
|
35626
35613
|
let segments = accumulator.getSegments();
|
|
35627
35614
|
for (const call of escalatedData.toolCalls) {
|
|
@@ -35634,7 +35621,7 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35634
35621
|
status
|
|
35635
35622
|
);
|
|
35636
35623
|
}
|
|
35637
|
-
|
|
35624
|
+
_optionalChain([callbacks, 'access', _866 => _866.onSegmentsUpdate, 'optionalCall', _867 => _867(segments)]);
|
|
35638
35625
|
}
|
|
35639
35626
|
} else {
|
|
35640
35627
|
const segments = accumulator.addApprovalRequest(
|
|
@@ -35644,37 +35631,37 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35644
35631
|
escalatedData.approvalType,
|
|
35645
35632
|
status
|
|
35646
35633
|
);
|
|
35647
|
-
|
|
35634
|
+
_optionalChain([callbacks, 'access', _868 => _868.onSegmentsUpdate, 'optionalCall', _869 => _869(segments)]);
|
|
35648
35635
|
}
|
|
35649
35636
|
} else {
|
|
35650
|
-
accumulator.updateApprovalStatus(requestId, status
|
|
35637
|
+
accumulator.updateApprovalStatus(requestId, status);
|
|
35651
35638
|
if (!callbacks.onApprovalResolved) {
|
|
35652
|
-
|
|
35639
|
+
_optionalChain([callbacks, 'access', _870 => _870.onSegmentsUpdate, 'optionalCall', _871 => _871(accumulator.getSegments())]);
|
|
35653
35640
|
}
|
|
35654
35641
|
}
|
|
35655
|
-
_optionalChain([callbacks, 'access',
|
|
35642
|
+
_optionalChain([callbacks, 'access', _872 => _872.onApprovalResolved, 'optionalCall', _873 => _873(requestId, status, approvalType)]);
|
|
35656
35643
|
break;
|
|
35657
35644
|
}
|
|
35658
35645
|
case "error": {
|
|
35659
35646
|
let message2;
|
|
35660
|
-
if ("details" in action && _optionalChain([action, 'optionalAccess',
|
|
35647
|
+
if ("details" in action && _optionalChain([action, 'optionalAccess', _874 => _874.details])) {
|
|
35661
35648
|
try {
|
|
35662
|
-
message2 = _optionalChain([JSON, 'access',
|
|
35649
|
+
message2 = _optionalChain([JSON, 'access', _875 => _875.parse, 'call', _876 => _876(action.details), 'optionalAccess', _877 => _877.error, 'optionalAccess', _878 => _878.message]);
|
|
35663
35650
|
} catch (e35) {
|
|
35664
35651
|
message2 = action.details;
|
|
35665
35652
|
}
|
|
35666
35653
|
}
|
|
35667
35654
|
const segments = accumulator.addError(action.error, message2);
|
|
35668
|
-
|
|
35669
|
-
_optionalChain([callbacks, 'access',
|
|
35655
|
+
_optionalChain([callbacks, 'access', _879 => _879.onSegmentsUpdate, 'optionalCall', _880 => _880(segments)]);
|
|
35656
|
+
_optionalChain([callbacks, 'access', _881 => _881.onError, 'optionalCall', _882 => _882(action.error, message2)]);
|
|
35670
35657
|
break;
|
|
35671
35658
|
}
|
|
35672
35659
|
case "system": {
|
|
35673
|
-
_optionalChain([callbacks, 'access',
|
|
35660
|
+
_optionalChain([callbacks, 'access', _883 => _883.onSystemMessage, 'optionalCall', _884 => _884(action.text)]);
|
|
35674
35661
|
break;
|
|
35675
35662
|
}
|
|
35676
35663
|
case "direct_message": {
|
|
35677
|
-
_optionalChain([callbacks, 'access',
|
|
35664
|
+
_optionalChain([callbacks, 'access', _885 => _885.onDirectMessage, 'optionalCall', _886 => _886(action.text, {
|
|
35678
35665
|
ownerType: action.ownerType,
|
|
35679
35666
|
displayName: action.displayName,
|
|
35680
35667
|
userId: action.userId
|
|
@@ -35682,29 +35669,29 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35682
35669
|
break;
|
|
35683
35670
|
}
|
|
35684
35671
|
case "message_request":
|
|
35685
|
-
_optionalChain([callbacks, 'access',
|
|
35672
|
+
_optionalChain([callbacks, 'access', _887 => _887.onUserMessage, 'optionalCall', _888 => _888(action.text, {
|
|
35686
35673
|
ownerType: action.ownerType,
|
|
35687
35674
|
displayName: action.displayName,
|
|
35688
35675
|
userId: action.userId
|
|
35689
35676
|
})]);
|
|
35690
35677
|
break;
|
|
35691
35678
|
case "token_usage":
|
|
35692
|
-
_optionalChain([callbacks, 'access',
|
|
35679
|
+
_optionalChain([callbacks, 'access', _889 => _889.onTokenUsage, 'optionalCall', _890 => _890(action.data)]);
|
|
35693
35680
|
break;
|
|
35694
35681
|
case "context_compaction_start": {
|
|
35695
35682
|
const standalone = !isInStreamRef.current;
|
|
35696
35683
|
const segments = accumulator.addContextCompaction();
|
|
35697
|
-
|
|
35684
|
+
_optionalChain([callbacks, 'access', _891 => _891.onSegmentsUpdate, 'optionalCall', _892 => _892(segments, standalone ? { append: true, isCompacting: true } : void 0)]);
|
|
35698
35685
|
break;
|
|
35699
35686
|
}
|
|
35700
35687
|
case "context_compaction_end": {
|
|
35701
35688
|
const standalone = !isInStreamRef.current;
|
|
35702
35689
|
const segments = accumulator.completeContextCompaction(action.summary);
|
|
35703
|
-
|
|
35690
|
+
_optionalChain([callbacks, 'access', _893 => _893.onSegmentsUpdate, 'optionalCall', _894 => _894(segments, standalone ? { append: true, isCompacting: true } : void 0)]);
|
|
35704
35691
|
break;
|
|
35705
35692
|
}
|
|
35706
35693
|
case "dialog_closed":
|
|
35707
|
-
_optionalChain([callbacks, 'access',
|
|
35694
|
+
_optionalChain([callbacks, 'access', _895 => _895.onDialogClosed, 'optionalCall', _896 => _896()]);
|
|
35708
35695
|
break;
|
|
35709
35696
|
default:
|
|
35710
35697
|
break;
|
|
@@ -35722,8 +35709,8 @@ function useRealtimeChunkProcessor(options) {
|
|
|
35722
35709
|
sawDirectMessageRef.current = false;
|
|
35723
35710
|
}, []);
|
|
35724
35711
|
const updateApprovalStatus = _react.useCallback.call(void 0,
|
|
35725
|
-
(requestId, status
|
|
35726
|
-
return accumulatorRef.current.updateApprovalStatus(requestId, status
|
|
35712
|
+
(requestId, status) => {
|
|
35713
|
+
return accumulatorRef.current.updateApprovalStatus(requestId, status);
|
|
35727
35714
|
},
|
|
35728
35715
|
[]
|
|
35729
35716
|
);
|
|
@@ -35766,7 +35753,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
35766
35753
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
35767
35754
|
if (!cancelled) setCommands(next);
|
|
35768
35755
|
} catch (err) {
|
|
35769
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
35756
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _897 => _897.name]) !== "AbortError") {
|
|
35770
35757
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
35771
35758
|
}
|
|
35772
35759
|
} finally {
|
|
@@ -35785,7 +35772,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
35785
35772
|
const query = _reactquery.useQuery.call(void 0, {
|
|
35786
35773
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
35787
35774
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
35788
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
35775
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _898 => _898.enabled]), () => ( true)),
|
|
35789
35776
|
staleTime: Infinity,
|
|
35790
35777
|
gcTime: Infinity
|
|
35791
35778
|
});
|
|
@@ -35806,7 +35793,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
35806
35793
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
35807
35794
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
35808
35795
|
return new Promise((resolve, reject) => {
|
|
35809
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
35796
|
+
if (_optionalChain([signal, 'optionalAccess', _899 => _899.aborted])) {
|
|
35810
35797
|
reject(new Error("Upload cancelled"));
|
|
35811
35798
|
return;
|
|
35812
35799
|
}
|
|
@@ -35820,7 +35807,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
35820
35807
|
xhr.removeEventListener("error", handleError);
|
|
35821
35808
|
xhr.removeEventListener("abort", handleAbort);
|
|
35822
35809
|
xhr.removeEventListener("timeout", handleTimeout);
|
|
35823
|
-
_optionalChain([signal, 'optionalAccess',
|
|
35810
|
+
_optionalChain([signal, 'optionalAccess', _900 => _900.removeEventListener, 'call', _901 => _901("abort", handleSignalAbort)]);
|
|
35824
35811
|
if (xhr.readyState !== XMLHttpRequest.DONE) xhr.abort();
|
|
35825
35812
|
};
|
|
35826
35813
|
const handleProgress = (event) => {
|
|
@@ -35856,7 +35843,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
35856
35843
|
const handleSignalAbort = () => {
|
|
35857
35844
|
xhr.abort();
|
|
35858
35845
|
};
|
|
35859
|
-
_optionalChain([signal, 'optionalAccess',
|
|
35846
|
+
_optionalChain([signal, 'optionalAccess', _902 => _902.addEventListener, 'call', _903 => _903("abort", handleSignalAbort, { once: true })]);
|
|
35860
35847
|
xhr.upload.addEventListener("progress", handleProgress);
|
|
35861
35848
|
xhr.addEventListener("load", handleLoad);
|
|
35862
35849
|
xhr.addEventListener("error", handleError);
|
|
@@ -35900,12 +35887,12 @@ function useChatAttachments() {
|
|
|
35900
35887
|
try {
|
|
35901
35888
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
35902
35889
|
} catch (err) {
|
|
35903
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35890
|
+
if (_optionalChain([ctrl, 'optionalAccess', _904 => _904.signal, 'access', _905 => _905.aborted])) return;
|
|
35904
35891
|
throw new Error(
|
|
35905
35892
|
`Could not read file content: ${err instanceof Error ? err.message : String(err)}`
|
|
35906
35893
|
);
|
|
35907
35894
|
}
|
|
35908
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35895
|
+
if (_optionalChain([ctrl, 'optionalAccess', _906 => _906.signal, 'access', _907 => _907.aborted])) return;
|
|
35909
35896
|
if (!sniffed) {
|
|
35910
35897
|
throw new Error("Unrecognized file format");
|
|
35911
35898
|
}
|
|
@@ -35919,7 +35906,7 @@ function useChatAttachments() {
|
|
|
35919
35906
|
const urlResp = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
35920
35907
|
method: "POST",
|
|
35921
35908
|
headers: { "Content-Type": "application/json" },
|
|
35922
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
35909
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _908 => _908.signal]),
|
|
35923
35910
|
body: JSON.stringify({
|
|
35924
35911
|
fileName: att.file.name,
|
|
35925
35912
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -35945,9 +35932,9 @@ function useChatAttachments() {
|
|
|
35945
35932
|
(pct) => {
|
|
35946
35933
|
updateOne(att.id, { progress: pct });
|
|
35947
35934
|
},
|
|
35948
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
35935
|
+
_optionalChain([ctrl, 'optionalAccess', _909 => _909.signal])
|
|
35949
35936
|
);
|
|
35950
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35937
|
+
if (_optionalChain([ctrl, 'optionalAccess', _910 => _910.signal, 'access', _911 => _911.aborted])) return;
|
|
35951
35938
|
updateOne(att.id, {
|
|
35952
35939
|
status: "ready",
|
|
35953
35940
|
progress: 100,
|
|
@@ -35955,7 +35942,7 @@ function useChatAttachments() {
|
|
|
35955
35942
|
viewToken: mintData.viewToken
|
|
35956
35943
|
});
|
|
35957
35944
|
} catch (err) {
|
|
35958
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
35945
|
+
if (_optionalChain([ctrl, 'optionalAccess', _912 => _912.signal, 'access', _913 => _913.aborted])) return;
|
|
35959
35946
|
const message2 = err instanceof Error ? err.message : String(err);
|
|
35960
35947
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message2 });
|
|
35961
35948
|
} finally {
|
|
@@ -36106,7 +36093,7 @@ var ANON_DEFAULTS = {
|
|
|
36106
36093
|
function useResolveChatIdentity(enabled) {
|
|
36107
36094
|
const runtime = _chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, );
|
|
36108
36095
|
const url = runtime.endpoints.identityUrl;
|
|
36109
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkZSUNQJROcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
36096
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkZSUNQJROcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _914 => _914.email]), () => ( null));
|
|
36110
36097
|
const [data, setData] = _react.useState.call(void 0, ANON_DEFAULTS);
|
|
36111
36098
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, enabled);
|
|
36112
36099
|
_react.useEffect.call(void 0, () => {
|
|
@@ -36194,7 +36181,7 @@ function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
|
|
|
36194
36181
|
yield chunk;
|
|
36195
36182
|
}
|
|
36196
36183
|
} catch (err) {
|
|
36197
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
36184
|
+
if (_optionalChain([err, 'optionalAccess', _915 => _915.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
36198
36185
|
return;
|
|
36199
36186
|
}
|
|
36200
36187
|
const errorMessage = err instanceof Error ? err.message : "An error occurred";
|
|
@@ -36245,7 +36232,7 @@ function useChat({
|
|
|
36245
36232
|
const onMessagesChangeRef = _react.useRef.call(void 0, onMessagesChange);
|
|
36246
36233
|
onMessagesChangeRef.current = onMessagesChange;
|
|
36247
36234
|
_react.useEffect.call(void 0, () => {
|
|
36248
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
36235
|
+
_optionalChain([onMessagesChangeRef, 'access', _916 => _916.current, 'optionalCall', _917 => _917(messages)]);
|
|
36249
36236
|
}, [messages]);
|
|
36250
36237
|
const {
|
|
36251
36238
|
streamMessage,
|
|
@@ -36282,7 +36269,7 @@ function useChat({
|
|
|
36282
36269
|
name: "You",
|
|
36283
36270
|
content: text,
|
|
36284
36271
|
timestamp: /* @__PURE__ */ new Date(),
|
|
36285
|
-
..._optionalChain([options, 'optionalAccess',
|
|
36272
|
+
..._optionalChain([options, 'optionalAccess', _918 => _918.hidden]) ? { hidden: true } : {}
|
|
36286
36273
|
};
|
|
36287
36274
|
addMessage(userMessage);
|
|
36288
36275
|
setIsTyping(true);
|
|
@@ -36344,7 +36331,7 @@ function useChat({
|
|
|
36344
36331
|
currentTextSegment = "";
|
|
36345
36332
|
}
|
|
36346
36333
|
const seg = segment;
|
|
36347
|
-
const proposalId = _optionalChain([seg, 'access',
|
|
36334
|
+
const proposalId = _optionalChain([seg, 'access', _919 => _919.data, 'optionalAccess', _920 => _920.requestId]);
|
|
36348
36335
|
const updateApprovalMessage = (transform) => {
|
|
36349
36336
|
setMessages((prev) => {
|
|
36350
36337
|
for (let i = prev.length - 1; i >= 0; i--) {
|
|
@@ -36353,7 +36340,7 @@ function useChat({
|
|
|
36353
36340
|
if (!Array.isArray(m.content)) continue;
|
|
36354
36341
|
const segments = m.content;
|
|
36355
36342
|
const hasMatch = segments.some(
|
|
36356
|
-
(s) => s.type === "approval_request" && _optionalChain([s, 'access',
|
|
36343
|
+
(s) => s.type === "approval_request" && _optionalChain([s, 'access', _921 => _921.data, 'optionalAccess', _922 => _922.requestId]) === proposalId
|
|
36357
36344
|
);
|
|
36358
36345
|
if (!hasMatch) continue;
|
|
36359
36346
|
const next = [...prev];
|
|
@@ -36395,11 +36382,11 @@ function useChat({
|
|
|
36395
36382
|
if (!Array.isArray(m.content)) continue;
|
|
36396
36383
|
const segments = m.content;
|
|
36397
36384
|
const hasMatch = segments.some(
|
|
36398
|
-
(s) => s.type === "approval_request" && _optionalChain([s, 'access',
|
|
36385
|
+
(s) => s.type === "approval_request" && _optionalChain([s, 'access', _923 => _923.data, 'optionalAccess', _924 => _924.requestId]) === decision.proposalId
|
|
36399
36386
|
);
|
|
36400
36387
|
if (!hasMatch) continue;
|
|
36401
36388
|
const flipped = segments.map(
|
|
36402
|
-
(s) => s.type === "approval_request" && _optionalChain([s, 'access',
|
|
36389
|
+
(s) => s.type === "approval_request" && _optionalChain([s, 'access', _925 => _925.data, 'optionalAccess', _926 => _926.requestId]) === decision.proposalId ? { ...s, status: decision.action } : s
|
|
36403
36390
|
);
|
|
36404
36391
|
const next = [...prev];
|
|
36405
36392
|
next[i] = { ...m, content: flipped };
|
|
@@ -36561,8 +36548,8 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36561
36548
|
})),
|
|
36562
36549
|
{ role: "user", content: message2 }
|
|
36563
36550
|
];
|
|
36564
|
-
const targetPath = _optionalChain([extra, 'optionalAccess',
|
|
36565
|
-
const requestBody = _optionalChain([extra, 'optionalAccess',
|
|
36551
|
+
const targetPath = _optionalChain([extra, 'optionalAccess', _927 => _927.approvalAction]) ? endpoints.approvalToolUrl : endpoints.chatStreamUrl;
|
|
36552
|
+
const requestBody = _optionalChain([extra, 'optionalAccess', _928 => _928.approvalAction]) ? {
|
|
36566
36553
|
proposal_id: extra.approvalAction.proposalId,
|
|
36567
36554
|
action: extra.approvalAction.action,
|
|
36568
36555
|
messages: currentMessages.filter((m) => (m.role === "user" || m.role === "assistant") && !m.hidden).map((m) => ({
|
|
@@ -36571,8 +36558,8 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36571
36558
|
}))
|
|
36572
36559
|
} : {
|
|
36573
36560
|
messages: apiMessages,
|
|
36574
|
-
..._optionalChain([extra, 'optionalAccess',
|
|
36575
|
-
..._optionalChain([extra, 'optionalAccess',
|
|
36561
|
+
..._optionalChain([extra, 'optionalAccess', _929 => _929.commandOverride]) ? { commandOverride: extra.commandOverride } : {},
|
|
36562
|
+
..._optionalChain([extra, 'optionalAccess', _930 => _930.pendingAttachments]) && extra.pendingAttachments.length > 0 ? { pendingAttachments: extra.pendingAttachments } : {}
|
|
36576
36563
|
};
|
|
36577
36564
|
const response = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, targetPath, {
|
|
36578
36565
|
method: "POST",
|
|
@@ -36582,7 +36569,7 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36582
36569
|
if (!response.ok) {
|
|
36583
36570
|
throw new Error(`Chat request failed: ${response.status}`);
|
|
36584
36571
|
}
|
|
36585
|
-
const reader = _optionalChain([response, 'access',
|
|
36572
|
+
const reader = _optionalChain([response, 'access', _931 => _931.body, 'optionalAccess', _932 => _932.getReader, 'call', _933 => _933()]);
|
|
36586
36573
|
if (!reader) throw new Error("No response body");
|
|
36587
36574
|
const decoder = new TextDecoder();
|
|
36588
36575
|
let buffer = "";
|
|
@@ -36665,7 +36652,7 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36665
36652
|
const toolName = typeof meta.tool_name === "string" ? meta.tool_name : void 0;
|
|
36666
36653
|
const result = _nullishCoalesce(meta.result, () => ( null));
|
|
36667
36654
|
const card = _nullishCoalesce(meta.card, () => ( null));
|
|
36668
|
-
if (_optionalChain([card, 'optionalAccess',
|
|
36655
|
+
if (_optionalChain([card, 'optionalAccess', _934 => _934.ref, 'optionalAccess', _935 => _935.id]) && _optionalChain([card, 'optionalAccess', _936 => _936.type])) {
|
|
36669
36656
|
const existing = _nullishCoalesce(refsMapRef.current.get(sendIdx), () => ( {}));
|
|
36670
36657
|
const key = buildChatRefKey(card.type, card.ref.id);
|
|
36671
36658
|
refsMapRef.current.set(sendIdx, { ...existing, [key]: card.ref });
|
|
@@ -36678,8 +36665,8 @@ function createDocStreamFn(source, endpoints, messagesRef, sourcesMapRef, refsMa
|
|
|
36678
36665
|
willAutoContinue: meta.willAutoContinue === true,
|
|
36679
36666
|
...toolName ? { toolName } : {},
|
|
36680
36667
|
...result ? { result } : {},
|
|
36681
|
-
..._optionalChain([card, 'optionalAccess',
|
|
36682
|
-
..._optionalChain([card, 'optionalAccess',
|
|
36668
|
+
..._optionalChain([card, 'optionalAccess', _937 => _937.marker]) ? { marker: card.marker } : {},
|
|
36669
|
+
..._optionalChain([card, 'optionalAccess', _938 => _938.ref]) ? { cardRef: card.ref } : {},
|
|
36683
36670
|
...typeof meta.receiptText === "string" ? { receiptText: meta.receiptText } : {},
|
|
36684
36671
|
proposalId: typeof meta.proposalId === "string" ? meta.proposalId : void 0
|
|
36685
36672
|
};
|
|
@@ -36798,7 +36785,7 @@ var DEFAULT_CHAT_SOURCE = "embed";
|
|
|
36798
36785
|
var chatStorageKey = (source) => {
|
|
36799
36786
|
const base = `mingo-chat-${source}-v${CHAT_STORAGE_VERSION}`;
|
|
36800
36787
|
const auth = _chunkZSUNQJROcjs.getEmbedProxyAuth.call(void 0, );
|
|
36801
|
-
if (_optionalChain([auth, 'optionalAccess',
|
|
36788
|
+
if (_optionalChain([auth, 'optionalAccess', _939 => _939.email])) {
|
|
36802
36789
|
return `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}`;
|
|
36803
36790
|
}
|
|
36804
36791
|
return base;
|
|
@@ -36853,7 +36840,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36853
36840
|
const { active = true } = runtimeOptions;
|
|
36854
36841
|
const runtime = _chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, );
|
|
36855
36842
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
36856
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
36843
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _940 => _940.tableIdForDocumentType]), () => ( _chunkHR4CVAVHcjs.defaultTableIdForDocumentType));
|
|
36857
36844
|
const persistedRef = _react.useRef.call(void 0, null);
|
|
36858
36845
|
if (persistedRef.current === null) {
|
|
36859
36846
|
pruneStaleChatStorage(source);
|
|
@@ -36958,7 +36945,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
36958
36945
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
36959
36946
|
sources = sourcesMapRef.current.get(lookupIdx);
|
|
36960
36947
|
chatRefs = _nullishCoalesce(m.chatRefs, () => ( refsMapRef.current.get(lookupIdx)));
|
|
36961
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([metaMapRef, 'access',
|
|
36948
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([metaMapRef, 'access', _941 => _941.current, 'access', _942 => _942.get, 'call', _943 => _943(lookupIdx), 'optionalAccess', _944 => _944.scrollAnchor]), () => ( void 0));
|
|
36962
36949
|
}
|
|
36963
36950
|
return {
|
|
36964
36951
|
id: m.id,
|
|
@@ -37006,7 +36993,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
37006
36993
|
);
|
|
37007
36994
|
return;
|
|
37008
36995
|
}
|
|
37009
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
36996
|
+
const refSlug = typeof _optionalChain([reference, 'access', _945 => _945.metadata, 'optionalAccess', _946 => _946.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
37010
36997
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
37011
36998
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
37012
36999
|
const text = `/${cmdId} display "${escaped}"`;
|
|
@@ -37078,18 +37065,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
37078
37065
|
clearMessages,
|
|
37079
37066
|
streamingPhase,
|
|
37080
37067
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
37081
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37082
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37083
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37068
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _947 => _947.provider]), () => ( null)),
|
|
37069
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _948 => _948.modelLabel]), () => ( null)),
|
|
37070
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _949 => _949.contextWindowMaxTokens]), () => ( null)),
|
|
37084
37071
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
37085
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37072
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _950 => _950.inputTokens]), () => ( null)),
|
|
37086
37073
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
37087
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37074
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _951 => _951.outputTokens]), () => ( null)),
|
|
37088
37075
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
37089
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37076
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _952 => _952.cacheHitRatePct]), () => ( null)),
|
|
37090
37077
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
37091
37078
|
* token counts). null until the trailing usage frame lands. */
|
|
37092
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
37079
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _953 => _953.breakdown]), () => ( null)),
|
|
37093
37080
|
// ─── Dialog management — stubs for v1 ────────────────────────────────
|
|
37094
37081
|
// Guide mode currently keeps its history in `localStorage` opaquely
|
|
37095
37082
|
// under the hood (`runtime.source` namespaced key). Surfacing that
|
|
@@ -37147,15 +37134,15 @@ var noopRejectRequest = async (_id, _reason) => {
|
|
|
37147
37134
|
|
|
37148
37135
|
// src/components/chat/utils/process-historical-messages.ts
|
|
37149
37136
|
function getOwnerDisplayName(owner) {
|
|
37150
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
37137
|
+
if (_optionalChain([owner, 'optionalAccess', _954 => _954.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
37151
37138
|
const { firstName, lastName } = owner.user;
|
|
37152
37139
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
37153
37140
|
if (name) return name;
|
|
37154
37141
|
}
|
|
37155
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
37142
|
+
return _optionalChain([owner, 'optionalAccess', _955 => _955.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
37156
37143
|
}
|
|
37157
37144
|
function getOwnerAvatar(owner) {
|
|
37158
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
37145
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _956 => _956.user, 'optionalAccess', _957 => _957.image, 'optionalAccess', _958 => _958.imageUrl]), () => ( void 0));
|
|
37159
37146
|
}
|
|
37160
37147
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
37161
37148
|
messageDataArray.forEach((data) => {
|
|
@@ -37218,10 +37205,10 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
37218
37205
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
37219
37206
|
return;
|
|
37220
37207
|
}
|
|
37221
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
37208
|
+
const isUserMessage = _optionalChain([msg, 'access', _959 => _959.owner, 'optionalAccess', _960 => _960.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _961 => _961.owner, 'optionalAccess', _962 => _962.type]) === OWNER_TYPE.ADMIN;
|
|
37222
37209
|
if (isUserMessage) {
|
|
37223
37210
|
flushAssistantMessage();
|
|
37224
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
37211
|
+
const userAuthorType = _optionalChain([msg, 'access', _963 => _963.owner, 'optionalAccess', _964 => _964.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
37225
37212
|
messageDataArray.forEach((data) => {
|
|
37226
37213
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
37227
37214
|
processedMessages.push({
|
|
@@ -37246,7 +37233,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
37246
37233
|
});
|
|
37247
37234
|
const nextMsg = messages[index + 1];
|
|
37248
37235
|
const isLastMessage = index === messages.length - 1;
|
|
37249
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
37236
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _965 => _965.owner, 'optionalAccess', _966 => _966.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _967 => _967.owner, 'optionalAccess', _968 => _968.type]) === OWNER_TYPE.ADMIN);
|
|
37250
37237
|
if (isLastMessage || nextIsFromUser) {
|
|
37251
37238
|
flushAssistantMessage();
|
|
37252
37239
|
}
|
|
@@ -37356,7 +37343,7 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37356
37343
|
}
|
|
37357
37344
|
}
|
|
37358
37345
|
} else {
|
|
37359
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
37346
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _969 => _969.set, 'call', _970 => _970(data.approvalRequestId, {
|
|
37360
37347
|
command: data.command || "",
|
|
37361
37348
|
explanation: data.explanation,
|
|
37362
37349
|
approvalType,
|
|
@@ -37369,17 +37356,14 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37369
37356
|
if ("approvalRequestId" in data && data.approvalRequestId) {
|
|
37370
37357
|
const existingStatus = approvalStatuses[data.approvalRequestId];
|
|
37371
37358
|
const status = existingStatus || (data.approved ? "approved" : "rejected");
|
|
37372
|
-
const
|
|
37373
|
-
|
|
37374
|
-
if (_optionalChain([escalatedData, 'optionalAccess', _945 => _945.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
37359
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _971 => _971.get, 'call', _972 => _972(data.approvalRequestId)]);
|
|
37360
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _973 => _973.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
37375
37361
|
if (batchApprovalsEnabled) {
|
|
37376
37362
|
accumulator.addApprovalBatch(
|
|
37377
37363
|
data.approvalRequestId,
|
|
37378
37364
|
escalatedData.approvalType,
|
|
37379
37365
|
escalatedData.toolCalls,
|
|
37380
|
-
status
|
|
37381
|
-
void 0,
|
|
37382
|
-
resolvedByName
|
|
37366
|
+
status
|
|
37383
37367
|
);
|
|
37384
37368
|
} else {
|
|
37385
37369
|
for (const call of escalatedData.toolCalls) {
|
|
@@ -37393,7 +37377,7 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37393
37377
|
);
|
|
37394
37378
|
}
|
|
37395
37379
|
}
|
|
37396
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
37380
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _974 => _974.delete, 'call', _975 => _975(data.approvalRequestId)]);
|
|
37397
37381
|
break;
|
|
37398
37382
|
}
|
|
37399
37383
|
if (escalatedData) {
|
|
@@ -37402,10 +37386,10 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37402
37386
|
explanation: escalatedData.explanation,
|
|
37403
37387
|
approvalType: escalatedData.approvalType
|
|
37404
37388
|
});
|
|
37405
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
37389
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _976 => _976.delete, 'call', _977 => _977(data.approvalRequestId)]);
|
|
37406
37390
|
}
|
|
37407
37391
|
const before = accumulator.getSegments();
|
|
37408
|
-
const after = accumulator.updateApprovalStatus(data.approvalRequestId, status
|
|
37392
|
+
const after = accumulator.updateApprovalStatus(data.approvalRequestId, status);
|
|
37409
37393
|
const updatedExisting = before.some((s, i) => after[i] !== s);
|
|
37410
37394
|
if (updatedExisting) break;
|
|
37411
37395
|
accumulator.processApprovalResult(
|
|
@@ -37418,9 +37402,9 @@ function processMessageData(data, accumulator, approvalStatuses, options = {}, e
|
|
|
37418
37402
|
case MESSAGE_TYPE.ERROR:
|
|
37419
37403
|
if ("error" in data) {
|
|
37420
37404
|
let message2;
|
|
37421
|
-
if ("details" in data && _optionalChain([data, 'optionalAccess',
|
|
37405
|
+
if ("details" in data && _optionalChain([data, 'optionalAccess', _978 => _978.details])) {
|
|
37422
37406
|
try {
|
|
37423
|
-
message2 = _optionalChain([JSON, 'access',
|
|
37407
|
+
message2 = _optionalChain([JSON, 'access', _979 => _979.parse, 'call', _980 => _980(data.details), 'optionalAccess', _981 => _981.error, 'optionalAccess', _982 => _982.message]);
|
|
37424
37408
|
} catch (e42) {
|
|
37425
37409
|
message2 = data.details;
|
|
37426
37410
|
}
|
|
@@ -37503,10 +37487,10 @@ function processHistoricalMessagesWithErrors(messages, options = {}) {
|
|
|
37503
37487
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
37504
37488
|
return;
|
|
37505
37489
|
}
|
|
37506
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
37490
|
+
const isUserMessage = _optionalChain([msg, 'access', _983 => _983.owner, 'optionalAccess', _984 => _984.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _985 => _985.owner, 'optionalAccess', _986 => _986.type]) === OWNER_TYPE.ADMIN;
|
|
37507
37491
|
if (isUserMessage) {
|
|
37508
37492
|
flushAssistantMessage();
|
|
37509
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
37493
|
+
const userAuthorType = _optionalChain([msg, 'access', _987 => _987.owner, 'optionalAccess', _988 => _988.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
37510
37494
|
messageDataArray.forEach((data) => {
|
|
37511
37495
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
37512
37496
|
processedMessages.push({
|
|
@@ -37531,7 +37515,7 @@ function processHistoricalMessagesWithErrors(messages, options = {}) {
|
|
|
37531
37515
|
});
|
|
37532
37516
|
const nextMsg = messages[index + 1];
|
|
37533
37517
|
const isLastMessage = index === messages.length - 1;
|
|
37534
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
37518
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _989 => _989.owner, 'optionalAccess', _990 => _990.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _991 => _991.owner, 'optionalAccess', _992 => _992.type]) === OWNER_TYPE.ADMIN);
|
|
37535
37519
|
if (isLastMessage || nextIsFromUser) {
|
|
37536
37520
|
flushAssistantMessage();
|
|
37537
37521
|
}
|
|
@@ -37869,7 +37853,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
37869
37853
|
}, [active, fetchDialogs, loadDialogsPage]);
|
|
37870
37854
|
const sendMessage = _react.useCallback.call(void 0,
|
|
37871
37855
|
async (text, sendOptions) => {
|
|
37872
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
37856
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _993 => _993.hidden]), () => ( false));
|
|
37873
37857
|
setMessages((prev) => [
|
|
37874
37858
|
...prev,
|
|
37875
37859
|
{
|
|
@@ -38033,11 +38017,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
38033
38017
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
38034
38018
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
38035
38019
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
38036
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
38037
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
38038
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
38039
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
38040
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
38020
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _994 => _994.provider]), () => ( modelProvider)), () => ( null)),
|
|
38021
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _995 => _995.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
38022
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _996 => _996.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _997 => _997.contextWindowMaxTokens]))), () => ( null)),
|
|
38023
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _998 => _998.inputTokensSize]), () => ( null)),
|
|
38024
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _999 => _999.outputTokensSize]), () => ( null)),
|
|
38041
38025
|
currentCacheHitRatePct: null,
|
|
38042
38026
|
currentUsageBreakdown: null,
|
|
38043
38027
|
// Dialog management
|
|
@@ -38285,7 +38269,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
38285
38269
|
break;
|
|
38286
38270
|
case "approval_batch": {
|
|
38287
38271
|
const allDone = !!segment.data.executions && segment.data.toolCalls.every(
|
|
38288
|
-
(c) => _optionalChain([segment, 'access',
|
|
38272
|
+
(c) => _optionalChain([segment, 'access', _1000 => _1000.data, 'access', _1001 => _1001.executions, 'optionalAccess', _1002 => _1002[c.toolExecutionRequestId], 'optionalAccess', _1003 => _1003.status]) === "done"
|
|
38289
38273
|
);
|
|
38290
38274
|
if (segment.status !== "rejected" && !allDone) {
|
|
38291
38275
|
hasIncompleteState = true;
|
|
@@ -38353,20 +38337,20 @@ function mergeHistoryWithRealtime(input) {
|
|
|
38353
38337
|
const seqCoverageKnown = realtimeSeenStreamSeq > 0 && historyMaxStreamSeq > 0;
|
|
38354
38338
|
const historyCoversRealtime = seqCoverageKnown ? historyMaxStreamSeq >= realtimeSeenStreamSeq : null;
|
|
38355
38339
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
38356
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
38357
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
38340
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _1004 => _1004.role]) === "assistant" ? trailing : null;
|
|
38341
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _1005 => _1005.content, 'access', _1006 => _1006.find, 'call', _1007 => _1007((s) => s.type === "approval_batch"), 'optionalAccess', _1008 => _1008.data, 'optionalAccess', _1009 => _1009.approvalRequestId]), () => ( null)) : null;
|
|
38358
38342
|
let processedToUse = processedHistory;
|
|
38359
38343
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
38360
38344
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
38361
38345
|
if (historyBatchId) {
|
|
38362
38346
|
const batchTwins = existingMessages.filter(
|
|
38363
38347
|
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some(
|
|
38364
|
-
(s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
38348
|
+
(s) => s.type === "approval_batch" && _optionalChain([s, 'access', _1010 => _1010.data, 'optionalAccess', _1011 => _1011.approvalRequestId]) === historyBatchId
|
|
38365
38349
|
)
|
|
38366
38350
|
);
|
|
38367
38351
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
38368
38352
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
38369
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
38353
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _1012 => _1012.content])) ? historyTrailingAssistant.content.length : 0;
|
|
38370
38354
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
38371
38355
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
38372
38356
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -38382,16 +38366,16 @@ function mergeHistoryWithRealtime(input) {
|
|
|
38382
38366
|
if (pinnedSyntheticIds.has(m.id)) return true;
|
|
38383
38367
|
if (droppedSyntheticIds.has(m.id)) return false;
|
|
38384
38368
|
if (processedIds.has(m.id)) return false;
|
|
38385
|
-
if (_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
38369
|
+
if (_optionalChain([rawHistoryIds, 'optionalAccess', _1013 => _1013.has, 'call', _1014 => _1014(m.id)])) return false;
|
|
38386
38370
|
if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
|
|
38387
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
38371
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _1015 => _1015.timestamp, 'optionalAccess', _1016 => _1016.getTime, 'call', _1017 => _1017()]), () => ( 0))) <= historyFetchedAt;
|
|
38388
38372
|
return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
|
|
38389
38373
|
}
|
|
38390
38374
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
38391
38375
|
if (m.role === "assistant" && trailingAssistantText && assistantAnswerText(m.content) === trailingAssistantText) {
|
|
38392
38376
|
return false;
|
|
38393
38377
|
}
|
|
38394
|
-
const covered =
|
|
38378
|
+
const covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _1018 => _1018.timestamp, 'optionalAccess', _1019 => _1019.getTime, 'call', _1020 => _1020()]), () => ( 0))) <= historyFetchedAt;
|
|
38395
38379
|
if (covered) return false;
|
|
38396
38380
|
}
|
|
38397
38381
|
return true;
|
|
@@ -38611,7 +38595,7 @@ function useChatDialogManager({
|
|
|
38611
38595
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
38612
38596
|
if (restoreTarget) {
|
|
38613
38597
|
try {
|
|
38614
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
38598
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _1021 => _1021(restoreTarget.id)]);
|
|
38615
38599
|
} catch (err) {
|
|
38616
38600
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
38617
38601
|
return;
|
|
@@ -39010,7 +38994,7 @@ function EmbeddableChatInner({
|
|
|
39010
38994
|
}),
|
|
39011
38995
|
[commandsUrl]
|
|
39012
38996
|
);
|
|
39013
|
-
const userName = _optionalChain([identityUser, 'optionalAccess',
|
|
38997
|
+
const userName = _optionalChain([identityUser, 'optionalAccess', _1022 => _1022.firstName, 'optionalAccess', _1023 => _1023.trim, 'call', _1024 => _1024()]) || _optionalChain([identityUser, 'optionalAccess', _1025 => _1025.name, 'optionalAccess', _1026 => _1026.split, 'call', _1027 => _1027(" "), 'access', _1028 => _1028[0], 'optionalAccess', _1029 => _1029.trim, 'call', _1030 => _1030()]) || void 0;
|
|
39014
38998
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
39015
38999
|
if (modes) return modes;
|
|
39016
39000
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -39019,17 +39003,17 @@ function EmbeddableChatInner({
|
|
|
39019
39003
|
const mingoCaps = _react.useMemo.call(void 0, () => {
|
|
39020
39004
|
if (mingoState) {
|
|
39021
39005
|
return {
|
|
39022
|
-
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39023
|
-
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39024
|
-
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39025
|
-
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
39006
|
+
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _1031 => _1031.canRename]), () => ( false)),
|
|
39007
|
+
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _1032 => _1032.canArchive]), () => ( false)),
|
|
39008
|
+
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _1033 => _1033.fetchArchivedDialogs]),
|
|
39009
|
+
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _1034 => _1034.unarchiveDialog])
|
|
39026
39010
|
};
|
|
39027
39011
|
}
|
|
39028
39012
|
return {
|
|
39029
|
-
canRename: !!_optionalChain([effectiveModes, 'access',
|
|
39030
|
-
canArchive: !!_optionalChain([effectiveModes, 'access',
|
|
39031
|
-
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access',
|
|
39032
|
-
unarchiveDialog: _optionalChain([effectiveModes, 'access',
|
|
39013
|
+
canRename: !!_optionalChain([effectiveModes, 'access', _1035 => _1035.mingo, 'optionalAccess', _1036 => _1036.renameDialog]),
|
|
39014
|
+
canArchive: !!_optionalChain([effectiveModes, 'access', _1037 => _1037.mingo, 'optionalAccess', _1038 => _1038.archiveDialog]),
|
|
39015
|
+
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _1039 => _1039.mingo, 'optionalAccess', _1040 => _1040.fetchArchivedDialogs]),
|
|
39016
|
+
unarchiveDialog: _optionalChain([effectiveModes, 'access', _1041 => _1041.mingo, 'optionalAccess', _1042 => _1042.unarchiveDialog])
|
|
39033
39017
|
};
|
|
39034
39018
|
}, [mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
39035
39019
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
@@ -39041,7 +39025,7 @@ function EmbeddableChatInner({
|
|
|
39041
39025
|
if (controlledActiveMode === void 0) {
|
|
39042
39026
|
setUncontrolledActiveMode(next);
|
|
39043
39027
|
}
|
|
39044
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
39028
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _1043 => _1043(next)]);
|
|
39045
39029
|
},
|
|
39046
39030
|
[controlledActiveMode, onActiveModeChange]
|
|
39047
39031
|
);
|
|
@@ -39248,9 +39232,9 @@ function EmbeddableChatInner({
|
|
|
39248
39232
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
39249
39233
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
39250
39234
|
if (chatLoading) return void 0;
|
|
39251
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
39235
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _1044 => _1044.sources]);
|
|
39252
39236
|
if (!sources || sources.length === 0) return void 0;
|
|
39253
|
-
const content = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
39237
|
+
const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _1045 => _1045.content]) || "";
|
|
39254
39238
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map(
|
|
39255
39239
|
(m) => parseInt(m[1], 10)
|
|
39256
39240
|
);
|
|
@@ -39297,7 +39281,7 @@ function EmbeddableChatInner({
|
|
|
39297
39281
|
ChatPanelHeader,
|
|
39298
39282
|
{
|
|
39299
39283
|
showBack: hasConversation || guideCanReturnToMingo,
|
|
39300
|
-
title: hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
39284
|
+
title: hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _1046 => _1046.title]) || "New Chat" : isGuideEmpty ? "Mingo Guide" : "Current Chats",
|
|
39301
39285
|
backAriaLabel: hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo",
|
|
39302
39286
|
isArchivedView: isViewingArchived,
|
|
39303
39287
|
onBack: hasConversation ? handleBack : () => handleActiveModeChange("mingo"),
|
|
@@ -39402,10 +39386,10 @@ function EmbeddableChatInner({
|
|
|
39402
39386
|
subtitle: _nullishCoalesce(emptyStateGreeting, () => ( void 0)),
|
|
39403
39387
|
...guideWelcome,
|
|
39404
39388
|
onQuickAction: (action) => {
|
|
39405
|
-
_optionalChain([chatInputRef, 'access',
|
|
39389
|
+
_optionalChain([chatInputRef, 'access', _1047 => _1047.current, 'optionalAccess', _1048 => _1048.setValue, 'call', _1049 => _1049(
|
|
39406
39390
|
_nullishCoalesce(action.prompt, () => ( action.label))
|
|
39407
39391
|
)]);
|
|
39408
|
-
_optionalChain([chatInputRef, 'access',
|
|
39392
|
+
_optionalChain([chatInputRef, 'access', _1050 => _1050.current, 'optionalAccess', _1051 => _1051.focus, 'call', _1052 => _1052()]);
|
|
39409
39393
|
},
|
|
39410
39394
|
children: (chipCommands.length > 0 || !commandsLoaded) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "shrink-0 overflow-hidden rounded-md border border-ods-border", children: [
|
|
39411
39395
|
!commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -40249,4 +40233,4 @@ function EmbeddableChatInner({
|
|
|
40249
40233
|
|
|
40250
40234
|
|
|
40251
40235
|
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;
|
|
40252
|
-
//# sourceMappingURL=chunk-
|
|
40236
|
+
//# sourceMappingURL=chunk-7LTWNUHB.cjs.map
|