@wrongstack/tui 0.317.0 → 0.317.2
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/dist/index.js +42 -1
- package/dist/terminal-width.d.ts +11 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -21277,7 +21277,13 @@ function truncateTextDeep(node) {
|
|
|
21277
21277
|
return node;
|
|
21278
21278
|
}
|
|
21279
21279
|
if (Array.isArray(node)) {
|
|
21280
|
-
return node.map((child) =>
|
|
21280
|
+
return node.map((child, index) => {
|
|
21281
|
+
const walked = truncateTextDeep(child);
|
|
21282
|
+
if (isReactElement(walked) && walked.key === null) {
|
|
21283
|
+
return React5.cloneElement(walked, { key: `wst-wrap-${index}` });
|
|
21284
|
+
}
|
|
21285
|
+
return walked;
|
|
21286
|
+
});
|
|
21281
21287
|
}
|
|
21282
21288
|
if (!isReactElement(node)) {
|
|
21283
21289
|
return node;
|
|
@@ -46064,6 +46070,11 @@ import {
|
|
|
46064
46070
|
setDesignOverrides
|
|
46065
46071
|
} from "@wrongstack/core/design";
|
|
46066
46072
|
import { SKILL_LIMITS, stripFrontmatter } from "@wrongstack/core/skills";
|
|
46073
|
+
import {
|
|
46074
|
+
areSubagentsAllowed,
|
|
46075
|
+
isSubagentPolicyLocked,
|
|
46076
|
+
setSessionSubagentsAllowed
|
|
46077
|
+
} from "@wrongstack/core/coordination";
|
|
46067
46078
|
import { toErrorMessage as toErrorMessage12 } from "@wrongstack/core/utils";
|
|
46068
46079
|
import { useEffect as useEffect69 } from "react";
|
|
46069
46080
|
var RESUME_PICKER_SESSIONS = 500;
|
|
@@ -46090,6 +46101,36 @@ function useTuiSlashCommands({
|
|
|
46090
46101
|
listSessions,
|
|
46091
46102
|
openPromptPicker
|
|
46092
46103
|
}) {
|
|
46104
|
+
useEffect69(() => {
|
|
46105
|
+
const cmd = {
|
|
46106
|
+
name: "solo",
|
|
46107
|
+
description: "Control session-only subagents before the first message: /solo on|off|status.",
|
|
46108
|
+
async run(args) {
|
|
46109
|
+
const action = (args ?? "").trim().toLowerCase() || "status";
|
|
46110
|
+
const allowed = areSubagentsAllowed(agent.ctx);
|
|
46111
|
+
if (action === "status") {
|
|
46112
|
+
return {
|
|
46113
|
+
message: `Solo session is ${allowed ? "off" : "on"}${isSubagentPolicyLocked(agent.ctx) ? " (locked)" : ""}.`
|
|
46114
|
+
};
|
|
46115
|
+
}
|
|
46116
|
+
if (action !== "on" && action !== "off") {
|
|
46117
|
+
return { message: "Usage: /solo on|off|status" };
|
|
46118
|
+
}
|
|
46119
|
+
try {
|
|
46120
|
+
await setSessionSubagentsAllowed(agent.ctx, action === "off");
|
|
46121
|
+
return {
|
|
46122
|
+
message: action === "on" ? "Solo session enabled. Chimera, delegation, and background subagents are blocked." : "Solo session disabled. Subagents are allowed for this session."
|
|
46123
|
+
};
|
|
46124
|
+
} catch (err) {
|
|
46125
|
+
return { message: toErrorMessage12(err) };
|
|
46126
|
+
}
|
|
46127
|
+
}
|
|
46128
|
+
};
|
|
46129
|
+
return registerSlashCommandLifecycle(slashRegistry, cmd, {
|
|
46130
|
+
owner: "tui",
|
|
46131
|
+
official: true
|
|
46132
|
+
});
|
|
46133
|
+
}, [agent, slashRegistry]);
|
|
46093
46134
|
useEffect69(() => {
|
|
46094
46135
|
if (!getPickableProviders || !switchProviderAndModel) return;
|
|
46095
46136
|
const cmd = {
|
package/dist/terminal-width.d.ts
CHANGED
|
@@ -22,6 +22,11 @@ export declare function truncateDisplayStart(value: string, maxWidth: number, el
|
|
|
22
22
|
/** Split without bisecting a grapheme cluster; input is expected to be ANSI-free. */
|
|
23
23
|
export declare function splitDisplay(value: string, maxWidth: number): [head: string, tail: string];
|
|
24
24
|
export declare function padDisplayEnd(value: string, width: number): string;
|
|
25
|
+
/**
|
|
26
|
+
* One-line frame rule of exactly `width` display columns for `width >= 6`
|
|
27
|
+
* (labels are truncated to fit; the auxiliary right label yields first).
|
|
28
|
+
* Narrower widths degrade to bare corners narrower than `width`.
|
|
29
|
+
*/
|
|
25
30
|
export declare function frameRule(width: number, leftLabel: string, rightLabel?: string, edge?: 'top' | 'bottom'): string;
|
|
26
31
|
/**
|
|
27
32
|
* Structural split of a top/bottom frame rule that reserves — but does not
|
|
@@ -37,9 +42,12 @@ export declare function frameRule(width: number, leftLabel: string, rightLabel?:
|
|
|
37
42
|
* `tail` = ` ─` + right corner
|
|
38
43
|
*
|
|
39
44
|
* Invariant: `displayWidth(head) + reservedRightWidth + displayWidth(tail) === width`
|
|
40
|
-
* for any `width ≥
|
|
41
|
-
*
|
|
42
|
-
*
|
|
45
|
+
* for every renderable geometry — any `width ≥ 6` with no slot, and any
|
|
46
|
+
* `width ≥ reservedRightWidth + 9` with one (the label prefix needs its
|
|
47
|
+
* `─ ` / ` ` bookends beside the slot). Narrower widths or oversized slots
|
|
48
|
+
* degrade to bare corners. The chip's live content — spinner, rolling word,
|
|
49
|
+
* growing dots — must still be padded to exactly `reservedRightWidth` by
|
|
50
|
+
* the caller so the right corner never jitters.
|
|
43
51
|
*/
|
|
44
52
|
export declare function frameRuleParts(width: number, leftLabel: string, reservedRightWidth: number, edge?: 'top' | 'bottom'): {
|
|
45
53
|
head: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/tui",
|
|
3
|
-
"version": "0.317.
|
|
3
|
+
"version": "0.317.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack terminal UI: Ink-based interactive renderer with history, pickers, and slash menus.",
|
|
6
6
|
"repository": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"!dist/**/*.map"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@wrongstack/core": "0.317.
|
|
30
|
-
"@wrongstack/kanban": "0.317.
|
|
31
|
-
"@wrongstack/runtime": "0.317.
|
|
32
|
-
"@wrongstack/sage": "0.317.
|
|
33
|
-
"@wrongstack/sdd": "0.317.
|
|
34
|
-
"@wrongstack/tools": "0.317.
|
|
29
|
+
"@wrongstack/core": "0.317.2",
|
|
30
|
+
"@wrongstack/kanban": "0.317.2",
|
|
31
|
+
"@wrongstack/runtime": "0.317.2",
|
|
32
|
+
"@wrongstack/sage": "0.317.2",
|
|
33
|
+
"@wrongstack/sdd": "0.317.2",
|
|
34
|
+
"@wrongstack/tools": "0.317.2",
|
|
35
35
|
"ink": "7.1.1",
|
|
36
36
|
"react": "^19.2.8",
|
|
37
37
|
"string-width": "8.2.2",
|