prreviewbuddy 0.78.1 → 0.80.2
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/CHANGELOG.md +98 -0
- package/dist/{delete_review-BHOzMQ0_.js → delete_review-BXfGCvQ1.js} +295 -21
- package/dist/main.js +17 -12
- package/dist/server.js +2364 -1305
- package/package.json +1 -1
- package/static/chunk-C3E91izb.js +1 -0
- package/static/chunk-C8d9FvLk.js +1 -0
- package/static/chunk-DnOyRP8m.js +1 -0
- package/static/chunk-Dv0Wowan.js +1 -0
- package/static/chunk-h55PfL_M.js +1 -0
- package/static/help.js +1 -1
- package/static/notifications.js +1 -1
- package/static/reviews.js +1 -1
- package/static/runs.js +1 -0
- package/static/settings.js +1 -1
- package/static/shell.css +90 -6
- package/static/sidebar.css +7 -1
- package/static/workspace.js +81 -81
- package/static/chunk-BMAMO0Tf.js +0 -1
- package/static/chunk-D8xJNBjR.js +0 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Ai as
|
|
2
|
+
import { Ai as resolveTarget, An as modelHelpLines, Ar as recentWorkspaces, B as ensureServer, Bi as resolveAgent, D as relativeTime, Dr as positionInLineage, Er as mutateWorkspace, F as queueForReview, Gi as CONFIG_PATH, H as reviewsUrl, Hn as describeSubject, Ji as agentById, K as stopServer, Ki as STORE_ROOT, L as readIndexToken, M as runBatch, Mr as reviewedRepositories, Nr as summarise, O as batchIdentity, Oi as WITHHELD_REASON, Pn as MANAGED_ROOT, Q as parseWorkspacePort, Qn as allJobs, R as bootstrapUrl, Ri as git, Rn as readMarker, Tr as matchingWorkspaceIds, Ui as readAgentPreference, Un as findExistingReview, Vi as resolveModel, Vn as describeMovement, Wi as writeAgentPreference, X as MAX_WORKSPACE_PORT, Xi as detectAgents, Y as DEFAULT_WORKSPACE_PORT, Yn as forgeResolver, Z as MIN_WORKSPACE_PORT, _ as recordKissRun, _t as BUILD_VERSION, a as wasBlocked, at as settleReview, ct as startJob, d as mergeUpdateInto, dr as purposeOf, dt as record$1, et as statedWorkspacePort, f as updateReview, fr as clearClaim, ft as stamp, g as runningJobs, gr as followedRefName, gt as telemetryUploadEnabled, h as liveUpdateFor, ht as telemetryUploadConsent, i as liveJobsFor, it as prepareReview, ki as kissOutcome, lt as append, m as UpdateAlreadyRunningError, mt as recordTelemetryUploadConsent, n as deleteReview$1, or as PHASES, ot as reanalyseReview, pt as deliver, q as workspaceUrl, qi as AGENT_IDS, rr as loadJob, tt as writePortPreference, ur as progressSteps, vt as PACKAGE_NAME, wr as loadWorkspace, zn as removeWorktree } from "./delete_review-BXfGCvQ1.js";
|
|
3
3
|
import { basename, dirname, join, resolve } from "node:path";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
import { existsSync, mkdirSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -1975,8 +1975,8 @@ function realDeps() {
|
|
|
1975
1975
|
prUrl,
|
|
1976
1976
|
resolveRequest: forgeResolver
|
|
1977
1977
|
}),
|
|
1978
|
-
prepare: prepareReview,
|
|
1979
|
-
settle: (workspaceId, signal) => settleReview(workspaceId, "standard", signal),
|
|
1978
|
+
prepare: (target, agentId, fresh, requestedModel) => prepareReview(target, agentId, fresh, requestedModel, "cli"),
|
|
1979
|
+
settle: (workspaceId, signal) => settleReview(workspaceId, "standard", signal, "cli"),
|
|
1980
1980
|
jobIdOf: (workspaceId) => loadWorkspace(workspaceId)?.jobId,
|
|
1981
1981
|
enqueue: queueForReview,
|
|
1982
1982
|
links: async () => {
|
|
@@ -2241,7 +2241,7 @@ async function review(command, repoPath) {
|
|
|
2241
2241
|
if (command.lens === "kiss") return kiss(command, target);
|
|
2242
2242
|
const agent = await chooseFor(command);
|
|
2243
2243
|
if (!agent) return 1;
|
|
2244
|
-
const prepared = await prepareReview(target, agent.id, command.operation === "fresh", command.requestedModel);
|
|
2244
|
+
const prepared = await prepareReview(target, agent.id, command.operation === "fresh", command.requestedModel, "cli");
|
|
2245
2245
|
enqueue(command, prepared.kind === "new" ? prepared.workspaceId : prepared.existing.id);
|
|
2246
2246
|
if (prepared.kind === "existing") {
|
|
2247
2247
|
const url = linkTo(await ensureServer(), prepared.existing.id, prepared.existing.token);
|
|
@@ -2302,7 +2302,8 @@ async function kiss(command, target) {
|
|
|
2302
2302
|
workspaceId: workspace.id,
|
|
2303
2303
|
audience,
|
|
2304
2304
|
agentId: agent.id,
|
|
2305
|
-
...requestedModel ? { requestedModel } : {}
|
|
2305
|
+
...requestedModel ? { requestedModel } : {},
|
|
2306
|
+
source: "cli"
|
|
2306
2307
|
});
|
|
2307
2308
|
const url = linkTo(await ensureServer(), workspace.id, workspace.token);
|
|
2308
2309
|
out(startedReview(url, target));
|
|
@@ -2315,7 +2316,8 @@ async function kiss(command, target) {
|
|
|
2315
2316
|
audience
|
|
2316
2317
|
},
|
|
2317
2318
|
agentId: agent.id,
|
|
2318
|
-
...requestedModel ? { requestedModel } : {}
|
|
2319
|
+
...requestedModel ? { requestedModel } : {},
|
|
2320
|
+
source: "cli"
|
|
2319
2321
|
});
|
|
2320
2322
|
enqueue(command, workspaceId);
|
|
2321
2323
|
const fresh = loadWorkspace(workspaceId);
|
|
@@ -2386,7 +2388,7 @@ async function operate(command, workspace) {
|
|
|
2386
2388
|
try {
|
|
2387
2389
|
await reanalyseReview(workspace.id, agent.id, (jobId) => {
|
|
2388
2390
|
stopReanalysis = follow(jobId);
|
|
2389
|
-
}, command.requestedModel);
|
|
2391
|
+
}, command.requestedModel, "cli");
|
|
2390
2392
|
} finally {
|
|
2391
2393
|
stopReanalysis?.();
|
|
2392
2394
|
}
|
|
@@ -2404,9 +2406,12 @@ async function operate(command, workspace) {
|
|
|
2404
2406
|
let stopUpdate;
|
|
2405
2407
|
let outcome;
|
|
2406
2408
|
try {
|
|
2407
|
-
outcome = await updateReview(workspace, {
|
|
2408
|
-
|
|
2409
|
-
|
|
2409
|
+
outcome = await updateReview(workspace, {
|
|
2410
|
+
source: "cli",
|
|
2411
|
+
onStarted: (jobId) => {
|
|
2412
|
+
stopUpdate = follow(jobId);
|
|
2413
|
+
}
|
|
2414
|
+
});
|
|
2410
2415
|
} catch (error) {
|
|
2411
2416
|
if (!(error instanceof UpdateAlreadyRunningError)) throw error;
|
|
2412
2417
|
out(updateAlreadyRunning(url, actedOn(workspace)));
|
|
@@ -2513,7 +2518,7 @@ async function drive(workspaceId, url, kissRun) {
|
|
|
2513
2518
|
});
|
|
2514
2519
|
let settled;
|
|
2515
2520
|
try {
|
|
2516
|
-
settled = await settleReview(workspaceId, kissRun ? "kiss" : "standard");
|
|
2521
|
+
settled = await settleReview(workspaceId, kissRun ? "kiss" : "standard", void 0, "cli");
|
|
2517
2522
|
} finally {
|
|
2518
2523
|
stop();
|
|
2519
2524
|
}
|
|
@@ -2878,7 +2883,7 @@ function stopDrivers(running) {
|
|
|
2878
2883
|
* Every repository this machine has a record of having reviewed.
|
|
2879
2884
|
*
|
|
2880
2885
|
* Three sources because they expire at different rates and any one of them can be the last witness.
|
|
2881
|
-
* A job record is deleted
|
|
2886
|
+
* A job record is deleted seven days after its run ends; a worktree marker goes with its
|
|
2882
2887
|
* directory; a review is kept for thirty days. The reviews are usually the only thing left, and a
|
|
2883
2888
|
* repository we cannot name is a repository we cannot clean.
|
|
2884
2889
|
*/
|