Skip to content

fix: treat --apply/--contain as flags, not user text - #254

Merged
SebTardif merged 2 commits into
mainfrom
fix/improve-mpi-20260828-s1259
Aug 28, 2026
Merged

fix: treat --apply/--contain as flags, not user text#254
SebTardif merged 2 commits into
mainfrom
fix/improve-mpi-20260828-s1259

Conversation

@SebTardif

Copy link
Copy Markdown
Contributor

Summary

Treat --apply and --contain as CLI flags, not as user payload tokens, and correct a few stale contributor docs.

Why

withApplyFlag and withContainFlag used args.includes(...). If a Quick Action value was exactly --apply or --contain (for example replace old text), the helper treated that token as the flag.

  • Apply could run without --apply, so a confirmed apply became a dry run.
  • --contain could be omitted, so the CLI was no longer limited to the workspace.

The change

  • withApplyFlag only treats a trailing --apply as already present (the helper always appends).
  • withContainFlag only treats a leading --contain as already present (the helper always prefixes).
  • Tests cover payload tokens that used to suppress the flags.
  • Docs: AGENTS.md batch plans are line-oriented (not JSON); CI is GitHub-hosted (not self-hosted); Configure MCP walkthrough describes the target picker and Cursor/Windsurf mcpServers key; ROADMAP lists shipped Marketplace/CI/managed install as shipped.

Verification

  • Red: npx tsc -p ./tsconfig.test.json && node --test ./out-test/test/unit/quickActions.test.js failed on the new payload-token cases and the trailing --contain expectation.
  • Green: same command, 92 passed.
  • npm run check passed (431 unit tests, coverage, package).

Checklist

  • All commits in this pull request are signed off with git commit -s
  • I ran npm run check and it passes
  • I updated docs if user-facing behavior changed
  • I am contributing this work under the repository license (MIT)

Payload tokens equal to --apply or --contain were treated as
already-present CLI flags, so apply could dry-run and --contain
could be dropped.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
AGENTS.md said batch plans are JSON and CI is self-hosted. The
walkthrough said Configure MCP writes every editor automatically.
ROADMAP still listed shipped Marketplace, CI, and managed install
as future work.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@SebTardif
SebTardif marked this pull request as ready for review August 28, 2026 20:10
@SebTardif
SebTardif merged commit ebbd3b9 into main Aug 28, 2026
22 checks passed
@SebTardif
SebTardif deleted the fix/improve-mpi-20260828-s1259 branch August 28, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant