pantheon-opencode 2.0.3 → 2.1.0
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/AGENTS.global.md +1 -1
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +68 -0
- package/README.md +13 -6
- package/README.pt-BR.md +12 -5
- package/commands/pantheon-deepwork.md +11 -2
- package/package.json +2 -1
- package/plugin.json +1 -1
- package/prompts/orchestrate-with-zeus.prompt.md +2 -0
- package/pyproject.toml +1 -1
- package/scripts/cost.mjs +4 -5
- package/scripts/decision-router-budget.mjs +27 -6
- package/scripts/decision-router.mjs +76 -34
- package/scripts/doctor.mjs +74 -0
- package/scripts/install/decision-router-config.mjs +32 -7
- package/src/agents/apollo.md +6 -53
- package/src/agents/athena.md +1 -0
- package/src/agents/talos.md +10 -40
- package/src/agents/themis.md +9 -0
- package/src/agents/zeus.md +29 -2
- package/src/mcp/pantheon_vision.py +33 -2
- package/src/pantheon/background-job-board.ts +33 -0
- package/src/pantheon/bus.ts +190 -0
- package/src/pantheon/cost-command.ts +4 -1
- package/src/pantheon/deepwork/deepwork-tool.ts +370 -0
- package/src/pantheon/deepwork/plan-projection.ts +274 -0
- package/src/pantheon/deepwork/plan-schema.ts +93 -0
- package/src/pantheon/deepwork/plan-tracker.ts +336 -0
- package/src/pantheon/execution-receipt.ts +113 -0
- package/src/pantheon/jev-decision-tool.ts +8 -2
- package/src/pantheon/local-decision-budget.ts +36 -6
- package/src/pantheon/model-command.ts +2 -4
- package/src/pantheon/native-vision.ts +3 -1
- package/src/pantheon/prompt-cache-order.ts +89 -0
- package/src/pantheon/skill-search-tool.ts +2 -2
- package/src/pantheon/themis-reflex.ts +164 -0
- package/src/pantheon/tools.ts +2 -0
- package/src/plugin/index.js +979 -60
- package/src/plugins/tui/dist/tui.js +461 -289
- package/src/plugins/tui/dist/tui.js.map +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/autonomy-state.ts +14 -16
- package/src/plugins/tui/src/decision-router-state.ts +22 -10
- package/src/plugins/tui/src/pantheon-settings-state.ts +119 -35
- package/src/plugins/tui/src/pantheon-settings.tsx +142 -48
- package/src/plugins/tui/src/preset-state.ts +96 -6
- package/src/plugins/tui/src/update-status.ts +62 -22
|
@@ -111,29 +111,6 @@ function formatSpent(cost) {
|
|
|
111
111
|
const MODEL_USAGE_VISIBLE_CEILING = 3;
|
|
112
112
|
const MODEL_USAGE_MESSAGE_LIMIT = 400;
|
|
113
113
|
const MODEL_USAGE_SESSION_LIMIT = 8;
|
|
114
|
-
Object.freeze([
|
|
115
|
-
"auto",
|
|
116
|
-
"pt-BR",
|
|
117
|
-
"en"
|
|
118
|
-
]);
|
|
119
|
-
/**
|
|
120
|
-
* Resolve effective language: 'pt-BR' or 'en'.
|
|
121
|
-
* Defaults to 'pt-BR' if system locale contains 'pt', if Intl locale is pt,
|
|
122
|
-
* or if system timezone is Brazilian/Portuguese; otherwise 'en'.
|
|
123
|
-
*/
|
|
124
|
-
function resolveLanguage(preference = "auto", env = process.env) {
|
|
125
|
-
if (preference === "pt-BR") return "pt-BR";
|
|
126
|
-
if (preference === "en") return "en";
|
|
127
|
-
if ((env.LC_ALL ?? env.LC_MESSAGES ?? env.LANG ?? env.LANGUAGE ?? "").toLowerCase().startsWith("pt")) return "pt-BR";
|
|
128
|
-
try {
|
|
129
|
-
if (Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase().startsWith("pt")) return "pt-BR";
|
|
130
|
-
} catch {}
|
|
131
|
-
try {
|
|
132
|
-
const tz = (env.TZ ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "").toLowerCase();
|
|
133
|
-
if (tz.includes("sao_paulo") || tz.includes("brazil") || tz.includes("fortaleza") || tz.includes("recife") || tz.includes("manaus") || tz.includes("belem") || tz.includes("cuiaba") || tz.includes("campo_grande") || tz.includes("porto_velho") || tz.includes("rio_branco") || tz.includes("boa_vista") || tz.includes("maceio") || tz.includes("bahia") || tz.includes("noronha") || tz.includes("araguaina") || tz.includes("santarem") || tz.includes("lisbon") || tz.includes("madeira") || tz.includes("azores")) return "pt-BR";
|
|
134
|
-
} catch {}
|
|
135
|
-
return "en";
|
|
136
|
-
}
|
|
137
114
|
//#endregion
|
|
138
115
|
//#region src/autonomy-state.ts
|
|
139
116
|
const DEFAULT_GOAL_LOOP_PREFS = {
|
|
@@ -188,7 +165,7 @@ function parseUsd(cell) {
|
|
|
188
165
|
return Number.isFinite(value) && value > 0 ? value : null;
|
|
189
166
|
}
|
|
190
167
|
function buildAutonomyTab(input) {
|
|
191
|
-
const isPt =
|
|
168
|
+
const isPt = input.languagePref === "pt-BR";
|
|
192
169
|
return {
|
|
193
170
|
id: "autonomy",
|
|
194
171
|
title: isPt ? "Autonomia" : "Autonomy",
|
|
@@ -236,25 +213,25 @@ function buildAutonomyTab(input) {
|
|
|
236
213
|
}]
|
|
237
214
|
},
|
|
238
215
|
{
|
|
239
|
-
title: isPt ? "Gradiente de
|
|
216
|
+
title: isPt ? "Gradiente de Decisão (política de referência · governado por J1 e Orçamentos)" : "Decision Gradient (reference policy · governed by J1 & Budgets)",
|
|
240
217
|
rows: [
|
|
241
218
|
{
|
|
242
219
|
id: "autonomy.gradient.solo",
|
|
243
|
-
name: "Decide solo",
|
|
244
|
-
value: "autonomous",
|
|
245
|
-
note: isPt ? "
|
|
220
|
+
name: isPt ? "Decisão solo" : "Decide solo",
|
|
221
|
+
value: isPt ? "autônomo" : "autonomous",
|
|
222
|
+
note: isPt ? "ações rotineiras de baixo risco · reversível sem travas (sem portão)" : "reversible & low-risk edits, routine fixes (no gate)"
|
|
246
223
|
},
|
|
247
224
|
{
|
|
248
225
|
id: "autonomy.gradient.jev",
|
|
249
|
-
name: "Jev decides",
|
|
250
|
-
value: "arbitrated",
|
|
251
|
-
note: isPt ? "ambiguidade de tipos e
|
|
226
|
+
name: isPt ? "Decisão Jev" : "Jev decides",
|
|
227
|
+
value: isPt ? "arbitrado" : "arbitrated",
|
|
228
|
+
note: isPt ? "ambiguidade de tipos e rotas · configurado nos Tetos de Orçamento acima" : "typed ambiguity & candidate ranking · configured via Budgets above"
|
|
252
229
|
},
|
|
253
230
|
{
|
|
254
231
|
id: "autonomy.gradient.human",
|
|
255
|
-
name: "Human decides",
|
|
256
|
-
value: "human review",
|
|
257
|
-
note: isPt ? "
|
|
232
|
+
name: isPt ? "Aprovação humana" : "Human decides",
|
|
233
|
+
value: isPt ? "revisão humana" : "human review",
|
|
234
|
+
note: isPt ? "ações destrutivas e de alto risco · configurado no limiar do Portão J1" : "high-risk & destructive operations · configured via J1 Gate"
|
|
258
235
|
}
|
|
259
236
|
]
|
|
260
237
|
}
|
|
@@ -320,23 +297,33 @@ const DECISION_KNOWN_MODELS = Object.freeze({
|
|
|
320
297
|
* note. Drift-pinned against the installer/runtime sources in tests.
|
|
321
298
|
*/
|
|
322
299
|
const DECISION_PROVIDER_CREDENTIALS = Object.freeze({
|
|
323
|
-
"openai-decisions": {
|
|
300
|
+
"openai-decisions": {
|
|
301
|
+
note: "host-configured model — provision via `decision-router setup-model openai-decisions`",
|
|
302
|
+
notePt: "modelo do host — configure via `decision-router setup-model openai-decisions`"
|
|
303
|
+
},
|
|
324
304
|
"typesafe-jev": {
|
|
325
305
|
env: "TYPESAFE_API_KEY",
|
|
326
|
-
note: "export TYPESAFE_API_KEY=… then restart"
|
|
306
|
+
note: "export TYPESAFE_API_KEY=… then restart",
|
|
307
|
+
notePt: "export TYPESAFE_API_KEY=… e depois reinicie"
|
|
308
|
+
},
|
|
309
|
+
"opencode-console-jev": {
|
|
310
|
+
note: "rides your OpenCode login — no separate key",
|
|
311
|
+
notePt: "utiliza login do OpenCode — sem chave separada"
|
|
327
312
|
},
|
|
328
|
-
"opencode-console-jev": { note: "rides your OpenCode login — no separate key" },
|
|
329
313
|
"openrouter-jev": {
|
|
330
314
|
env: "OPENROUTER_API_KEY",
|
|
331
|
-
note: "export OPENROUTER_API_KEY=… then restart"
|
|
315
|
+
note: "export OPENROUTER_API_KEY=… then restart",
|
|
316
|
+
notePt: "export OPENROUTER_API_KEY=… e depois reinicie"
|
|
332
317
|
},
|
|
333
318
|
"vercel-gateway-jev": {
|
|
334
319
|
env: "AI_GATEWAY_API_KEY",
|
|
335
|
-
note: "export AI_GATEWAY_API_KEY=… then restart"
|
|
320
|
+
note: "export AI_GATEWAY_API_KEY=… then restart",
|
|
321
|
+
notePt: "export AI_GATEWAY_API_KEY=… e depois reinicie"
|
|
336
322
|
},
|
|
337
323
|
"cloudflare-workers-jev": {
|
|
338
324
|
env: "CLOUDFLARE_API_TOKEN",
|
|
339
|
-
note: "needs accountId (setup-model --account-id=…) + CLOUDFLARE_API_TOKEN"
|
|
325
|
+
note: "needs accountId (setup-model --account-id=…) + CLOUDFLARE_API_TOKEN",
|
|
326
|
+
notePt: "requer accountId (setup-model --account-id=…) + CLOUDFLARE_API_TOKEN"
|
|
340
327
|
}
|
|
341
328
|
});
|
|
342
329
|
const DECISION_TARGET_CYCLE = Object.freeze(DECISION_KNOWN_PROVIDERS.map((provider) => `${provider}/${DECISION_KNOWN_MODELS[provider]}`));
|
|
@@ -530,14 +517,14 @@ function credentialStatus(provider, env, authProviders, configProviders) {
|
|
|
530
517
|
return "missing";
|
|
531
518
|
}
|
|
532
519
|
function buildDecisionTab(read, env = process.env, authProviders = /* @__PURE__ */ new Set(), configProviders = /* @__PURE__ */ new Set(), languagePref) {
|
|
533
|
-
const isPt =
|
|
520
|
+
const isPt = languagePref === "pt-BR";
|
|
534
521
|
const { config, corrupt } = read;
|
|
535
522
|
const rows = [{
|
|
536
523
|
id: "decision.enabled",
|
|
537
524
|
name: isPt ? "Assistente Jev" : "Jev Assistant",
|
|
538
525
|
value: config.enabled ? "enabled" : "disabled",
|
|
539
526
|
...corrupt ? {} : { cycle: DECISION_ENABLED_CYCLE },
|
|
540
|
-
note: corrupt ? isPt ? "config inválida — runtime fail-closes;
|
|
527
|
+
note: corrupt ? isPt ? "config inválida — runtime fail-closes; repare via `decision-router setup-model`" : "config unreadable/invalid — runtime fail-closes; repair via `decision-router setup-model`" : isPt ? "aplica em tempo real — arbitragem de decisões relida a cada chamada" : "applies live — the runtime re-reads this on every gated call"
|
|
541
528
|
}, {
|
|
542
529
|
id: "decision.selection.mode",
|
|
543
530
|
name: isPt ? "Modo de Operação" : "Operation Mode",
|
|
@@ -581,7 +568,7 @@ function buildDecisionTab(read, env = process.env, authProviders = /* @__PURE__
|
|
|
581
568
|
id: `decision.key.${provider}`,
|
|
582
569
|
name: provider,
|
|
583
570
|
value: status === "missing" ? "MISSING" : status,
|
|
584
|
-
note: credential.note
|
|
571
|
+
note: isPt ? credential.notePt ?? credential.note : credential.note
|
|
585
572
|
};
|
|
586
573
|
})
|
|
587
574
|
}]
|
|
@@ -801,17 +788,18 @@ function settledDraft(draft, applied) {
|
|
|
801
788
|
return next;
|
|
802
789
|
}
|
|
803
790
|
const GATES_ENABLED_CYCLE = Object.freeze(["enabled", "disabled"]);
|
|
804
|
-
function buildGatesTab(load) {
|
|
791
|
+
function buildGatesTab(load, languagePref) {
|
|
792
|
+
const isPt = languagePref === "pt-BR";
|
|
805
793
|
const merged = mergedOverrides(load);
|
|
806
794
|
const rowFor = (behavior) => {
|
|
807
795
|
const fromProject = load.project[behavior.id] !== void 0;
|
|
808
796
|
const writable = !fromProject && canWriteOverrides(load);
|
|
809
797
|
return {
|
|
810
798
|
id: `gate.${behavior.id}`,
|
|
811
|
-
name: fromProject ? `${behavior.title} (project)` : behavior.title,
|
|
799
|
+
name: fromProject ? `${behavior.title} (${isPt ? "projeto" : "project"})` : behavior.title,
|
|
812
800
|
value: isBehaviorDisabled(merged, behavior.id) ? "disabled" : "enabled",
|
|
813
801
|
...writable ? { cycle: GATES_ENABLED_CYCLE } : {},
|
|
814
|
-
note: fromProject ? "project file wins at runtime — edit .pantheon/overrides.json" : behavior.description
|
|
802
|
+
note: fromProject ? isPt ? "arquivo do projeto tem precedência · edite .pantheon/overrides.json" : "project file wins at runtime — edit .pantheon/overrides.json" : behavior.description
|
|
815
803
|
};
|
|
816
804
|
};
|
|
817
805
|
const install = SETTINGS_BEHAVIORS.filter((behavior) => behavior.kind === "install");
|
|
@@ -820,65 +808,117 @@ function buildGatesTab(load) {
|
|
|
820
808
|
id: "gates",
|
|
821
809
|
title: "Gates",
|
|
822
810
|
groups: [{
|
|
823
|
-
title: "Install skills",
|
|
811
|
+
title: isPt ? "Skills instaladas" : "Install skills",
|
|
824
812
|
rows: install.map(rowFor)
|
|
825
813
|
}, {
|
|
826
|
-
title: "Runtime gates",
|
|
814
|
+
title: isPt ? "Portões de execução" : "Runtime gates",
|
|
827
815
|
rows: runtime.map(rowFor)
|
|
828
816
|
}]
|
|
829
817
|
};
|
|
830
818
|
}
|
|
831
|
-
function buildAboutTab(version) {
|
|
819
|
+
function buildAboutTab(version, extra) {
|
|
820
|
+
const isPt = extra?.languagePref === "pt-BR";
|
|
821
|
+
const sysRows = [{
|
|
822
|
+
id: "about.version",
|
|
823
|
+
name: isPt ? "Versão" : "Version",
|
|
824
|
+
value: `v${version}`,
|
|
825
|
+
note: isPt ? "OpenCode 2.x nativo — contrato V1 descontinuado" : "OpenCode 2.x only — the V1 contract is removed"
|
|
826
|
+
}, {
|
|
827
|
+
id: "about.behaviors",
|
|
828
|
+
name: isPt ? "Comportamentos" : "Behaviors",
|
|
829
|
+
value: String(SETTINGS_BEHAVIORS.length),
|
|
830
|
+
note: isPt ? "portões e skills de governança registradas" : "registered governance gates and skills"
|
|
831
|
+
}];
|
|
832
|
+
if (extra?.nodeVersion) sysRows.push({
|
|
833
|
+
id: "about.runtime",
|
|
834
|
+
name: "Runtime Node.js",
|
|
835
|
+
value: `v${extra.nodeVersion}`,
|
|
836
|
+
note: extra.platform ? `${isPt ? "plataforma" : "platform"}: ${extra.platform}` : ""
|
|
837
|
+
});
|
|
838
|
+
const govRows = [
|
|
839
|
+
{
|
|
840
|
+
id: "about.preset",
|
|
841
|
+
name: isPt ? "Predefinição" : "Active Preset",
|
|
842
|
+
value: extra?.preset ?? "none",
|
|
843
|
+
note: isPt ? "modelo global ativo do Pantheon" : "global model preset active in Pantheon"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
id: "about.decision",
|
|
847
|
+
name: isPt ? "Assistente Jev" : "Decision Router",
|
|
848
|
+
value: extra?.decisionEnabled ? isPt ? "ativado" : "enabled" : isPt ? "desativado" : "disabled",
|
|
849
|
+
note: isPt ? "arbitragem de modelos e candidatos" : "model and candidate arbitration"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
id: "about.j1",
|
|
853
|
+
name: isPt ? "Portão J1" : "J1 Risk Gate",
|
|
854
|
+
value: extra?.j1Mode ?? "shadow",
|
|
855
|
+
note: isPt ? "portão de risco de segurança operacional" : "operational safety risk score gate"
|
|
856
|
+
}
|
|
857
|
+
];
|
|
858
|
+
const refRows = [{
|
|
859
|
+
id: "about.license",
|
|
860
|
+
name: isPt ? "Licença" : "License",
|
|
861
|
+
value: "MIT",
|
|
862
|
+
note: "Open source · Pantheon Project"
|
|
863
|
+
}, {
|
|
864
|
+
id: "about.repo",
|
|
865
|
+
name: isPt ? "Repositório" : "Repository",
|
|
866
|
+
value: "ils15/pantheon-opencode",
|
|
867
|
+
note: "github.com/ils15/pantheon-opencode"
|
|
868
|
+
}];
|
|
869
|
+
const groups = [{
|
|
870
|
+
title: isPt ? "Sistema & Plataforma" : "System & Platform",
|
|
871
|
+
rows: sysRows
|
|
872
|
+
}];
|
|
873
|
+
if (extra?.preset !== void 0 || extra?.decisionEnabled !== void 0) groups.push({
|
|
874
|
+
title: isPt ? "Governança & Roteamento" : "Governance & Routing",
|
|
875
|
+
rows: govRows
|
|
876
|
+
});
|
|
877
|
+
groups.push({
|
|
878
|
+
title: isPt ? "Projeto & Referências" : "Project & References",
|
|
879
|
+
rows: refRows
|
|
880
|
+
});
|
|
832
881
|
return {
|
|
833
882
|
id: "about",
|
|
834
|
-
title: "About",
|
|
835
|
-
groups
|
|
836
|
-
id: "about.version",
|
|
837
|
-
name: "Version",
|
|
838
|
-
value: `v${version}`,
|
|
839
|
-
note: "OpenCode 2.x only — the V1 contract is removed"
|
|
840
|
-
}, {
|
|
841
|
-
id: "about.behaviors",
|
|
842
|
-
name: "Behaviors",
|
|
843
|
-
value: String(SETTINGS_BEHAVIORS.length),
|
|
844
|
-
note: "docs/design/2.0-settings-and-install.md"
|
|
845
|
-
}] }]
|
|
883
|
+
title: isPt ? "Sobre" : "About",
|
|
884
|
+
groups
|
|
846
885
|
};
|
|
847
886
|
}
|
|
848
|
-
function buildChangelogTab(version, items = []) {
|
|
887
|
+
function buildChangelogTab(version, items = [], languagePref) {
|
|
888
|
+
const isPt = languagePref === "pt-BR";
|
|
849
889
|
const rows = [];
|
|
850
890
|
if (items.length > 0) items.forEach((item, index) => {
|
|
851
891
|
rows.push({
|
|
852
892
|
id: `changelog.item.${index + 1}`,
|
|
853
893
|
name: item.title.slice(0, 26),
|
|
854
|
-
value:
|
|
894
|
+
value: "",
|
|
855
895
|
note: item.detail
|
|
856
896
|
});
|
|
857
897
|
});
|
|
858
898
|
else rows.push({
|
|
859
899
|
id: "changelog.info",
|
|
860
|
-
name: "Release",
|
|
900
|
+
name: isPt ? "Versão" : "Release",
|
|
861
901
|
value: `v${version}`,
|
|
862
|
-
note: "view full history in CHANGELOG.md or GitHub releases"
|
|
902
|
+
note: isPt ? "veja o histórico completo no CHANGELOG.md ou no GitHub" : "view full history in CHANGELOG.md or GitHub releases"
|
|
863
903
|
});
|
|
864
904
|
return {
|
|
865
905
|
id: "changelog",
|
|
866
|
-
title: "Changelog",
|
|
906
|
+
title: isPt ? "Changelog" : "Changelog",
|
|
867
907
|
groups: [{
|
|
868
|
-
title: `What's New in v${version}`,
|
|
908
|
+
title: isPt ? `Novidades na versão v${version}` : `What's New in v${version}`,
|
|
869
909
|
rows
|
|
870
910
|
}, {
|
|
871
|
-
title: "Release References",
|
|
911
|
+
title: isPt ? "Referências de Versão" : "Release References",
|
|
872
912
|
rows: [{
|
|
873
913
|
id: "changelog.docs",
|
|
874
|
-
name: "Documentation",
|
|
914
|
+
name: isPt ? "Documentação" : "Documentation",
|
|
875
915
|
value: "CHANGELOG.md",
|
|
876
|
-
note: "shipped at plugin root and repository root"
|
|
916
|
+
note: isPt ? "incluído na raiz do plugin e do repositório" : "shipped at plugin root and repository root"
|
|
877
917
|
}, {
|
|
878
918
|
id: "changelog.repo",
|
|
879
|
-
name: "GitHub Repository",
|
|
919
|
+
name: isPt ? "Repositório GitHub" : "GitHub Repository",
|
|
880
920
|
value: "ils15/pantheon-opencode",
|
|
881
|
-
note: "releases, pull requests and discussion"
|
|
921
|
+
note: isPt ? "versões, pull requests e discussões" : "releases, pull requests and discussion"
|
|
882
922
|
}]
|
|
883
923
|
}]
|
|
884
924
|
};
|
|
@@ -1073,6 +1113,29 @@ function buildDoctorTab(input) {
|
|
|
1073
1113
|
}] }]
|
|
1074
1114
|
};
|
|
1075
1115
|
}
|
|
1116
|
+
Object.freeze([
|
|
1117
|
+
"auto",
|
|
1118
|
+
"pt-BR",
|
|
1119
|
+
"en"
|
|
1120
|
+
]);
|
|
1121
|
+
/**
|
|
1122
|
+
* Resolve effective language: 'pt-BR' or 'en'.
|
|
1123
|
+
* Defaults to 'pt-BR' if system locale contains 'pt', if Intl locale is pt,
|
|
1124
|
+
* or if system timezone is Brazilian/Portuguese; otherwise 'en'.
|
|
1125
|
+
*/
|
|
1126
|
+
function resolveLanguage(preference = "auto", env = process.env) {
|
|
1127
|
+
if (preference === "pt-BR") return "pt-BR";
|
|
1128
|
+
if (preference === "en") return "en";
|
|
1129
|
+
if ((env.LC_ALL ?? env.LC_MESSAGES ?? env.LANG ?? env.LANGUAGE ?? "").toLowerCase().startsWith("pt")) return "pt-BR";
|
|
1130
|
+
try {
|
|
1131
|
+
if (Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase().startsWith("pt")) return "pt-BR";
|
|
1132
|
+
} catch {}
|
|
1133
|
+
try {
|
|
1134
|
+
const tz = (env.TZ ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "").toLowerCase();
|
|
1135
|
+
if (tz.includes("sao_paulo") || tz.includes("brazil") || tz.includes("fortaleza") || tz.includes("recife") || tz.includes("manaus") || tz.includes("belem") || tz.includes("cuiaba") || tz.includes("campo_grande") || tz.includes("porto_velho") || tz.includes("rio_branco") || tz.includes("boa_vista") || tz.includes("maceio") || tz.includes("bahia") || tz.includes("noronha") || tz.includes("araguaina") || tz.includes("santarem") || tz.includes("lisbon") || tz.includes("madeira") || tz.includes("azores")) return "pt-BR";
|
|
1136
|
+
} catch {}
|
|
1137
|
+
return "en";
|
|
1138
|
+
}
|
|
1076
1139
|
//#endregion
|
|
1077
1140
|
//#region src/j1-gate-status.ts
|
|
1078
1141
|
const J1_FLAG_ENV = "PANTHEON_J1_RISK_SCORE";
|
|
@@ -1221,26 +1284,74 @@ function backupMarker(path) {
|
|
|
1221
1284
|
mkdirSync(dirname(path), { recursive: true });
|
|
1222
1285
|
copyFileSync(path, `${path}.bak`);
|
|
1223
1286
|
}
|
|
1287
|
+
const VISION_MODEL_OPTIONS = Object.freeze([
|
|
1288
|
+
"auto",
|
|
1289
|
+
"opencode-go/mimo-v2.6-flash",
|
|
1290
|
+
"google/gemini-2.5-flash",
|
|
1291
|
+
"openai/gpt-5-mini",
|
|
1292
|
+
"anthropic/claude-3-5-haiku",
|
|
1293
|
+
"opencode-go/mimo-v2.5"
|
|
1294
|
+
]);
|
|
1295
|
+
function visionConfigPaths(cwd = process.cwd(), env = process.env) {
|
|
1296
|
+
const home = env.HOME ?? "";
|
|
1297
|
+
const xdg = env.XDG_CONFIG_HOME ?? join(home, ".config");
|
|
1298
|
+
return [join(cwd, ".opencode", "opencode-vision.json"), join(xdg, "opencode", "opencode-vision.json")];
|
|
1299
|
+
}
|
|
1300
|
+
function readConfiguredVisionModel(cwd = process.cwd(), env = process.env) {
|
|
1301
|
+
for (const path of visionConfigPaths(cwd, env)) try {
|
|
1302
|
+
if (existsSync(path)) {
|
|
1303
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
1304
|
+
if (typeof parsed?.visionModel === "string" && parsed.visionModel.trim()) return parsed.visionModel.trim();
|
|
1305
|
+
}
|
|
1306
|
+
} catch {}
|
|
1307
|
+
return "auto";
|
|
1308
|
+
}
|
|
1309
|
+
function writeConfiguredVisionModel(model, cwd = process.cwd(), env = process.env) {
|
|
1310
|
+
const home = env.HOME ?? "";
|
|
1311
|
+
const xdg = env.XDG_CONFIG_HOME ?? join(home, ".config");
|
|
1312
|
+
const projectDir = join(cwd, ".opencode");
|
|
1313
|
+
const targetPath = existsSync(projectDir) ? join(projectDir, "opencode-vision.json") : join(xdg, "opencode", "opencode-vision.json");
|
|
1314
|
+
let current = {};
|
|
1315
|
+
try {
|
|
1316
|
+
if (existsSync(targetPath)) current = JSON.parse(readFileSync(targetPath, "utf8"));
|
|
1317
|
+
} catch {
|
|
1318
|
+
current = {};
|
|
1319
|
+
}
|
|
1320
|
+
if (model === "auto" || !model.trim()) delete current.visionModel;
|
|
1321
|
+
else current.visionModel = model.trim();
|
|
1322
|
+
mkdirSync(dirname(targetPath), { recursive: true });
|
|
1323
|
+
const temp = `${targetPath}.tui.tmp`;
|
|
1324
|
+
writeFileSync(temp, `${JSON.stringify(current, null, 2)}\n`, "utf8");
|
|
1325
|
+
renameSync(temp, targetPath);
|
|
1326
|
+
}
|
|
1224
1327
|
const PRESET_CYCLE = Object.freeze(["none", ...PRESET_NAMES]);
|
|
1225
|
-
function buildPresetTab(input) {
|
|
1328
|
+
function buildPresetTab(input, languagePref) {
|
|
1329
|
+
const isPt = languagePref === "pt-BR";
|
|
1226
1330
|
const rows = [{
|
|
1227
1331
|
id: "preset",
|
|
1228
|
-
name: "Preset",
|
|
1332
|
+
name: isPt ? "Predefinição" : "Preset",
|
|
1229
1333
|
value: input.globalName ?? "none",
|
|
1230
1334
|
cycle: PRESET_CYCLE,
|
|
1231
|
-
note: "global marker · atomic write, .bak backup · none = opencode defaults"
|
|
1335
|
+
note: isPt ? "marcador global · gravação atômica, backup .bak · none = padrão OpenCode" : "global marker · atomic write, .bak backup · none = opencode defaults"
|
|
1232
1336
|
}];
|
|
1233
1337
|
if (input.projectName !== null) rows.push({
|
|
1234
1338
|
id: "preset.project",
|
|
1235
|
-
name: "Project",
|
|
1339
|
+
name: isPt ? "Projeto" : "Project",
|
|
1236
1340
|
value: input.projectName,
|
|
1237
|
-
note: `${projectActivePresetPath()} wins over the global marker — read-only here`
|
|
1341
|
+
note: isPt ? `${projectActivePresetPath()} tem precedência sobre o global — somente leitura aqui` : `${projectActivePresetPath()} wins over the global marker — read-only here`
|
|
1342
|
+
});
|
|
1343
|
+
if (input.visionModel !== void 0) rows.push({
|
|
1344
|
+
id: "preset.vision_model",
|
|
1345
|
+
name: isPt ? "Modelo de Visão" : "Vision Model",
|
|
1346
|
+
value: input.visionModel || "auto",
|
|
1347
|
+
cycle: VISION_MODEL_OPTIONS,
|
|
1348
|
+
note: isPt ? "modelo para inspeção de imagens (vision_describe) · salvo em opencode-vision.json" : "model for image inspection (vision_describe) · saved in opencode-vision.json"
|
|
1238
1349
|
});
|
|
1239
1350
|
return {
|
|
1240
1351
|
id: "preset",
|
|
1241
1352
|
title: "Preset",
|
|
1242
1353
|
groups: [{
|
|
1243
|
-
title: "Model preset",
|
|
1354
|
+
title: isPt ? "Predefinição de modelo" : "Model preset",
|
|
1244
1355
|
rows
|
|
1245
1356
|
}]
|
|
1246
1357
|
};
|
|
@@ -1707,13 +1818,14 @@ function registryTagForChannel(channel) {
|
|
|
1707
1818
|
function registryUrlForChannel(channel) {
|
|
1708
1819
|
return `https://registry.npmjs.org/pantheon-opencode/${registryTagForChannel(channel)}`;
|
|
1709
1820
|
}
|
|
1710
|
-
function formatAgo(ms) {
|
|
1711
|
-
if (ms < 6e4) return "just now";
|
|
1712
|
-
if (ms < 36e5) return `${Math.floor(ms / 6e4)}m ago`;
|
|
1713
|
-
if (ms < 864e5) return `${Math.floor(ms / 36e5)}h ago`;
|
|
1714
|
-
return `${Math.floor(ms / 864e5)}d ago`;
|
|
1821
|
+
function formatAgo(ms, isPt = false) {
|
|
1822
|
+
if (ms < 6e4) return isPt ? "agora mesmo" : "just now";
|
|
1823
|
+
if (ms < 36e5) return isPt ? `há ${Math.floor(ms / 6e4)}m` : `${Math.floor(ms / 6e4)}m ago`;
|
|
1824
|
+
if (ms < 864e5) return isPt ? `há ${Math.floor(ms / 36e5)}h` : `${Math.floor(ms / 36e5)}h ago`;
|
|
1825
|
+
return isPt ? `há ${Math.floor(ms / 864e5)}d` : `${Math.floor(ms / 864e5)}d ago`;
|
|
1715
1826
|
}
|
|
1716
1827
|
function buildUpdatesTab(input) {
|
|
1828
|
+
const isPt = input.languagePref === "pt-BR";
|
|
1717
1829
|
const nowMs = input.nowMs ?? Date.now();
|
|
1718
1830
|
const channel = input.selectedChannel ?? updateChannelFor(input.currentVersion);
|
|
1719
1831
|
const lastCheckMs = input.state.lastCheckMs;
|
|
@@ -1722,43 +1834,43 @@ function buildUpdatesTab(input) {
|
|
|
1722
1834
|
const newer = latest !== void 0 && comparePantheonVersions(latest, input.currentVersion) > 0 && !(stable(input.currentVersion) && !stable(latest));
|
|
1723
1835
|
const rows = [{
|
|
1724
1836
|
id: "update.channel",
|
|
1725
|
-
name: "Channel",
|
|
1837
|
+
name: isPt ? "Canal" : "Channel",
|
|
1726
1838
|
value: channel,
|
|
1727
1839
|
cycle: ["stable", "beta"],
|
|
1728
|
-
note: "stable tracks npm `latest`; beta tracks npm `beta`"
|
|
1840
|
+
note: isPt ? "stable segue npm `latest`; beta segue npm `beta`" : "stable tracks npm `latest`; beta tracks npm `beta`"
|
|
1729
1841
|
}, {
|
|
1730
1842
|
id: "update.check",
|
|
1731
|
-
name: "Check now",
|
|
1732
|
-
value: input.checking ? "checking…" : lastCheckMs ? `last check ${formatAgo(nowMs - lastCheckMs)}` : "never checked",
|
|
1843
|
+
name: isPt ? "Verificar agora" : "Check now",
|
|
1844
|
+
value: input.checking ? isPt ? "verificando…" : "checking…" : lastCheckMs ? isPt ? `última verificação ${formatAgo(nowMs - lastCheckMs, true)}` : `last check ${formatAgo(nowMs - lastCheckMs, false)}` : isPt ? "nunca verificado" : "never checked",
|
|
1733
1845
|
action: "update-check",
|
|
1734
|
-
note: "enter probes the registry for the running channel"
|
|
1846
|
+
note: isPt ? "enter consulta o registro npm para o canal ativo" : "enter probes the registry for the running channel"
|
|
1735
1847
|
}];
|
|
1736
1848
|
if (latest) {
|
|
1737
1849
|
rows.push({
|
|
1738
1850
|
id: "update.latest",
|
|
1739
|
-
name: "Registry",
|
|
1740
|
-
value: newer ? `v${latest} available` : "up to date",
|
|
1741
|
-
note: newer ? "adopt with `pantheon-opencode update`" : "no newer compatible version"
|
|
1851
|
+
name: isPt ? "Registro (npm)" : "Registry",
|
|
1852
|
+
value: newer ? `v${latest} ${isPt ? "disponível" : "available"}` : isPt ? "atualizado" : "up to date",
|
|
1853
|
+
note: newer ? isPt ? "instale com `pantheon-opencode update`" : "adopt with `pantheon-opencode update`" : isPt ? "nenhuma versão mais recente compatível" : "no newer compatible version"
|
|
1742
1854
|
});
|
|
1743
1855
|
rows.push({
|
|
1744
1856
|
id: "update.run",
|
|
1745
|
-
name: "Update now",
|
|
1746
|
-
value: input.updating ? "updating…" : newer ?
|
|
1857
|
+
name: isPt ? "Atualizar agora" : "Update now",
|
|
1858
|
+
value: input.updating ? isPt ? "atualizando…" : "updating…" : newer ? `${isPt ? "instalar" : "install"} v${latest}` : isPt ? "reinstalar / atualizar" : "reinstall / refresh",
|
|
1747
1859
|
action: "update-run",
|
|
1748
|
-
note: newer ? "enter runs `pantheon-opencode update`" : "enter refreshes installed copy"
|
|
1860
|
+
note: newer ? isPt ? "enter executa `pantheon-opencode update`" : "enter runs `pantheon-opencode update`" : isPt ? "enter atualiza a cópia instalada" : "enter refreshes installed copy"
|
|
1749
1861
|
});
|
|
1750
1862
|
}
|
|
1751
1863
|
rows.push({
|
|
1752
1864
|
id: "update.command",
|
|
1753
|
-
name: "CLI command",
|
|
1865
|
+
name: isPt ? "Comando CLI" : "CLI command",
|
|
1754
1866
|
value: channel === "beta" ? "pantheon-opencode update" : "pantheon-opencode update --stable",
|
|
1755
|
-
note: "run in terminal or OpenCode Desktop terminal"
|
|
1867
|
+
note: isPt ? "execute no terminal ou no terminal integrado do OpenCode" : "run in terminal or OpenCode Desktop terminal"
|
|
1756
1868
|
});
|
|
1757
1869
|
return {
|
|
1758
1870
|
id: "updates",
|
|
1759
|
-
title: "Updates",
|
|
1871
|
+
title: isPt ? "Atualizações" : "Updates",
|
|
1760
1872
|
groups: [{
|
|
1761
|
-
title: "Updates & Maintenance",
|
|
1873
|
+
title: isPt ? "Atualizações & Manutenção" : "Updates & Maintenance",
|
|
1762
1874
|
rows
|
|
1763
1875
|
}]
|
|
1764
1876
|
};
|
|
@@ -1950,7 +2062,7 @@ async function readChangelogForBundle(bundleUrl) {
|
|
|
1950
2062
|
}
|
|
1951
2063
|
/** The ambient build-time version, or null outside a tsdown build. */
|
|
1952
2064
|
function embeddedVersion() {
|
|
1953
|
-
return "2.0
|
|
2065
|
+
return "2.1.0";
|
|
1954
2066
|
}
|
|
1955
2067
|
/**
|
|
1956
2068
|
* Resolve the running Pantheon version for the what's-new window: the plugin
|
|
@@ -2175,10 +2287,35 @@ function persistUpdateCheckState(previous, latest) {
|
|
|
2175
2287
|
} catch {}
|
|
2176
2288
|
}
|
|
2177
2289
|
function resolveRunningVersion() {
|
|
2178
|
-
return "2.0
|
|
2290
|
+
return "2.1.0";
|
|
2179
2291
|
}
|
|
2180
2292
|
const VALUE_WIDTH = 24;
|
|
2181
2293
|
function SettingsWindow(props) {
|
|
2294
|
+
const isPt = () => resolveLanguage(tuiPrefs().layout?.language) === "pt-BR";
|
|
2295
|
+
const formatValueDisplay = (val) => {
|
|
2296
|
+
if (!isPt()) return val;
|
|
2297
|
+
switch (val) {
|
|
2298
|
+
case "enabled": return "ativado";
|
|
2299
|
+
case "disabled": return "desativado";
|
|
2300
|
+
case "granted": return "permitido";
|
|
2301
|
+
case "not granted": return "não permitido";
|
|
2302
|
+
case "explicit": return "explícito";
|
|
2303
|
+
case "auto": return "automático";
|
|
2304
|
+
case "local": return "local";
|
|
2305
|
+
case "autonomous": return "autônomo";
|
|
2306
|
+
case "arbitrated": return "arbitrado";
|
|
2307
|
+
case "human review": return "revisão humana";
|
|
2308
|
+
case "MISSING":
|
|
2309
|
+
case "missing": return "PENDENTE";
|
|
2310
|
+
case "auth store": return "login opencode";
|
|
2311
|
+
case "env": return "variável env";
|
|
2312
|
+
case "config": return "configuração";
|
|
2313
|
+
case "never checked": return "nunca verificado";
|
|
2314
|
+
case "up to date": return "atualizado";
|
|
2315
|
+
case "none": return "nenhum";
|
|
2316
|
+
default: return val;
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2182
2319
|
const tab = () => props.tabs()[props.page()] ?? props.tabs()[0] ?? EMPTY_TAB;
|
|
2183
2320
|
return (() => {
|
|
2184
2321
|
var _el$ = createElement("box"), _el$2 = createElement("box"), _el$3 = createElement("text"), _el$4 = createElement("b"), _el$6 = createElement("span"), _el$7 = createElement("box"), _el$8 = createElement("box"), _el$9 = createElement("box"), _el$0 = createElement("text"), _el$10 = createElement("box"), _el$11 = createElement("scrollbox");
|
|
@@ -2234,19 +2371,19 @@ function SettingsWindow(props) {
|
|
|
2234
2371
|
children: (t, index) => {
|
|
2235
2372
|
const isActive = () => index() === props.page();
|
|
2236
2373
|
return (() => {
|
|
2237
|
-
var _el$
|
|
2238
|
-
insertNode(_el$
|
|
2239
|
-
setProp(_el$
|
|
2240
|
-
setProp(_el$
|
|
2241
|
-
setProp(_el$
|
|
2242
|
-
setProp(_el$
|
|
2243
|
-
spread(_el$
|
|
2244
|
-
setProp(_el$
|
|
2245
|
-
spread(_el$
|
|
2374
|
+
var _el$27 = createElement("box"), _el$28 = createElement("text");
|
|
2375
|
+
insertNode(_el$27, _el$28);
|
|
2376
|
+
setProp(_el$27, "onMouseDown", () => props.onJumpTab?.(index()));
|
|
2377
|
+
setProp(_el$27, "paddingLeft", 1);
|
|
2378
|
+
setProp(_el$27, "paddingRight", 1);
|
|
2379
|
+
setProp(_el$27, "flexShrink", 0);
|
|
2380
|
+
spread(_el$27, mergeProps(() => isActive() ? { backgroundColor: "#262626" } : {}), true);
|
|
2381
|
+
setProp(_el$28, "wrapMode", "none");
|
|
2382
|
+
spread(_el$28, mergeProps({ get fg() {
|
|
2246
2383
|
return memo(() => !!isActive())() ? props.warn ?? "#fba970" : props.muted;
|
|
2247
2384
|
} }, () => isActive() ? { attributes: 1 } : {}), true);
|
|
2248
|
-
insert(_el$
|
|
2249
|
-
return _el$
|
|
2385
|
+
insert(_el$28, () => `${t.title}${tabDirty(props.draft(), t) ? " ●" : ""}`);
|
|
2386
|
+
return _el$27;
|
|
2250
2387
|
})();
|
|
2251
2388
|
}
|
|
2252
2389
|
}));
|
|
@@ -2271,22 +2408,22 @@ function SettingsWindow(props) {
|
|
|
2271
2408
|
return tab().groups;
|
|
2272
2409
|
},
|
|
2273
2410
|
children: (group) => (() => {
|
|
2274
|
-
var _el$
|
|
2275
|
-
setProp(_el$
|
|
2276
|
-
setProp(_el$
|
|
2277
|
-
insert(_el$
|
|
2411
|
+
var _el$29 = createElement("box");
|
|
2412
|
+
setProp(_el$29, "flexDirection", "column");
|
|
2413
|
+
setProp(_el$29, "marginBottom", 1);
|
|
2414
|
+
insert(_el$29, createComponent(Show, {
|
|
2278
2415
|
get when() {
|
|
2279
2416
|
return group.title !== void 0;
|
|
2280
2417
|
},
|
|
2281
2418
|
get children() {
|
|
2282
|
-
var _el$
|
|
2283
|
-
setProp(_el$
|
|
2284
|
-
insert(_el$
|
|
2285
|
-
effect((_$p) => setProp(_el$
|
|
2286
|
-
return _el$
|
|
2419
|
+
var _el$30 = createElement("text");
|
|
2420
|
+
setProp(_el$30, "attributes", 1);
|
|
2421
|
+
insert(_el$30, () => group.title);
|
|
2422
|
+
effect((_$p) => setProp(_el$30, "fg", props.warn ?? props.fg, _$p));
|
|
2423
|
+
return _el$30;
|
|
2287
2424
|
}
|
|
2288
2425
|
}), null);
|
|
2289
|
-
insert(_el$
|
|
2426
|
+
insert(_el$29, createComponent(For, {
|
|
2290
2427
|
get each() {
|
|
2291
2428
|
return group.rows;
|
|
2292
2429
|
},
|
|
@@ -2296,54 +2433,63 @@ function SettingsWindow(props) {
|
|
|
2296
2433
|
const staged = () => props.draft()[row.id] !== void 0;
|
|
2297
2434
|
const gutter = () => isSelected() ? "▸ " : " ";
|
|
2298
2435
|
const valueCell = () => {
|
|
2299
|
-
|
|
2300
|
-
if (row.
|
|
2301
|
-
if (row.
|
|
2302
|
-
|
|
2436
|
+
const formatted = formatValueDisplay(display());
|
|
2437
|
+
if (row.cycle !== void 0) return `< ${formatted} >`;
|
|
2438
|
+
if (row.action !== void 0) return `[ ${formatted} ]`;
|
|
2439
|
+
if (row.id.startsWith("autonomy.gradient.")) return `[ref] ${formatted}`;
|
|
2440
|
+
return formatted;
|
|
2303
2441
|
};
|
|
2304
2442
|
return (() => {
|
|
2305
|
-
var _el$
|
|
2306
|
-
insertNode(_el$
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
spread(_el$36, mergeProps(() => isSelected() ? { backgroundColor: "#262626" } : {}, { "onMouseDown": () => {
|
|
2443
|
+
var _el$31 = createElement("box"), _el$32 = createElement("box"), _el$33 = createElement("text");
|
|
2444
|
+
insertNode(_el$31, _el$32);
|
|
2445
|
+
setProp(_el$31, "flexDirection", "row");
|
|
2446
|
+
spread(_el$31, mergeProps(() => isSelected() ? { backgroundColor: "#262626" } : {}, { "onMouseDown": () => {
|
|
2310
2447
|
props.onSelectRow?.(row.id);
|
|
2311
2448
|
} }), true);
|
|
2312
|
-
insertNode(_el$
|
|
2313
|
-
setProp(_el$
|
|
2314
|
-
spread(_el$
|
|
2449
|
+
insertNode(_el$32, _el$33);
|
|
2450
|
+
setProp(_el$32, "width", 28);
|
|
2451
|
+
spread(_el$33, mergeProps({ get fg() {
|
|
2315
2452
|
return memo(() => !!isSelected())() ? props.warn ?? "#fba970" : props.fg;
|
|
2316
2453
|
} }, () => isSelected() ? { attributes: 1 } : {}), true);
|
|
2317
|
-
insert(_el$
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2454
|
+
insert(_el$33, () => `${gutter()}${row.name}`.padEnd(28));
|
|
2455
|
+
insert(_el$31, createComponent(Show, {
|
|
2456
|
+
get when() {
|
|
2457
|
+
return memo(() => row.value !== "")() && row.value !== void 0;
|
|
2458
|
+
},
|
|
2459
|
+
get children() {
|
|
2460
|
+
var _el$34 = createElement("box"), _el$35 = createElement("text");
|
|
2461
|
+
insertNode(_el$34, _el$35);
|
|
2462
|
+
setProp(_el$34, "width", 24);
|
|
2463
|
+
setProp(_el$34, "onMouseDown", () => {
|
|
2464
|
+
props.onSelectRow?.(row.id);
|
|
2465
|
+
props.onCycleValue?.(row.id, 1);
|
|
2466
|
+
});
|
|
2467
|
+
spread(_el$35, mergeProps({ get fg() {
|
|
2468
|
+
return memo(() => !!isSelected())() ? "#ffffff" : memo(() => !!staged())() ? props.warn ?? props.fg : props.muted;
|
|
2469
|
+
} }, () => isSelected() || staged() ? { attributes: 1 } : {}), true);
|
|
2470
|
+
insert(_el$35, () => `${valueCell()}${staged() ? " ●" : ""}`.padEnd(VALUE_WIDTH));
|
|
2471
|
+
return _el$34;
|
|
2472
|
+
}
|
|
2473
|
+
}), null);
|
|
2474
|
+
insert(_el$31, createComponent(Show, {
|
|
2329
2475
|
get when() {
|
|
2330
2476
|
return row.note !== void 0;
|
|
2331
2477
|
},
|
|
2332
2478
|
get children() {
|
|
2333
|
-
var _el$
|
|
2334
|
-
insertNode(_el$
|
|
2335
|
-
setProp(_el$
|
|
2336
|
-
setProp(_el$
|
|
2337
|
-
insert(_el$
|
|
2338
|
-
effect((_$p) => setProp(_el$
|
|
2339
|
-
return _el$
|
|
2479
|
+
var _el$36 = createElement("box"), _el$37 = createElement("text");
|
|
2480
|
+
insertNode(_el$36, _el$37);
|
|
2481
|
+
setProp(_el$36, "flexGrow", 1);
|
|
2482
|
+
setProp(_el$36, "flexShrink", 1);
|
|
2483
|
+
insert(_el$37, () => row.note);
|
|
2484
|
+
effect((_$p) => setProp(_el$37, "fg", isSelected() ? "#e5e7eb" : props.muted, _$p));
|
|
2485
|
+
return _el$36;
|
|
2340
2486
|
}
|
|
2341
2487
|
}), null);
|
|
2342
|
-
return _el$
|
|
2488
|
+
return _el$31;
|
|
2343
2489
|
})();
|
|
2344
2490
|
}
|
|
2345
2491
|
}), null);
|
|
2346
|
-
return _el$
|
|
2492
|
+
return _el$29;
|
|
2347
2493
|
})()
|
|
2348
2494
|
}));
|
|
2349
2495
|
insert(_el$, createComponent(Show, {
|
|
@@ -2366,170 +2512,170 @@ function SettingsWindow(props) {
|
|
|
2366
2512
|
},
|
|
2367
2513
|
get fallback() {
|
|
2368
2514
|
return (() => {
|
|
2369
|
-
var _el$
|
|
2370
|
-
insertNode(_el$
|
|
2371
|
-
setProp(_el$
|
|
2372
|
-
insert(_el$
|
|
2515
|
+
var _el$38 = createElement("box"), _el$52 = createElement("text");
|
|
2516
|
+
insertNode(_el$38, _el$52);
|
|
2517
|
+
setProp(_el$38, "flexDirection", "column");
|
|
2518
|
+
insert(_el$38, createComponent(Show, {
|
|
2373
2519
|
get when() {
|
|
2374
2520
|
return draftDirty(props.draft());
|
|
2375
2521
|
},
|
|
2376
2522
|
get fallback() {
|
|
2377
2523
|
return (() => {
|
|
2378
|
-
var _el$
|
|
2379
|
-
insertNode(_el$
|
|
2380
|
-
insertNode(_el$
|
|
2381
|
-
insertNode(_el$
|
|
2382
|
-
insertNode(_el$
|
|
2383
|
-
insertNode(_el$
|
|
2384
|
-
insertNode(_el$
|
|
2385
|
-
insertNode(_el$
|
|
2386
|
-
setProp(_el$
|
|
2387
|
-
setProp(_el$
|
|
2388
|
-
setProp(_el$
|
|
2524
|
+
var _el$53 = createElement("box"), _el$54 = createElement("box"), _el$55 = createElement("text"), _el$57 = createElement("text"), _el$59 = createElement("box"), _el$60 = createElement("text"), _el$62 = createElement("text"), _el$64 = createElement("box"), _el$65 = createElement("text"), _el$67 = createElement("box"), _el$68 = createElement("text");
|
|
2525
|
+
insertNode(_el$53, _el$54);
|
|
2526
|
+
insertNode(_el$53, _el$57);
|
|
2527
|
+
insertNode(_el$53, _el$59);
|
|
2528
|
+
insertNode(_el$53, _el$62);
|
|
2529
|
+
insertNode(_el$53, _el$64);
|
|
2530
|
+
insertNode(_el$53, _el$67);
|
|
2531
|
+
insertNode(_el$53, _el$68);
|
|
2532
|
+
setProp(_el$53, "flexDirection", "row");
|
|
2533
|
+
setProp(_el$53, "flexWrap", "wrap");
|
|
2534
|
+
setProp(_el$53, "alignItems", "center");
|
|
2535
|
+
setProp(_el$53, "flexShrink", 0);
|
|
2536
|
+
setProp(_el$53, "rowGap", 1);
|
|
2537
|
+
insertNode(_el$54, _el$55);
|
|
2538
|
+
setProp(_el$54, "backgroundColor", "#262626");
|
|
2539
|
+
setProp(_el$54, "flexShrink", 0);
|
|
2540
|
+
setProp(_el$54, "onMouseDown", () => props.onClose?.());
|
|
2541
|
+
insertNode(_el$55, createTextNode(` Close `));
|
|
2542
|
+
setProp(_el$55, "fg", "#ffffff");
|
|
2543
|
+
insertNode(_el$57, createTextNode(` `));
|
|
2544
|
+
setProp(_el$57, "flexShrink", 0);
|
|
2545
|
+
insertNode(_el$59, _el$60);
|
|
2546
|
+
setProp(_el$59, "backgroundColor", "#262626");
|
|
2547
|
+
setProp(_el$59, "flexShrink", 0);
|
|
2548
|
+
setProp(_el$59, "onMouseDown", () => props.onResetPage?.());
|
|
2549
|
+
insertNode(_el$60, createTextNode(` Reset page `));
|
|
2550
|
+
setProp(_el$60, "fg", "#ffffff");
|
|
2551
|
+
insertNode(_el$62, createTextNode(` `));
|
|
2389
2552
|
setProp(_el$62, "flexShrink", 0);
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
setProp(_el$
|
|
2393
|
-
setProp(_el$
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
setProp(_el$
|
|
2397
|
-
|
|
2398
|
-
setProp(_el$66, "flexShrink", 0);
|
|
2399
|
-
insertNode(_el$68, _el$69);
|
|
2400
|
-
setProp(_el$68, "backgroundColor", "#262626");
|
|
2553
|
+
insertNode(_el$64, _el$65);
|
|
2554
|
+
setProp(_el$64, "backgroundColor", "#262626");
|
|
2555
|
+
setProp(_el$64, "flexShrink", 0);
|
|
2556
|
+
setProp(_el$64, "onMouseDown", () => props.onStageDefaults?.());
|
|
2557
|
+
insertNode(_el$65, createTextNode(` Defaults `));
|
|
2558
|
+
setProp(_el$65, "fg", "#ffffff");
|
|
2559
|
+
setProp(_el$67, "flexGrow", 1);
|
|
2560
|
+
setProp(_el$67, "minWidth", 1);
|
|
2401
2561
|
setProp(_el$68, "flexShrink", 0);
|
|
2402
|
-
|
|
2403
|
-
insertNode(_el$69, createTextNode(` Reset page `));
|
|
2404
|
-
setProp(_el$69, "fg", "#ffffff");
|
|
2405
|
-
insertNode(_el$71, createTextNode(` `));
|
|
2406
|
-
setProp(_el$71, "flexShrink", 0);
|
|
2407
|
-
insertNode(_el$73, _el$74);
|
|
2408
|
-
setProp(_el$73, "backgroundColor", "#262626");
|
|
2409
|
-
setProp(_el$73, "flexShrink", 0);
|
|
2410
|
-
setProp(_el$73, "onMouseDown", () => props.onStageDefaults?.());
|
|
2411
|
-
insertNode(_el$74, createTextNode(` Defaults `));
|
|
2412
|
-
setProp(_el$74, "fg", "#ffffff");
|
|
2413
|
-
setProp(_el$76, "flexGrow", 1);
|
|
2414
|
-
setProp(_el$76, "minWidth", 1);
|
|
2415
|
-
insertNode(_el$77, createTextNode(`no staged changes`));
|
|
2416
|
-
setProp(_el$77, "flexShrink", 0);
|
|
2562
|
+
insert(_el$68, () => isPt() ? "sem alterações pendentes" : "no staged changes");
|
|
2417
2563
|
effect((_p$) => {
|
|
2418
2564
|
var _v$1 = props.muted, _v$10 = props.muted, _v$11 = props.muted;
|
|
2419
|
-
_v$1 !== _p$.e && (_p$.e = setProp(_el$
|
|
2420
|
-
_v$10 !== _p$.t && (_p$.t = setProp(_el$
|
|
2421
|
-
_v$11 !== _p$.a && (_p$.a = setProp(_el$
|
|
2565
|
+
_v$1 !== _p$.e && (_p$.e = setProp(_el$57, "fg", _v$1, _p$.e));
|
|
2566
|
+
_v$10 !== _p$.t && (_p$.t = setProp(_el$62, "fg", _v$10, _p$.t));
|
|
2567
|
+
_v$11 !== _p$.a && (_p$.a = setProp(_el$68, "fg", _v$11, _p$.a));
|
|
2422
2568
|
return _p$;
|
|
2423
2569
|
}, {
|
|
2424
2570
|
e: void 0,
|
|
2425
2571
|
t: void 0,
|
|
2426
2572
|
a: void 0
|
|
2427
2573
|
});
|
|
2428
|
-
return _el$
|
|
2574
|
+
return _el$53;
|
|
2429
2575
|
})();
|
|
2430
2576
|
},
|
|
2431
2577
|
get children() {
|
|
2432
|
-
var _el$
|
|
2578
|
+
var _el$39 = createElement("box"), _el$40 = createElement("box"), _el$41 = createElement("text"), _el$42 = createElement("text"), _el$44 = createElement("box"), _el$45 = createElement("text"), _el$46 = createElement("text"), _el$48 = createElement("box"), _el$49 = createElement("text"), _el$50 = createElement("box"), _el$51 = createElement("text");
|
|
2579
|
+
insertNode(_el$39, _el$40);
|
|
2580
|
+
insertNode(_el$39, _el$42);
|
|
2581
|
+
insertNode(_el$39, _el$44);
|
|
2582
|
+
insertNode(_el$39, _el$46);
|
|
2583
|
+
insertNode(_el$39, _el$48);
|
|
2584
|
+
insertNode(_el$39, _el$50);
|
|
2585
|
+
insertNode(_el$39, _el$51);
|
|
2586
|
+
setProp(_el$39, "flexDirection", "row");
|
|
2587
|
+
setProp(_el$39, "flexWrap", "wrap");
|
|
2588
|
+
setProp(_el$39, "alignItems", "center");
|
|
2589
|
+
setProp(_el$39, "flexShrink", 0);
|
|
2590
|
+
setProp(_el$39, "rowGap", 1);
|
|
2591
|
+
insertNode(_el$40, _el$41);
|
|
2592
|
+
setProp(_el$40, "backgroundColor", "#fba970");
|
|
2593
|
+
setProp(_el$40, "flexShrink", 0);
|
|
2594
|
+
setProp(_el$40, "onMouseDown", () => props.onSave?.());
|
|
2595
|
+
setProp(_el$41, "fg", "#000000");
|
|
2596
|
+
insert(_el$41, () => isPt() ? " Salvar " : " Save ");
|
|
2597
|
+
insertNode(_el$42, createTextNode(` `));
|
|
2598
|
+
setProp(_el$42, "flexShrink", 0);
|
|
2433
2599
|
insertNode(_el$44, _el$45);
|
|
2434
|
-
|
|
2435
|
-
insertNode(_el$44, _el$50);
|
|
2436
|
-
insertNode(_el$44, _el$53);
|
|
2437
|
-
insertNode(_el$44, _el$55);
|
|
2438
|
-
insertNode(_el$44, _el$58);
|
|
2439
|
-
insertNode(_el$44, _el$59);
|
|
2440
|
-
setProp(_el$44, "flexDirection", "row");
|
|
2441
|
-
setProp(_el$44, "flexWrap", "wrap");
|
|
2442
|
-
setProp(_el$44, "alignItems", "center");
|
|
2600
|
+
setProp(_el$44, "backgroundColor", "#262626");
|
|
2443
2601
|
setProp(_el$44, "flexShrink", 0);
|
|
2444
|
-
setProp(_el$44, "
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
setProp(_el$
|
|
2449
|
-
insertNode(_el$
|
|
2450
|
-
setProp(_el$
|
|
2451
|
-
insertNode(_el$48, createTextNode(` `));
|
|
2602
|
+
setProp(_el$44, "onMouseDown", () => props.onDiscard?.());
|
|
2603
|
+
setProp(_el$45, "fg", "#ffffff");
|
|
2604
|
+
insert(_el$45, () => isPt() ? " Descartar " : " Discard ");
|
|
2605
|
+
insertNode(_el$46, createTextNode(` `));
|
|
2606
|
+
setProp(_el$46, "flexShrink", 0);
|
|
2607
|
+
insertNode(_el$48, _el$49);
|
|
2608
|
+
setProp(_el$48, "backgroundColor", "#262626");
|
|
2452
2609
|
setProp(_el$48, "flexShrink", 0);
|
|
2453
|
-
|
|
2454
|
-
setProp(_el$
|
|
2455
|
-
|
|
2456
|
-
setProp(_el$50, "
|
|
2457
|
-
|
|
2458
|
-
setProp(_el$51, "
|
|
2459
|
-
|
|
2460
|
-
setProp(_el$53, "flexShrink", 0);
|
|
2461
|
-
insertNode(_el$55, _el$56);
|
|
2462
|
-
setProp(_el$55, "backgroundColor", "#262626");
|
|
2463
|
-
setProp(_el$55, "flexShrink", 0);
|
|
2464
|
-
setProp(_el$55, "onMouseDown", () => props.onResetPage?.());
|
|
2465
|
-
insertNode(_el$56, createTextNode(` Reset page `));
|
|
2466
|
-
setProp(_el$56, "fg", "#ffffff");
|
|
2467
|
-
setProp(_el$58, "flexGrow", 1);
|
|
2468
|
-
setProp(_el$58, "minWidth", 1);
|
|
2469
|
-
insertNode(_el$59, createTextNode(`unsaved changes`));
|
|
2470
|
-
setProp(_el$59, "flexShrink", 0);
|
|
2610
|
+
setProp(_el$48, "onMouseDown", () => props.onResetPage?.());
|
|
2611
|
+
setProp(_el$49, "fg", "#ffffff");
|
|
2612
|
+
insert(_el$49, () => isPt() ? " Redefinir página " : " Reset page ");
|
|
2613
|
+
setProp(_el$50, "flexGrow", 1);
|
|
2614
|
+
setProp(_el$50, "minWidth", 1);
|
|
2615
|
+
setProp(_el$51, "flexShrink", 0);
|
|
2616
|
+
insert(_el$51, () => isPt() ? "alterações não salvas" : "unsaved changes");
|
|
2471
2617
|
effect((_p$) => {
|
|
2472
2618
|
var _v$8 = props.muted, _v$9 = props.muted, _v$0 = props.warn ?? "#f59e0b";
|
|
2473
|
-
_v$8 !== _p$.e && (_p$.e = setProp(_el$
|
|
2474
|
-
_v$9 !== _p$.t && (_p$.t = setProp(_el$
|
|
2475
|
-
_v$0 !== _p$.a && (_p$.a = setProp(_el$
|
|
2619
|
+
_v$8 !== _p$.e && (_p$.e = setProp(_el$42, "fg", _v$8, _p$.e));
|
|
2620
|
+
_v$9 !== _p$.t && (_p$.t = setProp(_el$46, "fg", _v$9, _p$.t));
|
|
2621
|
+
_v$0 !== _p$.a && (_p$.a = setProp(_el$51, "fg", _v$0, _p$.a));
|
|
2476
2622
|
return _p$;
|
|
2477
2623
|
}, {
|
|
2478
2624
|
e: void 0,
|
|
2479
2625
|
t: void 0,
|
|
2480
2626
|
a: void 0
|
|
2481
2627
|
});
|
|
2482
|
-
return _el$
|
|
2628
|
+
return _el$39;
|
|
2483
2629
|
}
|
|
2484
|
-
}), _el$
|
|
2485
|
-
insert(_el$
|
|
2630
|
+
}), _el$52);
|
|
2631
|
+
insert(_el$52, () => {
|
|
2486
2632
|
const currentRow = findRow(tab(), props.selectedId() ?? "");
|
|
2487
|
-
if (currentRow?.cycle !== void 0) return "click or ›/←/→ change · ↑↓ select · tab next tab · ctrl+s save · ctrl+r reset page · esc close";
|
|
2488
|
-
if (currentRow?.action !== void 0) return "enter or space run action · ↑↓ select · tab next tab · ctrl+s save · ctrl+r reset page · esc close";
|
|
2489
|
-
return "[ref] documented reference (read-only) · ↑↓ select · tab next tab · esc close";
|
|
2633
|
+
if (currentRow?.cycle !== void 0) return isPt() ? "clique ou ›/←/→ alterar · ↑↓ selecionar · tab próxima aba · ctrl+s salvar · ctrl+r redefinir · esc fechar" : "click or ›/←/→ change · ↑↓ select · tab next tab · ctrl+s save · ctrl+r reset page · esc close";
|
|
2634
|
+
if (currentRow?.action !== void 0) return isPt() ? "enter ou espaço executar · ↑↓ selecionar · tab próxima aba · ctrl+s salvar · ctrl+r redefinir · esc fechar" : "enter or space run action · ↑↓ select · tab next tab · ctrl+s save · ctrl+r reset page · esc close";
|
|
2635
|
+
return isPt() ? "[ref] política de referência (somente leitura) · ↑↓ selecionar · tab próxima aba · esc fechar" : "[ref] documented reference (read-only) · ↑↓ select · tab next tab · esc close";
|
|
2490
2636
|
});
|
|
2491
|
-
effect((_$p) => setProp(_el$
|
|
2492
|
-
return _el$
|
|
2637
|
+
effect((_$p) => setProp(_el$52, "fg", props.muted, _$p));
|
|
2638
|
+
return _el$38;
|
|
2493
2639
|
})();
|
|
2494
2640
|
},
|
|
2495
2641
|
get children() {
|
|
2496
|
-
var _el$13 = createElement("box"), _el$14 = createElement("box"), _el$15 = createElement("text"), _el$
|
|
2642
|
+
var _el$13 = createElement("box"), _el$14 = createElement("box"), _el$15 = createElement("text"), _el$16 = createElement("box"), _el$17 = createElement("text"), _el$18 = createElement("text"), _el$20 = createElement("box"), _el$21 = createElement("text"), _el$22 = createElement("text"), _el$24 = createElement("box"), _el$25 = createElement("text"), _el$26 = createElement("text");
|
|
2497
2643
|
insertNode(_el$13, _el$14);
|
|
2498
|
-
insertNode(_el$13, _el$
|
|
2644
|
+
insertNode(_el$13, _el$26);
|
|
2499
2645
|
setProp(_el$13, "flexDirection", "column");
|
|
2500
2646
|
insertNode(_el$14, _el$15);
|
|
2501
|
-
insertNode(_el$14, _el$
|
|
2647
|
+
insertNode(_el$14, _el$16);
|
|
2648
|
+
insertNode(_el$14, _el$18);
|
|
2502
2649
|
insertNode(_el$14, _el$20);
|
|
2503
2650
|
insertNode(_el$14, _el$22);
|
|
2504
|
-
insertNode(_el$14, _el$
|
|
2505
|
-
insertNode(_el$14, _el$27);
|
|
2651
|
+
insertNode(_el$14, _el$24);
|
|
2506
2652
|
setProp(_el$14, "flexDirection", "row");
|
|
2507
|
-
insertNode(_el$15, createTextNode(`Keep your changes? `));
|
|
2508
2653
|
setProp(_el$15, "attributes", 1);
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
setProp(_el$
|
|
2512
|
-
|
|
2513
|
-
setProp(_el$
|
|
2514
|
-
|
|
2515
|
-
insertNode(_el$
|
|
2516
|
-
|
|
2517
|
-
setProp(_el$
|
|
2518
|
-
|
|
2519
|
-
setProp(_el$
|
|
2520
|
-
|
|
2521
|
-
insertNode(_el$
|
|
2522
|
-
|
|
2523
|
-
setProp(_el$
|
|
2524
|
-
|
|
2525
|
-
setProp(_el$
|
|
2526
|
-
|
|
2654
|
+
insert(_el$15, () => isPt() ? "Deseja salvar as alterações? " : "Keep your changes? ");
|
|
2655
|
+
insertNode(_el$16, _el$17);
|
|
2656
|
+
setProp(_el$16, "backgroundColor", "#fba970");
|
|
2657
|
+
setProp(_el$16, "onMouseDown", () => props.onSave?.());
|
|
2658
|
+
setProp(_el$17, "fg", "#000000");
|
|
2659
|
+
insert(_el$17, () => isPt() ? " Salvar " : " Save ");
|
|
2660
|
+
insertNode(_el$18, createTextNode(` `));
|
|
2661
|
+
insertNode(_el$20, _el$21);
|
|
2662
|
+
setProp(_el$20, "backgroundColor", "#262626");
|
|
2663
|
+
setProp(_el$20, "onMouseDown", () => props.onDiscard?.());
|
|
2664
|
+
setProp(_el$21, "fg", "#ffffff");
|
|
2665
|
+
insert(_el$21, () => isPt() ? " Descartar " : " Discard ");
|
|
2666
|
+
insertNode(_el$22, createTextNode(` `));
|
|
2667
|
+
insertNode(_el$24, _el$25);
|
|
2668
|
+
setProp(_el$24, "backgroundColor", "#262626");
|
|
2669
|
+
setProp(_el$24, "onMouseDown", () => props.onCancelExit?.());
|
|
2670
|
+
setProp(_el$25, "fg", "#ffffff");
|
|
2671
|
+
insert(_el$25, () => isPt() ? " Continuar editando " : " Keep editing ");
|
|
2672
|
+
insert(_el$26, () => isPt() ? "ctrl+s salvar · d descartar alterações · esc continuar editando" : "ctrl+s save · d discard the changes · esc keep editing");
|
|
2527
2673
|
effect((_p$) => {
|
|
2528
2674
|
var _v$ = props.warn ?? "#f59e0b", _v$2 = props.muted, _v$3 = props.muted, _v$4 = props.muted;
|
|
2529
2675
|
_v$ !== _p$.e && (_p$.e = setProp(_el$15, "fg", _v$, _p$.e));
|
|
2530
|
-
_v$2 !== _p$.t && (_p$.t = setProp(_el$
|
|
2531
|
-
_v$3 !== _p$.a && (_p$.a = setProp(_el$
|
|
2532
|
-
_v$4 !== _p$.o && (_p$.o = setProp(_el$
|
|
2676
|
+
_v$2 !== _p$.t && (_p$.t = setProp(_el$18, "fg", _v$2, _p$.t));
|
|
2677
|
+
_v$3 !== _p$.a && (_p$.a = setProp(_el$22, "fg", _v$3, _p$.a));
|
|
2678
|
+
_v$4 !== _p$.o && (_p$.o = setProp(_el$26, "fg", _v$4, _p$.o));
|
|
2533
2679
|
return _p$;
|
|
2534
2680
|
}, {
|
|
2535
2681
|
e: void 0,
|
|
@@ -2582,11 +2728,14 @@ function createWindowController(context, exit) {
|
|
|
2582
2728
|
if (hl.found) {
|
|
2583
2729
|
const items = [];
|
|
2584
2730
|
for (const group of hl.groups) for (const item of group.items) {
|
|
2585
|
-
const
|
|
2586
|
-
const
|
|
2731
|
+
const colon = item.indexOf(": ");
|
|
2732
|
+
const emdash = item.indexOf("—");
|
|
2733
|
+
const sep = colon !== -1 ? colon : emdash;
|
|
2734
|
+
const title = sep !== -1 ? item.slice(0, sep).trim() : item.slice(0, 26);
|
|
2735
|
+
const detail = sep !== -1 ? item.slice(sep + (colon !== -1 ? 2 : 1)).trim() : item;
|
|
2587
2736
|
items.push({
|
|
2588
2737
|
title,
|
|
2589
|
-
detail
|
|
2738
|
+
detail,
|
|
2590
2739
|
group: group.heading ?? void 0
|
|
2591
2740
|
});
|
|
2592
2741
|
}
|
|
@@ -2597,7 +2746,8 @@ function createWindowController(context, exit) {
|
|
|
2597
2746
|
presetTick();
|
|
2598
2747
|
return {
|
|
2599
2748
|
globalName: readActivePresetMarker(globalActivePresetPath())?.name ?? null,
|
|
2600
|
-
projectName: readActivePresetMarker(projectActivePresetPath())?.name ?? null
|
|
2749
|
+
projectName: readActivePresetMarker(projectActivePresetPath())?.name ?? null,
|
|
2750
|
+
visionModel: readConfiguredVisionModel()
|
|
2601
2751
|
};
|
|
2602
2752
|
};
|
|
2603
2753
|
const updatesInput = () => {
|
|
@@ -2614,11 +2764,12 @@ function createWindowController(context, exit) {
|
|
|
2614
2764
|
return input;
|
|
2615
2765
|
};
|
|
2616
2766
|
const tabs = () => {
|
|
2617
|
-
const
|
|
2767
|
+
const rawLang = tuiPrefs().layout?.language;
|
|
2768
|
+
const lang = resolveLanguage(rawLang);
|
|
2618
2769
|
return [
|
|
2619
|
-
buildGatesTab(load()),
|
|
2770
|
+
buildGatesTab(load(), lang),
|
|
2620
2771
|
buildDecisionTab(decision(), process.env, readAuthProviders(), readConfigProviders(), lang),
|
|
2621
|
-
buildPresetTab(presetInput()),
|
|
2772
|
+
buildPresetTab(presetInput(), lang),
|
|
2622
2773
|
buildTuiTab(tuiPrefs(), lang),
|
|
2623
2774
|
buildAutonomyTab({
|
|
2624
2775
|
goalLoop: goalLoop(),
|
|
@@ -2627,14 +2778,24 @@ function createWindowController(context, exit) {
|
|
|
2627
2778
|
languagePref: lang
|
|
2628
2779
|
}),
|
|
2629
2780
|
buildJ1Tab(process.env, false, lang),
|
|
2630
|
-
buildUpdatesTab(
|
|
2631
|
-
|
|
2781
|
+
buildUpdatesTab({
|
|
2782
|
+
...updatesInput(),
|
|
2783
|
+
languagePref: lang
|
|
2784
|
+
}),
|
|
2785
|
+
buildChangelogTab(currentVersion, changelogItems(), lang),
|
|
2632
2786
|
buildDoctorTab({
|
|
2633
2787
|
runningVersion: currentVersion,
|
|
2634
2788
|
nodeVersion: process.versions.node,
|
|
2635
2789
|
load: load()
|
|
2636
2790
|
}),
|
|
2637
|
-
buildAboutTab(currentVersion
|
|
2791
|
+
buildAboutTab(currentVersion, {
|
|
2792
|
+
nodeVersion: process.versions.node,
|
|
2793
|
+
platform: process.platform,
|
|
2794
|
+
preset: readActivePresetMarker(globalActivePresetPath())?.name ?? null,
|
|
2795
|
+
decisionEnabled: decision().config.enabled,
|
|
2796
|
+
j1Mode: process.env.PANTHEON_J1_RISK_SCORE ?? "shadow",
|
|
2797
|
+
languagePref: lang
|
|
2798
|
+
})
|
|
2638
2799
|
];
|
|
2639
2800
|
};
|
|
2640
2801
|
const rows = () => tabRows(tabs()[page()] ?? tabs()[0] ?? EMPTY_TAB);
|
|
@@ -2789,6 +2950,16 @@ function createWindowController(context, exit) {
|
|
|
2789
2950
|
reason: error instanceof Error ? error.message : "preset marker write failed"
|
|
2790
2951
|
};
|
|
2791
2952
|
}
|
|
2953
|
+
if (id === "preset.vision_model") try {
|
|
2954
|
+
writeConfiguredVisionModel(value);
|
|
2955
|
+
setPresetTick((tick) => tick + 1);
|
|
2956
|
+
return { ok: true };
|
|
2957
|
+
} catch (error) {
|
|
2958
|
+
return {
|
|
2959
|
+
ok: false,
|
|
2960
|
+
reason: error instanceof Error ? error.message : "vision model config write failed"
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2792
2963
|
if (id.startsWith("autonomy.goal_loop.")) {
|
|
2793
2964
|
const next = { ...goalLoop() };
|
|
2794
2965
|
if (id === "autonomy.goal_loop.enabled") next.enabled = value === "enabled";
|
|
@@ -2854,8 +3025,9 @@ function createWindowController(context, exit) {
|
|
|
2854
3025
|
};
|
|
2855
3026
|
};
|
|
2856
3027
|
const save = () => {
|
|
3028
|
+
const isPt = resolveLanguage(tuiPrefs().layout?.language) === "pt-BR";
|
|
2857
3029
|
if (!draftDirty(draft())) {
|
|
2858
|
-
setNotice("nothing staged — ←/→ stages a change first");
|
|
3030
|
+
setNotice(isPt ? "nada pendente — ←/→ altera um valor primeiro" : "nothing staged — ←/→ stages a change first");
|
|
2859
3031
|
return;
|
|
2860
3032
|
}
|
|
2861
3033
|
const writer = dispatchWrite;
|
|
@@ -2866,9 +3038,9 @@ function createWindowController(context, exit) {
|
|
|
2866
3038
|
setDecision(readDecisionRouterConfig());
|
|
2867
3039
|
setPresetTick((tick) => tick + 1);
|
|
2868
3040
|
}
|
|
2869
|
-
if (failed.length > 0) setNotice(`${failed.map((f) => `${f.id}: ${f.reason}`).join(" · ")} — staged changes kept`);
|
|
3041
|
+
if (failed.length > 0) setNotice(`${failed.map((f) => `${f.id}: ${f.reason}`).join(" · ")} — ${isPt ? "alterações mantidas" : "staged changes kept"}`);
|
|
2870
3042
|
else {
|
|
2871
|
-
setNotice(`saved ${applied.length} change${applied.length === 1 ? "" : "s"}`);
|
|
3043
|
+
setNotice(isPt ? `salva(s) ${applied.length} alteração(ões)` : `saved ${applied.length} change${applied.length === 1 ? "" : "s"}`);
|
|
2872
3044
|
if (confirmExit()) exit();
|
|
2873
3045
|
}
|
|
2874
3046
|
};
|
|
@@ -6341,7 +6513,7 @@ async function checkForPantheonUpdate(context) {
|
|
|
6341
6513
|
const latest = String((await response.json())?.version ?? "");
|
|
6342
6514
|
if (!latest) return;
|
|
6343
6515
|
const notice = pickUpdateNotice({
|
|
6344
|
-
currentVersion: "2.0
|
|
6516
|
+
currentVersion: "2.1.0",
|
|
6345
6517
|
latestVersion: latest,
|
|
6346
6518
|
state: readState(),
|
|
6347
6519
|
nowMs: Date.now()
|
|
@@ -7153,7 +7325,7 @@ function Sidebar(props) {
|
|
|
7153
7325
|
get children() {
|
|
7154
7326
|
var _el$13 = createElement("text");
|
|
7155
7327
|
setProp(_el$13, "attributes", 1);
|
|
7156
|
-
insert(_el$13, `Pantheon v2.0
|
|
7328
|
+
insert(_el$13, `Pantheon v2.1.0`);
|
|
7157
7329
|
effect((_$p) => setProp(_el$13, "fg", text(), _$p));
|
|
7158
7330
|
return _el$13;
|
|
7159
7331
|
}
|
|
@@ -7925,7 +8097,7 @@ function HomeStatus(props) {
|
|
|
7925
8097
|
},
|
|
7926
8098
|
get children() {
|
|
7927
8099
|
var _el$73 = createElement("text");
|
|
7928
|
-
insert(_el$73, () => `Pantheon v2.0
|
|
8100
|
+
insert(_el$73, () => `Pantheon v2.1.0${preset().name ? ` ▸ ${preset().name}` : ""}`);
|
|
7929
8101
|
effect((_$p) => setProp(_el$73, "fg", muted(), _$p));
|
|
7930
8102
|
return _el$73;
|
|
7931
8103
|
}
|