chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -4,9 +4,7 @@ import type { AgentModelListConfig } from "../config/types.js";
export const OPENCODE_ZEN_DEFAULT_MODEL = "opencode/claude-opus-4-5";
const LEGACY_OPENCODE_ZEN_DEFAULT_MODEL = "opencode-zen/claude-opus-4-5";
function resolvePrimaryModel(
model?: AgentModelListConfig | string,
): string | undefined {
function resolvePrimaryModel(model?: AgentModelListConfig | string): string | undefined {
if (typeof model === "string") return model;
if (model && typeof model === "object" && typeof model.primary === "string") {
return model.primary;
@@ -20,9 +18,7 @@ export function applyOpencodeZenModelDefault(cfg: ClawdbotConfig): {
} {
const current = resolvePrimaryModel(cfg.agents?.defaults?.model)?.trim();
const normalizedCurrent =
current === LEGACY_OPENCODE_ZEN_DEFAULT_MODEL
? OPENCODE_ZEN_DEFAULT_MODEL
: current;
current === LEGACY_OPENCODE_ZEN_DEFAULT_MODEL ? OPENCODE_ZEN_DEFAULT_MODEL : current;
if (normalizedCurrent === OPENCODE_ZEN_DEFAULT_MODEL) {
return { next: cfg, changed: false };
}
@@ -35,8 +31,7 @@ export function applyOpencodeZenModelDefault(cfg: ClawdbotConfig): {
defaults: {
...cfg.agents?.defaults,
model:
cfg.agents?.defaults?.model &&
typeof cfg.agents.defaults.model === "object"
cfg.agents?.defaults?.model && typeof cfg.agents.defaults.model === "object"
? {
...cfg.agents.defaults.model,
primary: OPENCODE_ZEN_DEFAULT_MODEL,