feat: smart subtree-aware reinit and validate --fix
- project_map_reinit now regenerates only the target subtree + ancestors by default, falling back to full reinit when subtree file count exceeds reinitFullThresholdPercent (default 10%). - Add reinitFullThresholdPercent config option. - Expose fix=true on project_map_validate Pi tool for localized repair. - Update docs and runtime guidance to prefer patch / validate --fix before full reinit. - Add integration tests for smart reinit and update typebox mock.
This commit is contained in:
@@ -16,6 +16,7 @@ vi.mock("typebox", () => ({
|
||||
Object: (props: unknown) => props,
|
||||
Optional: (prop: unknown) => prop,
|
||||
String: (opts: unknown) => ({ type: "string", ...(opts as object) }),
|
||||
Boolean: (opts: unknown) => ({ type: "boolean", ...(opts as object) }),
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -251,7 +252,7 @@ describe("pi-extension", () => {
|
||||
await handler(null, mockCtx);
|
||||
|
||||
expect(mockNotify).toHaveBeenCalledWith(
|
||||
expect.stringContaining("1 dirty packages detected"),
|
||||
expect.stringContaining("1 dirty package(s) detected"),
|
||||
"warning",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user