import { Hammer } from 'lucide-react';
import { Loader } from '@/components/ui/loader.tsx';
import MarkdownRenderer from '@/components/ui/markdown-renderer.tsx';
import type { ExecutionProcess, WorktreeDiff } from 'shared/types.ts';
import DisplayConversationEntry from '@/components/tasks/TaskDetails/DisplayConversationEntry.tsx';
import useNormalizedConversation from '@/hooks/useNormalizedConversation';
interface NormalizedConversationViewerProps {
executionProcess: ExecutionProcess;
onConversationUpdate?: () => void;
diff?: WorktreeDiff | null;
isBackgroundRefreshing?: boolean;
diffDeletable?: boolean;
}
export function NormalizedConversationViewer({
executionProcess,
diffDeletable,
onConversationUpdate,
}: NormalizedConversationViewerProps) {
const { loading, error, conversation, displayEntries } =
useNormalizedConversation({
executionProcess,
onConversationUpdate,
});
if (loading) {
return (