@engenty/wizards-runtime 0.9.7 → 0.9.8
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/apps/runtime/dist/agents/architect.js +4 -2
- package/apps/runtime/dist/agents/company.js +1 -1
- package/apps/runtime/dist/agents/studio-assistant.js +1 -1
- package/apps/runtime/dist/assistant/primer.js +1 -1
- package/apps/runtime/dist/authoring/example.js +2 -2
- package/apps/runtime/dist/authoring/guide.js +11 -11
- package/apps/runtime/dist/credits/estimate.js +5 -5
- package/apps/runtime/dist/db/adopt.js +4 -3
- package/apps/runtime/dist/db/migrations/control/0011_model_classes.sql +11 -0
- package/apps/runtime/dist/db/migrations/control/meta/0011_snapshot.json +600 -0
- package/apps/runtime/dist/db/migrations/control/meta/_journal.json +7 -0
- package/apps/runtime/dist/db/migrations/tenant/0021_model_classes.sql +41 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0021_snapshot.json +3475 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
- package/apps/runtime/dist/docs/dev/plugins/quick-start.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/server.md +2 -2
- package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +9 -5
- package/apps/runtime/dist/docs/dev/wizard-format/film-steps.md +2 -2
- package/apps/runtime/dist/docs/dev/wizard-format/index.md +14 -8
- package/apps/runtime/dist/docs/user-guide/models.md +22 -13
- package/apps/runtime/dist/docs/user-guide/steps.md +6 -6
- package/apps/runtime/dist/documents/parse.js +1 -1
- package/apps/runtime/dist/engine/requirements.js +11 -11
- package/apps/runtime/dist/engine/steps.js +4 -4
- package/apps/runtime/dist/env.js +4 -4
- package/apps/runtime/dist/film/step.js +1 -1
- package/apps/runtime/dist/harness/antigravity.js +3 -3
- package/apps/runtime/dist/harness/apple.js +1 -1
- package/apps/runtime/dist/harness/claude.js +2 -2
- package/apps/runtime/dist/harness/codex.js +3 -3
- package/apps/runtime/dist/harness/cursor.js +1 -1
- package/apps/runtime/dist/mcp/tools.js +6 -3
- package/apps/runtime/dist/models.js +64 -10
- package/apps/runtime/dist/plugins/loader.js +1 -1
- package/apps/runtime/dist/routes/studio.js +16 -5
- package/apps/runtime/dist/services/assistant-chats.js +1 -1
- package/apps/runtime/dist/services/brand.js +1 -1
- package/apps/runtime/dist/services/knowledge-model.js +1 -1
- package/apps/runtime/dist/services/marketplace.js +3 -1
- package/apps/runtime/dist/services/project-files.js +1 -1
- package/apps/runtime/dist/services/translations.js +2 -2
- package/apps/runtime/dist/services/wizards.js +2 -2
- package/apps/runtime/dist/sharing/agent.js +1 -1
- package/apps/runtime/dist/texts.js +12 -0
- package/apps/web/dist/assets/{AboutDialog-B3tljxg5.js → AboutDialog-B_Ixp_Tb.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-DfWTNzyl.js → ChangelogDialog-BpEIbAZ8.js} +1 -1
- package/apps/web/dist/assets/{EditorPage-XDdz2UM4.js → EditorPage-CKHY4hn4.js} +4 -4
- package/apps/web/dist/assets/{FlowPreview-CKNVCFbp.js → FlowPreview-APXdRflR.js} +1 -1
- package/apps/web/dist/assets/{Harness-BCec49Cq.js → Harness-BsGXMlLg.js} +1 -1
- package/apps/web/dist/assets/{Marketplace-BuYeaxK2.js → Marketplace-Dr-Qnb-F.js} +2 -2
- package/apps/web/dist/assets/{NewWizardChannels-DRNji-bk.js → NewWizardChannels-0JrRdUFd.js} +1 -1
- package/apps/web/dist/assets/{NewWizardPage-4TpgYOaI.js → NewWizardPage-9igFL5O8.js} +1 -1
- package/apps/web/dist/assets/{OnboardingPage-Cf52NOIt.js → OnboardingPage-BcK9FUnU.js} +1 -1
- package/apps/web/dist/assets/{PreviewPane-C4yMcZPM.js → PreviewPane-X4LBqA0D.js} +3 -3
- package/apps/web/dist/assets/ProjectPage-CG0i-KhR.js +1 -0
- package/apps/web/dist/assets/{PublicRunner-Bftc1c4m.js → PublicRunner-CZR1ziQ4.js} +1 -1
- package/apps/web/dist/assets/{ReadOnly-DVQm9IYx.js → ReadOnly-BraZbEG_.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-Bw4tdoV7.js +2 -0
- package/apps/web/dist/assets/SetupPage-CvkE2aKx.js +1 -0
- package/apps/web/dist/assets/{SharePage-Cn-bqSyr.js → SharePage-Dk7zC5Zo.js} +1 -1
- package/apps/web/dist/assets/changelog-DDXnAaHm.js +1 -0
- package/apps/web/dist/assets/{coins-DgDTBbeg.js → coins-391m1e4_.js} +1 -1
- package/apps/web/dist/assets/index-BTUtot4r.js +14 -0
- package/apps/web/dist/assets/index-DcUL6teA.css +1 -0
- package/apps/web/dist/assets/{phone-D1Drdiio.js → phone-DvgrtyNO.js} +1 -1
- package/apps/web/dist/assets/{runners-CTd0YAiA.js → runners-4OBelIgF.js} +1 -1
- package/apps/web/dist/assets/{session-DX2BcTfz.js → session-DvnGHbDz.js} +1 -1
- package/apps/web/dist/assets/{settings-menu-ay9jNbQu.js → settings-menu-xK9A-gaP.js} +1 -1
- package/apps/web/dist/assets/theme-D3yDT4QT.js +11 -0
- package/apps/web/dist/assets/ui-BVQk2DtW.js +137 -0
- package/apps/web/dist/assets/{upload-Dj7KPL--.js → upload-BgXbzG6C.js} +1 -1
- package/apps/web/dist/assets/{useMutation-CUSQpD-i.js → useMutation-DkwSQWoD.js} +1 -1
- package/apps/web/dist/assets/{volume-2-CcHZOU2m.js → volume-2-DHGoe3Cg.js} +1 -1
- package/apps/web/dist/assets/{wrench-CfJTFnMJ.js → wrench-Cf_aE3O0.js} +1 -1
- package/apps/web/dist/index.html +8 -8
- package/apps/web/dist/mcp/flow.html +56 -56
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +2 -2
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +872 -18
- package/node_modules/@engenty/wizards-shared/dist/definition.js +52 -11
- package/node_modules/@engenty/wizards-shared/dist/json-schema.js +3 -3
- package/node_modules/@engenty/wizards-shared/dist/providers.d.ts +37 -0
- package/node_modules/@engenty/wizards-shared/dist/providers.js +64 -12
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/ProjectPage-D6Tah3QK.js +0 -1
- package/apps/web/dist/assets/SettingsPage-Cd-osLDu.js +0 -2
- package/apps/web/dist/assets/SetupPage-Dc8U5k5P.js +0 -1
- package/apps/web/dist/assets/changelog-CjSBB-a4.js +0 -1
- package/apps/web/dist/assets/index-DS3zUVw_.css +0 -1
- package/apps/web/dist/assets/index-Da7hPToW.js +0 -14
- package/apps/web/dist/assets/theme-DanjuO1H.js +0 -11
- package/apps/web/dist/assets/ui-CJCF3Mhe.js +0 -137
|
@@ -6,8 +6,8 @@ import { createGateway } from "@ai-sdk/gateway";
|
|
|
6
6
|
import { createGoogle } from "@ai-sdk/google";
|
|
7
7
|
import { createOpenAI } from "@ai-sdk/openai";
|
|
8
8
|
import { createReplicate } from "@ai-sdk/replicate";
|
|
9
|
-
import { MODEL_CLASSES, TEXT_CLASSES, } from "@engenty/wizards-shared/definition";
|
|
10
|
-
import { CAPABILITY_CLASSES, creditsModelOf, isCreditsRef, PROVIDER_IDS, providerInfo, providerOfRef, } from "@engenty/wizards-shared/providers";
|
|
9
|
+
import { DEFINITION_VERSION, MODEL_CLASSES, TEXT_CLASSES, } from "@engenty/wizards-shared/definition";
|
|
10
|
+
import { blockingNeeds, CAPABILITY_CLASSES, creditsModelOf, isCreditsRef, missingNeeds, PROVIDER_IDS, providerInfo, providerOfRef, traitsOf, } from "@engenty/wizards-shared/providers";
|
|
11
11
|
import { note, saidText } from "@engenty/wizards-shared/run";
|
|
12
12
|
import { generateSpeech, generateText, } from "ai";
|
|
13
13
|
import { accountToken, linkedAccount } from "./auth/account.js";
|
|
@@ -205,7 +205,7 @@ function reachable(cfg, ref) {
|
|
|
205
205
|
/** What a class runs on without credits: a client, an own key or a local model. "" = no way of its own. */
|
|
206
206
|
function ownRef(cfg, cls) {
|
|
207
207
|
const bound = cfg.settings.bindings[cls];
|
|
208
|
-
// A text class bound to Apple Intelligence (Classifier,
|
|
208
|
+
// A text class bound to Apple Intelligence (Classifier, Low) thinks on this Mac whatever
|
|
209
209
|
// the source is: the others keep the installed client, the account's credits or the keys.
|
|
210
210
|
if (isText(cls) && bound && parse(bound).provider === "apple") {
|
|
211
211
|
return reachable(cfg, bound) ? bound : "";
|
|
@@ -237,9 +237,9 @@ function ownRef(cfg, cls) {
|
|
|
237
237
|
/** What a class makes, to say that nothing makes it. */
|
|
238
238
|
const MAKES = {
|
|
239
239
|
classifier: "makesText",
|
|
240
|
+
low: "makesText",
|
|
240
241
|
standard: "makesText",
|
|
241
242
|
high: "makesText",
|
|
242
|
-
highest: "makesText",
|
|
243
243
|
image: "makesImages",
|
|
244
244
|
video: "makesVideos",
|
|
245
245
|
speech: "makesSpeech",
|
|
@@ -306,11 +306,17 @@ function need(cfg, name) {
|
|
|
306
306
|
}
|
|
307
307
|
return key;
|
|
308
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* Says the class names of this definition version: the gateway reads `wizards/<class>` and
|
|
311
|
+
* answers `/v1/models` in them. A caller without it is a runtime from before version 2.
|
|
312
|
+
*/
|
|
313
|
+
const DEFINITION_HEADER = { "x-wizards-definition": String(DEFINITION_VERSION) };
|
|
309
314
|
function gatewayClient(access, meta) {
|
|
310
315
|
return createGateway({
|
|
311
316
|
baseURL: `${access.baseUrl}/v4/ai`,
|
|
312
317
|
apiKey: access.token,
|
|
313
318
|
headers: {
|
|
319
|
+
...DEFINITION_HEADER,
|
|
314
320
|
...(access.tenant ? { "x-wizards-tenant": access.tenant } : {}),
|
|
315
321
|
...(meta.runId ? { "x-wizards-run": meta.runId } : {}),
|
|
316
322
|
...(meta.stepId ? { "x-wizards-step": meta.stepId } : {}),
|
|
@@ -335,6 +341,7 @@ export async function classCatalog() {
|
|
|
335
341
|
const res = await fetch(`${access.baseUrl}/v1/models`, {
|
|
336
342
|
headers: {
|
|
337
343
|
authorization: `Bearer ${access.token}`,
|
|
344
|
+
...DEFINITION_HEADER,
|
|
338
345
|
...(access.tenant ? { "x-wizards-tenant": access.tenant } : {}),
|
|
339
346
|
},
|
|
340
347
|
signal: AbortSignal.timeout(10_000),
|
|
@@ -763,6 +770,7 @@ export async function systemOneAccess() {
|
|
|
763
770
|
authorization: `Bearer ${access.token}`,
|
|
764
771
|
// Booked under the classifier class; its evaluation model answers.
|
|
765
772
|
"ai-model-id": "wizards/classifier",
|
|
773
|
+
...DEFINITION_HEADER,
|
|
766
774
|
...(access.tenant ? { "x-wizards-tenant": access.tenant } : {}),
|
|
767
775
|
},
|
|
768
776
|
model: null,
|
|
@@ -964,7 +972,7 @@ export async function filmClient(cls) {
|
|
|
964
972
|
/** Whether any text model can answer at all: the studio says so before the first chat turn. */
|
|
965
973
|
export async function hasTextModel() {
|
|
966
974
|
try {
|
|
967
|
-
await textModel("
|
|
975
|
+
await textModel("low");
|
|
968
976
|
return true;
|
|
969
977
|
}
|
|
970
978
|
catch {
|
|
@@ -1049,13 +1057,16 @@ export function waysIn(ways, lang) {
|
|
|
1049
1057
|
/** What the settings page shows: the choices, which keys are there (never the keys), and the ways. */
|
|
1050
1058
|
export async function modelSettings(lang = "en") {
|
|
1051
1059
|
const cfg = await config();
|
|
1060
|
+
const ways = await classWays();
|
|
1052
1061
|
return {
|
|
1053
1062
|
source: cfg.settings.source,
|
|
1054
1063
|
bindings: cfg.settings.bindings,
|
|
1055
1064
|
ollamaUrl: cfg.settings.ollamaUrl ?? env.ollamaUrl,
|
|
1056
1065
|
creditFallback: cfg.settings.creditFallback !== false,
|
|
1057
1066
|
keys: Object.fromEntries(LOCAL_KEYS.map((k) => [k, Boolean(cfg.keys[k])])),
|
|
1058
|
-
ways: waysIn(
|
|
1067
|
+
ways: waysIn(ways, lang),
|
|
1068
|
+
/** Per text class, what of its minimums its model lacks (`CLASS_NEEDS`); null: not checked. */
|
|
1069
|
+
fit: classFit(ways),
|
|
1059
1070
|
/** Apple Intelligence on this Mac: shown where the machine can run it, picked once it answers. */
|
|
1060
1071
|
apple: managed ? null : await appleStatus(),
|
|
1061
1072
|
/** What a class costs on the credits, where they are at hand. */
|
|
@@ -1121,7 +1132,7 @@ function freeClasses(bindings) {
|
|
|
1121
1132
|
const setupOutcome = () => ({
|
|
1122
1133
|
ok: true,
|
|
1123
1134
|
message: null,
|
|
1124
|
-
text: ownRef(local, "
|
|
1135
|
+
text: ownRef(local, "low") || null,
|
|
1125
1136
|
});
|
|
1126
1137
|
/** The setup's test of one key: checked with the provider, stored, and put to use. */
|
|
1127
1138
|
export async function setUpKey(name, key, lang = "en") {
|
|
@@ -1162,7 +1173,7 @@ export async function setUpOllama(url, lang = "en") {
|
|
|
1162
1173
|
if (!models.length) {
|
|
1163
1174
|
return { ok: false, message: serverText(lang, "ollamaNoModel"), text: null };
|
|
1164
1175
|
}
|
|
1165
|
-
const bound = local.settings.bindings.
|
|
1176
|
+
const bound = local.settings.bindings.low?.replace(/^ollama:/, "");
|
|
1166
1177
|
const model = bound && models.includes(bound) ? bound : models[0];
|
|
1167
1178
|
const text = Object.fromEntries(TEXT_CLASSES.map((c) => [c, `ollama:${model}`]));
|
|
1168
1179
|
await saveLocalModels({ ollamaUrl: base, bindings: freeClasses(text) });
|
|
@@ -1193,12 +1204,55 @@ function priceOf(ref) {
|
|
|
1193
1204
|
return (catalog.get(provider === null || provider === "gateway" ? id : `${provider}/${id}`)?.pricing ??
|
|
1194
1205
|
{});
|
|
1195
1206
|
}
|
|
1207
|
+
/**
|
|
1208
|
+
* The AI Gateway's entry of the model a binding names: by the gateway's id, and a provider's own
|
|
1209
|
+
* id by the gateway's name for it (`anthropic:claude-sonnet-5-5` is `anthropic/claude-sonnet-5.5`).
|
|
1210
|
+
*/
|
|
1211
|
+
function catalogEntryOf(ref) {
|
|
1212
|
+
const { provider, id } = parse(ref);
|
|
1213
|
+
if (provider === null || provider === "gateway") {
|
|
1214
|
+
return catalog.get(id);
|
|
1215
|
+
}
|
|
1216
|
+
return (catalog.get(`${provider}/${id}`) ??
|
|
1217
|
+
catalog.get(`${provider}/${id.replace(/(\d)-(\d)/g, "$1.$2")}`));
|
|
1218
|
+
}
|
|
1196
1219
|
/** A model's context window in tokens, as the AI Gateway's catalog gives it; null where unknown. */
|
|
1197
1220
|
export function contextWindowOf(ref) {
|
|
1198
|
-
const
|
|
1199
|
-
const entry = catalog.get(provider === null || provider === "gateway" ? id : `${provider}/${id}`);
|
|
1221
|
+
const entry = catalogEntryOf(ref);
|
|
1200
1222
|
return typeof entry?.context_window === "number" ? entry.context_window : null;
|
|
1201
1223
|
}
|
|
1224
|
+
/** What a bound model can do, by the AI Gateway's catalog; null for a model it does not list. */
|
|
1225
|
+
export function modelTraitsOf(ref) {
|
|
1226
|
+
const entry = ref && !isCreditsRef(ref) ? catalogEntryOf(ref) : undefined;
|
|
1227
|
+
return entry ? traitsOf(entry.tags ?? [], entry.context_window) : null;
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Per text class, what of its minimums the model it runs on lacks: a key's or a local model's,
|
|
1231
|
+
* where the catalog lists it. Null where nothing is checked: an installed client, the credits
|
|
1232
|
+
* (the gateway's admin picks those models), a model the catalog does not know.
|
|
1233
|
+
*/
|
|
1234
|
+
export function classFit(ways) {
|
|
1235
|
+
return Object.fromEntries(TEXT_CLASSES.map((cls) => {
|
|
1236
|
+
const way = ways[cls];
|
|
1237
|
+
const traits = way.kind === "key" || way.kind === "local" ? modelTraitsOf(way.ref) : null;
|
|
1238
|
+
return [cls, traits ? missingNeeds(cls, traits) : null];
|
|
1239
|
+
}));
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* The first binding of these that cannot work at all: a text class bound to a model the catalog
|
|
1243
|
+
* knows to lack what the class cannot do without (Goose and the build chat call tools).
|
|
1244
|
+
*/
|
|
1245
|
+
export function blockedBinding(bindings) {
|
|
1246
|
+
for (const cls of TEXT_CLASSES) {
|
|
1247
|
+
const ref = bindings[cls];
|
|
1248
|
+
const traits = ref ? modelTraitsOf(ref) : null;
|
|
1249
|
+
const needs = traits ? blockingNeeds(cls, missingNeeds(cls, traits)) : [];
|
|
1250
|
+
if (ref && needs.length) {
|
|
1251
|
+
return { cls, ref, needs };
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
return null;
|
|
1255
|
+
}
|
|
1202
1256
|
const n = (v, fallback) => {
|
|
1203
1257
|
const x = Number(v);
|
|
1204
1258
|
return Number.isFinite(x) ? x : fallback;
|
|
@@ -234,7 +234,7 @@ function apiFor(record) {
|
|
|
234
234
|
},
|
|
235
235
|
getTenantDb: () => db,
|
|
236
236
|
async generate(request) {
|
|
237
|
-
const resolved = await textModel(request.model ?? "
|
|
237
|
+
const resolved = await textModel(request.model ?? "low").catch((err) => {
|
|
238
238
|
// Said so a route can pass it on as it is: 503 with the code `no_model`.
|
|
239
239
|
throw err instanceof ModelUnavailableError
|
|
240
240
|
? Object.assign(err, { name: "ModelUnavailableError", status: 503, code: "no_model" })
|
|
@@ -4,7 +4,7 @@ import { ASSISTANT_LAYOUTS, ASSISTANT_PAGE_BYTES, ASSISTANT_WIDTH, assistantSign
|
|
|
4
4
|
import { LANGS, MODEL_CLASSES, TEXT_CLASSES, wizardLang, } from "@engenty/wizards-shared/definition";
|
|
5
5
|
import { CATEGORY_TYPES, whereSchema } from "@engenty/wizards-shared/knowledge";
|
|
6
6
|
import { PROJECT_FILE_KINDS } from "@engenty/wizards-shared/projects";
|
|
7
|
-
import { isCreditsRef } from "@engenty/wizards-shared/providers";
|
|
7
|
+
import { CLASS_NAMES, isCreditsRef, modelLabel } from "@engenty/wizards-shared/providers";
|
|
8
8
|
import { note } from "@engenty/wizards-shared/run";
|
|
9
9
|
import { wizardTexts } from "@engenty/wizards-shared/translation";
|
|
10
10
|
import { PACKAGE_EXTENSION, PACKAGE_MAX_BYTES, PACKAGE_MIME, } from "@engenty/wizards-shared/wizard-package";
|
|
@@ -37,7 +37,7 @@ import { seenApps } from "../mcp/seen.js";
|
|
|
37
37
|
import { generateImageMedia, generateSpeechMedia, generateVideoMedia } from "../media/generate.js";
|
|
38
38
|
import { transcribeAudio } from "../media/transcribe.js";
|
|
39
39
|
import { errorText, saidOf } from "../model-errors.js";
|
|
40
|
-
import { CHAT_WAYS, checkKey, classProblem, classWays, embeddingModel, hasTextModel, LOCAL_KEYS, localModelSettings, ModelUnavailableError, modelSettings, saveLocalModels, saveModels, setUpKey, setUpOllama, storedKey, textModel, } from "../models.js";
|
|
40
|
+
import { blockedBinding, CHAT_WAYS, checkKey, classProblem, classWays, embeddingModel, hasTextModel, LOCAL_KEYS, localModelSettings, ModelUnavailableError, modelSettings, saveLocalModels, saveModels, setUpKey, setUpOllama, storedKey, textModel, } from "../models.js";
|
|
41
41
|
import { refreshPro } from "../plugins/pro.js";
|
|
42
42
|
import { HTML_RESPONSE_CSP } from "../render/guard.js";
|
|
43
43
|
import { isAdminRole, mayBuild, mayCreate, projectWritable, requireAdmin, requireWritable, } from "../services/access.js";
|
|
@@ -85,15 +85,15 @@ async function markTested(source) {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* The chosen source has passed a test call and can still answer: its client is there and signed
|
|
88
|
-
* in. Where Apple Intelligence thinks the short classes, the test ran there; a client behind
|
|
89
|
-
* and
|
|
88
|
+
* in. Where Apple Intelligence thinks the short classes, the test ran there; a client behind
|
|
89
|
+
* Standard and High is no condition then.
|
|
90
90
|
*/
|
|
91
91
|
async function setupDone() {
|
|
92
92
|
const { source, bindings } = localModelSettings();
|
|
93
93
|
if (!(await testedSources()).includes(source)) {
|
|
94
94
|
return false;
|
|
95
95
|
}
|
|
96
|
-
const client = bindings.
|
|
96
|
+
const client = bindings.low.startsWith("apple:") ? null : harness(source);
|
|
97
97
|
if (client) {
|
|
98
98
|
const status = await detectHarness(client.id);
|
|
99
99
|
return Boolean(status?.version) && status?.auth !== "none";
|
|
@@ -1399,6 +1399,17 @@ export const studio = new Hono()
|
|
|
1399
1399
|
}, 403);
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
+
const blocked = input.bindings ? blockedBinding(input.bindings) : null;
|
|
1403
|
+
if (blocked) {
|
|
1404
|
+
return c.json({
|
|
1405
|
+
error: say(c, "modelLacksForClass", {
|
|
1406
|
+
model: modelLabel(blocked.ref),
|
|
1407
|
+
cls: CLASS_NAMES[blocked.cls],
|
|
1408
|
+
needs: blocked.needs.map((n) => say(c, `need.${n}`)).join(", "),
|
|
1409
|
+
}),
|
|
1410
|
+
code: "model_lacks",
|
|
1411
|
+
}, 400);
|
|
1412
|
+
}
|
|
1402
1413
|
await saveModels(input);
|
|
1403
1414
|
return c.json(await modelSettings(requestLang(c)));
|
|
1404
1415
|
})
|
|
@@ -122,7 +122,7 @@ const SUMMARY_RULES = [
|
|
|
122
122
|
async function summarise(messages, before) {
|
|
123
123
|
const firstAsk = messages.find((m) => m.role === "user")?.content ?? "";
|
|
124
124
|
try {
|
|
125
|
-
const model = await textModel("
|
|
125
|
+
const model = await textModel("low");
|
|
126
126
|
const result = await generateText({
|
|
127
127
|
model: model.model,
|
|
128
128
|
maxOutputTokens: 900,
|
|
@@ -68,7 +68,7 @@ const gradientAnswer = z.object({
|
|
|
68
68
|
* angle and colour stops, in the brand's colours where the words name them.
|
|
69
69
|
*/
|
|
70
70
|
export async function describeGradient(brand, text, current) {
|
|
71
|
-
const model = await textModel("
|
|
71
|
+
const model = await textModel("low");
|
|
72
72
|
const result = await generateText({
|
|
73
73
|
model: model.model,
|
|
74
74
|
maxOutputTokens: 800,
|
|
@@ -511,7 +511,7 @@ export async function writeSummary(valueId) {
|
|
|
511
511
|
if (!items.length) {
|
|
512
512
|
throw new ServiceError("invalid", note("nothingFiledUnderValue"));
|
|
513
513
|
}
|
|
514
|
-
const model = await textModel("
|
|
514
|
+
const model = await textModel("low");
|
|
515
515
|
const result = await generateText({
|
|
516
516
|
model: model.model,
|
|
517
517
|
maxOutputTokens: 2000,
|
|
@@ -37,6 +37,8 @@ async function call(path, init) {
|
|
|
37
37
|
try {
|
|
38
38
|
const res = await fetch(`${env.marketplace.url}/api/v1${path}`, {
|
|
39
39
|
...init,
|
|
40
|
+
// Wizards in this version of the definition; a caller without it gets version 1.
|
|
41
|
+
headers: { ...init?.headers, "x-wizards-definition": String(DEFINITION_VERSION) },
|
|
40
42
|
signal: AbortSignal.timeout(TIMEOUT_MS),
|
|
41
43
|
});
|
|
42
44
|
if (!res.ok) {
|
|
@@ -335,9 +337,9 @@ function listPrices() {
|
|
|
335
337
|
webSearchCredits: WEB_SEARCH_COST_USD * CREDITS_PER_USD,
|
|
336
338
|
classes: {
|
|
337
339
|
classifier: text(m.classifier),
|
|
340
|
+
low: text(m.low),
|
|
338
341
|
standard: text(m.standard),
|
|
339
342
|
high: text(m.high),
|
|
340
|
-
highest: text(m.highest),
|
|
341
343
|
image: {
|
|
342
344
|
model: m.image,
|
|
343
345
|
kind: "image",
|
|
@@ -208,7 +208,7 @@ async function projectLine(projectId) {
|
|
|
208
208
|
}
|
|
209
209
|
/** One sentence about a picture, for whoever picks among the project's files later. */
|
|
210
210
|
async function describeImage(row, data) {
|
|
211
|
-
const seer = await textModel("
|
|
211
|
+
const seer = await textModel("low");
|
|
212
212
|
const result = await generateText({
|
|
213
213
|
model: seer.model,
|
|
214
214
|
maxOutputTokens: 300,
|
|
@@ -12,7 +12,7 @@ import { currentTenant } from "../tenants/tenant.js";
|
|
|
12
12
|
import { ServiceError } from "./errors.js";
|
|
13
13
|
/**
|
|
14
14
|
* A wizard in its viewer's language, on request (docs/plans/wizard-translation.md): one call per
|
|
15
|
-
* wizard and language on the `
|
|
15
|
+
* wizard and language on the `low` class at effort low, kept and shared by every viewer;
|
|
16
16
|
* the runner's own words once per language for the whole runtime. Booked to the wizard's owner
|
|
17
17
|
* like any call of the tenant.
|
|
18
18
|
*/
|
|
@@ -47,7 +47,7 @@ async function translate(texts, opts) {
|
|
|
47
47
|
for (let i = 0; i < keys.length; i += size) {
|
|
48
48
|
chunks.push(keys.slice(i, i + size));
|
|
49
49
|
}
|
|
50
|
-
const model = await textModel("
|
|
50
|
+
const model = await textModel("low", { effort: "low" });
|
|
51
51
|
// The model sees short keys (t0, t1, …): some providers allow only letters, digits, "_", "."
|
|
52
52
|
// and "-" in a schema's property names, and a text's own key may hold anything.
|
|
53
53
|
const call = async (chunk) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { versionChanges } from "@engenty/wizards-shared/changes";
|
|
2
|
-
import { pluginToolOf, shapeIssues, validateWizard, wizardSchema, } from "@engenty/wizards-shared/definition";
|
|
2
|
+
import { DEFINITION_VERSION, pluginToolOf, shapeIssues, validateWizard, wizardSchema, } from "@engenty/wizards-shared/definition";
|
|
3
3
|
import { note } from "@engenty/wizards-shared/run";
|
|
4
4
|
import { and, desc, eq, sql } from "drizzle-orm";
|
|
5
5
|
import { nanoid } from "nanoid";
|
|
@@ -25,7 +25,7 @@ import { saveTheme } from "./themes.js";
|
|
|
25
25
|
/** The wizard a new one starts as, in the language of whoever makes it. */
|
|
26
26
|
function blankWizard(lang) {
|
|
27
27
|
return {
|
|
28
|
-
version:
|
|
28
|
+
version: DEFINITION_VERSION,
|
|
29
29
|
title: serverText(lang, "newWizard"),
|
|
30
30
|
description: "",
|
|
31
31
|
avatar: "round",
|
|
@@ -24,7 +24,7 @@ export async function runShareAgent(ctx, input, job) {
|
|
|
24
24
|
throw new ShareError(line("shareNoCredits"));
|
|
25
25
|
}
|
|
26
26
|
const step = await ctx.step();
|
|
27
|
-
const resolved = await textModel("
|
|
27
|
+
const resolved = await textModel("standard", step.call);
|
|
28
28
|
const tools = await job.tools(step, new FileKeeper(step, []));
|
|
29
29
|
attachTools(resolved, tools);
|
|
30
30
|
const prompt = [
|
|
@@ -94,6 +94,12 @@ const EN = {
|
|
|
94
94
|
somethingWentWrongTry: "Something went wrong. Try again.",
|
|
95
95
|
unknownApp: "Unknown app.",
|
|
96
96
|
onlyOrganizationAdminsChange: "Only organization admins can change its models.",
|
|
97
|
+
modelLacksForClass: "{model} lacks what the class {cls} can’t work without: {needs}. Choose another model for it.",
|
|
98
|
+
"need.tools": "tool calls",
|
|
99
|
+
"need.json": "JSON output",
|
|
100
|
+
"need.vision": "image input",
|
|
101
|
+
"need.reasoning": "reasoning",
|
|
102
|
+
"need.context": "a long enough context",
|
|
97
103
|
notAvailableCloud: "This isn’t available in the cloud.",
|
|
98
104
|
noApiKeySet: "No API key is set.",
|
|
99
105
|
onlyOrganizationAdminsTest: "Only organization admins can test its models.",
|
|
@@ -264,6 +270,12 @@ const DE = {
|
|
|
264
270
|
somethingWentWrongTry: "Da ist etwas schiefgelaufen. Versuch es noch einmal.",
|
|
265
271
|
unknownApp: "Diese App gibt es nicht.",
|
|
266
272
|
onlyOrganizationAdminsChange: "Nur Admins der Organisation ändern ihre Modelle.",
|
|
273
|
+
modelLacksForClass: "{model} fehlt, was die Klasse {cls} unbedingt braucht: {needs}. Wähle dafür ein anderes Modell.",
|
|
274
|
+
"need.tools": "Tool-Aufrufe",
|
|
275
|
+
"need.json": "JSON-Ausgabe",
|
|
276
|
+
"need.vision": "Bilder als Eingabe",
|
|
277
|
+
"need.reasoning": "Reasoning",
|
|
278
|
+
"need.context": "genug Kontext",
|
|
267
279
|
notAvailableCloud: "Das gibt es nicht in der Cloud.",
|
|
268
280
|
noApiKeySet: "Kein API-Key hinterlegt.",
|
|
269
281
|
onlyOrganizationAdminsTest: "Nur Admins der Organisation testen ihre Modelle.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Bt as i,Ht as a,Jt as o,Mr as s,Rr as c,Ut as l,Vt as u,Zt as d,on as f,sr as p}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Bt as i,Ht as a,Jt as o,Mr as s,Rr as c,Ut as l,Vt as u,Zt as d,on as f,sr as p}from"./ui-BVQk2DtW.js";import{t as m}from"./preload-helper-DpV6A1kQ.js";import{t as h}from"./logo-CGNoptDg.js";import{K as g,it as _,rt as v}from"./index-BTUtot4r.js";import{c as y,f as b}from"./settings-menu-xK9A-gaP.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-BpEIbAZ8.js";var T=e(t(),1),E=[{name:`engenty wizards`,description:`credit.engenty-wizards`,homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:`credit.engenty`,homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],D=[{name:`Mastra`,description:`credit.mastra`,homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:`credit.ai-sdk`,homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:`credit.model-context-protocol`,homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:`credit.hono`,homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:`credit.drizzle-orm`,homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:`credit.libsql`,homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:`credit.playwright`,homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`React`,description:`credit.react`,homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:`credit.vite`,homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:`credit.tailwind-css`,homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:`credit.react-flow`,homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:`credit.tanstack-query`,homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:`credit.xterm-js`,homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:`credit.lucide`,homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:`credit.geist-geist-mono`,homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:`credit.space-grotesk`,homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:`credit.git-cliff`,homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],O=e(n(),1),k=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function A({name:e,homepage:t,version:n,license:r,description:i}){return(0,O.jsxs)(`li`,{className:`py-2.5`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,O.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,O.jsx)(s,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,O.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,O.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function j({title:e,hint:t,children:n}){return(0,O.jsxs)(`section`,{className:`mt-6`,children:[(0,O.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,O.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function M({credits:e}){return(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,O.jsx)(A,{name:e.name,homepage:e.homepage,license:e.license,description:f(e.description)},e.name))})}function N({label:e,packages:t}){return(0,O.jsxs)(`div`,{className:`mt-4`,children:[(0,O.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,O.jsx)(A,{...e},e.name))})]})}function P({active:e}){let[t,n]=(0,T.useState)(null),[r,i]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let r=!1;return m(()=>import(`./oss-credits-C2JUsf2d.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,T.useEffect)(()=>{e||i(``)},[e]);let a=r.trim().toLowerCase(),s=e=>a?e.filter(e=>k(a,e.name,e.license,f(e.description))):e,c=e=>a?e.filter(e=>k(a,e.name,e.license,e.version)):e,d=s(E),p=s(D),h=t?[{id:`shared`,label:f(`about.creditsShared`),packages:c(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:c(e.packages)}))].filter(e=>e.packages.length>0):[],g=d.length===0&&p.length===0&&h.length===0;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:f(`about.creditsHint`)}),(0,O.jsx)(l,{type:`search`,value:r,placeholder:f(`about.search`),onChange:e=>i(e.target.value)}),d.length>0?(0,O.jsx)(j,{title:f(`about.creditsProduct`),children:(0,O.jsx)(M,{credits:d})}):null,p.length>0?(0,O.jsx)(j,{title:f(`about.creditsBuiltWith`),children:(0,O.jsx)(M,{credits:p})}):null,t===null?(0,O.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,O.jsx)(o,{})}):h.length>0?(0,O.jsx)(j,{title:f(`about.creditsDeps`),hint:a?void 0:f(`about.creditsDepsHint`),children:h.map(e=>(0,O.jsx)(N,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,O.jsx)(u,{children:f(`about.noMatches`)}):null]})}var F=[`new`,`earlier`,`credits`],I=e=>f(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),L=e=>e===1?f(`about.change`):f(`about.changes`,{n:e});function R({me:e,active:t,initialTab:n=`new`}){let i=e?.mode===`local`,{data:a,latest:s}=v(i&&t),[l,u]=(0,T.useState)(null),[p,m]=(0,T.useState)(n);(0,T.useEffect)(()=>m(n),[n]);let E=b(F.indexOf(p)),D=a?.newer&&s?s:_;(0,T.useEffect)(()=>{if(!t)return;let e=!1;return u(null),S(D===`0.9.8`?void 0:D).then(t=>{e||u(t)}),()=>{e=!0}},[t,D]);let k=l?.find(e=>e.version===`v${D}`)??l?.[0]??null,A=l?.filter(e=>e!==k)??[],j=i?a?.kind??null:`cloud`;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,O.jsx)(h,{size:96}),(0,O.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,O.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,O.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,O.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[f(`about.version`,{v:_}),j?` · ${f(`about.kind.${j}`)}`:``]})]}),i?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(g,{enabled:t})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(d,{value:p,onChange:m,options:F.map(e=>({id:e,label:I(e)})),label:f(`about.title`)})}),(0,O.jsxs)(`div`,{className:r(`mt-5`,y(E)),children:[p===`new`?l===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(o,{})}):k?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[w(k),(0,O.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:C(k)})]}),(0,O.jsx)(`div`,{className:`mt-3`,children:(0,O.jsx)(x,{release:k})})]}):(0,O.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:f(`about.changelogEmpty`)}):null,p===`earlier`?(0,O.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:A.map(e=>(0,O.jsxs)(`details`,{className:`group/r py-2`,children:[(0,O.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,O.jsx)(c,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,O.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:w(e)}),(0,O.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:C(e)}),(0,O.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:L(e.commits.length)})]}),(0,O.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,O.jsx)(x,{release:e})})]},e.version??`unreleased`))}):null,p===`credits`?(0,O.jsx)(P,{active:!0}):null]},p)]})}function z({open:e,onClose:t,me:n}){return(0,O.jsxs)(i,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,O.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,O.jsx)(a,{label:f(`common.close`),onClick:t,children:(0,O.jsx)(p,{className:`size-4`})})}),(0,O.jsx)(R,{me:n,active:e})]})}export{z as AboutDialog,R as AboutPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Bt as i,Jt as a,Ut as o,Vt as s,on as c}from"./ui-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Bt as i,Jt as a,Ut as o,Vt as s,on as c}from"./ui-BVQk2DtW.js";import{t as l}from"./preload-helper-DpV6A1kQ.js";var u=e(t(),1),d=e(n(),1);function f(e){switch(e.group){case`Added`:return{label:`NEW`,dot:`bg-moss`};case`Fixed`:return{label:`FIXED`,dot:`bg-amber`};case`Changed`:return{label:`CHANGED`,dot:`bg-cobalt`};case`Performance`:return{label:`PERFORMANCE`,dot:`bg-ember`};case`Deploy`:return{label:`DEPLOY`,dot:`bg-ink-4`};case`Docs`:return{label:`DOCS`,dot:`bg-ink-4`};default:return{label:`OTHER`,dot:`bg-ink-4`}}}var p=e=>e.version?e.version.replace(/^v/,``):c(`about.unreleased`),m=e=>e.timestamp?new Date(e.timestamp*1e3).toISOString().slice(0,10):``,h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=[];for(let t of e){if(`${p(t)} ${m(t)}`.toLowerCase().includes(n)){r.push(t);continue}let e=t.commits.filter(e=>`${f(e).label} ${e.scope??``} ${e.message}`.toLowerCase().includes(n));e.length>0&&r.push({...t,commits:e})}return r}async function _(e){if(e)try{let t=await fetch(`https://raw.githubusercontent.com/engenty/wizards/v${e}/apps/web/src/about/changelog.json`,{signal:AbortSignal.timeout(5e3)});if(t.ok)return await t.json()}catch{}return(await l(async()=>{let{default:e}=await import(`./changelog-DDXnAaHm.js`);return{default:e}},[])).default}function v({release:e}){return(0,d.jsx)(`ul`,{className:`flex flex-col gap-2`,children:e.commits.map(e=>{let t=f(e);return(0,d.jsxs)(`li`,{className:`flex items-start gap-2.5 text-[0.875rem]`,children:[(0,d.jsx)(`span`,{className:r(`mt-[7px] size-1.5 shrink-0 rounded-full`,t.dot)}),(0,d.jsxs)(`span`,{className:`min-w-0 text-ink-2`,children:[(0,d.jsxs)(`span`,{className:`font-semibold text-[0.75rem] text-ink tracking-wide`,children:[t.label,e.scope?` [${e.scope}]`:``]}),` `,h(e.message),e.breaking?(0,d.jsx)(`span`,{className:`ml-1.5 rounded-full bg-rose-tint px-1.5 py-0.5 font-medium text-[0.75rem] text-rose`,children:c(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[r,l]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||r)return;let t=!1;return _(n).then(e=>{t||l(e)}),()=>{t=!0}},[e,r,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=r?g(r,f):[];return(0,d.jsxs)(i,{open:e,onClose:t,title:c(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:c(`about.changelogHint`)}),r===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(a,{})}):r.length===0?(0,d.jsx)(s,{children:c(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o,{type:`search`,value:f,placeholder:c(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(s,{children:c(`about.noMatches`)}):null,y.map(e=>(0,d.jsxs)(`section`,{className:`mt-6`,children:[(0,d.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[p(e),(0,d.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:m(e)})]}),(0,d.jsx)(`div`,{className:`mt-3`,children:(0,d.jsx)(v,{release:e})})]},e.version??`unreleased`))]})]})}export{y as ChangelogDialog,v as ReleaseNotes,_ as loadReleases,m as releaseDate,p as releaseLabel};
|