히스토리 패널 작업 완료.

This commit is contained in:
sheetEasy AI Team
2025-06-27 14:47:47 +09:00
parent e5ee01553a
commit b09a417291
4 changed files with 164 additions and 18 deletions

View File

@@ -24,18 +24,16 @@ const PromptInput: React.FC<PromptInputProps> = ({
value,
onChange,
onExecute,
disabled = true,
disabled: _disabled = true,
maxLength = 500,
onHistoryToggle,
historyCount,
}) => {
const textareaRef = useRef<HTMLTextAreaElement>(null);
const [showCellInsertFeedback, setShowCellInsertFeedback] = useState(false);
const [lastInsertedCell, setLastInsertedCell] = useState<string | null>(null);
const [currentSelectedCell, setCurrentSelectedCell] = useState<string | null>(
null,
);
const [processingMessage, setProcessingMessage] = useState<string>("");
const [, setShowCellInsertFeedback] = useState(false);
const [, setLastInsertedCell] = useState<string | null>(null);
const [, setCurrentSelectedCell] = useState<string | null>(null);
const [, setProcessingMessage] = useState<string>("");
const cellAddressToInsert = useAppStore((state) => state.cellAddressToInsert);
const setCellAddressToInsert = useAppStore(
@@ -53,7 +51,7 @@ const PromptInput: React.FC<PromptInputProps> = ({
}, [cellAddressToInsert]);
/**
* 전송하기 버튼 클릭 핸들러
* 전송하기 버튼 클릭 핸들러 - 상위 컴포넌트 onExecute 사용 또는 기본 로직
*/
const handleExecute = async () => {
if (!value.trim()) {
@@ -66,6 +64,14 @@ const PromptInput: React.FC<PromptInputProps> = ({
return;
}
// 상위 컴포넌트에서 onExecute를 전달받은 경우 해당 함수 사용
if (onExecute) {
console.log("🚀 상위 컴포넌트 onExecute 함수 호출");
await onExecute();
return;
}
// 폴백: 기본 AI 프로세서 직접 호출
setProcessingMessage("AI가 요청을 처리하고 있습니다...");
try {