Add a captured-variable name filter for pause-point hit responses#1883
Conversation
Wide classes can flood a pause-point hit response with dozens of locals, parameters, and instance fields even after --captured-variables names already drops values. Add a --captured-variable-names flag (comma separated, exact match on Name, case-sensitive) to await-pause-point and pause-point-status that keeps only the requested entries, applied before --captured-variables so the two compose (filter narrows, then mode controls value verbosity). When none of the requested names match, CapturedVariables/history come back empty and the new CLI-only CapturedVariableNameFilterNoMatch field is set, so an agent doesn't mistake a filtered-empty result for "nothing was captured at this hit." This field is added by the CLI response layer only; the C#/IPC contract from Unity is unchanged. Verified against a real pause point (HelloWorldTool.cs:22, hit via the hello-world sample tool): single-name, multi-name, no-match, and composition with --captured-variables names all behave as designed. Also updated the pause-point skill doc (source + generated .claude/.agents copies) with usage guidance for the new flag.
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
303bb40
into
feature/pause-point-feedback-round3-integration
Summary
await-pause-point,pause-point-status) can now be narrowed to specific variables by name, so investigating a wide class with dozens of captured locals/fields no longer means scrolling past everything you don't need.User Impact
--captured-variables namesalready dropped everyValueto make a first pass lighter, but the response still listed every captured local, parameter, and instance field by name — on a field-heavy class this could still be dozens of entries to scan through before finding the ones you actually care about.--captured-variable-names velocity,this(comma-separated, exact match, case-sensitive) to either command and only those entries come back, in bothfullandnamesmode. If none of the requested names exist in the capture, the response comes back with an emptyCapturedVariablesarray plus a newCapturedVariableNameFilterNoMatch: truefield, so it's clear the filter matched nothing rather than the pause point having captured nothing at all.Changes
cli/project-runner/internal/projectrunner/pause_point_captured_variable_names_filter.go(new):parsePausePointCapturedVariableNames(comma-split, trims whitespace, drops empty entries) andfilterPausePointCapturedVariablesByName, which filters bothCapturedVariablesand everyCapturedVariableHistoryframe and setsCapturedVariableNameFilterNoMatchwhen nothing matched.pause_point_types.go: addedCapturedVariableNameFilterNoMatch boolto the response struct — a CLI-side-only field, not part of the Unity/IPC contract.pause_point_wait.go: registered the new--captured-variable-namesflag on both commands' option parsing, and call the filter beforeapplyPausePointCapturedVariablesModeso the two flags compose (filter narrows which variables appear, then the mode controls how much of each survivor is emitted).native_command_help.go: added thePausePointCapturedVariableNamesFlagNameconstant and registered it in both commands' help/option tables.--captured-variables names, and an empty-filter no-op case.Packages/src/Editor/CliOnlyTools~/PausePoint/Skill/SKILL.md, plus the regenerated.claude/.agentscopies) with usage guidance for the new flag.Verification
sh scripts/check-go-cli.sh: 0 lint issues, all packages pass.go test ./internal/projectrunner/... -run 'TestFilterPausePointCapturedVariablesByName|TestParsePausePointCapturedVariableNames' -v: all 6 subtests pass.Assets/Editor/CustomCommandSamples/HelloWorld/HelloWorldTool.cs:22, triggered it via thehello-worldsample tool, and confirmed against the live response that--captured-variable-names name,thisreturns exactly those two entries in original order, an unmatched name returns an empty array withCapturedVariableNameFilterNoMatch: true, and--captured-variable-names name --captured-variables namescorrectly composes (keeps onlyname, strips itsValue).main/v3-beta, so repository CI workflows do not fire here; the checks above are the local/manual equivalent.