zames_pro 2.90.11 → 2.90.13
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/extraTools.js +9 -1
- package/dist/input.js +19 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.90.13] - 2026-10-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **apply-patch:** start each hunk search where the previous one ended
|
|
15
|
+
|
|
16
|
+
## [2.90.12] - 2026-10-29
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **input:** keep the legacy reverse-search position when the query is refined
|
|
21
|
+
|
|
10
22
|
## [2.90.11] - 2026-10-29
|
|
11
23
|
|
|
12
24
|
### Fixed
|
package/dist/extraTools.js
CHANGED
|
@@ -168,6 +168,11 @@ export function applyUpdateHunk(content, hunkLines) {
|
|
|
168
168
|
const hasCRLF = content.includes('\r\n');
|
|
169
169
|
const eol = hasCRLF ? '\r\n' : NL;
|
|
170
170
|
let fileLines = content.split(/\r?\n/);
|
|
171
|
+
// Hunks are ordered top-to-bottom, so the search for the next block must not
|
|
172
|
+
// go back before the end of the previous one. Searching from 0 made a hunk
|
|
173
|
+
// re-find a region an EARLIER hunk had already consumed (or, once that text
|
|
174
|
+
// was gone, fail with "Context not found").
|
|
175
|
+
let searchFrom = 0;
|
|
171
176
|
for (const block of splitHunks(hunkLines)) {
|
|
172
177
|
const oldLines = [];
|
|
173
178
|
const newLines = [];
|
|
@@ -198,7 +203,7 @@ export function applyUpdateHunk(content, hunkLines) {
|
|
|
198
203
|
error: 'Hunk has no context or removed lines to anchor on.',
|
|
199
204
|
};
|
|
200
205
|
}
|
|
201
|
-
const at = locateBlock(fileLines, oldLines, block.oldStart,
|
|
206
|
+
const at = locateBlock(fileLines, oldLines, block.oldStart, searchFrom);
|
|
202
207
|
if (at === -1) {
|
|
203
208
|
return {
|
|
204
209
|
ok: false,
|
|
@@ -211,6 +216,9 @@ export function applyUpdateHunk(content, hunkLines) {
|
|
|
211
216
|
...newLines,
|
|
212
217
|
...fileLines.slice(at + oldLines.length),
|
|
213
218
|
];
|
|
219
|
+
// The next block starts after the lines this hunk just produced: its text
|
|
220
|
+
// cannot legitimately live BEFORE them.
|
|
221
|
+
searchFrom = at + newLines.length;
|
|
214
222
|
}
|
|
215
223
|
return { ok: true, content: fileLines.join(eol) };
|
|
216
224
|
}
|
package/dist/input.js
CHANGED
|
@@ -1512,12 +1512,24 @@ export class LineEditor {
|
|
|
1512
1512
|
const q = this._searchQuery;
|
|
1513
1513
|
if (resetToNewest)
|
|
1514
1514
|
this._searchIndex = this.history.length - 1;
|
|
1515
|
-
|
|
1515
|
+
const from = this._searchIndex;
|
|
1516
|
+
for (let i = from; i >= 0; i--) {
|
|
1516
1517
|
if (q === '' || this.history[i].toLowerCase().includes(q.toLowerCase())) {
|
|
1517
1518
|
this._searchIndex = i;
|
|
1518
1519
|
return;
|
|
1519
1520
|
}
|
|
1520
1521
|
}
|
|
1522
|
+
// Nothing at or ABOVE the current match: a query that only matches a NEWER
|
|
1523
|
+
// entry is still found (an empty query always matches, so this only runs
|
|
1524
|
+
// for a real query).
|
|
1525
|
+
if (q !== '' && from >= 0) {
|
|
1526
|
+
for (let i = from + 1; i < this.history.length; i++) {
|
|
1527
|
+
if (this.history[i].toLowerCase().includes(q.toLowerCase())) {
|
|
1528
|
+
this._searchIndex = i;
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1521
1533
|
// No match from here: signal it and leave the buffer as-is.
|
|
1522
1534
|
this._searchIndex = -1;
|
|
1523
1535
|
}
|
|
@@ -1568,14 +1580,18 @@ export class LineEditor {
|
|
|
1568
1580
|
// A character typed during search extends the query; Backspace trims it.
|
|
1569
1581
|
_searchInput(ch) {
|
|
1570
1582
|
this._searchQuery += ch;
|
|
1571
|
-
|
|
1583
|
+
// Refine from the CURRENT match: resetting to the newest entry made the
|
|
1584
|
+
// search jump FORWARD after `_searchNext` walked back, so the operator
|
|
1585
|
+
// lost the place they were browsing (the TUI was already fixed).
|
|
1586
|
+
this._searchRefresh(false);
|
|
1572
1587
|
this._searchStatus();
|
|
1573
1588
|
}
|
|
1574
1589
|
_searchBackspace() {
|
|
1575
1590
|
if (!this._searchQuery.length)
|
|
1576
1591
|
return;
|
|
1577
1592
|
this._searchQuery = this._searchQuery.slice(0, -1);
|
|
1578
|
-
|
|
1593
|
+
// Same rule as _searchInput: keep the current position.
|
|
1594
|
+
this._searchRefresh(false);
|
|
1579
1595
|
this._searchStatus();
|
|
1580
1596
|
}
|
|
1581
1597
|
_handle(data) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.90.
|
|
3
|
+
"version": "2.90.13",
|
|
4
4
|
"description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen or GLM — no API key required. Reads and edits files, runs commands, commits to git, like Claude Code / Codex CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|