feat: persist full review output to disk and render in expandable view
Review text was truncated to 500 chars in the chat message body with no way to access the full content — once a review exceeded that limit it was lost from the UI. Now the full review body is rendered in the expanded (Ctrl+O) view like the implementation tool-call tree, and can optionally be persisted to disk per-loop. Changes: - Add saveReviews config flag + reviewsDir path option - Add loop-start prompt to opt into saving reviews to disk when auto-review is enabled (skipped when explicitly set in YAML) - Pass full reviewText via message details instead of inlining a slice - Extend ralpi-progress renderer to show full review body when expanded, dim hint to expand when collapsed - Add saveReviewToFile() writing to .ralpi/reviews/<prdKey>/<taskId>.md, mirroring the per-loop reflections layout so many loops don't collide
This commit is contained in:
@@ -164,6 +164,8 @@ export interface RalpiConfig {
|
||||
stateDir: string;
|
||||
/** Directory for per-task reflections */
|
||||
reflectionsDir: string;
|
||||
/** Directory for per-loop review output (mirrors reflectionsDir) */
|
||||
reviewsDir: string;
|
||||
};
|
||||
execution: {
|
||||
/** Task execution timeout in milliseconds */
|
||||
@@ -176,6 +178,9 @@ export interface RalpiConfig {
|
||||
autoCommit: boolean;
|
||||
/** Spawn a review agent to review the commit against the task description */
|
||||
autoReview: boolean;
|
||||
/** Persist the full review output to `.ralpi/reviews/<task-id>.md`.
|
||||
* Only active when autoReview is true and the user opts in at loop start. */
|
||||
saveReviews: boolean;
|
||||
/** Keys under `execution:` explicitly present in a loaded config YAML.
|
||||
* Used to skip interactive prompts for fields the user already set. */
|
||||
explicitKeys?: Set<string>;
|
||||
@@ -208,6 +213,7 @@ export const DEFAULT_CONFIG: RalpiConfig = {
|
||||
paths: {
|
||||
stateDir: ".ralpi",
|
||||
reflectionsDir: ".ralpi/reflections",
|
||||
reviewsDir: ".ralpi/reviews",
|
||||
},
|
||||
execution: {
|
||||
timeoutMs: 0, // 0 = inherit Pi's own defaults (no ralpi-level timeout)
|
||||
@@ -215,6 +221,7 @@ export const DEFAULT_CONFIG: RalpiConfig = {
|
||||
models: [],
|
||||
autoCommit: true,
|
||||
autoReview: false,
|
||||
saveReviews: false,
|
||||
commitModel: "",
|
||||
reviewModel: "",
|
||||
implModel: "",
|
||||
|
||||
Reference in New Issue
Block a user