@loonglab/loongcode-cli 0.1.2 → 0.1.3

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
@@ -4,8 +4,33 @@ All notable changes to LoongCode will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.3] - 2026-10-13
8
+
9
+ A model-configuration and context-management release. The setup flow sets a
10
+ model's context window and output ceiling again; `/model` edits and removes
11
+ models — seeded from what is saved, never displaying a stored key, and always
12
+ tested before anything is written; and a run whose context overflows no longer
13
+ ends when compaction cannot help: the request is reduced instead, and every
14
+ compaction that cannot progress is reported rather than discarded. It also
15
+ records the rename and the command consolidation the code has carried since
16
+ 0.1.2, which are listed below.
17
+
7
18
  ### Added
8
19
 
20
+ - Model configuration is complete again in the product. The setup flow's
21
+ unnumbered `Configure limits…` sub-step sets a new model's `contextWindow` and
22
+ `maxOutputTokens` (defaulting to 128000 and 8192, validated as positive
23
+ integers with the output ceiling no larger than the window); the values are
24
+ shown on the screen that confirms the connection test, and the probe tests
25
+ exactly the configuration that will be saved. `/model` offers `Edit model…`,
26
+ which runs the same sequence seeded from what is saved — the id and its
27
+ derived name stay put, the stored API key is never displayed and is either
28
+ kept or replaced through the masked prompt, and nothing is written until a
29
+ connection test succeeds — and `Remove model…`, which confirms by name.
30
+ Removing the active model reopens setup immediately instead of waiting for the
31
+ next task; removing any other model leaves the active one alone. All three
32
+ actions are refused while a task or a compaction is running, so a model change
33
+ can never take the workspace view out from under a run.
9
34
  - An empty transcript now opens with a large `LOONGCODE` block wordmark and the
10
35
  descriptor "an opinionated coding agent", followed by the existing keyboard
11
36
  hints. The hero is a true empty state: it is centered as a group in the
@@ -58,6 +83,11 @@ All notable changes to LoongCode will be documented in this file.
58
83
 
59
84
  ### Removed
60
85
 
86
+ - The `settings.json` key `model`. It documented a "default active model id"
87
+ that nothing ever read, and its validation could fail a settings load — and
88
+ through it a run — over a value with no effect. The active model has always
89
+ been owned by `models.json`; a settings file that still carries the key keeps
90
+ loading, because unknown keys are ignored.
61
91
  - Slash command `/reload`. Prompt templates are discovered live, `AGENTS.md` /
62
92
  `CLAUDE.md` and agent-facing resources load on every run, so there is nothing
63
93
  left to refresh manually.
@@ -77,6 +107,42 @@ All notable changes to LoongCode will be documented in this file.
77
107
  capabilities now live inside the `/session` manager; they are not retained
78
108
  as aliases.
79
109
 
110
+ ### Fixed
111
+
112
+ - A run no longer ends when its context overflows and compaction cannot help. In
113
+ a single-task run the compactable region is the task itself — everything the
114
+ run produced sits after the last user message — so compaction reported
115
+ `no-progress / empty-tail` and the run stopped with `context overflow detected
116
+ but compaction made no progress: empty-tail`. The request projection is now
117
+ reduced instead: tool output the model can get back is withheld from the
118
+ request — output a cap spilled to a captured artifact (`spillPath`), or a
119
+ `read` that names the file it read (`sourcePath`, plus `resumeOffset` when the
120
+ read was capped) — while the two most recent recoverable results, failed
121
+ executions, and observed-failure evidence are kept, and each withheld result
122
+ states what it held and how to get back to it. The two kinds of route do not
123
+ promise the same thing: a spill artifact holds the output as it was, while a
124
+ path re-reads the file's current contents — so a read whose file a later write
125
+ or edit in the same history names is kept, rather than offered a route that
126
+ would return something the model never read. Only the request is reduced:
127
+ durable history is untouched, and a reference that no longer resolves fails as
128
+ a normal read error rather than returning invented content. Recovery is
129
+ bounded like compaction retries (five per run), never sends a reduced request
130
+ identical to one a provider has already rejected, and ends the run naming the
131
+ failed stage and carrying the provider's own diagnostic when nothing
132
+ recoverable remains.
133
+ - Compaction that cannot progress is no longer silent. The proactive check used
134
+ to discard a `no-progress` outcome entirely, so the only trace of it was the
135
+ failure it eventually caused; every attempt now emits a `compaction_skipped`
136
+ event naming the reason (`empty-tail`, `no-compactable-region`,
137
+ `empty-summary`) and the trigger (`proactive`, `reactive`, `provider`), a
138
+ recovery emits `projection_reduced`, and the run record carries
139
+ `compactionSkips` and `projectionRecoveries` so a finished run still explains
140
+ itself. A proactive verdict is reported once per unchanged history: the
141
+ attempt is not repeated — with its checkpoint and its event — on every
142
+ iteration that changes nothing compaction could act on, and is retried as soon
143
+ as the history moves. `/compact` reports which reason applied instead of a
144
+ bare "nothing to compact".
145
+
80
146
  ## [0.1.2] - 2026-10-12
81
147
 
82
148
  A cross-platform compatibility release. Windows gets a real choice of shell —
package/README.md CHANGED
@@ -25,9 +25,16 @@ On first launch no model is active, and LoongCode says so: it opens the setup
25
25
  flow (protocol `openai` or `anthropic`, endpoint, model name, API key) before
26
26
  the workspace appears, and the normal interface is not reachable until a model
27
27
  is active. `/model` is that same flow — it lists the models you have configured
28
- and offers `Add model…` for a new one. Context and output limits are defaulted,
29
- and only exposed under an optional *Configure limits…* step. Cancelling setup
30
- exits; a task you had already typed is not run and is not saved.
28
+ and offers `Add model…`, `Edit model…` and `Remove model…`. Context and output
29
+ limits are defaulted to 128000 and 8192, and changeable in the flow's optional
30
+ *Configure limits…* step. Cancelling setup exits; a task you had already typed
31
+ is not run and is not saved.
32
+
33
+ Editing a model reuses the flow, seeded from what is saved: the stored API key
34
+ is never displayed — you choose to keep it or enter a replacement — and the
35
+ change is saved only after a connection test succeeds. Model changes are refused
36
+ while a task or a compaction is running, and removing the active model reopens
37
+ setup.
31
38
 
32
39
  ## Scripting
33
40