'use client';

import React from 'react';

import type { ChatMessage } from '@/types';
import { MessageList } from '@/components/chat-workbench/MessageList';

export function ChatWorkbench({
  messages,
  isThinking,
  messagesEndRef,
  messageViewportRef,
  onFeedback,
  onRequestRevision,
}: {
  messages: ChatMessage[];
  isThinking: boolean;
  messagesEndRef: React.RefObject<HTMLDivElement>;
  messageViewportRef: React.RefObject<HTMLDivElement>;
  onFeedback: (runId: string, feedbackType: 'accept' | 'revise' | 'abandon', comment?: string) => void;
  onRequestRevision: (runId: string) => void;
}) {
  return (
    <div className="h-full">
    <MessageList
      messages={messages}
      isThinking={isThinking}
      messagesEndRef={messagesEndRef}
      viewportRef={messageViewportRef}
      onFeedback={onFeedback}
      onRequestRevision={onRequestRevision}
    />
    </div>
  );
}
