feat(repl): /dream manual command + report rendering - #533
Merged
Conversation
Intercept /dream and /dream --dry-run in the REPL loop: spawn the process-isolated `pigo --dream [--dream-dry-run] -C <cwd>` subprocess, show a progress indication, capture the single-line Report JSON on stdout, and render a full-table change report (merged/deduped/ paths-cleaned/pruned/distilled, bytes+files before→after, reconciled, notes). --dry-run reflects report.DryRun with a clear DRY-RUN label. A pre-spawn read-only lock check surfaces "已有 dream 在运行" when a background dream already holds a live lock; subprocess exit 1 or unparseable stdout prints a clear error without crashing the REPL (SPEC §6.1). The subprocess is bounded by a 10min timeout (SPEC §6.3). RenderReportLine is exported for reuse by the startup background trigger (#526). Adds /dream to the /help command list.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/dreamand/dream --dry-runin the REPL loop (mirrors/compact/memory): spawn the process-isolatedpigo --dream [--dream-dry-run] -C <cwd>subprocess, show a progress line, capture the single-line Report JSON on stdout, and render a full-table change report.--dry-runreflectsreport.DryRunwith a clear DRY-RUN label ("nothing written").RenderReportLine(report)exported for reuse by the startup background trigger (dream: startup background due-trigger + one-line summary #526). Added/dreamto the/helpcommand list.Closes #525
Test plan
go build ./... && go vet ./...cleango test ./internal/cli/repl/... ./internal/dream/... ./internal/cli/prompts/...green