Files
paseo/plugins/worktree-include/index.server.ts
T
Mohamed BoudraandCarlos Precioso dee0d138e9 feat(worktrees): copy included local files before setup and agents (#8100)
* feat(worktrees): copy included local files before setup and agents

Keep local-file materialization in one built-in lifecycle hook so workspace setup and the first agent see the completed copy. Reuse the community plugin algorithm with the source checkout supplied by the worktree hook.

Co-authored-by: Carlos Precioso <github@precioso.design>

* test(plugins): make worktree lifecycle checks portable on Windows

Compare source checkout filesystem identity across Git and Windows path spellings. Exercise copy rollback with a destination file blocking a directory, since Git for Windows accepts directories as exclude files.

---------

Co-authored-by: Carlos Precioso <github@precioso.design>
2026-10-28 17:21:01 +07:00

9 lines
347 B
TypeScript

import type { PluginServerContext } from "@getpaseo/plugin/server";
import { copyWorktreeIncludes } from "./server/copy.js";
export default function contribute(server: PluginServerContext) {
return server.addHook("worktree.create.after", async ({ worktree }) => {
await copyWorktreeIncludes(worktree.path, worktree.sourceCheckout);
});
}