lody 0.103.0 → 0.104.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/README.md +59 -1
- package/dist/baguette-worker.js +480 -0
- package/dist/chunks/{acp-BzvviK-N.js → acp-C0LiROfB.js} +3 -3
- package/dist/chunks/{cloudflared-native-DbUToPHH.js → cloudflared-native-BWtpTE_5.js} +3 -3
- package/dist/chunks/{daemon-session-tools-DESvdAeY.js → daemon-session-tools-C6AE_3JK.js} +12 -9
- package/dist/chunks/{directory-handle-CtdCjbNh.js → directory-handle-DgcESjFj.js} +28 -22
- package/dist/chunks/{index-DEdPzgH7.js → index-Sv4ANSUY.js} +8893 -2560
- package/dist/chunks/ios-simulator-hTbW-tat.js +161 -0
- package/dist/chunks/{review-viewer-BZiXmQnJ.js → review-viewer-nQBrydLp.js} +13 -10
- package/dist/chunks/{schemas-WuyisFi9.js → schemas-D_XLKCXC.js} +8 -8
- package/dist/claude-acp.js +1 -1
- package/dist/cloudflared-worker.js +2 -2
- package/dist/codex-acp.js +1 -1
- package/dist/deepseek-acp.js +253 -128
- package/dist/devin-acp.js +1152 -0
- package/dist/file-index-scan-worker.js +2 -2
- package/dist/index.js +107512 -37004
- package/package.json +7 -5
- package/dist/chunks/index-DhSXbMsB.js +0 -742
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as object, s as string, l as literal,
|
|
1
|
+
import { o as object, s as string, l as literal, c as boolean, a as _enum, e as union, n as number, d as discriminatedUnion, b as array, r as record, P as tuple, u as unknown } from "./schemas-D_XLKCXC.js";
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import path__default from "node:path";
|
|
@@ -847,6 +847,17 @@ function bytesToHex(bytes) {
|
|
|
847
847
|
function assertNever(value) {
|
|
848
848
|
throw new Error(`Unhandled Code Collab value: ${String(value)}`);
|
|
849
849
|
}
|
|
850
|
+
function gitDiffBaseRefCandidates(preferredBaseBranch) {
|
|
851
|
+
const preferred = preferredBaseBranch?.trim();
|
|
852
|
+
const refs = [];
|
|
853
|
+
if (preferred?.startsWith("refs/remotes/")) {
|
|
854
|
+
refs.push(preferred);
|
|
855
|
+
} else if (preferred) {
|
|
856
|
+
const branch = preferred.startsWith("refs/heads/") ? preferred.slice("refs/heads/".length) : preferred;
|
|
857
|
+
refs.push(`origin/${branch}`, preferred);
|
|
858
|
+
}
|
|
859
|
+
return [.../* @__PURE__ */ new Set([...refs, "origin/main", "main", "origin/master", "master", "origin/HEAD"])];
|
|
860
|
+
}
|
|
850
861
|
const execFileAsync = promisify(execFile);
|
|
851
862
|
const GIT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;
|
|
852
863
|
async function isInsideGitWorktree(workspaceRoot) {
|
|
@@ -899,7 +910,7 @@ async function runGitLsFiles(cwd) {
|
|
|
899
910
|
}
|
|
900
911
|
}
|
|
901
912
|
async function computeAllChanges(workspaceRoot, options = {}) {
|
|
902
|
-
const diffBase = await resolveAllChangesDiffBase(workspaceRoot, options.preferredBaseBranch);
|
|
913
|
+
const diffBase = options.diffBase ?? await resolveAllChangesDiffBase(workspaceRoot, options.preferredBaseBranch);
|
|
903
914
|
const diffTarget = diffBase ?? "HEAD";
|
|
904
915
|
const [numstat, nameStatus, untracked] = await Promise.all([
|
|
905
916
|
// `--numstat` cannot use `-z`, so disable `core.quotePath` to keep non-ASCII paths
|
|
@@ -976,17 +987,10 @@ async function resolveAllChangesDiffBase(workspaceRoot, preferredBaseBranch) {
|
|
|
976
987
|
}
|
|
977
988
|
}
|
|
978
989
|
const head = await runGit(workspaceRoot, ["rev-parse", "--verify", "HEAD^{commit}"]);
|
|
979
|
-
return head.ok && head.stdout.trim() ?
|
|
990
|
+
return head.ok && head.stdout.trim() ? head.stdout.trim() : null;
|
|
980
991
|
}
|
|
981
992
|
async function resolveAllChangesBaseRef(workspaceRoot, preferredBaseBranch) {
|
|
982
|
-
const candidates =
|
|
983
|
-
...preferredBaseBranch ? [`origin/${preferredBaseBranch}`, preferredBaseBranch] : [],
|
|
984
|
-
"origin/main",
|
|
985
|
-
"main",
|
|
986
|
-
"origin/master",
|
|
987
|
-
"master",
|
|
988
|
-
"origin/HEAD"
|
|
989
|
-
];
|
|
993
|
+
const candidates = gitDiffBaseRefCandidates(preferredBaseBranch);
|
|
990
994
|
for (const candidate of candidates) {
|
|
991
995
|
const exists = await runGit(workspaceRoot, ["rev-parse", "--verify", `${candidate}^{commit}`]);
|
|
992
996
|
if (exists.ok) {
|
|
@@ -1141,16 +1145,18 @@ async function closeDirectoryQuietly(directory) {
|
|
|
1141
1145
|
}
|
|
1142
1146
|
}
|
|
1143
1147
|
export {
|
|
1144
|
-
|
|
1145
|
-
|
|
1148
|
+
buildCodeCollabFileIndexState as A,
|
|
1149
|
+
CODE_COLLAB_V2_TEXT_LIMITS as B,
|
|
1146
1150
|
CodeCollabV2FileIndexRequestSchema as C,
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1151
|
+
CODE_COLLAB_V2_ALL_CHANGES_DIFF_LIMITS as D,
|
|
1152
|
+
resolveAllChangesDiffBase as E,
|
|
1153
|
+
computeAllChanges as F,
|
|
1154
|
+
codeCollabFileIndexStatesEqual as G,
|
|
1155
|
+
scanGitDirectoryEntries as H,
|
|
1156
|
+
closeDirectoryQuietly as I,
|
|
1157
|
+
joinWorkspacePath as J,
|
|
1158
|
+
isInsideGitWorktree as K,
|
|
1159
|
+
pathSegmentComparisonKey as L,
|
|
1154
1160
|
CodeCollabV2OpenTextRequestSchema as a,
|
|
1155
1161
|
CodeCollabV2RefreshTextRequestSchema as b,
|
|
1156
1162
|
CodeCollabV2SaveTextRequestSchema as c,
|
|
@@ -1176,6 +1182,6 @@ export {
|
|
|
1176
1182
|
readCodeCollabFileIndexSignalFromFlock as w,
|
|
1177
1183
|
writeCodeCollabFileIndexSignalToFlock as x,
|
|
1178
1184
|
writeCodeCollabFileIndexToFlock as y,
|
|
1179
|
-
|
|
1185
|
+
gitDiffBaseRefCandidates as z
|
|
1180
1186
|
};
|
|
1181
|
-
//# sourceMappingURL=directory-handle-
|
|
1187
|
+
//# sourceMappingURL=directory-handle-DgcESjFj.js.map
|