@rse/ase 2.0.4 → 2.0.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/dst/ase-config-schema.js +1 -1
- package/dst/ase-hook.js +12 -3
- package/dst/ase-setup-settings.js +111 -1
- package/dst/ase-setup.js +19 -7
- package/dst/ase-spec.js +184 -49
- package/dst/ase-task-board-tui-model.js +8 -1
- package/dst/ase-task-board-tui.js +26 -2
- package/dst/ase-task-board-web-client.js +10 -10
- package/dst/man/ase-artifact.md +1 -1
- package/dst/man/ase-config.md +5 -3
- package/dst/man/ase-mcp.md +1 -1
- package/dst/man/ase-setup-install.md +10 -1
- package/dst/man/ase-setup-status.md +6 -0
- package/dst/man/ase-setup-uninstall.md +3 -1
- package/dst/man/ase-setup-update.md +3 -0
- package/dst/man/ase-setup.md +4 -4
- package/dst/man/ase-spec-export.md +14 -3
- package/dst/man/ase-spec-init.md +10 -1
- package/dst/man/ase-spec-lint.md +2 -1
- package/dst/man/ase-spec-preview.md +10 -1
- package/dst/man/ase-spec-query.md +96 -0
- package/dst/man/ase-spec.md +32 -11
- package/dst/man/ase.md +3 -3
- package/package.json +21 -18
- package/plugin/.claude-plugin/icon.png +0 -0
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/meta/ase-format-spec.md +29 -5
- package/plugin/meta/ase-format-specbook.md +427 -47
- package/plugin/meta/ase-format-specbook.yaml +180 -78
- package/plugin/mods/ase-mods-common.ts +474 -0
- package/plugin/mods/ase-mods-evaluate.ts +227 -0
- package/plugin/mods/ase-mods-grill.ts +283 -0
- package/plugin/mods/ase-mods-help-browse.ts +410 -0
- package/plugin/mods/ase-mods-help-compose.ts +561 -0
- package/plugin/mods/ase-mods-help-find.ts +434 -0
- package/plugin/mods/ase-mods-help-hint.ts +134 -0
- package/plugin/mods/ase-mods-help-show.ts +142 -0
- package/plugin/mods/ase-mods.ts +220 -381
- package/plugin/skills/ase-code-lint/SKILL.md +15 -15
- package/plugin/skills/ase-code-lint/help.md +21 -8
- package/plugin/skills/ase-help-intent/SKILL.md +2 -1
- package/plugin/skills/ase-help-intent/data.md +42 -16
- package/plugin/skills/ase-spec-activate/SKILL.md +4 -1
- package/plugin/skills/ase-spec-lint/SKILL.md +15 -15
- package/plugin/skills/ase-spec-lint/help.md +21 -8
- package/plugin/mods/claude-code.d.ts +0 -13440
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { render, Box, Text, useInput, useStdin } from "ink";
|
|
8
|
+
import stringWidth from "string-width";
|
|
8
9
|
import { Task } from "./ase-task.js";
|
|
9
10
|
import { buildBoard, toneOf, viewLabels } from "./ase-task-board-core.js";
|
|
10
11
|
import pkg from "../package.json" with { type: "json" };
|
|
@@ -160,6 +161,25 @@ const App = ({ log, initial, project, relay }) => {
|
|
|
160
161
|
});
|
|
161
162
|
return renderScreen(ctx, project);
|
|
162
163
|
};
|
|
164
|
+
/* wrap stdout to erase the tail of each changed line ("CSI <n> G" plus "CSI K" plus
|
|
165
|
+
its styled text) after instead of before its text, as otherwise the line is shown
|
|
166
|
+
blanked in terminals redrawing between the reads of a frame, like tmux popups;
|
|
167
|
+
a text reaching the last column needs no erasing, which would there erase its
|
|
168
|
+
last character, as the cursor rests on it */
|
|
169
|
+
const lateErasing = (stream) => {
|
|
170
|
+
/* eslint-disable-next-line no-control-regex */
|
|
171
|
+
const changed = /\x1b\[(\d+)G\x1b\[K((?:[^\x1b\n]|\x1b\[[\d;:]*m)*)/g;
|
|
172
|
+
const write = (data, ...args) => stream.write(typeof data !== "string" ? data :
|
|
173
|
+
data.replace(changed, (_all, col, text) => `\x1b[${col}G${text}` + (Number(col) - 1 + stringWidth(text) < stream.columns ? "\x1b[K" : "")), ...args);
|
|
174
|
+
return new Proxy(stream, {
|
|
175
|
+
get: (target, prop) => {
|
|
176
|
+
if (prop === "write")
|
|
177
|
+
return write;
|
|
178
|
+
const value = Reflect.get(target, prop, target);
|
|
179
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
};
|
|
163
183
|
/* run the terminal board until the user quits */
|
|
164
184
|
export const runTUI = async (log, relay) => {
|
|
165
185
|
const initial = await buildBoard(log);
|
|
@@ -175,9 +195,13 @@ export const runTUI = async (log, relay) => {
|
|
|
175
195
|
process.once("exit", reset);
|
|
176
196
|
try {
|
|
177
197
|
/* enable the kitty keyboard protocol (if the terminal supports it),
|
|
178
|
-
as only under it the Shift modifier of RETURN is reported
|
|
198
|
+
as only under it the Shift modifier of RETURN is reported, and
|
|
199
|
+
rewrite only the changed lines of a frame, as otherwise every frame
|
|
200
|
+
is erased and redrawn entirely, which flickers in terminals not
|
|
201
|
+
honoring synchronized output (DEC mode 2026), like tmux popups */
|
|
179
202
|
const app = render(h(App, { log, initial, project, relay }), {
|
|
180
|
-
alternateScreen: true, exitOnCtrlC: true, patchConsole: true, kittyKeyboard: { mode: "auto" }
|
|
203
|
+
alternateScreen: true, exitOnCtrlC: true, patchConsole: true, kittyKeyboard: { mode: "auto" },
|
|
204
|
+
incrementalRendering: true, stdout: lateErasing(process.stdout)
|
|
181
205
|
});
|
|
182
206
|
await app.waitUntilExit();
|
|
183
207
|
}
|