fix review

This commit is contained in:
2026-04-02 11:20:36 +00:00
parent 69697c822c
commit 1dd7d8a2d8
3 changed files with 7 additions and 3 deletions

View File

@@ -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<Change[]> {
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"',