openfox 1.6.75 → 1.6.76
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/{ask-3RK5YJZE.js → ask-5SSOA6SZ.js} +2 -2
- package/dist/{auth-LZZX63KI.js → auth-56SIRACI.js} +3 -6
- package/dist/auto-compaction-V3PA77WG.js +27 -0
- package/dist/{branch.api-XADFZZAA.js → branch.api-PWFW26KC.js} +2 -2
- package/dist/{chat-handler-KYMMXPP6.js → chat-handler-7DKHGTVO.js} +31 -29
- package/dist/{chunk-5UTTLO4D.js → chunk-5ZD3GZTK.js} +89 -49
- package/dist/{chunk-AFATQ5LJ.js → chunk-B5AP3RSV.js} +1 -1
- package/dist/{chunk-22CTURMH.js → chunk-BJYPTN5S.js} +1 -1
- package/dist/{chunk-DLINTLB7.js → chunk-BSTVRSV6.js} +7 -5
- package/dist/{chunk-7JPKRM6M.js → chunk-CMQCO27Y.js} +22 -12
- package/dist/{chunk-R4HADRYO.js → chunk-CQGTEGKL.js} +1 -1
- package/dist/{chunk-J5DV33SS.js → chunk-CUDAT6SS.js} +46 -18
- package/dist/{chunk-ETIXH35K.js → chunk-H5EICXF3.js} +499 -277
- package/dist/{chunk-XIZ6B6IS.js → chunk-K2V7EW5F.js} +541 -299
- package/dist/{chunk-PNBH3RAX.js → chunk-K44MW7JJ.js} +1 -1
- package/dist/{chunk-BLNFJ22S.js → chunk-KIOUKC3Z.js} +6 -4
- package/dist/{chunk-4CQ7CUQ6.js → chunk-LCQ3MPXD.js} +5 -5
- package/dist/{chunk-CTAIXOZJ.js → chunk-NDJ6FKSP.js} +1 -1
- package/dist/{chunk-IA4O65CR.js → chunk-NHJ2GVCF.js} +100 -68
- package/dist/{chunk-GQZGIMJO.js → chunk-OXI26S7U.js} +12 -7
- package/dist/{chunk-NBU6KIOD.js → chunk-PBGOZMVY.js} +4 -4
- package/dist/{chunk-B7E3BICY.js → chunk-RGRBWDZP.js} +2 -4
- package/dist/{chunk-VIGOXEZG.js → chunk-RQ4XSKUR.js} +15 -16
- package/dist/{chunk-KFBIHS3S.js → chunk-STYHKCG7.js} +20 -14
- package/dist/{chunk-55Z3DJ7G.js → chunk-TGWEH2BC.js} +10 -11
- package/dist/{chunk-TYUNDOX2.js → chunk-UKMRZDWM.js} +90 -41
- package/dist/{chunk-PFRQO5Z3.js → chunk-VAMTEAYI.js} +49 -27
- package/dist/{chunk-574HZVLE.js → chunk-VRGRAQDG.js} +2 -2
- package/dist/{chunk-JQBTYHUR.js → chunk-WR6QCJJO.js} +53 -15
- package/dist/{chunk-RBPOAAIZ.js → chunk-XKIEDGQF.js} +22 -18
- package/dist/cli/dev.js +2 -2
- package/dist/cli/index.js +2 -2
- package/dist/{config-6T4EHAP2.js → config-5CONAOL7.js} +7 -7
- package/dist/{events-LKEZ3YCW.js → events-BDXQOC7F.js} +6 -6
- package/dist/{folding-JN2WT44N.js → folding-2HW7FIKL.js} +2 -2
- package/dist/{inspect-proxy-Y4MRAVB7.js → inspect-proxy-Y75AXMRX.js} +3 -3
- package/dist/{manager-HM2J5VMW.js → manager-W7N3XQ4Q.js} +3 -3
- package/dist/orchestrator-KCHEENHK.js +43 -0
- package/dist/package.json +19 -3
- package/dist/{paths-ZRI56O63.js → paths-X46PPOI2.js} +2 -2
- package/dist/{processor-23O4HPSS.js → processor-6TS37IYH.js} +15 -11
- package/dist/{project-creator-LASKNQPA.js → project-creator-VD7MLOWE.js} +8 -5
- package/dist/{projects-HEUOWNSR.js → projects-XLMSDFTQ.js} +4 -4
- package/dist/{protocol-5AWNGFLH.js → protocol-4CTV7OZC.js} +3 -3
- package/dist/{protocol-DRBnujwe.d.ts → protocol-4xbfAlGO.d.ts} +3 -0
- package/dist/{provider-AKN355YH.js → provider-ESEBV3LL.js} +15 -11
- package/dist/{pwa-GHQCMCIU.js → pwa-76XP2DY2.js} +2 -2
- package/dist/{runtime-config-ZCK74XKM.js → runtime-config-CBJJJGBD.js} +2 -2
- package/dist/{serve-TW63YCNQ.js → serve-OLDABBV3.js} +29 -27
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.js +22 -22
- package/dist/server/public/__inspect__.js +2 -1
- package/dist/{service-74Z7JK2J.js → service-D6LC3CAM.js} +3 -2
- package/dist/{settings-NI4ITGV6.js → settings-TQNQB56H.js} +4 -4
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/{store-2IF3ZSLD.js → store-OQ45KONN.js} +2 -2
- package/dist/{tools-RUAY6EVI.js → tools-BHYHS3RY.js} +18 -18
- package/dist/{vision-fallback-AXH3BGJC.js → vision-fallback-ED27LH6C.js} +3 -3
- package/dist/web/assets/{index-CWdKiSP8.js → index-DAuZ02-Q.js} +57 -57
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +19 -3
- package/dist/auto-compaction-OW4P2QWQ.js +0 -27
- package/dist/orchestrator-QP4O7MUM.js +0 -43
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeImageFromDataUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BSTVRSV6.js";
|
|
4
4
|
import {
|
|
5
5
|
logger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K44MW7JJ.js";
|
|
7
7
|
|
|
8
8
|
// src/server/llm/backend.ts
|
|
9
9
|
var BACKEND_CAPABILITIES = {
|
|
@@ -403,6 +403,19 @@ function convertToolCalls(toolCalls) {
|
|
|
403
403
|
}
|
|
404
404
|
}));
|
|
405
405
|
}
|
|
406
|
+
function buildAssistantMessage(msg) {
|
|
407
|
+
const result = {
|
|
408
|
+
role: "assistant",
|
|
409
|
+
content: msg.content || null
|
|
410
|
+
};
|
|
411
|
+
if (msg.toolCalls?.length) {
|
|
412
|
+
result["tool_calls"] = convertToolCalls(msg.toolCalls);
|
|
413
|
+
}
|
|
414
|
+
if (msg.thinkingContent) {
|
|
415
|
+
result["reasoning_content"] = msg.thinkingContent;
|
|
416
|
+
}
|
|
417
|
+
return result;
|
|
418
|
+
}
|
|
406
419
|
function convertAttachmentSync(attachment, modelSupportsVision) {
|
|
407
420
|
if (modelSupportsVision) {
|
|
408
421
|
return {
|
|
@@ -423,7 +436,11 @@ function createAttachmentForConversion(data, filename, id) {
|
|
|
423
436
|
};
|
|
424
437
|
}
|
|
425
438
|
async function convertAttachmentWithFallback(attachment, options) {
|
|
426
|
-
logger.debug("[VisionFallback] convertAttachmentWithFallback called", {
|
|
439
|
+
logger.debug("[VisionFallback] convertAttachmentWithFallback called", {
|
|
440
|
+
filename: attachment.filename,
|
|
441
|
+
id: attachment.id,
|
|
442
|
+
hasCallbacks: !!options.onVisionFallbackStart
|
|
443
|
+
});
|
|
427
444
|
if (options.modelSupportsVision) {
|
|
428
445
|
logger.debug("[VisionFallback] Model supports vision - passing image directly");
|
|
429
446
|
return {
|
|
@@ -485,12 +502,8 @@ function convertMessages(messages, options) {
|
|
|
485
502
|
tool_call_id: msg.toolCallId
|
|
486
503
|
};
|
|
487
504
|
}
|
|
488
|
-
if (msg.role === "assistant"
|
|
489
|
-
return
|
|
490
|
-
role: "assistant",
|
|
491
|
-
content: msg.content || null,
|
|
492
|
-
tool_calls: convertToolCalls(msg.toolCalls)
|
|
493
|
-
};
|
|
505
|
+
if (msg.role === "assistant") {
|
|
506
|
+
return buildAssistantMessage(msg);
|
|
494
507
|
}
|
|
495
508
|
if (msg.role === "user" && msg.attachments && msg.attachments.length > 0) {
|
|
496
509
|
const content = buildAttachmentContent(msg.content, msg.attachments, options.modelSupportsVision);
|
|
@@ -529,12 +542,8 @@ async function convertMessagesWithFallback(messages, options) {
|
|
|
529
542
|
}
|
|
530
543
|
continue;
|
|
531
544
|
}
|
|
532
|
-
if (msg.role === "assistant"
|
|
533
|
-
converted.push(
|
|
534
|
-
role: "assistant",
|
|
535
|
-
content: msg.content || null,
|
|
536
|
-
tool_calls: convertToolCalls(msg.toolCalls)
|
|
537
|
-
});
|
|
545
|
+
if (msg.role === "assistant") {
|
|
546
|
+
converted.push(buildAssistantMessage(msg));
|
|
538
547
|
continue;
|
|
539
548
|
}
|
|
540
549
|
if (msg.role === "user" && msg.attachments && msg.attachments.length > 0) {
|
|
@@ -614,8 +623,27 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
|
|
|
614
623
|
return { params, modelParams };
|
|
615
624
|
}
|
|
616
625
|
async function buildCreateParamsFromInput(input, isStreaming) {
|
|
617
|
-
const {
|
|
618
|
-
|
|
626
|
+
const {
|
|
627
|
+
model,
|
|
628
|
+
request,
|
|
629
|
+
profile,
|
|
630
|
+
capabilities,
|
|
631
|
+
disableThinking,
|
|
632
|
+
visionFallbackEnabled = false,
|
|
633
|
+
onVisionFallbackStart,
|
|
634
|
+
onVisionFallbackDone
|
|
635
|
+
} = input;
|
|
636
|
+
return buildChatCompletionCreateParams(
|
|
637
|
+
model,
|
|
638
|
+
request,
|
|
639
|
+
profile,
|
|
640
|
+
capabilities,
|
|
641
|
+
!!disableThinking,
|
|
642
|
+
visionFallbackEnabled,
|
|
643
|
+
isStreaming,
|
|
644
|
+
onVisionFallbackStart,
|
|
645
|
+
onVisionFallbackDone
|
|
646
|
+
);
|
|
619
647
|
}
|
|
620
648
|
var buildNonStreamingCreateParams = (input) => buildCreateParamsFromInput(input, false);
|
|
621
649
|
var buildStreamingCreateParams = (input) => buildCreateParamsFromInput(input, true);
|
|
@@ -773,4 +801,4 @@ export {
|
|
|
773
801
|
extractThinking,
|
|
774
802
|
streamWithSegments
|
|
775
803
|
};
|
|
776
|
-
//# sourceMappingURL=chunk-
|
|
804
|
+
//# sourceMappingURL=chunk-CUDAT6SS.js.map
|