refactor(cli): centralize command execution flow (#841)

This commit is contained in:
Charles Packer
2026-02-05 18:21:07 -08:00
committed by GitHub
parent 2b7d618b39
commit 37e8347358
9 changed files with 1360 additions and 1479 deletions

View File

@@ -11,7 +11,7 @@ type CommandLine = {
id: string;
input: string;
output: string;
phase?: "running" | "finished";
phase?: "running" | "waiting" | "finished";
success?: boolean;
dimOutput?: boolean;
preformatted?: boolean;
@@ -30,6 +30,9 @@ type CommandLine = {
export const CommandMessage = memo(({ line }: { line: CommandLine }) => {
const columns = useTerminalWidth();
const rightWidth = Math.max(0, columns - 2); // gutter is 2 cols
if (line.phase === "waiting") {
return null;
}
// Determine dot state based on phase and success
const getDotElement = () => {

View File

@@ -88,7 +88,7 @@ const _colors = {
selected: brandColors.primaryAccent,
inactive: brandColors.textDisabled, // uses dimColor prop
border: brandColors.textDisabled,
running: brandColors.statusWarning,
running: brandColors.textSecondary,
error: brandColors.statusError,
},