@eliya-oss/agent-diff 0.1.0-alpha.181 → 0.1.0-alpha.182
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 +12 -0
- package/dist/main.js +23 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.182
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(diff): an arrow pressed after a short scroll that leaves the cursor on screen keeps the view where the scroll left it.
|
|
8
|
+
|
|
9
|
+
<details><summary>What was wrong</summary>
|
|
10
|
+
|
|
11
|
+
The arrow moved the cursor one line and jumped the view back to where it was before the scroll, so the reader lost their place.
|
|
12
|
+
|
|
13
|
+
</details>
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.181
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -10042,7 +10042,7 @@ var init_config = __esmMin((() => {
|
|
|
10042
10042
|
//#region package.json
|
|
10043
10043
|
init_pane();
|
|
10044
10044
|
init_config();
|
|
10045
|
-
var version$1 = "0.1.0-alpha.
|
|
10045
|
+
var version$1 = "0.1.0-alpha.182";
|
|
10046
10046
|
//#endregion
|
|
10047
10047
|
//#region src/cli/error.ts
|
|
10048
10048
|
var UnknownCommand, MissingOption, UnknownField, UnknownOption, BadOption, RegistryUnanswered;
|
|
@@ -23239,7 +23239,7 @@ var init_editor = __esmMin((() => {
|
|
|
23239
23239
|
}));
|
|
23240
23240
|
//#endregion
|
|
23241
23241
|
//#region src/tui/moving.ts
|
|
23242
|
-
var clicked, stepped, catchUp, paged, commitSynced, rolled, moveFile, walkComments;
|
|
23242
|
+
var clicked, stepped, stayPut, catchUp, paged, commitSynced, rolled, moveFile, walkComments;
|
|
23243
23243
|
var init_moving = __esmMin((() => {
|
|
23244
23244
|
init_dist();
|
|
23245
23245
|
init_reduce();
|
|
@@ -23277,7 +23277,20 @@ var init_moving = __esmMin((() => {
|
|
|
23277
23277
|
return gen(function* () {
|
|
23278
23278
|
if (paged(app, delta)) return;
|
|
23279
23279
|
catchUp(app);
|
|
23280
|
+
const held = app.state;
|
|
23280
23281
|
yield* commitSynced(app, delta > 0 ? "cursor.next" : "cursor.prev");
|
|
23282
|
+
stayPut(app, held);
|
|
23283
|
+
});
|
|
23284
|
+
};
|
|
23285
|
+
stayPut = (app, held) => {
|
|
23286
|
+
const state = app.state;
|
|
23287
|
+
if (held.scroll < 0 || state.screen !== "review" || state.patchIndex !== held.patchIndex) return;
|
|
23288
|
+
const span = app.screen.blockAt(state.cursor, state.stop);
|
|
23289
|
+
const end = held.scroll + Math.max(1, app.screen.viewportRows());
|
|
23290
|
+
if (span.rows === 0 || span.start < held.scroll || span.start + span.rows > end) return;
|
|
23291
|
+
app.commit({
|
|
23292
|
+
...state,
|
|
23293
|
+
scroll: held.scroll
|
|
23281
23294
|
});
|
|
23282
23295
|
};
|
|
23283
23296
|
catchUp = (app) => {
|
|
@@ -23285,9 +23298,15 @@ var init_moving = __esmMin((() => {
|
|
|
23285
23298
|
if (state.screen !== "review" || state.focus !== "diff" || state.scroll < 0) return;
|
|
23286
23299
|
const last = state.scroll + Math.max(1, app.screen.viewportRows()) - 1;
|
|
23287
23300
|
const at = app.screen.screenRowOf(state.cursor) ?? last;
|
|
23288
|
-
if (at >= state.scroll && at <= last) return;
|
|
23289
|
-
const wanted = at < state.scroll ? state.scroll : last;
|
|
23290
23301
|
const top = app.screen.rowAtScreen(state.scroll);
|
|
23302
|
+
if (at >= state.scroll && at <= last) {
|
|
23303
|
+
app.commit({
|
|
23304
|
+
...state,
|
|
23305
|
+
top
|
|
23306
|
+
});
|
|
23307
|
+
return;
|
|
23308
|
+
}
|
|
23309
|
+
const wanted = at < state.scroll ? state.scroll : last;
|
|
23291
23310
|
app.commit({
|
|
23292
23311
|
...state,
|
|
23293
23312
|
cursor: app.screen.rowAtScreen(wanted),
|
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.182",
|
|
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": {
|