fix(tui): show elapsed time for running shell tools (#1026)
This commit is contained in:
@@ -68,6 +68,13 @@ export const StreamingOutputDisplay = memo(
|
||||
{" "}… +{hiddenCount} more lines ({elapsed}s){interruptHint}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{/* Always show elapsed while running, even if output is short */}
|
||||
{hiddenCount === 0 && (
|
||||
<Text dimColor>
|
||||
{" "}({elapsed}s){interruptHint}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
isPatchTool,
|
||||
isPlanTool,
|
||||
isSearchTool,
|
||||
isShellTool,
|
||||
isTaskTool,
|
||||
isTodoTool,
|
||||
} from "../helpers/toolNameMapping.js";
|
||||
@@ -62,22 +63,6 @@ type ToolCallLine = {
|
||||
streaming?: StreamingState;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if tool is a shell/bash tool that supports streaming output
|
||||
*/
|
||||
function isShellTool(name: string): boolean {
|
||||
const shellTools = [
|
||||
"Bash",
|
||||
"Shell",
|
||||
"shell",
|
||||
"shell_command",
|
||||
"run_shell_command",
|
||||
"RunShellCommand",
|
||||
"ShellCommand",
|
||||
];
|
||||
return shellTools.includes(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* ToolCallMessageRich - Rich formatting version with old layout logic
|
||||
* This preserves the exact wrapping and spacing logic from the old codebase
|
||||
|
||||
Reference in New Issue
Block a user