Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
48 changes: 25 additions & 23 deletions client/src/pages/ComparePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,34 +143,36 @@ const ComparePage: React.FC = () => {
}, []);

return (
<div className="px-5">
<div className="h-[100dvh] flex flex-col scroll-auto">
<Header title="요금제 비교하기" onBackClick={() => openModal()} />

<ComparePageTitle>
비교하고 싶은
<br />
요금제를 선택해 주세요
</ComparePageTitle>

<FadeInUpDiv custom={1}>
<PlanSelectionCardArea
selectedLeft={selectedLeft}
selectedRight={selectedRight}
onSelectSlot={openSheetForSlot}
onClearSlot={handleClearSlot}
/>
</FadeInUpDiv>

<FadeInUpDiv custom={2}>
{selectedLeft || selectedRight ? (
<ComparisonResult
<div className="flex-1 overflow-y-auto px-5 hide-scrollbar">
<ComparePageTitle>
비교하고 싶은
<br />
요금제를 선택해 주세요
</ComparePageTitle>

<FadeInUpDiv custom={1}>
<PlanSelectionCardArea
selectedLeft={selectedLeft}
selectedRight={selectedRight}
onSelectSlot={openSheetForSlot}
onClearSlot={handleClearSlot}
/>
) : (
<EmptyState />
)}
</FadeInUpDiv>
</FadeInUpDiv>

<FadeInUpDiv custom={2}>
{selectedLeft || selectedRight ? (
<ComparisonResult
selectedLeft={selectedLeft}
selectedRight={selectedRight}
/>
) : (
<EmptyState />
)}
</FadeInUpDiv>
</div>

<BottomSheet
className="fixed left-1/2 top-0 bottom-0 -translate-x-1/2 w-full max-w-[600px] flex justify-center items-center z-50"
Expand Down
7 changes: 2 additions & 5 deletions server/controllers/planSocketController.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,15 @@ export const handlePlanRecommend = async (
return;
}
console.log('수신메세지', message);
console.log('대화히스토리', history?.length || 0, '개');

// 🔧 히스토리가 있으면 사용, 없으면 기본 메시지만 사용
const plans = '';
console.log('히스토리:', history);
const basicMessages =
history && history.length > 0
? history
: [{ role: 'user', content: message }];
console.log('프롬프트메세지', basicMessages.length, '개');
let messages;
try {
messages = buildPromptMessages(plans, basicMessages);
messages = buildPromptMessages(basicMessages);
} catch (promptError) {
console.error('❌ Prompt building error:', promptError);
socket.emit('error', {
Expand Down
2 changes: 0 additions & 2 deletions server/services/gptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ export const streamChat = async (
content: `${functionName} 함수를 호출했습니다. 인자: ${functionArgsRaw}`,
});

// searchPlans 함수의 경우 검색 결과 상세 정보 추가
console.log('여기야', functionName, result);
if (functionName === 'searchPlans' && result) {
if (result.result === 'empty') {
functionResults.push({
Expand Down
2 changes: 1 addition & 1 deletion server/utils/promptBuilder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const buildPromptMessages = (plans, fullMessages) => {
export const buildPromptMessages = (fullMessages) => {
const systemMessage = {
role: 'system',
content: `너는 LG유플러스 요금제 추천 도우미야! 반드시 간단한 인사와 요금제 추천과 관련된 질문에만 응답해야 해. 요금제 외의 질문(예: 요리 레시피, 날씨, 일반 상식 등)은 답변하지 말고 "저는 요금제 추천 도우미입니다. 📱💡" 라면서 요금제 추천에 관심이 있냐고 유저에게 친절하게 안내해.
Expand Down
Loading