@eliya-oss/agent-diff 0.1.0-alpha.100 → 0.1.0-alpha.101
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 +6 -0
- package/dist/main.js +46 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.101
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Ctrl+C on the review says what a second press will do rather than leaving at once, and `adiff config set` refuses a value that is not on or off instead of reading it as off.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.100
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -9150,7 +9150,7 @@ var init_preferences = __esmMin((() => {
|
|
|
9150
9150
|
}));
|
|
9151
9151
|
//#endregion
|
|
9152
9152
|
//#region src/cli/error.ts
|
|
9153
|
-
var UnknownBranch, UnknownBase, UnknownFile, UnknownComment, UnknownPreference, UnselectableRange, UnknownCommand, MissingOption, UnknownWorktree, MalformedLayers, NoLayers, InitUnwritable;
|
|
9153
|
+
var UnknownBranch, UnknownBase, UnknownFile, UnknownComment, UnknownPreference, UnknownPreferenceValue, UnselectableRange, UnknownCommand, MissingOption, UnknownWorktree, MalformedLayers, NoLayers, InitUnwritable;
|
|
9154
9154
|
var init_error$1 = __esmMin((() => {
|
|
9155
9155
|
init_dist();
|
|
9156
9156
|
UnknownBranch = class extends TaggedError("UnknownBranch") {};
|
|
@@ -9158,6 +9158,7 @@ var init_error$1 = __esmMin((() => {
|
|
|
9158
9158
|
UnknownFile = class extends TaggedError("UnknownFile") {};
|
|
9159
9159
|
UnknownComment = class extends TaggedError("UnknownComment") {};
|
|
9160
9160
|
UnknownPreference = class extends TaggedError("UnknownPreference") {};
|
|
9161
|
+
UnknownPreferenceValue = class extends TaggedError("UnknownPreferenceValue") {};
|
|
9161
9162
|
UnselectableRange = class extends TaggedError("UnselectableRange") {};
|
|
9162
9163
|
UnknownCommand = class extends TaggedError("UnknownCommand") {};
|
|
9163
9164
|
MissingOption = class extends TaggedError("MissingOption") {};
|
|
@@ -9165,7 +9166,7 @@ var init_error$1 = __esmMin((() => {
|
|
|
9165
9166
|
MalformedLayers = class extends TaggedError("MalformedLayers") {};
|
|
9166
9167
|
NoLayers = class extends TaggedError("NoLayers") {};
|
|
9167
9168
|
InitUnwritable = class extends TaggedError("InitUnwritable") {};
|
|
9168
|
-
})), CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, AT_ONCE, summaryOf, summaryFor, listBranches, blobOf, vouchIn, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, sentIn, listSent, commentIn, submitComment, without$1, submitReply, listPatches, patchIn, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, readPreferences, readPreference, savePreference, setBase, clearBase, markRead;
|
|
9169
|
+
})), CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, AT_ONCE, summaryOf, summaryFor, listBranches, blobOf, vouchIn, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, sentIn, listSent, commentIn, submitComment, without$1, submitReply, listPatches, patchIn, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, readPreferences, readPreference, ON, OFF, preferenceValue, savePreference, setBase, clearBase, markRead;
|
|
9169
9170
|
var init_commands = __esmMin((() => {
|
|
9170
9171
|
init_dist();
|
|
9171
9172
|
init_patch();
|
|
@@ -9569,6 +9570,18 @@ var init_commands = __esmMin((() => {
|
|
|
9569
9570
|
byDefault: known.byDefault
|
|
9570
9571
|
};
|
|
9571
9572
|
});
|
|
9573
|
+
ON = "on";
|
|
9574
|
+
OFF = "off";
|
|
9575
|
+
preferenceValue = fn("Cli.preferenceValue")(function* (name, said) {
|
|
9576
|
+
const wanted = said.trim().toLowerCase();
|
|
9577
|
+
if (wanted === ON) return true;
|
|
9578
|
+
if (wanted === OFF) return false;
|
|
9579
|
+
return yield* new UnknownPreferenceValue({
|
|
9580
|
+
name,
|
|
9581
|
+
value: said,
|
|
9582
|
+
known: [ON, OFF]
|
|
9583
|
+
});
|
|
9584
|
+
});
|
|
9572
9585
|
savePreference = fn("Cli.savePreference")(function* (name, value) {
|
|
9573
9586
|
const known = preferenceNamed(name);
|
|
9574
9587
|
if (known === void 0) return yield* new UnknownPreference({
|
|
@@ -9913,7 +9926,7 @@ var init_pane = __esmMin((() => {
|
|
|
9913
9926
|
init_commands();
|
|
9914
9927
|
init_init();
|
|
9915
9928
|
init_pane();
|
|
9916
|
-
var version$1 = "0.1.0-alpha.
|
|
9929
|
+
var version$1 = "0.1.0-alpha.101";
|
|
9917
9930
|
//#endregion
|
|
9918
9931
|
//#region src/cli/upgrade.ts
|
|
9919
9932
|
var PACKAGE, TAG, RELEASES, REGISTRY, ASK_MS, RUN_MS, CELLAR, COMPILED, INSTALLED, BUN_GLOBAL, routeOf, ROUTES, asRoute, checkoutOf, assetOf, commandFor, NOTES, RUNNABLE, NUMBERS, numbersIn, compare$1, partsOf, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
|
|
@@ -11189,6 +11202,11 @@ var init_report$1 = __esmMin((() => {
|
|
|
11189
11202
|
suggestion: "The error lists the preferences adiff knows. Run `adiff config list` to see them with their values.",
|
|
11190
11203
|
retriable: false
|
|
11191
11204
|
},
|
|
11205
|
+
UnknownPreferenceValue: {
|
|
11206
|
+
exit: 3,
|
|
11207
|
+
suggestion: "A preference is on or off. Pass --value on or --value off.",
|
|
11208
|
+
retriable: false
|
|
11209
|
+
},
|
|
11192
11210
|
UnknownWorktree: {
|
|
11193
11211
|
exit: 3,
|
|
11194
11212
|
suggestion: "--worktree takes the path of a worktree of the repository under review. The error lists the ones that exist; pass one of those, or run the command from inside it with `--worktree .`.",
|
|
@@ -16039,7 +16057,7 @@ var init_upgrade = __esmMin((() => {
|
|
|
16039
16057
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
16040
16058
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
16041
16059
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
16042
|
-
})), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, OVER, overReview, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, restsWhereItLanded, lonelyGaps, chosenIn, settingsHeld, firstBranches, missing, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
16060
|
+
})), LEAVING_SAID, NOTICE_MS, KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, OVER, overReview, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, restsWhereItLanded, lonelyGaps, chosenIn, settingsHeld, firstBranches, missing, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
16043
16061
|
var init_app = __esmMin((() => {
|
|
16044
16062
|
init_dist();
|
|
16045
16063
|
init_report();
|
|
@@ -16057,6 +16075,8 @@ var init_app = __esmMin((() => {
|
|
|
16057
16075
|
init_intent();
|
|
16058
16076
|
init_session();
|
|
16059
16077
|
init_upgrade();
|
|
16078
|
+
LEAVING_SAID = "press ctrl+c again to leave";
|
|
16079
|
+
NOTICE_MS = 2200;
|
|
16060
16080
|
KEY_HISTORY = 40;
|
|
16061
16081
|
DRAIN_PASSES = 8;
|
|
16062
16082
|
TRAIL_HISTORY = 20;
|
|
@@ -16168,6 +16188,7 @@ var init_app = __esmMin((() => {
|
|
|
16168
16188
|
remembered = "";
|
|
16169
16189
|
chosen = {};
|
|
16170
16190
|
selectingNow = false;
|
|
16191
|
+
leaving;
|
|
16171
16192
|
grewWithShift = false;
|
|
16172
16193
|
keys = [];
|
|
16173
16194
|
trail = [];
|
|
@@ -16180,7 +16201,7 @@ var init_app = __esmMin((() => {
|
|
|
16180
16201
|
constructor(options) {
|
|
16181
16202
|
this.renderer = options.renderer;
|
|
16182
16203
|
this.repo = options.repo;
|
|
16183
|
-
this.noticeMs = options.noticeMs ??
|
|
16204
|
+
this.noticeMs = options.noticeMs ?? NOTICE_MS;
|
|
16184
16205
|
this.sessionPath = options.sessionPath;
|
|
16185
16206
|
Object.assign(this.chosen, chosenIn({
|
|
16186
16207
|
...initialState([]),
|
|
@@ -16538,6 +16559,7 @@ var init_app = __esmMin((() => {
|
|
|
16538
16559
|
yield* this.askedToLeave();
|
|
16539
16560
|
return;
|
|
16540
16561
|
}
|
|
16562
|
+
this.forgetLeaving();
|
|
16541
16563
|
const action = forced ?? actionFor(this.state.screen, keyName(key), this.state.focus);
|
|
16542
16564
|
this.grewWithShift = action === "select.grow" || action === "select.shrink";
|
|
16543
16565
|
this.remember(action, key);
|
|
@@ -16958,10 +16980,24 @@ var init_app = __esmMin((() => {
|
|
|
16958
16980
|
this.commit(withNotice(atFile(next, target), `marked ${patch.path}`));
|
|
16959
16981
|
});
|
|
16960
16982
|
}
|
|
16983
|
+
forgetLeaving() {
|
|
16984
|
+
if (this.leaving === void 0) return;
|
|
16985
|
+
this.leaving = void 0;
|
|
16986
|
+
if (this.state.notice === LEAVING_SAID) this.commit(withNoticeHere(this.state, ""));
|
|
16987
|
+
}
|
|
16961
16988
|
askedToLeave() {
|
|
16962
16989
|
return sync(() => {
|
|
16963
|
-
if (overReview(this.state.screen))
|
|
16964
|
-
|
|
16990
|
+
if (overReview(this.state.screen)) {
|
|
16991
|
+
this.leaving = void 0;
|
|
16992
|
+
this.commit(reduce(this.measured(), "back"));
|
|
16993
|
+
return;
|
|
16994
|
+
}
|
|
16995
|
+
if (this.leaving !== void 0 && Date.now() - this.leaving < 3e3) {
|
|
16996
|
+
this.renderer.destroy();
|
|
16997
|
+
return;
|
|
16998
|
+
}
|
|
16999
|
+
this.leaving = Date.now();
|
|
17000
|
+
this.commit(withNotice(this.state, LEAVING_SAID));
|
|
16965
17001
|
});
|
|
16966
17002
|
}
|
|
16967
17003
|
worktreeFor(branch) {
|
|
@@ -17439,9 +17475,9 @@ const configGet = fn("Main.configGet")(function* (options) {
|
|
|
17439
17475
|
yield* answer(options, { preference });
|
|
17440
17476
|
});
|
|
17441
17477
|
const configSet = fn("Main.configSet")(function* (options) {
|
|
17442
|
-
const
|
|
17443
|
-
const
|
|
17444
|
-
yield* answer(options, { preference });
|
|
17478
|
+
const name = yield* required(options, "name");
|
|
17479
|
+
const wanted = yield* preferenceValue(name, yield* required(options, "value"));
|
|
17480
|
+
yield* answer(options, { preference: yield* savePreference(name, wanted) });
|
|
17445
17481
|
});
|
|
17446
17482
|
const reviewPane = fn("Main.reviewPane")(function* (options) {
|
|
17447
17483
|
const report = yield* openPane(yield* required(options, "repo"), options["branch"]);
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"bin": {
|
|
24
24
|
"adiff": "./bin/adiff.js"
|
|
25
25
|
},
|
|
26
|
-
"version": "0.1.0-alpha.
|
|
26
|
+
"version": "0.1.0-alpha.101",
|
|
27
27
|
"description": "Review the work an agent left you without losing the thread: comments live on the lines, the agent answers them, and each point stays open until you settle it.",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"repository": {
|