diffprism 0.8.0 → 0.10.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 +2 -2
- package/dist/{chunk-IZLVSGFJ.js → chunk-Z6JCMILV.js} +14 -1
- package/dist/mcp-server.js +2 -2
- package/package.json +1 -1
- package/ui-dist/assets/{index-BtEI7qe5.js → index-BNkJBAwp.js} +68 -53
- package/ui-dist/assets/index-DI7hAuU3.css +1 -0
- package/ui-dist/index.html +3 -3
- package/ui-dist/assets/index-Dlg-Xehq.css +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
startReview
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Z6JCMILV.js";
|
|
5
5
|
|
|
6
6
|
// cli/src/index.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -42,7 +42,7 @@ async function serve() {
|
|
|
42
42
|
|
|
43
43
|
// cli/src/index.ts
|
|
44
44
|
var program = new Command();
|
|
45
|
-
program.name("diffprism").description("Local-first code review tool for agent-generated changes").version(true ? "0.
|
|
45
|
+
program.name("diffprism").description("Local-first code review tool for agent-generated changes").version(true ? "0.10.0" : "0.0.0-dev");
|
|
46
46
|
program.command("review [ref]").description("Open a browser-based diff review").option("--staged", "Review staged changes").option("--unstaged", "Review unstaged changes").option("-t, --title <title>", "Review title").option("--dev", "Use Vite dev server with HMR instead of static files").action(review);
|
|
47
47
|
program.command("serve").description("Start the MCP server for Claude Code integration").action(serve);
|
|
48
48
|
program.parse();
|
|
@@ -61,6 +61,18 @@ function getGitDiff(ref, options) {
|
|
|
61
61
|
}
|
|
62
62
|
return output;
|
|
63
63
|
}
|
|
64
|
+
function getCurrentBranch(options) {
|
|
65
|
+
const cwd = options?.cwd ?? process.cwd();
|
|
66
|
+
try {
|
|
67
|
+
return execSync("git rev-parse --abbrev-ref HEAD", {
|
|
68
|
+
cwd,
|
|
69
|
+
encoding: "utf-8",
|
|
70
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
71
|
+
}).trim();
|
|
72
|
+
} catch {
|
|
73
|
+
return "unknown";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
64
76
|
function getUntrackedDiffs(cwd) {
|
|
65
77
|
let untrackedList;
|
|
66
78
|
try {
|
|
@@ -795,6 +807,7 @@ function createStaticServer(distPath, port) {
|
|
|
795
807
|
async function startReview(options) {
|
|
796
808
|
const { diffRef, title, description, reasoning, cwd, silent, dev } = options;
|
|
797
809
|
const { diffSet, rawDiff } = getDiff(diffRef, { cwd });
|
|
810
|
+
const currentBranch = getCurrentBranch({ cwd });
|
|
798
811
|
if (diffSet.files.length === 0) {
|
|
799
812
|
if (!silent) {
|
|
800
813
|
console.log("No changes to review.");
|
|
@@ -836,7 +849,7 @@ DiffPrism Review: ${title ?? briefing.summary}`);
|
|
|
836
849
|
diffSet,
|
|
837
850
|
rawDiff,
|
|
838
851
|
briefing,
|
|
839
|
-
metadata: { title, description, reasoning }
|
|
852
|
+
metadata: { title, description, reasoning, currentBranch }
|
|
840
853
|
};
|
|
841
854
|
bridge.sendInit(initPayload);
|
|
842
855
|
const result = await bridge.waitForResult();
|
package/dist/mcp-server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startReview
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z6JCMILV.js";
|
|
4
4
|
|
|
5
5
|
// packages/mcp-server/src/index.ts
|
|
6
6
|
import fs from "fs";
|
|
@@ -11,7 +11,7 @@ import { z } from "zod";
|
|
|
11
11
|
async function startMcpServer() {
|
|
12
12
|
const server = new McpServer({
|
|
13
13
|
name: "diffprism",
|
|
14
|
-
version: true ? "0.
|
|
14
|
+
version: true ? "0.10.0" : "0.0.0-dev"
|
|
15
15
|
});
|
|
16
16
|
server.tool(
|
|
17
17
|
"open_review",
|