From 1dd7d8a2d83847ba5dd1ef9727e048c9675b05f4 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Thu, 2 Apr 2026 11:20:36 +0000 Subject: [PATCH] fix review --- modules/_opencode/agent/{moonshot.md => derek.md} | 0 modules/_opencode/plugin/review.ts | 6 +++++- modules/ai-tools.nix | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) rename modules/_opencode/agent/{moonshot.md => derek.md} (100%) diff --git a/modules/_opencode/agent/moonshot.md b/modules/_opencode/agent/derek.md similarity index 100% rename from modules/_opencode/agent/moonshot.md rename to modules/_opencode/agent/derek.md diff --git a/modules/_opencode/plugin/review.ts b/modules/_opencode/plugin/review.ts index 0b98058..1fc3765 100644 --- a/modules/_opencode/plugin/review.ts +++ b/modules/_opencode/plugin/review.ts @@ -32,6 +32,7 @@ type ReviewTarget = type ReviewSelectorValue = ReviewTarget["type"] | "toggleCustomInstructions" const CUSTOM_INSTRUCTIONS_KEY = "review.customInstructions" +const MIN_CHANGE_REVIEW_OPTIONS = 10 const WORKING_COPY_PROMPT = "Review the current working-copy changes (including new files) and provide prioritized findings." @@ -308,10 +309,13 @@ const plugin: TuiPlugin = async (api) => { } async function getRecentChanges(limit = 20): Promise { + const effectiveLimit = Math.max(limit, MIN_CHANGE_REVIEW_OPTIONS) const r = await jj( "log", + "-r", + "all()", "-n", - String(limit), + String(effectiveLimit), "--no-graph", "-T", 'change_id.shortest(8) ++ "\\t" ++ description.first_line() ++ "\\n"', diff --git a/modules/ai-tools.nix b/modules/ai-tools.nix index 131bc00..2a380f2 100644 --- a/modules/ai-tools.nix +++ b/modules/ai-tools.nix @@ -26,7 +26,7 @@ in { package = inputs'.llm-agents.packages.opencode; settings = { model = "openai/gpt-5.4"; - small_model = "openai/gpt-5.1-mini"; + small_model = "openai/gpt-5.1-codex-mini"; theme = "rosepine"; plugin = [ "opencode-claude-auth" @@ -125,7 +125,7 @@ in { disable = true; }; explore = { - model = "openai/gpt-5.1-mini"; + model = "openai/gpt-5.1-codex-mini"; }; }; instructions = [