Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/HomePage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ $white: #ffffff;

@media (min-width: 1440px) {
width: 80vw;
padding: 6rem 5rem;
padding: 5rem 4rem;
}
}

Expand Down Expand Up @@ -248,11 +248,11 @@ $white: #ffffff;
margin-bottom: 1.5rem;

@media (min-width: 640px) {
font-size: 3.2rem;
font-size: 2.8rem;
}

@media (min-width: 1024px) {
font-size: 3.8rem;
font-size: 3rem;
}

.highlight {
Expand Down
4 changes: 1 addition & 3 deletions src/app/api/retrievalAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ export const listCollections = async () => {
/**
* 새 컬렉션을 생성하는 함수
* @param {string} collectionName - 컬렉션 이름
* @param {number} vectorSize - 벡터 차원 수
* @param {string} distance - 거리 메트릭 ("Cosine", "Euclidean", "Dot")
* @param {string} description - 컬렉션 설명 (선택사항)
* @param {Object} metadata - 커스텀 메타데이터 (선택사항)
* @returns {Promise<Object>} 생성된 컬렉션 정보
*/
export const createCollection = async (collectionName, vectorSize, distance = "Cosine", description = null, metadata = null) => {
export const createCollection = async (collectionName, distance = "Cosine", description = null, metadata = null) => {
try {
const response = await fetch(`${API_BASE_URL}/api/retrieval/collections`, {
method: 'POST',
Expand All @@ -70,7 +69,6 @@ export const createCollection = async (collectionName, vectorSize, distance = "C
},
body: JSON.stringify({
collection_name: collectionName,
vector_size: vectorSize,
distance: distance,
description: description,
metadata: metadata
Expand Down
12 changes: 9 additions & 3 deletions src/app/chat/components/ChatContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import ChatInterface from './ChatInterface';
import NewChatInterface from './NewChatInterface';
import DefaultChatInterface from './DefaultChatInterface';

const ChatContentInner: React.FC = () => {
interface ChatContentProps {
onChatStarted?: () => void; // 채팅 시작 후 호출될 콜백
}

const ChatContentInner: React.FC<ChatContentProps> = ({ onChatStarted }) => {
const searchParams = useSearchParams();
const [currentView, setCurrentView] = useState<'welcome' | 'workflow' | 'newChat' | 'existingChat' | 'defaultChat'>('welcome');
const [selectedWorkflow, setSelectedWorkflow] = useState<any>(null);
Expand Down Expand Up @@ -60,6 +64,7 @@ const ChatContentInner: React.FC = () => {
<div className={styles.workflowSection}>
<DefaultChatInterface
onBack={() => setCurrentView('welcome')}
onChatStarted={onChatStarted}
/>
</div>
</div>
Expand All @@ -74,6 +79,7 @@ const ChatContentInner: React.FC = () => {
<NewChatInterface
workflow={selectedWorkflow}
onBack={() => setCurrentView('workflow')}
onChatStarted={onChatStarted}
/>
</div>
</div>
Expand Down Expand Up @@ -140,15 +146,15 @@ const ChatContentInner: React.FC = () => {
);
};

const ChatContent: React.FC = () => {
const ChatContent: React.FC<ChatContentProps> = ({ onChatStarted }) => {
return (
<Suspense fallback={
<div className={styles.loadingContainer}>
<div className={styles.loadingSpinner}></div>
<p>Loading chat...</p>
</div>
}>
<ChatContentInner />
<ChatContentInner onChatStarted={onChatStarted} />
</Suspense>
);
};
Expand Down
9 changes: 7 additions & 2 deletions src/app/chat/components/ChatPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,24 @@ const ChatPageContent: React.FC = () => {
setActiveSection('current-chat');
};

const handleChatStarted = () => {
// 채팅 시작 후 current-chat으로 전환
setActiveSection('current-chat');
};

const settingSidebarItems = getSettingSidebarItems();
const chatSidebarItems = getChatSidebarItems();

const renderContent = () => {
switch (activeSection) {
case 'new-chat':
return <ChatContent />
return <ChatContent onChatStarted={handleChatStarted} />
case 'current-chat':
return <CurrentChatInterface />;
case 'chat-history':
return <ChatHistory onSelectChat={handleChatSelect} />
default:
return <ChatContent />
return <ChatContent onChatStarted={handleChatStarted} />
}
};

Expand Down
Loading
Loading