kaizen-agent 1.2.0 → 1.2.1
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/cli/dashboard.ts +4 -0
- package/cli/settings.ts +7 -0
- package/package.json +1 -1
package/cli/dashboard.ts
CHANGED
|
@@ -228,6 +228,10 @@ export async function dashboard(
|
|
|
228
228
|
const lines = await run(chosen);
|
|
229
229
|
if (lines?.length) await report(lines);
|
|
230
230
|
survey(); // an action may have changed what exists
|
|
231
|
+
// Settings is one of those actions, and ui.mouse is one of its keys: without
|
|
232
|
+
// this the toggle does nothing until the next launch.
|
|
233
|
+
mouseWanted = mouseFromConfig(state);
|
|
234
|
+
if (mouseWanted) mouseOn(); else mouseOff();
|
|
231
235
|
}
|
|
232
236
|
} finally {
|
|
233
237
|
mouseOff();
|
package/cli/settings.ts
CHANGED
|
@@ -171,6 +171,7 @@ export async function settings(repoRoot: string, standalone = true) {
|
|
|
171
171
|
|
|
172
172
|
function cycle(step: number) {
|
|
173
173
|
const s = SETTINGS[active]!;
|
|
174
|
+
const wasMouse = s.key === "ui.mouse";
|
|
174
175
|
const text = readFileSync(file, "utf8");
|
|
175
176
|
if (s.key === "preset") {
|
|
176
177
|
const current = detectPreset(text, defaults);
|
|
@@ -193,6 +194,12 @@ export async function settings(repoRoot: string, standalone = true) {
|
|
|
193
194
|
saved = read(updated, s.key) === next
|
|
194
195
|
? c.green(`saved ${s.key} = ${next || '""'} (preset: ${detected})`)
|
|
195
196
|
: `\x1b[33mcould not write ${s.key}\x1b[0m`;
|
|
197
|
+
// Applied here rather than at the next launch: a toggle that needs a restart
|
|
198
|
+
// reads as a toggle that does not work.
|
|
199
|
+
if (wasMouse) {
|
|
200
|
+
if (next === "true" && !mouseArmed) { stdout.write("\x1b[?1000h\x1b[?1006h"); mouseArmed = true; }
|
|
201
|
+
if (next === "false" && mouseArmed) { stdout.write("\x1b[?1006l\x1b[?1000l"); mouseArmed = false; }
|
|
202
|
+
}
|
|
196
203
|
}
|
|
197
204
|
}
|
|
198
205
|
|
package/package.json
CHANGED