@circuitwall/jarela 2.2.0 → 2.2.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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -2
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +61 -20
- package/.next/standalone/.next/server/app/api/v1/models/route.js +5 -3
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +27 -24
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page.js +313 -251
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -2
- package/.next/standalone/.next/server/chunks/2471.js +17 -17
- package/.next/standalone/.next/server/chunks/2563.js +24 -50
- package/.next/standalone/.next/server/chunks/3399.js +10695 -10695
- package/.next/standalone/.next/server/chunks/3524.js +5 -33
- package/.next/standalone/.next/server/chunks/424.js +10 -5
- package/.next/standalone/.next/server/chunks/4508.js +2 -2
- package/.next/standalone/.next/server/chunks/46.js +111 -46
- package/.next/standalone/.next/server/chunks/466.js +88 -13
- package/.next/standalone/.next/server/chunks/6649.js +1 -1
- package/.next/standalone/.next/server/chunks/9590.js +108 -46
- package/.next/standalone/.next/server/chunks/9640.js +3 -6
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +104 -45
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{1395-f201e3e2e1f57715.js → 1395-a340fb0a345382a4.js} +89 -14
- package/.next/standalone/.next/static/chunks/{4576-13f7546a145a3624.js → 7045-8bc2f14e430ca661.js} +58 -2
- package/.next/standalone/.next/static/chunks/app/{page-c6e972a7fd13dae8.js → page-7017f07f8a7a083c.js} +170 -151
- package/.next/standalone/package.json +1 -1
- package/CHANGELOG.md +8 -0
- package/api/client.models.test.ts +31 -0
- package/api/client.ts +16 -1
- package/api/types.ts +8 -0
- package/app/api/v1/models/[name]/route.test.ts +89 -0
- package/app/api/v1/models/[name]/route.ts +54 -3
- package/app/api/v1/models/route.ts +4 -2
- package/app/api/v1/providers/[provider]/models/route.test.ts +53 -0
- package/app/api/v1/providers/[provider]/models/route.ts +27 -16
- package/components/agents/agent-editor/AdvancedSection.tsx +8 -2
- package/components/agents/agent-editor/ModelSection.tsx +6 -3
- package/components/models/ModelEditor.tsx +1 -1
- package/components/models/ModelsPanel.tsx +34 -8
- package/components/models/model-editor/GitHubCopilotAuth.tsx +1 -1
- package/components/models/model-editor/save-helpers.ts +2 -2
- package/components/models/model-editor/useModelEditorForm.ts +1 -1
- package/components/models/model-editor/useModelSaveHandlers.ts +1 -1
- package/components/setup/wizard/StepCredentials.tsx +1 -1
- package/components/setup/wizard/StepModel.tsx +3 -8
- package/hooks/useModels.ts +17 -1
- package/lib/agents/effective-model.test.ts +45 -0
- package/lib/agents/effective-model.ts +11 -5
- package/lib/agents/llm.ts +2 -2
- package/lib/agents/run-thread.ts +10 -5
- package/lib/agents/warm-summary-background.test.ts +1 -2
- package/lib/agents/warm-summary-background.ts +4 -7
- package/lib/db/migrations.ts +10 -0
- package/lib/health/probes.test.ts +8 -11
- package/lib/health/probes.ts +5 -31
- package/lib/models/editor-payload.ts +1 -1
- package/lib/providers/github-copilot-auth.ts +2 -3
- package/lib/providers/github-copilot.test.ts +27 -0
- package/lib/providers/github-copilot.ts +21 -44
- package/lib/stores/integrations.test.ts +7 -0
- package/lib/stores/integrations.ts +4 -4
- package/lib/stores/model-config.test.ts +88 -0
- package/lib/stores/model-config.ts +90 -8
- package/package.json +1 -1
- /package/.next/standalone/.next/static/{e2NV1wk6mWg3SIeELXevg → NUrC9xax1sp1Q70nlFqS6}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{e2NV1wk6mWg3SIeELXevg → NUrC9xax1sp1Q70nlFqS6}/_ssgManifest.js +0 -0
|
@@ -3042,7 +3042,7 @@ module.exports = require("node:http");
|
|
|
3042
3042
|
/***/ 38084:
|
|
3043
3043
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
3044
3044
|
|
|
3045
|
-
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
3045
|
+
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 74403));
|
|
3046
3046
|
;
|
|
3047
3047
|
Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 26751));
|
|
3048
3048
|
|
|
@@ -3306,207 +3306,7 @@ module.exports = require("node:url");
|
|
|
3306
3306
|
|
|
3307
3307
|
/***/ }),
|
|
3308
3308
|
|
|
3309
|
-
/***/
|
|
3310
|
-
/***/ ((module, exports, __webpack_require__) => {
|
|
3311
|
-
|
|
3312
|
-
"use strict";
|
|
3313
|
-
|
|
3314
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
3315
|
-
value: true
|
|
3316
|
-
}));
|
|
3317
|
-
Object.defineProperty(exports, "addBasePath", ({
|
|
3318
|
-
enumerable: true,
|
|
3319
|
-
get: function() {
|
|
3320
|
-
return addBasePath;
|
|
3321
|
-
}
|
|
3322
|
-
}));
|
|
3323
|
-
const _addpathprefix = __webpack_require__(71000);
|
|
3324
|
-
const _normalizetrailingslash = __webpack_require__(34956);
|
|
3325
|
-
const basePath = false || '';
|
|
3326
|
-
function addBasePath(path, required) {
|
|
3327
|
-
return (0, _normalizetrailingslash.normalizePathTrailingSlash)( false ? 0 : (0, _addpathprefix.addPathPrefix)(path, basePath));
|
|
3328
|
-
}
|
|
3329
|
-
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
|
|
3330
|
-
Object.defineProperty(exports.default, '__esModule', {
|
|
3331
|
-
value: true
|
|
3332
|
-
});
|
|
3333
|
-
Object.assign(exports.default, exports);
|
|
3334
|
-
module.exports = exports.default;
|
|
3335
|
-
} //# sourceMappingURL=add-base-path.js.map
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
/***/ }),
|
|
3339
|
-
|
|
3340
|
-
/***/ 75919:
|
|
3341
|
-
/***/ ((module) => {
|
|
3342
|
-
|
|
3343
|
-
"use strict";
|
|
3344
|
-
module.exports = require("node:worker_threads");
|
|
3345
|
-
|
|
3346
|
-
/***/ }),
|
|
3347
|
-
|
|
3348
|
-
/***/ 76760:
|
|
3349
|
-
/***/ ((module) => {
|
|
3350
|
-
|
|
3351
|
-
"use strict";
|
|
3352
|
-
module.exports = require("node:path");
|
|
3353
|
-
|
|
3354
|
-
/***/ }),
|
|
3355
|
-
|
|
3356
|
-
/***/ 77598:
|
|
3357
|
-
/***/ ((module) => {
|
|
3358
|
-
|
|
3359
|
-
"use strict";
|
|
3360
|
-
module.exports = require("node:crypto");
|
|
3361
|
-
|
|
3362
|
-
/***/ }),
|
|
3363
|
-
|
|
3364
|
-
/***/ 79428:
|
|
3365
|
-
/***/ ((module) => {
|
|
3366
|
-
|
|
3367
|
-
"use strict";
|
|
3368
|
-
module.exports = require("buffer");
|
|
3369
|
-
|
|
3370
|
-
/***/ }),
|
|
3371
|
-
|
|
3372
|
-
/***/ 79925:
|
|
3373
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
3374
|
-
|
|
3375
|
-
"use strict";
|
|
3376
|
-
// Format function modified from nodejs
|
|
3377
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
3378
|
-
//
|
|
3379
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
3380
|
-
// copy of this software and associated documentation files (the
|
|
3381
|
-
// "Software"), to deal in the Software without restriction, including
|
|
3382
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
3383
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
3384
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
3385
|
-
// following conditions:
|
|
3386
|
-
//
|
|
3387
|
-
// The above copyright notice and this permission notice shall be included
|
|
3388
|
-
// in all copies or substantial portions of the Software.
|
|
3389
|
-
//
|
|
3390
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
3391
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
3392
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
3393
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
3394
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
3395
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
3396
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3397
|
-
|
|
3398
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
3399
|
-
value: true
|
|
3400
|
-
}));
|
|
3401
|
-
0 && (0);
|
|
3402
|
-
function _export(target, all) {
|
|
3403
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
3404
|
-
enumerable: true,
|
|
3405
|
-
get: all[name]
|
|
3406
|
-
});
|
|
3407
|
-
}
|
|
3408
|
-
_export(exports, {
|
|
3409
|
-
formatUrl: function() {
|
|
3410
|
-
return formatUrl;
|
|
3411
|
-
},
|
|
3412
|
-
formatWithValidation: function() {
|
|
3413
|
-
return formatWithValidation;
|
|
3414
|
-
},
|
|
3415
|
-
urlObjectKeys: function() {
|
|
3416
|
-
return urlObjectKeys;
|
|
3417
|
-
}
|
|
3418
|
-
});
|
|
3419
|
-
const _interop_require_wildcard = __webpack_require__(24814);
|
|
3420
|
-
const _querystring = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(90485));
|
|
3421
|
-
const slashedProtocols = /https?|ftp|gopher|file/;
|
|
3422
|
-
function formatUrl(urlObj) {
|
|
3423
|
-
let { auth, hostname } = urlObj;
|
|
3424
|
-
let protocol = urlObj.protocol || '';
|
|
3425
|
-
let pathname = urlObj.pathname || '';
|
|
3426
|
-
let hash = urlObj.hash || '';
|
|
3427
|
-
let query = urlObj.query || '';
|
|
3428
|
-
let host = false;
|
|
3429
|
-
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
|
|
3430
|
-
if (urlObj.host) {
|
|
3431
|
-
host = auth + urlObj.host;
|
|
3432
|
-
} else if (hostname) {
|
|
3433
|
-
host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
|
|
3434
|
-
if (urlObj.port) {
|
|
3435
|
-
host += ':' + urlObj.port;
|
|
3436
|
-
}
|
|
3437
|
-
}
|
|
3438
|
-
if (query && typeof query === 'object') {
|
|
3439
|
-
query = String(_querystring.urlQueryToSearchParams(query));
|
|
3440
|
-
}
|
|
3441
|
-
let search = urlObj.search || query && `?${query}` || '';
|
|
3442
|
-
if (protocol && !protocol.endsWith(':')) protocol += ':';
|
|
3443
|
-
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
|
|
3444
|
-
host = '//' + (host || '');
|
|
3445
|
-
if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
|
|
3446
|
-
} else if (!host) {
|
|
3447
|
-
host = '';
|
|
3448
|
-
}
|
|
3449
|
-
if (hash && hash[0] !== '#') hash = '#' + hash;
|
|
3450
|
-
if (search && search[0] !== '?') search = '?' + search;
|
|
3451
|
-
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
|
|
3452
|
-
search = search.replace('#', '%23');
|
|
3453
|
-
return `${protocol}${host}${pathname}${search}${hash}`;
|
|
3454
|
-
}
|
|
3455
|
-
const urlObjectKeys = [
|
|
3456
|
-
'auth',
|
|
3457
|
-
'hash',
|
|
3458
|
-
'host',
|
|
3459
|
-
'hostname',
|
|
3460
|
-
'href',
|
|
3461
|
-
'path',
|
|
3462
|
-
'pathname',
|
|
3463
|
-
'port',
|
|
3464
|
-
'protocol',
|
|
3465
|
-
'query',
|
|
3466
|
-
'search',
|
|
3467
|
-
'slashes'
|
|
3468
|
-
];
|
|
3469
|
-
function formatWithValidation(url) {
|
|
3470
|
-
if (false) {}
|
|
3471
|
-
return formatUrl(url);
|
|
3472
|
-
} //# sourceMappingURL=format-url.js.map
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
/***/ }),
|
|
3476
|
-
|
|
3477
|
-
/***/ 80099:
|
|
3478
|
-
/***/ ((module) => {
|
|
3479
|
-
|
|
3480
|
-
"use strict";
|
|
3481
|
-
module.exports = require("node:sqlite");
|
|
3482
|
-
|
|
3483
|
-
/***/ }),
|
|
3484
|
-
|
|
3485
|
-
/***/ 80481:
|
|
3486
|
-
/***/ ((module) => {
|
|
3487
|
-
|
|
3488
|
-
"use strict";
|
|
3489
|
-
module.exports = require("node:readline");
|
|
3490
|
-
|
|
3491
|
-
/***/ }),
|
|
3492
|
-
|
|
3493
|
-
/***/ 81630:
|
|
3494
|
-
/***/ ((module) => {
|
|
3495
|
-
|
|
3496
|
-
"use strict";
|
|
3497
|
-
module.exports = require("http");
|
|
3498
|
-
|
|
3499
|
-
/***/ }),
|
|
3500
|
-
|
|
3501
|
-
/***/ 94735:
|
|
3502
|
-
/***/ ((module) => {
|
|
3503
|
-
|
|
3504
|
-
"use strict";
|
|
3505
|
-
module.exports = require("events");
|
|
3506
|
-
|
|
3507
|
-
/***/ }),
|
|
3508
|
-
|
|
3509
|
-
/***/ 96190:
|
|
3309
|
+
/***/ 74403:
|
|
3510
3310
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3511
3311
|
|
|
3512
3312
|
"use strict";
|
|
@@ -4256,40 +4056,8 @@ function useUrlSync() {
|
|
|
4256
4056
|
};
|
|
4257
4057
|
}
|
|
4258
4058
|
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
* Resolve which `ModelConfig` will actually be used for an agent at runtime.
|
|
4262
|
-
*
|
|
4263
|
-
* Mirrors what `lib/agents/llm.ts` does server-side: when an agent has
|
|
4264
|
-
* `model_config_name` set, that wins; otherwise the workspace-wide default
|
|
4265
|
-
* model is used. Both client (BridgeEditor, AgentEditor capability hints)
|
|
4266
|
-
* and server need the same logic — this is the single source of truth.
|
|
4267
|
-
*
|
|
4268
|
-
* Returns `null` only when neither the requested config nor the default
|
|
4269
|
-
* exists in the provided list (typically: no models configured yet).
|
|
4270
|
-
*/ function resolveAgentModel(agent, models) {
|
|
4271
|
-
const defaultModel = models.find((m)=>m.is_default) ?? models[0] ?? null;
|
|
4272
|
-
if (!agent?.model_config_name) return defaultModel;
|
|
4273
|
-
return models.find((m)=>m.name === agent.model_config_name) ?? defaultModel;
|
|
4274
|
-
}
|
|
4275
|
-
/**
|
|
4276
|
-
* Diagnose whether an agent has a runnable model RIGHT NOW. Used by the
|
|
4277
|
-
* Scheduled Tasks and Watchers panels to surface model-availability issues
|
|
4278
|
-
* before an unattended run silently no-ops with `no_model`.
|
|
4279
|
-
*/ function agentModelStatus(agent, models) {
|
|
4280
|
-
if (!agent) return {
|
|
4281
|
-
state: "no-agent"
|
|
4282
|
-
};
|
|
4283
|
-
const effectiveModel = resolveAgentModel(agent, models);
|
|
4284
|
-
if (effectiveModel) return {
|
|
4285
|
-
state: "ok",
|
|
4286
|
-
model: effectiveModel
|
|
4287
|
-
};
|
|
4288
|
-
return {
|
|
4289
|
-
state: "no-model"
|
|
4290
|
-
};
|
|
4291
|
-
}
|
|
4292
|
-
|
|
4059
|
+
// EXTERNAL MODULE: ./lib/agents/effective-model.ts
|
|
4060
|
+
var effective_model = __webpack_require__(3872);
|
|
4293
4061
|
;// ./hooks/useConfigurationIssues.ts
|
|
4294
4062
|
/* __next_internal_client_entry_do_not_use__ useConfigurationIssues auto */
|
|
4295
4063
|
|
|
@@ -4345,7 +4113,7 @@ function useUrlSync() {
|
|
|
4345
4113
|
pushIssue("no-default-model", "info", "No default model set", "Agents without an explicit model will fail. Pick one default.", "?tab=models", "Open Models →");
|
|
4346
4114
|
}
|
|
4347
4115
|
for (const a of agents){
|
|
4348
|
-
const status = agentModelStatus(a, models);
|
|
4116
|
+
const status = (0,effective_model/* agentModelStatus */.xu)(a, models);
|
|
4349
4117
|
if (status.state === "no-model") {
|
|
4350
4118
|
pushIssue(`agent-no-model:${a.id}`, "error", `Agent "${a.name}" has no model`, "Pick a model or set a workspace default.", `?tab=agents&item=${encodeURIComponent(a.id)}`, "Fix in Agents →");
|
|
4351
4119
|
}
|
|
@@ -53618,6 +53386,51 @@ const ArrowUpRight = (0,createLucideIcon/* default */.A)(arrow_up_right_iconData
|
|
|
53618
53386
|
|
|
53619
53387
|
// EXTERNAL MODULE: ./node_modules/lucide-react/dist/esm/icons/star.mjs
|
|
53620
53388
|
var star = __webpack_require__(53053);
|
|
53389
|
+
;// ./node_modules/lucide-react/dist/esm/icons/power-off.mjs
|
|
53390
|
+
/**
|
|
53391
|
+
* @license lucide-react v1.47.0 - ISC
|
|
53392
|
+
*
|
|
53393
|
+
* This source code is licensed under the ISC license.
|
|
53394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53395
|
+
*/
|
|
53396
|
+
const power_off_iconData = {
|
|
53397
|
+
name: "power-off",
|
|
53398
|
+
size: 24,
|
|
53399
|
+
node: [
|
|
53400
|
+
[
|
|
53401
|
+
"path",
|
|
53402
|
+
{
|
|
53403
|
+
d: "M18.36 6.64A9 9 0 0 1 20.77 15",
|
|
53404
|
+
key: "dxknvb"
|
|
53405
|
+
}
|
|
53406
|
+
],
|
|
53407
|
+
[
|
|
53408
|
+
"path",
|
|
53409
|
+
{
|
|
53410
|
+
d: "M6.16 6.16a9 9 0 1 0 12.68 12.68",
|
|
53411
|
+
key: "1x7qb5"
|
|
53412
|
+
}
|
|
53413
|
+
],
|
|
53414
|
+
[
|
|
53415
|
+
"path",
|
|
53416
|
+
{
|
|
53417
|
+
d: "M12 2v4",
|
|
53418
|
+
key: "3427ic"
|
|
53419
|
+
}
|
|
53420
|
+
],
|
|
53421
|
+
[
|
|
53422
|
+
"path",
|
|
53423
|
+
{
|
|
53424
|
+
d: "m2 2 20 20",
|
|
53425
|
+
key: "1ooewy"
|
|
53426
|
+
}
|
|
53427
|
+
]
|
|
53428
|
+
]
|
|
53429
|
+
};
|
|
53430
|
+
power_off_iconData.node;
|
|
53431
|
+
const PowerOff = (0,createLucideIcon/* default */.A)(power_off_iconData);
|
|
53432
|
+
//# sourceMappingURL=power-off.mjs.map
|
|
53433
|
+
|
|
53621
53434
|
// EXTERNAL MODULE: ./node_modules/lucide-react/dist/esm/icons/trash.mjs
|
|
53622
53435
|
var trash = __webpack_require__(61422);
|
|
53623
53436
|
;// ./components/ui/PanelHeader.tsx
|
|
@@ -53699,6 +53512,24 @@ function useModels() {
|
|
|
53699
53512
|
}, [
|
|
53700
53513
|
refreshModels
|
|
53701
53514
|
]);
|
|
53515
|
+
const setDefault = (0,react.useCallback)(async (name)=>{
|
|
53516
|
+
const m = await client/* api */.FH.models.patch(name, {
|
|
53517
|
+
is_default: true
|
|
53518
|
+
});
|
|
53519
|
+
await refreshModels();
|
|
53520
|
+
return m;
|
|
53521
|
+
}, [
|
|
53522
|
+
refreshModels
|
|
53523
|
+
]);
|
|
53524
|
+
const setEnabled = (0,react.useCallback)(async (name, enabled)=>{
|
|
53525
|
+
const m = await client/* api */.FH.models.patch(name, {
|
|
53526
|
+
enabled
|
|
53527
|
+
});
|
|
53528
|
+
await refreshModels();
|
|
53529
|
+
return m;
|
|
53530
|
+
}, [
|
|
53531
|
+
refreshModels
|
|
53532
|
+
]);
|
|
53702
53533
|
const remove = (0,react.useCallback)(async (name)=>{
|
|
53703
53534
|
await client/* api */.FH.models.delete(name);
|
|
53704
53535
|
await refreshModels();
|
|
@@ -53736,6 +53567,8 @@ function useModels() {
|
|
|
53736
53567
|
refresh,
|
|
53737
53568
|
create,
|
|
53738
53569
|
update,
|
|
53570
|
+
setDefault,
|
|
53571
|
+
setEnabled,
|
|
53739
53572
|
remove,
|
|
53740
53573
|
assign,
|
|
53741
53574
|
unassign
|
|
@@ -53750,6 +53583,8 @@ function useModels() {
|
|
|
53750
53583
|
refresh,
|
|
53751
53584
|
create,
|
|
53752
53585
|
update,
|
|
53586
|
+
setDefault,
|
|
53587
|
+
setEnabled,
|
|
53753
53588
|
remove,
|
|
53754
53589
|
assign,
|
|
53755
53590
|
unassign
|
|
@@ -54260,7 +54095,7 @@ const PROVIDER_COLORS = {
|
|
|
54260
54095
|
"github-copilot": "bg-purple-900/40 text-purple-300 border-purple-700"
|
|
54261
54096
|
};
|
|
54262
54097
|
function ModelsPanel() {
|
|
54263
|
-
const { models, assignments, loading, create, update, remove, refresh } = useModels();
|
|
54098
|
+
const { models, assignments, loading, create, update, setDefault, setEnabled, remove, refresh } = useModels();
|
|
54264
54099
|
const { agents, loading: agentsLoading } = useAgents();
|
|
54265
54100
|
const strategyOverrides = agents.filter((agent)=>agent.usage_strategy != null);
|
|
54266
54101
|
const [editing, setEditing] = (0,react.useState)(null);
|
|
@@ -54308,12 +54143,20 @@ function ModelsPanel() {
|
|
|
54308
54143
|
refresh();
|
|
54309
54144
|
}
|
|
54310
54145
|
async function handleSetDefault(m) {
|
|
54311
|
-
|
|
54312
|
-
|
|
54313
|
-
|
|
54314
|
-
|
|
54315
|
-
|
|
54316
|
-
}
|
|
54146
|
+
setDeleteError(null);
|
|
54147
|
+
try {
|
|
54148
|
+
await setDefault(m.name);
|
|
54149
|
+
} catch (e) {
|
|
54150
|
+
setDeleteError(`Could not set "${m.name}" as default: ${(0,utils_error/* errorMessage */.g)(e)}`);
|
|
54151
|
+
}
|
|
54152
|
+
}
|
|
54153
|
+
async function handleToggleEnabled(m) {
|
|
54154
|
+
setDeleteError(null);
|
|
54155
|
+
try {
|
|
54156
|
+
await setEnabled(m.name, !m.enabled);
|
|
54157
|
+
} catch (e) {
|
|
54158
|
+
setDeleteError(`Could not ${m.enabled ? "disable" : "enable"} "${m.name}": ${(0,utils_error/* errorMessage */.g)(e)}`);
|
|
54159
|
+
}
|
|
54317
54160
|
}
|
|
54318
54161
|
async function handleRemove(name) {
|
|
54319
54162
|
const affectedAgents = assignments.filter((assignment)=>assignment.model_config_name === name).map((assignment)=>agents.find((agent)=>agent.id === assignment.agent_id)?.name ?? assignment.agent_id);
|
|
@@ -54589,7 +54432,7 @@ function ModelsPanel() {
|
|
|
54589
54432
|
return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
54590
54433
|
"data-deep-link-id": m.name,
|
|
54591
54434
|
onClick: ()=>setEditing(m),
|
|
54592
|
-
className:
|
|
54435
|
+
className: `flex items-center gap-3 py-2.5 border-b border-border/60 group cursor-pointer hover:bg-surface-3/30 transition-colors ${m.enabled ? "" : "opacity-60"}`,
|
|
54593
54436
|
children: [
|
|
54594
54437
|
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", {
|
|
54595
54438
|
className: "shrink-0 text-fg-subtle",
|
|
@@ -54605,13 +54448,17 @@ function ModelsPanel() {
|
|
|
54605
54448
|
className: "flex items-center gap-2 mb-0.5",
|
|
54606
54449
|
children: [
|
|
54607
54450
|
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", {
|
|
54608
|
-
className:
|
|
54451
|
+
className: `text-sm font-medium ${m.enabled ? "text-fg" : "text-fg-subtle line-through"}`,
|
|
54609
54452
|
children: m.name
|
|
54610
54453
|
}),
|
|
54611
54454
|
m.is_default && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(star/* default */.A, {
|
|
54612
54455
|
size: 11,
|
|
54613
54456
|
className: "text-yellow-700 dark:text-yellow-400 fill-yellow-400 shrink-0"
|
|
54614
54457
|
}),
|
|
54458
|
+
!m.enabled && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", {
|
|
54459
|
+
className: "text-xs px-1.5 py-0.5 rounded border bg-surface-2 text-fg-muted border-border",
|
|
54460
|
+
children: "disabled"
|
|
54461
|
+
}),
|
|
54615
54462
|
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", {
|
|
54616
54463
|
className: `text-xs px-1.5 py-0.5 rounded border ${PROVIDER_COLORS[m.provider] ?? "bg-surface-2 text-fg-muted border-border"}`,
|
|
54617
54464
|
children: m.provider
|
|
@@ -54634,10 +54481,10 @@ function ModelsPanel() {
|
|
|
54634
54481
|
/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
54635
54482
|
className: "flex gap-1 opacity-40 group-hover:opacity-100 pointer-coarse:opacity-100 transition-opacity shrink-0",
|
|
54636
54483
|
children: [
|
|
54637
|
-
!m.is_default && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", {
|
|
54484
|
+
!m.is_default && m.enabled && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", {
|
|
54638
54485
|
onClick: (e)=>{
|
|
54639
54486
|
e.stopPropagation();
|
|
54640
|
-
handleSetDefault(m);
|
|
54487
|
+
void handleSetDefault(m);
|
|
54641
54488
|
},
|
|
54642
54489
|
className: "p-1 text-fg-subtle hover:text-yellow-700 dark:hover:text-yellow-400 transition-colors",
|
|
54643
54490
|
title: "Set as default",
|
|
@@ -54645,6 +54492,21 @@ function ModelsPanel() {
|
|
|
54645
54492
|
size: 13
|
|
54646
54493
|
})
|
|
54647
54494
|
}),
|
|
54495
|
+
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", {
|
|
54496
|
+
onClick: (e)=>{
|
|
54497
|
+
e.stopPropagation();
|
|
54498
|
+
void handleToggleEnabled(m);
|
|
54499
|
+
},
|
|
54500
|
+
className: "p-1 text-fg-subtle hover:text-fg transition-colors",
|
|
54501
|
+
title: m.enabled ? "Disable; hide from model selection" : "Enable; show in model selection",
|
|
54502
|
+
"aria-label": m.enabled ? `Disable ${m.name}` : `Enable ${m.name}`,
|
|
54503
|
+
"aria-pressed": !m.enabled,
|
|
54504
|
+
children: m.enabled ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Power, {
|
|
54505
|
+
size: 13
|
|
54506
|
+
}) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)(PowerOff, {
|
|
54507
|
+
size: 13
|
|
54508
|
+
})
|
|
54509
|
+
}),
|
|
54648
54510
|
/*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", {
|
|
54649
54511
|
onClick: (e)=>{
|
|
54650
54512
|
e.stopPropagation();
|
|
@@ -62750,7 +62612,7 @@ function RouteTable({ bridge_id, module }) {
|
|
|
62750
62612
|
client/* api */.FH.models.list().then(setModels).catch(()=>{});
|
|
62751
62613
|
}, []);
|
|
62752
62614
|
/** Vision capability of an agent (resolves via its model_config_name, with default fallback). */ function agentVisionState(a) {
|
|
62753
|
-
const cfg = resolveAgentModel(a, models);
|
|
62615
|
+
const cfg = (0,effective_model/* resolveAgentModel */.Fu)(a, models);
|
|
62754
62616
|
if (!cfg) return {
|
|
62755
62617
|
supported: false,
|
|
62756
62618
|
classified: false,
|
|
@@ -68154,7 +68016,7 @@ function WatcherCard({ watcher, agent, agents, models, onCancel, onRunNow, onCha
|
|
|
68154
68016
|
const overdue = !watcher.last_error && new Date(watcher.next_run_at).getTime() < Date.now() - 60000;
|
|
68155
68017
|
// Pre-flight model availability for the assigned agent; only relevant
|
|
68156
68018
|
// when the watcher reacts via an agent prompt (not a pure script).
|
|
68157
|
-
const modelStatus = watcher.reaction_kind === "agent_prompt" ? agentModelStatus(agent ?? null, models) : null;
|
|
68019
|
+
const modelStatus = watcher.reaction_kind === "agent_prompt" ? (0,effective_model/* agentModelStatus */.xu)(agent ?? null, models) : null;
|
|
68158
68020
|
return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
68159
68021
|
"data-deep-link-id": watcher.id,
|
|
68160
68022
|
className: "mb-2 rounded-lg border border-border bg-surface-2 overflow-hidden",
|
|
@@ -68886,7 +68748,7 @@ function TaskCard({ task, agent, agents, models, onCancel, onRunNow, onChanged }
|
|
|
68886
68748
|
collapseSeconds: true
|
|
68887
68749
|
});
|
|
68888
68750
|
const overdue = !task.last_error && new Date(task.next_run_at).getTime() < Date.now() - 60000;
|
|
68889
|
-
const modelStatus = task.reaction_kind === "agent_prompt" ? agentModelStatus(agent ?? null, models) : null;
|
|
68751
|
+
const modelStatus = task.reaction_kind === "agent_prompt" ? (0,effective_model/* agentModelStatus */.xu)(agent ?? null, models) : null;
|
|
68890
68752
|
return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", {
|
|
68891
68753
|
"data-deep-link-id": task.id,
|
|
68892
68754
|
className: "mb-2 rounded-lg border border-border bg-surface-2 overflow-hidden group",
|
|
@@ -77532,6 +77394,206 @@ function AppShell() {
|
|
|
77532
77394
|
}
|
|
77533
77395
|
|
|
77534
77396
|
|
|
77397
|
+
/***/ }),
|
|
77398
|
+
|
|
77399
|
+
/***/ 75729:
|
|
77400
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
77401
|
+
|
|
77402
|
+
"use strict";
|
|
77403
|
+
|
|
77404
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
77405
|
+
value: true
|
|
77406
|
+
}));
|
|
77407
|
+
Object.defineProperty(exports, "addBasePath", ({
|
|
77408
|
+
enumerable: true,
|
|
77409
|
+
get: function() {
|
|
77410
|
+
return addBasePath;
|
|
77411
|
+
}
|
|
77412
|
+
}));
|
|
77413
|
+
const _addpathprefix = __webpack_require__(71000);
|
|
77414
|
+
const _normalizetrailingslash = __webpack_require__(34956);
|
|
77415
|
+
const basePath = false || '';
|
|
77416
|
+
function addBasePath(path, required) {
|
|
77417
|
+
return (0, _normalizetrailingslash.normalizePathTrailingSlash)( false ? 0 : (0, _addpathprefix.addPathPrefix)(path, basePath));
|
|
77418
|
+
}
|
|
77419
|
+
if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') {
|
|
77420
|
+
Object.defineProperty(exports.default, '__esModule', {
|
|
77421
|
+
value: true
|
|
77422
|
+
});
|
|
77423
|
+
Object.assign(exports.default, exports);
|
|
77424
|
+
module.exports = exports.default;
|
|
77425
|
+
} //# sourceMappingURL=add-base-path.js.map
|
|
77426
|
+
|
|
77427
|
+
|
|
77428
|
+
/***/ }),
|
|
77429
|
+
|
|
77430
|
+
/***/ 75919:
|
|
77431
|
+
/***/ ((module) => {
|
|
77432
|
+
|
|
77433
|
+
"use strict";
|
|
77434
|
+
module.exports = require("node:worker_threads");
|
|
77435
|
+
|
|
77436
|
+
/***/ }),
|
|
77437
|
+
|
|
77438
|
+
/***/ 76760:
|
|
77439
|
+
/***/ ((module) => {
|
|
77440
|
+
|
|
77441
|
+
"use strict";
|
|
77442
|
+
module.exports = require("node:path");
|
|
77443
|
+
|
|
77444
|
+
/***/ }),
|
|
77445
|
+
|
|
77446
|
+
/***/ 77598:
|
|
77447
|
+
/***/ ((module) => {
|
|
77448
|
+
|
|
77449
|
+
"use strict";
|
|
77450
|
+
module.exports = require("node:crypto");
|
|
77451
|
+
|
|
77452
|
+
/***/ }),
|
|
77453
|
+
|
|
77454
|
+
/***/ 79428:
|
|
77455
|
+
/***/ ((module) => {
|
|
77456
|
+
|
|
77457
|
+
"use strict";
|
|
77458
|
+
module.exports = require("buffer");
|
|
77459
|
+
|
|
77460
|
+
/***/ }),
|
|
77461
|
+
|
|
77462
|
+
/***/ 79925:
|
|
77463
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
77464
|
+
|
|
77465
|
+
"use strict";
|
|
77466
|
+
// Format function modified from nodejs
|
|
77467
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
77468
|
+
//
|
|
77469
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
77470
|
+
// copy of this software and associated documentation files (the
|
|
77471
|
+
// "Software"), to deal in the Software without restriction, including
|
|
77472
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
77473
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
77474
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
77475
|
+
// following conditions:
|
|
77476
|
+
//
|
|
77477
|
+
// The above copyright notice and this permission notice shall be included
|
|
77478
|
+
// in all copies or substantial portions of the Software.
|
|
77479
|
+
//
|
|
77480
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
77481
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
77482
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
77483
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
77484
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
77485
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
77486
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
77487
|
+
|
|
77488
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
77489
|
+
value: true
|
|
77490
|
+
}));
|
|
77491
|
+
0 && (0);
|
|
77492
|
+
function _export(target, all) {
|
|
77493
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
77494
|
+
enumerable: true,
|
|
77495
|
+
get: all[name]
|
|
77496
|
+
});
|
|
77497
|
+
}
|
|
77498
|
+
_export(exports, {
|
|
77499
|
+
formatUrl: function() {
|
|
77500
|
+
return formatUrl;
|
|
77501
|
+
},
|
|
77502
|
+
formatWithValidation: function() {
|
|
77503
|
+
return formatWithValidation;
|
|
77504
|
+
},
|
|
77505
|
+
urlObjectKeys: function() {
|
|
77506
|
+
return urlObjectKeys;
|
|
77507
|
+
}
|
|
77508
|
+
});
|
|
77509
|
+
const _interop_require_wildcard = __webpack_require__(24814);
|
|
77510
|
+
const _querystring = /*#__PURE__*/ _interop_require_wildcard._(__webpack_require__(90485));
|
|
77511
|
+
const slashedProtocols = /https?|ftp|gopher|file/;
|
|
77512
|
+
function formatUrl(urlObj) {
|
|
77513
|
+
let { auth, hostname } = urlObj;
|
|
77514
|
+
let protocol = urlObj.protocol || '';
|
|
77515
|
+
let pathname = urlObj.pathname || '';
|
|
77516
|
+
let hash = urlObj.hash || '';
|
|
77517
|
+
let query = urlObj.query || '';
|
|
77518
|
+
let host = false;
|
|
77519
|
+
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
|
|
77520
|
+
if (urlObj.host) {
|
|
77521
|
+
host = auth + urlObj.host;
|
|
77522
|
+
} else if (hostname) {
|
|
77523
|
+
host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
|
|
77524
|
+
if (urlObj.port) {
|
|
77525
|
+
host += ':' + urlObj.port;
|
|
77526
|
+
}
|
|
77527
|
+
}
|
|
77528
|
+
if (query && typeof query === 'object') {
|
|
77529
|
+
query = String(_querystring.urlQueryToSearchParams(query));
|
|
77530
|
+
}
|
|
77531
|
+
let search = urlObj.search || query && `?${query}` || '';
|
|
77532
|
+
if (protocol && !protocol.endsWith(':')) protocol += ':';
|
|
77533
|
+
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
|
|
77534
|
+
host = '//' + (host || '');
|
|
77535
|
+
if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
|
|
77536
|
+
} else if (!host) {
|
|
77537
|
+
host = '';
|
|
77538
|
+
}
|
|
77539
|
+
if (hash && hash[0] !== '#') hash = '#' + hash;
|
|
77540
|
+
if (search && search[0] !== '?') search = '?' + search;
|
|
77541
|
+
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
|
|
77542
|
+
search = search.replace('#', '%23');
|
|
77543
|
+
return `${protocol}${host}${pathname}${search}${hash}`;
|
|
77544
|
+
}
|
|
77545
|
+
const urlObjectKeys = [
|
|
77546
|
+
'auth',
|
|
77547
|
+
'hash',
|
|
77548
|
+
'host',
|
|
77549
|
+
'hostname',
|
|
77550
|
+
'href',
|
|
77551
|
+
'path',
|
|
77552
|
+
'pathname',
|
|
77553
|
+
'port',
|
|
77554
|
+
'protocol',
|
|
77555
|
+
'query',
|
|
77556
|
+
'search',
|
|
77557
|
+
'slashes'
|
|
77558
|
+
];
|
|
77559
|
+
function formatWithValidation(url) {
|
|
77560
|
+
if (false) {}
|
|
77561
|
+
return formatUrl(url);
|
|
77562
|
+
} //# sourceMappingURL=format-url.js.map
|
|
77563
|
+
|
|
77564
|
+
|
|
77565
|
+
/***/ }),
|
|
77566
|
+
|
|
77567
|
+
/***/ 80099:
|
|
77568
|
+
/***/ ((module) => {
|
|
77569
|
+
|
|
77570
|
+
"use strict";
|
|
77571
|
+
module.exports = require("node:sqlite");
|
|
77572
|
+
|
|
77573
|
+
/***/ }),
|
|
77574
|
+
|
|
77575
|
+
/***/ 80481:
|
|
77576
|
+
/***/ ((module) => {
|
|
77577
|
+
|
|
77578
|
+
"use strict";
|
|
77579
|
+
module.exports = require("node:readline");
|
|
77580
|
+
|
|
77581
|
+
/***/ }),
|
|
77582
|
+
|
|
77583
|
+
/***/ 81630:
|
|
77584
|
+
/***/ ((module) => {
|
|
77585
|
+
|
|
77586
|
+
"use strict";
|
|
77587
|
+
module.exports = require("http");
|
|
77588
|
+
|
|
77589
|
+
/***/ }),
|
|
77590
|
+
|
|
77591
|
+
/***/ 94735:
|
|
77592
|
+
/***/ ((module) => {
|
|
77593
|
+
|
|
77594
|
+
"use strict";
|
|
77595
|
+
module.exports = require("events");
|
|
77596
|
+
|
|
77535
77597
|
/***/ }),
|
|
77536
77598
|
|
|
77537
77599
|
/***/ 99253:
|