@parallel-cli/parallel 0.4.0 → 0.4.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 +116 -0
- package/README.md +137 -121
- package/dist/commands.js +17 -4
- package/dist/config.js +255 -30
- package/dist/controller.js +32 -10
- package/dist/i18n.js +196 -8
- package/dist/index.js +5 -2
- package/dist/pricing.js +166 -31
- package/dist/ui/App.js +199 -45
- package/dist/ui/CommandInput.js +42 -17
- package/dist/ui/SettingsPanel.js +291 -61
- package/dist/ui/Wizard.js +43 -6
- package/dist/ui/views.js +15 -6
- package/package.json +10 -1
package/dist/ui/views.js
CHANGED
|
@@ -18,19 +18,27 @@ function useScrollWindow(items, visible, anchor = 'top') {
|
|
|
18
18
|
const s = Math.min(scroll, max);
|
|
19
19
|
const step = Math.max(1, visible - 1);
|
|
20
20
|
useInput((_input, key) => {
|
|
21
|
-
const towardsAnchor = (v) => Math.max(0, Math.min(v, max) -
|
|
22
|
-
const awayFromAnchor = (v) => Math.min(Math.min(v, max) +
|
|
21
|
+
const towardsAnchor = (v, amount = step) => Math.max(0, Math.min(v, max) - amount);
|
|
22
|
+
const awayFromAnchor = (v, amount = step) => Math.min(Math.min(v, max) + amount, max);
|
|
23
23
|
if (anchor === 'top') {
|
|
24
24
|
if (key.pageDown)
|
|
25
25
|
setScroll(awayFromAnchor);
|
|
26
26
|
if (key.pageUp)
|
|
27
27
|
setScroll(towardsAnchor);
|
|
28
|
+
if (key.downArrow)
|
|
29
|
+
setScroll((v) => awayFromAnchor(v, 1));
|
|
30
|
+
if (key.upArrow)
|
|
31
|
+
setScroll((v) => towardsAnchor(v, 1));
|
|
28
32
|
}
|
|
29
33
|
else {
|
|
30
34
|
if (key.pageUp)
|
|
31
35
|
setScroll(awayFromAnchor);
|
|
32
36
|
if (key.pageDown)
|
|
33
37
|
setScroll(towardsAnchor);
|
|
38
|
+
if (key.upArrow)
|
|
39
|
+
setScroll((v) => awayFromAnchor(v, 1));
|
|
40
|
+
if (key.downArrow)
|
|
41
|
+
setScroll((v) => towardsAnchor(v, 1));
|
|
34
42
|
}
|
|
35
43
|
});
|
|
36
44
|
const start = anchor === 'top' ? s : Math.max(0, items.length - visible - s);
|
|
@@ -86,9 +94,10 @@ export function SessionsView({ projectRoot }) {
|
|
|
86
94
|
const sessions = Controller.listSessions(projectRoot);
|
|
87
95
|
return (_jsxs(Box, { borderStyle: "round", borderColor: "yellow", flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, color: "yellow", children: t('sessions.title') }), sessions.length === 0 ? (_jsx(Text, { color: "gray", children: t('sessions.empty') })) : (sessions.map((s, i) => (_jsxs(Text, { wrap: "truncate-end", children: [' ', _jsxs(Text, { color: "yellow", bold: true, children: [String(i + 1).padStart(2), "."] }), ' ', _jsx(Text, { children: t('sessions.item', { date: new Date(s.data.savedAt).toLocaleString(), agents: s.data.agents.length }) }), _jsxs(Text, { color: "gray", children: [" ", s.data.agents.map((a) => a.name).join(', ').slice(0, 80)] })] }, s.file)))), _jsx(Text, { children: " " }), _jsx(Text, { color: "gray", children: t('sessions.hint') })] }));
|
|
88
96
|
}
|
|
89
|
-
export function HelpView() {
|
|
90
|
-
//
|
|
91
|
-
const
|
|
97
|
+
export function HelpView({ bodyHeight }) {
|
|
98
|
+
// Fixed intro/highlight/footer rows consume about 12 lines inside the already-sized body.
|
|
99
|
+
const fallbackVisible = useVisibleRows(16);
|
|
100
|
+
const visible = bodyHeight ? Math.max(3, bodyHeight - 12) : fallbackVisible;
|
|
92
101
|
const commands = visibleCommands();
|
|
93
102
|
const { slice, above, below } = useScrollWindow(commands, visible, 'top');
|
|
94
103
|
const highlights = [
|
|
@@ -96,5 +105,5 @@ export function HelpView() {
|
|
|
96
105
|
['Shell approvals', ['/approvals ask', '/approvals auto', '/approvals yolo']],
|
|
97
106
|
['Navigation', ['/focus', '/attach', '/raw', '/send']],
|
|
98
107
|
];
|
|
99
|
-
return (_jsxs(Box, { borderStyle: "round", borderColor: "cyan", flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: t('help.title') }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, children: t('help.l1a') }), t('help.l1b'), _jsx(Text, { bold: true, children: t('help.l1c') }), "."] }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, children: t('help.l2a') }), t('help.l2b'), _jsx(Text, { bold: true, children: t('help.l2c') }), t('help.l2d')] }), _jsx(Text, { wrap: "truncate-end", children: t('help.l3') }), _jsx(Text, { children: " " }), highlights.map(([label, names]) => (_jsxs(Text, { wrap: "truncate-end", children: [_jsxs(Text, { color: "cyan", bold: true, children: [label, ": "] }), _jsx(Text, { color: "gray", children: names.join(' ') })] }, label))), _jsx(Text, { color: "gray", wrap: "truncate-end", children: "Keyboard: Tab/\u2192 autocomplete \u00B7 Esc back/clear \u00B7
|
|
108
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: "cyan", flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: t('help.title') }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, children: t('help.l1a') }), t('help.l1b'), _jsx(Text, { bold: true, children: t('help.l1c') }), "."] }), _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, children: t('help.l2a') }), t('help.l2b'), _jsx(Text, { bold: true, children: t('help.l2c') }), t('help.l2d')] }), _jsx(Text, { wrap: "truncate-end", children: t('help.l3') }), _jsx(Text, { children: " " }), highlights.map(([label, names]) => (_jsxs(Text, { wrap: "truncate-end", children: [_jsxs(Text, { color: "cyan", bold: true, children: [label, ": "] }), _jsx(Text, { color: "gray", children: names.join(' ') })] }, label))), _jsx(Text, { color: "gray", wrap: "truncate-end", children: "Keyboard: \u2191/\u2193 or PgUp/PgDn scroll \u00B7 Tab/\u2192 autocomplete \u00B7 Esc back/clear \u00B7 Ctrl+U clear \u00B7 Ctrl+V image" }), _jsx(Text, { children: " " }), _jsx(Above, { n: above }), slice.map((c) => (_jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: "cyan", bold: true, children: c.name.padEnd(18) }), _jsx(Text, { color: "yellow", children: c.args.padEnd(24) }), _jsxs(Text, { color: "gray", children: [t(c.descKey), c.aliases?.length ? ` (= ${c.aliases.join(', ')})` : ''] })] }, c.name))), _jsx(Below, { n: below }), _jsx(Text, { children: " " }), _jsx(Text, { color: "gray", wrap: "truncate-end", children: t('help.states') }), _jsx(Text, { color: "gray", wrap: "truncate-end", children: t('help.keys') })] }));
|
|
100
109
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallel-cli/parallel",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Real-time multi-agent coding CLI with shared context, adaptive co-editing, dedicated agent terminals, and headless CI runs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"real-time"
|
|
16
16
|
],
|
|
17
17
|
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/Nil06/parallel-cli.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/Nil06/parallel-cli#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/Nil06/parallel-cli/issues"
|
|
25
|
+
},
|
|
18
26
|
"author": "Nil Amara",
|
|
19
27
|
"type": "module",
|
|
20
28
|
"bin": {
|
|
@@ -24,6 +32,7 @@
|
|
|
24
32
|
"files": [
|
|
25
33
|
"dist",
|
|
26
34
|
"README.md",
|
|
35
|
+
"CHANGELOG.md",
|
|
27
36
|
"LICENSE"
|
|
28
37
|
],
|
|
29
38
|
"publishConfig": {
|