diff --git a/2_frontend/src/features/snap/components/ThinkingBubble.tsx b/2_frontend/src/features/snap/components/ThinkingBubble.tsx index 5f86559..4dabce1 100644 --- a/2_frontend/src/features/snap/components/ThinkingBubble.tsx +++ b/2_frontend/src/features/snap/components/ThinkingBubble.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from "react" /** 답변 자리(첫 토큰 전·재진입 대기·세션 생성 중). Message 의 assistant 모양과 똑같이 — - * AI 배지 + CODEASSIST 라벨, 본문은 상자 없이. 안에 시머 텍스트나 스트리밍 본문을 넣는다. */ + * AI 배지 + CODEASSIST 라벨, 본문은 상자 없이. "생각하는 중" 표시는 아래 WorkingRow 가 맡음. */ export function ThinkingBubble({ children }: { children?: ReactNode }) { return (
@@ -13,9 +13,7 @@ export function ThinkingBubble({ children }: { children?: ReactNode }) { CODEASSIST
-
- {children ?? 생각하는 중…} -
+
{children}
) } diff --git a/2_frontend/src/features/snap/components/ThinkingSteps.tsx b/2_frontend/src/features/snap/components/ThinkingSteps.tsx index a4e76f1..a539617 100644 --- a/2_frontend/src/features/snap/components/ThinkingSteps.tsx +++ b/2_frontend/src/features/snap/components/ThinkingSteps.tsx @@ -66,8 +66,8 @@ export function ThinkingSteps({ ) } -/** 하단 "작성 중… · N초" — 스피너 + 경과 초. busy 가 true 인 동안만 그림. */ -export function WorkingRow({ busy }: { busy: boolean }) { +/** 하단 상태줄 — 스피너 + 경과 초. 답변 글자 오기 전엔 "생각하는 중", 오기 시작하면 "작성 중". */ +export function WorkingRow({ busy, label = "작성 중…" }: { busy: boolean; label?: string }) { const [elapsed, setElapsed] = useState(0) useEffect(() => { if (!busy) return @@ -80,7 +80,7 @@ export function WorkingRow({ busy }: { busy: boolean }) { return (
- 작성 중… · {elapsed}초 + {label} · {elapsed}초
) } diff --git a/2_frontend/src/features/snap/pages/NewChatPage.test.tsx b/2_frontend/src/features/snap/pages/NewChatPage.test.tsx index 7567bfd..3ea5a07 100644 --- a/2_frontend/src/features/snap/pages/NewChatPage.test.tsx +++ b/2_frontend/src/features/snap/pages/NewChatPage.test.tsx @@ -30,7 +30,7 @@ describe("NewChatPage 전송", () => { mount() fireEvent.click(screen.getByText("MARA 에서 자재번호로 자재유형(MTART) 읽는 SELECT SINGLE")) expect(mutate).toHaveBeenCalledOnce() - expect(await screen.findByText("생각하는 중…")).toBeTruthy() + expect(await screen.findByText(/생각하는 중…/)).toBeTruthy() expect(screen.getByText("MARA 에서 자재번호로 자재유형(MTART) 읽는 SELECT SINGLE")).toBeTruthy() expect(screen.queryByText("무엇을 도와드릴까요?")).toBeNull() act(() => lastCallbacks().onSuccess({ id: "ses_new" })) @@ -40,10 +40,10 @@ describe("NewChatPage 전송", () => { it("세션 생성 실패면 헤로로 돌아온다", async () => { mount() fireEvent.click(screen.getByText("내부 테이블 LOOP 에서 그룹 소계 구하는 관용구")) - expect(await screen.findByText("생각하는 중…")).toBeTruthy() + expect(await screen.findByText(/생각하는 중…/)).toBeTruthy() act(() => lastCallbacks().onError()) expect(await screen.findByText("무엇을 도와드릴까요?")).toBeTruthy() - expect(screen.queryByText("생각하는 중…")).toBeNull() + expect(screen.queryByText(/생각하는 중…/)).toBeNull() }) it("생성 중엔 두 번째 전송을 무시한다", () => { diff --git a/2_frontend/src/features/snap/pages/NewChatPage.tsx b/2_frontend/src/features/snap/pages/NewChatPage.tsx index 49fab9c..328f0c2 100644 --- a/2_frontend/src/features/snap/pages/NewChatPage.tsx +++ b/2_frontend/src/features/snap/pages/NewChatPage.tsx @@ -9,6 +9,7 @@ import { Hero } from "../components/Hero" import { Composer } from "../components/Composer" import { Message } from "../components/Message" import { ThinkingBubble } from "../components/ThinkingBubble" +import { WorkingRow } from "../components/ThinkingSteps" import { useEscapeKey } from "../hooks/useEscapeKey" import type { SnapImageInput } from "../contract/types" @@ -61,6 +62,7 @@ export default function NewChatPage() { {/* eslint-disable-next-line jsx-a11y/aria-role -- Message 의 role 은 ARIA 아니고 화자 */} + )} - {m.content === "" ? ( - // 첫 토큰 오기 전 빈 시간 메움 — 과정도 아직 없으면 시머로 "생각 중" 신호 - steps.length === 0 && ( - 생각하는 중… - ) - ) : ( + {m.content !== "" && ( )} - + ) } @@ -222,7 +220,7 @@ export default function SessionChatPage() { {generatingRemotely && (
- +
)} diff --git a/4_rust_tauri/src-tauri/Cargo.lock b/4_rust_tauri/src-tauri/Cargo.lock index ec202b3..623ceb5 100644 --- a/4_rust_tauri/src-tauri/Cargo.lock +++ b/4_rust_tauri/src-tauri/Cargo.lock @@ -485,7 +485,7 @@ dependencies = [ [[package]] name = "codeassist-tauri" -version = "0.1.1" +version = "0.1.2" dependencies = [ "base64 0.22.1", "png 0.17.16", diff --git a/4_rust_tauri/src-tauri/Cargo.toml b/4_rust_tauri/src-tauri/Cargo.toml index 362a040..9bb6335 100644 --- a/4_rust_tauri/src-tauri/Cargo.toml +++ b/4_rust_tauri/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "codeassist-tauri" -version = "0.1.2" +version = "0.1.3" description = "CodeAssist 표준 Rust/Tauri 데스크톱 앱" authors = ["justdodev"] edition = "2021" diff --git a/4_rust_tauri/src-tauri/tauri.conf.json b/4_rust_tauri/src-tauri/tauri.conf.json index 9474490..bef9770 100644 --- a/4_rust_tauri/src-tauri/tauri.conf.json +++ b/4_rust_tauri/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "CodeAssist", - "version": "0.1.2", + "version": "0.1.3", "identifier": "com.codeassist.app", "build": { "beforeDevCommand": { "cwd": "../../2_frontend", "script": "npm run dev" },