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
13 changes: 3 additions & 10 deletions components/ai-assistant-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ChevronLeft, ChevronRight, Send, Bot, User } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Textarea } from "@/components/ui/textarea"
import { useChatSocket } from "@/hooks/use-chat-socket"
import { updateTokenUsage, getChatHistory } from "@/lib/api/chat"
import { getChatHistory } from "@/lib/api/chat"
import { MarkdownContent } from "@/components/markdown-content"

interface Message {
Expand Down Expand Up @@ -128,16 +128,9 @@ export function AiAssistantSidebar({
const tokensDelta: number = response.tokenCount ?? 0;

if (tokensDelta > 0) {
updateTokenUsage({ examId, participantId, tokens: tokensDelta })
.then(() => { onTokensUpdate(tokensDelta); })
.catch((err) => {
if (process.env.NODE_ENV === "development") {
console.warn("[WS Chat] Token update failed:", err);
}
onTokensUpdate(tokensDelta);
});
onTokensUpdate(tokensDelta);
}
}, [examId, participantId, onTokensUpdate]);
}, [onTokensUpdate]);

const handleChatError = useCallback((errorMessage: string) => {
console.error('[AiAssistant] WS 에러로 로딩 해제:', errorMessage);
Expand Down
4 changes: 2 additions & 2 deletions components/entry-codes-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,12 @@ export function EntryCodesContent() {
return (
<div className="flex h-full min-w-0 flex-1 flex-col">
{/* Top Header Bar */}
<header className="flex h-[88px] shrink-0 items-center justify-between border-b border-[#E5E5E5] bg-white px-8">
<header className="flex h-[88px] shrink-0 items-center justify-between border-b border-[#E5E5E5] bg-white px-8 lg:pr-8 xl:pr-10">
<div>
<h1 className="text-2xl font-semibold text-[#1A1A1A]">코드 관리</h1>
<p className="text-sm text-[#6B7280]">참가자 시험 입장 코드를 관리합니다</p>
</div>
<div className="flex gap-2 lg:mr-8 xl:mr-12 2xl:mr-16">
<div className="flex shrink-0 gap-2">
<button
onClick={() => setIsCreateExamOpen(true)}
className="rounded-full bg-[#3B82F6] px-5 py-2 text-sm font-medium text-white transition-colors hover:bg-[#2563EB]"
Expand Down
Loading