zames_pro 2.90.4 → 2.90.6

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 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.6] - 2026-10-28
11
+
12
+ ### Fixed
13
+
14
+ - **tui:** keep the reverse-search position when the query is refined
15
+
16
+ ## [2.90.5] - 2026-10-28
17
+
18
+ ### Fixed
19
+
20
+ - **commands:** keep an explicitly empty quoted argument as a supplied position
21
+
10
22
  ## [2.90.4] - 2026-10-28
11
23
 
12
24
  ### Fixed
package/dist/commands.js CHANGED
@@ -834,6 +834,11 @@ export function splitCommandArgs(rest) {
834
834
  const DQ = String.fromCharCode(34);
835
835
  let cur = '';
836
836
  let quote = '';
837
+ // A QUOTED token exists even when it is empty: `cmd a ""` supplies an empty
838
+ // positional. Without this flag an empty `""` was dropped, so a declared
839
+ // argument the operator deliberately left blank counted as MISSING and the
840
+ // command was refused with the usage hint.
841
+ let quoted = false;
837
842
  for (let i = 0; i < s.length; i++) {
838
843
  const ch = s[i];
839
844
  if (quote) {
@@ -846,18 +851,20 @@ export function splitCommandArgs(rest) {
846
851
  }
847
852
  if (ch === SQ || ch === DQ) {
848
853
  quote = ch;
854
+ quoted = true;
849
855
  continue;
850
856
  }
851
857
  if (ch.charCodeAt(0) <= 32) {
852
- if (cur) {
858
+ if (cur || quoted) {
853
859
  out.push(cur);
854
860
  cur = '';
861
+ quoted = false;
855
862
  }
856
863
  continue;
857
864
  }
858
865
  cur += ch;
859
866
  }
860
- if (cur)
867
+ if (cur || quoted)
861
868
  out.push(cur);
862
869
  return out;
863
870
  }
@@ -957,7 +964,9 @@ export function missingCommandArgs(names, rest) {
957
964
  const parts = splitCommandArgs(rest);
958
965
  const missing = [];
959
966
  for (let i = 0; i < names.length; i++) {
960
- if (!parts[i])
967
+ // `undefined` means the position was never supplied; an EMPTY string is a
968
+ // deliberately blank value (`cmd "" second`) and must not be reported.
969
+ if (parts[i] === undefined)
961
970
  missing.push(names[i]);
962
971
  }
963
972
  return missing;
package/dist/tui/edit.js CHANGED
@@ -366,12 +366,35 @@ export function searchCancel(s) {
366
366
  };
367
367
  }
368
368
  export function searchInput(s, ch) {
369
- return searchRefresh({ ...s, searchQuery: s.searchQuery + ch }, true);
369
+ // Refine from the CURRENT match, not from the newest entry: after
370
+ // `searchNext` walked back, re-searching from the bottom jumped FORWARD to a
371
+ // newer entry and the operator lost the place they were browsing.
372
+ return searchRefreshFrom({ ...s, searchQuery: s.searchQuery + ch }, s.searchIndex);
370
373
  }
371
374
  export function searchBackspace(s) {
372
375
  if (!s.searchQuery.length)
373
376
  return s;
374
- return searchRefresh({ ...s, searchQuery: s.searchQuery.slice(0, -1) }, true);
377
+ return searchRefreshFrom({ ...s, searchQuery: s.searchQuery.slice(0, -1) }, s.searchIndex);
378
+ }
379
+ /** Re-search from `from` (inclusive) walking BACK; -1 when nothing matches. */
380
+ function searchRefreshFrom(s, from) {
381
+ const q = s.searchQuery;
382
+ const start = Math.min(from, s.history.length - 1);
383
+ for (let i = start; i >= 0; i--) {
384
+ if (q === '' || s.history[i].toLowerCase().includes(q.toLowerCase())) {
385
+ const buf = s.history[i];
386
+ return { ...s, searchIndex: i, buf, cursor: Array.from(buf).length };
387
+ }
388
+ }
389
+ // Nothing at or ABOVE the current match: look at the newer entries too, so a
390
+ // query that only matches a newer line is still found.
391
+ for (let i = start + 1; i < s.history.length; i++) {
392
+ if (s.history[i].toLowerCase().includes(q.toLowerCase())) {
393
+ const buf = s.history[i];
394
+ return { ...s, searchIndex: i, buf, cursor: Array.from(buf).length };
395
+ }
396
+ }
397
+ return { ...s, searchIndex: -1 };
375
398
  }
376
399
  /**
377
400
  * Record a submitted message in the history (dedup the last one).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.90.4",
3
+ "version": "2.90.6",
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": {