zames_pro 2.82.20 → 2.82.21

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,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.82.21] - 2026-10-22
11
+
12
+ ### Fixed
13
+
14
+ - **glm:** unwrap nested pagination wrappers in the chat list
15
+
10
16
  ## [2.82.20] - 2026-10-22
11
17
 
12
18
  ### Fixed
package/dist/glm-chats.js CHANGED
@@ -85,19 +85,20 @@ export function scrapeGlmChatMessages(opts) {
85
85
  * anything unrecognizable (never throws).
86
86
  */
87
87
  export function parseGlmChatList(json) {
88
+ // Unwrap up to THREE levels of list wrappers: a paginated reply nests them
89
+ // (`{data:{list:{page,data:[…]}}}`, `{chats:{page,data:[…]}}`). Leaving an
90
+ // inner wrapper in place made its KEY (`'data'`/`'list'`) look like a chat id
91
+ // with an empty title, so /chats showed one fake chat and hid the real ones.
92
+ // A bare id-keyed MAP of chats has none of these keys and is kept as-is.
88
93
  let arr = json;
89
- if (arr && typeof arr === 'object' && !Array.isArray(arr)) {
94
+ for (let depth = 0; depth < 3; depth++) {
95
+ if (!arr || typeof arr !== 'object' || Array.isArray(arr))
96
+ break;
90
97
  const o = arr;
91
- // A wrapper key wins; otherwise the object itself is an id-keyed MAP
92
- // of chats (a real alternative shape), not an empty list.
93
- arr = o.data ?? o.chats ?? o.list ?? o.items ?? arr;
94
- // A paginated endpoint wraps TWICE (`{data:{chats:[…]}}`); leaving the
95
- // inner wrapper in place made its KEY look like a chat id (`'chats'`) with
96
- // an empty title, so /chats listed one fake chat and hid the real ones.
97
- if (arr && typeof arr === 'object' && !Array.isArray(arr)) {
98
- const inner = arr;
99
- arr = inner.chats ?? inner.list ?? inner.items ?? arr;
100
- }
98
+ const next = o.data ?? o.chats ?? o.list ?? o.items;
99
+ if (next === undefined)
100
+ break;
101
+ arr = next;
101
102
  }
102
103
  const keyed = Array.isArray(arr)
103
104
  ? null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zames_pro",
3
- "version": "2.82.20",
3
+ "version": "2.82.21",
4
4
  "description": "Terminal coding agent that drives a real browser to chat with DeepSeek, Qwen and other web LLMs — 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": {