diff --git a/AGENTS.md b/AGENTS.md index 1e62981..440beaa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,7 +35,7 @@ src/ initializeProject.ts Initialize Project command: generate/diff AGENTS.md managedInstall.ts Managed Install commands: install, update, reinstall Patchloom binary quickActions.ts Quick Action command: replace, tidy, doc set, search, create, append, prepend, doc get, patch merge - batchApply.ts Batch Apply command: atomic multi-operation plan via JSON + batchApply.ts Batch Apply command: atomic multi-operation plan (line-oriented, not JSON) setupWorkspace.ts Setup Workspace command: guided readiness walkthrough showStatus.ts Show Status command: diagnostics display verifyMcp.ts Verify MCP Server command: JSON-RPC initialize probe @@ -85,7 +85,7 @@ scripts/ actions/ setup-node/ Composite: Node.js from .nvmrc + npm ci workflows/ - ci.yml CI: unit tests, build, integration tests (self-hosted) + ci.yml CI: unit tests, build, integration tests (GitHub-hosted matrix) auto-approve.yml Auto-approve PRs from SebTardif and dependabot[bot] dependabot-auto-merge.yml Auto-merge minor/patch Dependabot PRs dco.yml DCO sign-off check on PRs diff --git a/ROADMAP.md b/ROADMAP.md index af83071..f194fec 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,16 +2,13 @@ This roadmap reflects current priorities. It is not a commitment and may change based on community feedback. -## Near-term +## Shipped -- **Marketplace publish** ([#2](https://github.com/patchloom/patchloom-vscode/issues/2)): Publish to the VS Code Marketplace and Open VSX so users can install directly from the editor. -- **Cross-platform CI** ([#25](https://github.com/patchloom/patchloom-vscode/issues/25)): Add Linux and Windows to the unit test matrix now that the repo is public and GitHub-hosted runners are available. -- **Branch protection and Dependabot auto-merge** ([#43](https://github.com/patchloom/patchloom-vscode/issues/43)): Enable branch protection on `main` and unblock Dependabot auto-merge. - -## Medium-term - -- **Cross-platform integration tests** ([#39](https://github.com/patchloom/patchloom-vscode/issues/39)): Extend extension and UI tests to Linux and Windows. -- **Managed binary install** ([#9](https://github.com/patchloom/patchloom-vscode/issues/9)): Automatically download and manage the Patchloom CLI binary. Blocked on the CLI publishing platform-specific archives. +- **Marketplace publish** ([#2](https://github.com/patchloom/patchloom-vscode/issues/2)): VS Code Marketplace and Open VSX. +- **Cross-platform CI** ([#25](https://github.com/patchloom/patchloom-vscode/issues/25)): Linux, macOS, and Windows unit and integration tests on GitHub-hosted runners. +- **Branch protection and Dependabot auto-merge** ([#43](https://github.com/patchloom/patchloom-vscode/issues/43)): Ruleset on `main` plus Dependabot auto-merge for patch/minor updates. +- **Cross-platform integration tests** ([#39](https://github.com/patchloom/patchloom-vscode/issues/39)): Extension and UI tests on Linux, macOS, and Windows. +- **Managed binary install** ([#9](https://github.com/patchloom/patchloom-vscode/issues/9)): Download, verify, extract, and promote the Patchloom CLI. ## Long-term diff --git a/src/commands/quickActions.ts b/src/commands/quickActions.ts index 4c401b7..8a00ee7 100644 --- a/src/commands/quickActions.ts +++ b/src/commands/quickActions.ts @@ -1536,7 +1536,7 @@ export function retargetQuickAction(action: PlannedQuickAction, nextTargetPath: } export function withApplyFlag(args: readonly string[]): string[] { - return args.includes("--apply") ? [...args] : [...args, "--apply"]; + return args.at(-1) === "--apply" ? [...args] : [...args, "--apply"]; } /** @@ -1544,9 +1544,7 @@ export function withApplyFlag(args: readonly string[]): string[] { * Global flags must appear before the subcommand (`patchloom --contain replace ...`). */ export function withContainFlag(args: readonly string[]): string[] { - return args[0] === "--contain" || args.includes("--contain") - ? [...args] - : ["--contain", ...args]; + return args[0] === "--contain" ? [...args] : ["--contain", ...args]; } async function previewAndMaybeApply( diff --git a/test/unit/quickActions.test.ts b/test/unit/quickActions.test.ts index 9632f1a..c689c15 100644 --- a/test/unit/quickActions.test.ts +++ b/test/unit/quickActions.test.ts @@ -267,6 +267,12 @@ test("withApplyFlag appends apply once", () => { ]); }); +test("withApplyFlag still appends when user text is --apply", () => { + assert.deepEqual(withApplyFlag(["replace", "--apply", "--new", "x", "f.txt"]), [ + "replace", "--apply", "--new", "x", "f.txt", "--apply" + ]); +}); + test("withContainFlag prefixes global --contain once", () => { assert.deepEqual(withContainFlag(["replace", "old", "--new", "new", "f.txt"]), [ "--contain", @@ -282,6 +288,7 @@ test("withContainFlag prefixes global --contain once", () => { "--apply" ]); assert.deepEqual(withContainFlag(["doc", "set", "a.json", "port", "1", "--contain"]), [ + "--contain", "doc", "set", "a.json", @@ -291,6 +298,12 @@ test("withContainFlag prefixes global --contain once", () => { ]); }); +test("withContainFlag still prefixes when user text is --contain", () => { + assert.deepEqual(withContainFlag(["replace", "--contain", "--new", "x", "f.txt"]), [ + "--contain", "replace", "--contain", "--new", "x", "f.txt" + ]); +}); + test("buildPrependQuickAction builds a file prepend command", () => { const action = buildPrependQuickAction("/workspace/demo/src/main.ts", "// copyright\n"); assert.equal(action.title, "Prepend to main.ts"); diff --git a/walkthrough/configure-mcp.md b/walkthrough/configure-mcp.md index 90550af..8fd6fc0 100644 --- a/walkthrough/configure-mcp.md +++ b/walkthrough/configure-mcp.md @@ -9,13 +9,13 @@ for your editor. Choose the **full** tool inventory or the **core** pack ## Supported Editors -| Editor | Config file | -|--------|------------| -| VS Code | `.vscode/mcp.json` | -| Cursor | `.cursor/mcp.json` | -| Windsurf | `~/.codeium/windsurf/mcp_config.json` | +| Editor | Config file | Key | +|--------|-------------|-----| +| VS Code | `.vscode/mcp.json` | `servers` | +| Cursor | `.cursor/mcp.json` | `mcpServers` | +| Windsurf | `~/.codeium/windsurf/mcp_config.json` | `mcpServers` | -The command detects which editors are available and configures them -automatically. +The command lists the editors it can configure. You pick one or more +targets, then Full vs Core. It does not write every editor on its own. See the [MCP setup guide](https://patchloom.github.io/patchloom/getting-started/mcp-setup.html) for advanced configuration.