+ {command && (
+
+ {command}
+
+ )}
+ {rawCommand &&
}
+
+
+ Exit code {workEntry.exitCode ?? "unknown"}
+
+
+ Duration{" "}
+ {workEntry.durationMs !== undefined ? formatDuration(workEntry.durationMs) : "unknown"}
+
+
+ {hasRenderableCommandOutput(workEntry.stdout) ? (
+
+ ) : null}
+ {hasRenderableCommandOutput(workEntry.stderr) ? (
+
+ ) : null}
+ {!hasStreamOutput && hasRenderableCommandOutput(workEntry.output) ? (
+
+ ) : null}
+
+ );
+}
+
+function CollapsedRawCommandBlock({ value }: { value: string }) {
+ const [expanded, setExpanded] = useState(false);
+
+ return (
+
+ {!hasInlineDiff && (workEntry.changedFiles?.length ?? 0) > 0 && (
+
+ {workEntry.changedFiles?.map((filePath) => {
+ const displayPath = formatWorkspaceRelativePath(filePath, ctx.workspaceRoot);
+ return (
+
+ {displayPath}
+
+ );
+ })}
+
+ )}
+ {hasInlineDiff &&
+ renderablePatch.files.map((fileDiff) => (
+
(
+
+ )}
+ options={{
+ collapsed: false,
+ diffStyle: "unified",
+ theme: resolveDiffThemeName(ctx.resolvedTheme),
+ }}
+ />
+ ))}
+ {renderablePatch?.kind === "raw" && (
+
+ {renderablePatch.text}
+
+ )}
+
+ );
+}
+
+function GenericToolEntryDetails({ value }: { value: string }) {
+ return (
+