Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/features/planner-chat/plannerChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export function PlannerChat({ onClose, onNotice, onTodosSaved }: PlannerChatProp
}

setIsBusy(true);
let shouldCloseAfterSave = false;
try {
const result = await savePlannerTodos({
todos: generatedPlan.todos,
Expand Down Expand Up @@ -228,11 +229,15 @@ export function PlannerChat({ onClose, onNotice, onTodosSaved }: PlannerChatProp
onNotice(
`${savedTodoItems.length}개의 오늘 할 일과 ${result.calendar_events.length}개의 일정이 저장됐어요.`,
);
shouldCloseAfterSave = true;
} catch (error) {
onNotice(`플랜 저장 실패: ${error instanceof Error ? error.message : "원인 미상"}`);
} finally {
setIsBusy(false);
}
if (shouldCloseAfterSave) {
onClose();
}
}

return (
Expand Down