diffprism 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
} from "./chunk-6J6PSBL2.js";
|
|
12
12
|
import {
|
|
13
13
|
demo
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LH6H3QSC.js";
|
|
15
15
|
import {
|
|
16
16
|
ensureServer,
|
|
17
17
|
isServerAlive,
|
|
18
18
|
readServerFile,
|
|
19
19
|
startGlobalServer,
|
|
20
20
|
submitReviewToServer
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4IQOTAHD.js";
|
|
22
22
|
import "./chunk-QGWYCEJN.js";
|
|
23
23
|
import "./chunk-DHCVZGHE.js";
|
|
24
24
|
import "./chunk-JSBRDJBE.js";
|
|
@@ -379,7 +379,7 @@ async function setupInteractive(flags) {
|
|
|
379
379
|
}
|
|
380
380
|
async function runDemo(dev) {
|
|
381
381
|
console.log("");
|
|
382
|
-
const { demo: demo2 } = await import("./demo-
|
|
382
|
+
const { demo: demo2 } = await import("./demo-MDPKCAXZ.js");
|
|
383
383
|
await demo2({ dev });
|
|
384
384
|
}
|
|
385
385
|
async function setupBatch(flags) {
|
|
@@ -822,7 +822,7 @@ async function fetchStatus(httpPort) {
|
|
|
822
822
|
return await response.json();
|
|
823
823
|
}
|
|
824
824
|
function printStatus(status, httpPort) {
|
|
825
|
-
const version = true ? "0.
|
|
825
|
+
const version = true ? "0.44.0" : "0.0.0-dev";
|
|
826
826
|
console.log(`
|
|
827
827
|
DiffPrism v${version}
|
|
828
828
|
`);
|
|
@@ -862,7 +862,7 @@ async function defaultAction() {
|
|
|
862
862
|
|
|
863
863
|
// cli/src/index.ts
|
|
864
864
|
var program = new Command();
|
|
865
|
-
program.name("diffprism").description("Local-first code review tool for agent-generated changes").version(true ? "0.
|
|
865
|
+
program.name("diffprism").description("Local-first code review tool for agent-generated changes").version(true ? "0.44.0" : "0.0.0-dev");
|
|
866
866
|
program.action(defaultAction);
|
|
867
867
|
program.command("demo").description("Open a sample review to see DiffPrism in action").option("--dev", "Use Vite dev server").action(demo);
|
|
868
868
|
program.command("review [ref]").description("Open a browser-based diff review (local git ref or GitHub PR ref like owner/repo#123)").option("--staged", "Review staged changes").option("--unstaged", "Review unstaged changes").option("-t, --title <title>", "Review title").option("--reasoning <text>", "Agent reasoning about the changes").option("--dev", "Use Vite dev server with HMR instead of static files").option("--post-to-github", "Automatically post review back to GitHub without prompting").action(review);
|
|
@@ -668,6 +668,16 @@ function recordReviewHistory(session, result) {
|
|
|
668
668
|
} catch {
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
|
+
function isInsideGitRepo(dirPath) {
|
|
672
|
+
let current = dirPath;
|
|
673
|
+
while (current !== "/") {
|
|
674
|
+
if (fs5.existsSync(`${current}/.git`)) return true;
|
|
675
|
+
const parent = current.replace(/\/[^/]+$/, "") || "/";
|
|
676
|
+
if (parent === current) break;
|
|
677
|
+
current = parent;
|
|
678
|
+
}
|
|
679
|
+
return fs5.existsSync(`${current}/.git`);
|
|
680
|
+
}
|
|
671
681
|
async function handleApiRequest(req, res) {
|
|
672
682
|
const method = req.method ?? "GET";
|
|
673
683
|
const url = (req.url ?? "/").split("?")[0];
|
|
@@ -869,7 +879,7 @@ async function handleApiRequest(req, res) {
|
|
|
869
879
|
if (a.isGitRepo !== b.isGitRepo) return a.isGitRepo ? -1 : 1;
|
|
870
880
|
return a.name.localeCompare(b.name);
|
|
871
881
|
});
|
|
872
|
-
const isGitRepo =
|
|
882
|
+
const isGitRepo = isInsideGitRepo(dirPath);
|
|
873
883
|
const parentPath = dirPath === "/" ? null : dirPath.replace(/\/[^/]+$/, "") || "/";
|
|
874
884
|
jsonResponse(res, 200, { path: dirPath, parentPath, isGitRepo, dirs });
|
|
875
885
|
} catch {
|
package/dist/mcp-server.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ensureServer,
|
|
13
13
|
isServerAlive,
|
|
14
14
|
submitReviewToServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4IQOTAHD.js";
|
|
16
16
|
import {
|
|
17
17
|
getDiff
|
|
18
18
|
} from "./chunk-QGWYCEJN.js";
|
|
@@ -152,7 +152,7 @@ async function handlePrReview(pr, options) {
|
|
|
152
152
|
async function startMcpServer() {
|
|
153
153
|
const server = new McpServer({
|
|
154
154
|
name: "diffprism",
|
|
155
|
-
version: true ? "0.
|
|
155
|
+
version: true ? "0.44.0" : "0.0.0-dev"
|
|
156
156
|
});
|
|
157
157
|
server.tool(
|
|
158
158
|
"open_review",
|