@cspeach/cli 1.1.53 → 1.1.54
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/agent/loop.js +50 -5
- package/dist/agent/tool-dispatch.js +11 -0
- package/dist/auth/auth-file.js +3 -0
- package/dist/auth/key-resolver.js +8 -3
- package/dist/auth/me.js +6 -2
- package/dist/cli.js +22 -0
- package/dist/commands/login.js +22 -4
- package/dist/commands/plan-reground.js +5 -0
- package/dist/commands/sap-link.js +14 -1
- package/dist/commands/team-build-help.js +19 -0
- package/dist/commands/team-build.js +97 -0
- package/dist/commands/team-plan.js +2 -2
- package/dist/commands/team-spec.js +107 -0
- package/dist/commands/team.js +74 -4
- package/dist/journey/chain.js +8 -0
- package/dist/journey/clean-core.js +2 -2
- package/dist/journey/rebuild.js +8 -0
- package/dist/journey/run.js +9 -0
- package/dist/licence/paths.js +5 -0
- package/dist/licence/seat-kind.js +110 -0
- package/dist/licence/seat-state.js +4 -0
- package/dist/licence/terminal-seat.js +43 -0
- package/dist/licence/turn-gate.js +4 -0
- package/dist/one-shot.js +32 -0
- package/dist/projects/answer-blockers.js +31 -7
- package/dist/projects/blocker-answers-note.js +1 -1
- package/dist/projects/save-command.js +37 -2
- package/dist/projects/saved-lines.js +19 -17
- package/dist/projects/spec-share.js +239 -0
- package/dist/register/picture.js +2 -2
- package/dist/register/store.js +19 -0
- package/dist/repl/builtin-commands.js +4 -3
- package/dist/repl/file-picker.js +52 -5
- package/dist/repl/mode-cycle.js +12 -0
- package/dist/repl/open-questions-gate.js +159 -0
- package/dist/repl/ready-phrase.js +108 -0
- package/dist/repl/startup-account.js +64 -1
- package/dist/repl/team-build-screen.js +116 -0
- package/dist/repl/team-build-start.js +178 -0
- package/dist/repl.js +205 -9
- package/dist/sap-link/policy.js +4 -0
- package/dist/sap-link/registry.js +9 -3
- package/dist/sap-link/server.js +4 -1
- package/dist/tools/_team-work-path.js +1 -1
- package/dist/tools/cap/sap-link-tool.js +2 -0
- package/dist/tools/project/spec_answers_record.js +62 -9
- package/dist/tools/project/team_findings.js +2 -2
- package/dist/tools/seat-gate.js +41 -0
- package/dist/ui/widgets/files-card.js +19 -1
- package/package.json +1 -1
|
@@ -24,6 +24,21 @@ export function filterFileItems(items, query) {
|
|
|
24
24
|
function fit(text, cells) {
|
|
25
25
|
return truncateToWidth(sanitizeControlChars(text), Math.max(1, cells));
|
|
26
26
|
}
|
|
27
|
+
/** A folder path keeps its END when cut (the project and .cspeach part): `…` + tail. */
|
|
28
|
+
function fitTail(text, cells) {
|
|
29
|
+
const clean = sanitizeControlChars(text);
|
|
30
|
+
const room = Math.max(1, cells);
|
|
31
|
+
if (stringWidth(clean) <= room)
|
|
32
|
+
return clean;
|
|
33
|
+
const chars = [...clean];
|
|
34
|
+
let tail = '';
|
|
35
|
+
for (let i = chars.length - 1; i >= 0; i--) {
|
|
36
|
+
if (stringWidth(chars[i] + tail) > room - 1)
|
|
37
|
+
break;
|
|
38
|
+
tail = chars[i] + tail;
|
|
39
|
+
}
|
|
40
|
+
return `…${tail}`;
|
|
41
|
+
}
|
|
27
42
|
export function FilesCard({ request, width, onResolve }) {
|
|
28
43
|
// Same raw-stdin reclaim as every card (an earlier inquirer prompt can leave
|
|
29
44
|
// Ink's raw-mode bookkeeping stale).
|
|
@@ -83,9 +98,12 @@ export function FilesCard({ request, width, onResolve }) {
|
|
|
83
98
|
const inner = Math.max(1, width - 4);
|
|
84
99
|
const dim = roleProps('dim');
|
|
85
100
|
const searchLabel = 'Search ';
|
|
101
|
+
const folderLabel = 'Folder ';
|
|
86
102
|
// A long query is cut by cells (with …) so the row never wraps.
|
|
87
103
|
const queryShown = fit(query, inner - stringWidth(searchLabel) - 1);
|
|
88
|
-
return (_jsxs(CardFrame, { tag: "QUESTION", footnote: "/files", width: width, children: [_jsx(Text, { bold: true, wrap: "truncate-end", children: fit(request.title, inner) }),
|
|
104
|
+
return (_jsxs(CardFrame, { tag: "QUESTION", footnote: "/files", width: width, children: [_jsx(Text, { bold: true, wrap: "truncate-end", children: fit(request.title, inner) }), request.folder
|
|
105
|
+
? _jsx(Text, { wrap: "truncate-end", ...dim, children: folderLabel + fitTail(request.folder, inner - stringWidth(folderLabel)) })
|
|
106
|
+
: null, _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { ...dim, children: searchLabel }), _jsx(Text, { children: queryShown }), _jsx(Text, { ...roleProps('sap'), children: "_" })] }), visible.length === 0
|
|
89
107
|
? _jsx(Text, { ...dim, children: "No file matches" })
|
|
90
108
|
: visible.map((it, i) => {
|
|
91
109
|
const on = start + i === cursor;
|