loop-task 2.0.12 → 2.0.13
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.
|
@@ -30,14 +30,26 @@ export async function executeCommand(command, commandArgs, cwd, logStream, signa
|
|
|
30
30
|
logStream.write(t("loop.exitMarker", { code: 1, duration: formatDuration(0) }));
|
|
31
31
|
return { exitCode: 1, duration: 0, startedAt, endedAt };
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
const shellCommand = formatCommandLine(command, commandArgs);
|
|
34
|
+
const needShell = /(\$\(|`|&&|\|\||;|>|<|\|)/.test(shellCommand);
|
|
35
|
+
const child = needShell
|
|
36
|
+
? execa(shellCommand, {
|
|
37
|
+
stdout: "pipe",
|
|
38
|
+
stderr: "pipe",
|
|
39
|
+
stdin: "ignore",
|
|
40
|
+
cwd: cwd || undefined,
|
|
41
|
+
cancelSignal: signal,
|
|
42
|
+
shell: true,
|
|
43
|
+
env: process.env,
|
|
44
|
+
})
|
|
45
|
+
: execa(command, commandArgs, {
|
|
46
|
+
stdout: "pipe",
|
|
47
|
+
stderr: "pipe",
|
|
48
|
+
stdin: "ignore",
|
|
49
|
+
cwd: cwd || undefined,
|
|
50
|
+
cancelSignal: signal,
|
|
51
|
+
env: process.env,
|
|
52
|
+
});
|
|
41
53
|
const stdoutChunks = [];
|
|
42
54
|
let stdoutTruncated = false;
|
|
43
55
|
let stdoutBytes = 0;
|
package/dist/tui/App.js
CHANGED
|
@@ -90,10 +90,11 @@ export function App(props) {
|
|
|
90
90
|
useEffect(() => { setSelectedRunIndex(0); }, [selected?.id]);
|
|
91
91
|
useLogStream(selectedId, view, (error) => pushToast("error", error.message));
|
|
92
92
|
const filteredTasks = useMemo(() => {
|
|
93
|
+
const sorted = [...tasks].sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: "base" }));
|
|
93
94
|
if (!taskQuery)
|
|
94
|
-
return
|
|
95
|
+
return sorted;
|
|
95
96
|
const q = taskQuery.toLowerCase();
|
|
96
|
-
return
|
|
97
|
+
return sorted.filter((t) => `${t.id} ${t.name} ${t.command}`.toLowerCase().includes(q));
|
|
97
98
|
}, [tasks, taskQuery]);
|
|
98
99
|
const taskClampedIndex = Math.min(taskSelectedIndex, Math.max(0, filteredTasks.length - 1));
|
|
99
100
|
const selectedTask = filteredTasks[taskClampedIndex] ?? null;
|
|
@@ -5,6 +5,7 @@ import { darkTheme as theme } from "../theme.js";
|
|
|
5
5
|
import { HEADER_COMPACT_WIDTH } from "../../config/constants.js";
|
|
6
6
|
import { t } from "../../i18n/index.js";
|
|
7
7
|
import { TabBar } from "./TabBar.js";
|
|
8
|
+
const VERSION = "v" + (process.env.npm_package_version ?? "dev");
|
|
8
9
|
function daemonSymbol(status) {
|
|
9
10
|
switch (status) {
|
|
10
11
|
case "connected": return "\u25CF";
|
|
@@ -36,5 +37,5 @@ export function Header(props) {
|
|
|
36
37
|
{ label: t("board.pausedLabel"), value: props.counts.paused, color: theme.semantic.warning },
|
|
37
38
|
{ label: t("board.idleLabel"), value: props.counts.idle, color: theme.semantic.idle },
|
|
38
39
|
];
|
|
39
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: theme.accent.brand, bold: true, children: t("board.appName") }), _jsx(Text, { color: daemonColor(props.daemonStatus), children: daemonSymbol(props.daemonStatus) }), _jsx(Text, { color: theme.text.secondary, children: daemonText(props.daemonStatus) }), !compact && entries.map((e) => e.value > 0 ? (_jsxs(React.Fragment, { children: [_jsx(Text, { color: theme.text.muted, children: e.label }), _jsx(Text, { color: e.color, children: e.value })] }, e.label)) : null)] }), _jsx(TabBar, { activeTab: props.activeTab, onTabChange: props.onTabChange, counts: props.tabCounts })] }), _jsx(Box, { children: _jsx(Text, { color: theme.border.default, children: "\u2500".repeat(width) }) })] }));
|
|
40
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: theme.accent.brand, bold: true, children: t("board.appName") }), _jsx(Text, { color: theme.text.muted, children: VERSION }), _jsx(Text, { color: daemonColor(props.daemonStatus), children: daemonSymbol(props.daemonStatus) }), _jsx(Text, { color: theme.text.secondary, children: daemonText(props.daemonStatus) }), !compact && entries.map((e) => e.value > 0 ? (_jsxs(React.Fragment, { children: [_jsx(Text, { color: theme.text.muted, children: e.label }), _jsx(Text, { color: e.color, children: e.value })] }, e.label)) : null)] }), _jsx(TabBar, { activeTab: props.activeTab, onTabChange: props.onTabChange, counts: props.tabCounts })] }), _jsx(Box, { children: _jsx(Text, { color: theme.border.default, children: "\u2500".repeat(width) }) })] }));
|
|
40
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loop-task",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "Loop engineering toolkit. Run any command on a cadence, in the background, managed from a terminal board. Schedule tests, builds, syncs, or agent prompts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|