From 2637a9de1a9162b2cdea71c1238b50355057b0fe Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Mon, 24 Aug 2026 14:43:05 -0300 Subject: [PATCH] =?UTF-8?q?chore(worktree):=20preset=20model=20do=20launch?= =?UTF-8?q?er=20via=20OPENCODE=5FWORKTREE=5FMODEL=20=E2=80=94=20fallback?= =?UTF-8?q?=20comum=20aos=203=20repos=20(alinhamento=20com=20infra-solla/t?= =?UTF-8?q?eqo)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/lib/worktree.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/lib/worktree.mjs b/scripts/lib/worktree.mjs index 719e237..4238341 100644 --- a/scripts/lib/worktree.mjs +++ b/scripts/lib/worktree.mjs @@ -17,8 +17,15 @@ export const PLAN_BRANCH_PREFIX = 'plans/plan-issue' /** Env var the interactive-terminal `worktree()` function sets to request the opencode launch. */ export const WORKTREE_TERMINAL_ENV = 'TEQO_WORKTREE_TERMINAL' -/** Preset model for the opencode launch — change the preset by editing this constant. */ -export const OPENCODE_PRESET_MODEL = 'deepseek/deepseek-v4-flash' +/** + * Preset model for the opencode launch — fallback comum aos 3 repos do fluxo + * (infra-solla, teqo, iara-pwa). Override sem editar código: global via + * `export OPENCODE_WORKTREE_MODEL=…` no profile (~/.bashrc), ou por repo na + * chave `OPENCODE_WORKTREE_MODEL` da `.forgejo/worktree.env` (o roteador + * `worktree()` exporta a chave antes de rodar este script). + */ +export const OPENCODE_PRESET_MODEL = + process.env.OPENCODE_WORKTREE_MODEL || 'deepseek/deepseek-v4-flash' /** * Skill command sent as the launch's initial message per purpose. `next`