@jeffusion/bungee-core 6.4.1 → 6.5.1
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/config-storage-worker.js +1206 -989
- package/dist/main.js +6258 -6204
- package/dist/plugins/chatgpt-oauth/index.js +7 -18
- package/dist/plugins/chatgpt-oauth/index.js.map +4 -4
- package/dist/plugins/chatgpt-oauth/ui/AccountsPage.svelte +13 -9
- package/dist/plugins/codex-router/index.js +2 -3
- package/dist/plugins/codex-router/index.js.map +3 -3
- package/dist/plugins/llm-protocol-adapter/control.js +45 -30
- package/dist/plugins/llm-protocol-adapter/control.js.map +4 -4
- package/dist/plugins/llm-protocol-adapter/index.js +53 -31
- package/dist/plugins/llm-protocol-adapter/index.js.map +6 -6
- package/package.json +2 -2
|
@@ -77,6 +77,8 @@
|
|
|
77
77
|
let routeChoice = $state('new'), routesLoading = $state(false), routeError = $state('');
|
|
78
78
|
let routeGeneration = 0;
|
|
79
79
|
let selectedRoute = $derived(routes.find(route => route.path === routeChoice));
|
|
80
|
+
let referencedRouteServices = $derived((selectedRoute?.service_references ?? []).map(reference => ({id:reference.service_id,
|
|
81
|
+
service:services.find(service => service._uid === reference.service_id)})));
|
|
80
82
|
let routeSelection = $derived($isLoading ? undefined : { value: routeChoice, label: routeChoice === 'new' ? t('ui.newRoute') : selectedRoute?.path ?? routeChoice });
|
|
81
83
|
let resetOpen = $state(false), resetAccount = $state<Account | null>(null), resetCredit = $state<Credit | null>(null);
|
|
82
84
|
let resetRequestId = $state(''), resetBusy = $state(false), resetNotice = $state('');
|
|
@@ -395,7 +397,7 @@
|
|
|
395
397
|
async function loadRoutes() {
|
|
396
398
|
const generation = ++routeGeneration;
|
|
397
399
|
routesLoading = true; routeError = '';
|
|
398
|
-
try { const loaded = await RoutesAPI.list(); if (generation === routeGeneration) routes = loaded; }
|
|
400
|
+
try { const [loaded,loadedServices] = await Promise.all([RoutesAPI.list(),ServicesAPI.list()]); if (generation === routeGeneration) { routes = loaded; services = loadedServices; } }
|
|
399
401
|
catch { if (generation === routeGeneration) routeError = 'ui.routesFailed'; }
|
|
400
402
|
finally { if (generation === routeGeneration) routesLoading = false; }
|
|
401
403
|
}
|
|
@@ -405,7 +407,7 @@
|
|
|
405
407
|
routeAccount = account; routeChoice = 'new'; routes = []; routeOpen = true; void loadRoutes();
|
|
406
408
|
}
|
|
407
409
|
async function continueToRoute() {
|
|
408
|
-
if (!routeAccount?.available || routesLoading || routeError || selectedRoute?.
|
|
410
|
+
if (!routeAccount?.available || routesLoading || routeError || selectedRoute?.service_references?.length) return;
|
|
409
411
|
if (routeChoice !== 'new' && !selectedRoute?._uid) { routeError = 'ui.routeMissing'; return; }
|
|
410
412
|
const handoff = { sourcePlugin: pluginName, sourceId: accountSourceId(routeAccount), accountRef: routeAccount.id,
|
|
411
413
|
mode: selectedRoute ? 'existing' as const : 'new' as const,
|
|
@@ -415,12 +417,12 @@
|
|
|
415
417
|
if (lifetime.signal.aborted) return;
|
|
416
418
|
void push(routeSourceHandoffUrl(handoff, selectedRoute?.path));
|
|
417
419
|
}
|
|
418
|
-
async function editReferencedService() {
|
|
419
|
-
const service =
|
|
420
|
+
async function editReferencedService(serviceId:string) {
|
|
421
|
+
const service = services.find(service => service._uid === serviceId);
|
|
420
422
|
if (!service) return;
|
|
421
423
|
routeOpen = false;
|
|
422
424
|
await tick();
|
|
423
|
-
if (!lifetime.signal.aborted) void push(`/services/edit/${encodeURIComponent(service)}`);
|
|
425
|
+
if (!lifetime.signal.aborted) void push(`/services/edit/${encodeURIComponent(service.name)}`);
|
|
424
426
|
}
|
|
425
427
|
function invalidatePolling() { pollGeneration += 1; clearTimeout(timer); timer = undefined; }
|
|
426
428
|
function clearSession() { invalidatePolling(); clearSecrets(); session = null; status = ''; }
|
|
@@ -602,16 +604,18 @@
|
|
|
602
604
|
</Select.Root>
|
|
603
605
|
</div>
|
|
604
606
|
{#if routesLoading}<p role="status" class="text-sm text-zinc-400">{t('ui.routesLoading')}</p>{/if}
|
|
605
|
-
{#if
|
|
607
|
+
{#if referencedRouteServices.length}
|
|
606
608
|
<div role="alert" class="border-l-2 border-amber-500 bg-amber-500/5 px-3 py-2 text-sm text-amber-300 space-y-2">
|
|
607
|
-
<p>{t('ui.routeUsesService', { name:
|
|
608
|
-
|
|
609
|
+
<p>{t('ui.routeUsesService', { name: referencedRouteServices.map(reference => reference.service?.name ?? reference.id).join(', ') })}</p>
|
|
610
|
+
{#each referencedRouteServices as reference (reference.id)}
|
|
611
|
+
<Button variant="outline" size="sm" disabled={!reference.service} onclick={() => editReferencedService(reference.id)}>{@render actionIcon(Server)}{t('ui.editReferencedService')} · {reference.service?.name ?? reference.id}</Button>
|
|
612
|
+
{/each}
|
|
609
613
|
</div>
|
|
610
614
|
{:else}<p class="text-sm text-zinc-400">{t('ui.routeHelp')}</p>{/if}
|
|
611
615
|
{#if routeError}<p role="alert" class="text-sm text-red-300">{t(routeError)}</p><Button variant="outline" disabled={routesLoading} aria-busy={routesLoading} onclick={loadRoutes}>{@render actionIcon(RefreshCw, routesLoading)}{t('ui.reloadRoutes')}</Button>{/if}
|
|
612
616
|
{/snippet}
|
|
613
617
|
{#snippet footer()}
|
|
614
|
-
<Button disabled={routesLoading || !!routeError || !!selectedRoute?.
|
|
618
|
+
<Button disabled={routesLoading || !!routeError || !!selectedRoute?.service_references?.length} aria-busy={routesLoading} onclick={continueToRoute}>{@render actionIcon(ArrowRight, routesLoading)}{t('ui.continueRoute')}</Button>
|
|
615
619
|
{/snippet}
|
|
616
620
|
</IndustrialDialog>
|
|
617
621
|
|
|
@@ -3505,7 +3505,6 @@ function mergeCatalog(native, bindings, catalog) {
|
|
|
3505
3505
|
}
|
|
3506
3506
|
const overrides = binding.capabilityOverrides;
|
|
3507
3507
|
const context = Math.min(info.contextWindow, overrides?.contextWindow ?? info.contextWindow);
|
|
3508
|
-
const reasoning = info.reasoning && overrides?.reasoning !== false;
|
|
3509
3508
|
const model = {
|
|
3510
3509
|
...model_template_0_160_1_default,
|
|
3511
3510
|
slug: id,
|
|
@@ -3517,7 +3516,7 @@ function mergeCatalog(native, bindings, catalog) {
|
|
|
3517
3516
|
input_modalities: ["text", ...info.inputModalities.includes("image") && overrides?.images !== false ? ["image"] : []],
|
|
3518
3517
|
supported_reasoning_levels: info.supportedEfforts.map((effort) => ({ effort, description: effort })),
|
|
3519
3518
|
supports_reasoning_effort_updates: info.supportedEfforts.length > 0,
|
|
3520
|
-
default_reasoning_level: info.defaultEffort
|
|
3519
|
+
default_reasoning_level: info.defaultEffort,
|
|
3521
3520
|
support_verbosity: false
|
|
3522
3521
|
};
|
|
3523
3522
|
if (replace)
|
|
@@ -3840,4 +3839,4 @@ export {
|
|
|
3840
3839
|
server_default as default
|
|
3841
3840
|
};
|
|
3842
3841
|
|
|
3843
|
-
//# debugId=
|
|
3842
|
+
//# debugId=4746A700856A37E564756E2164756E21
|