Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/components/Buttons/AudioButton/AudioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const AudioButton = () => {
tabIndex={0} // ← 키보드 포커스 가능
onMouseDown={async (event: MouseEvent) => {
event.preventDefault();
if (audioToggledOn) cancelTTS(); // 🔴 토글 OFF 직전 즉시 중단
if (audioToggledOn) cancelTTS(); // 토글 OFF 직전 즉시 중단
await toggleAudio();
}}
onKeyDown={async (e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatBotButton/ChatBotButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "./ChatBotButton.css";
* Toggles opening and closing of the chat window when general.embedded is false.
*/
const ChatBotButton = () => {
// ✅ 디버그 토글: true면 배지를 무조건 보여줌(표시 여부 문제 확인용)

const FORCE_BADGE_DEBUG = true;

// handles settings
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatBotContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,4 @@ const ChatBotContainer = ({
);
};

export default ChatBotContainer;
export default ChatBotContainer;
73 changes: 4 additions & 69 deletions src/components/ChatHistoryButton/ChatHistoryButton.tsx
Original file line number Diff line number Diff line change
@@ -1,69 +1,4 @@
import { useState, MouseEvent } from "react";

import { useChatHistoryInternal } from "../../hooks/internal/useChatHistoryInternal";
import { useSettingsContext } from "../../context/SettingsContext";
import { useStylesContext } from "../../context/StylesContext";

import "./ChatHistoryButton.css";

/**
* Supports viewing of old messages.
*/
const ChatHistoryButton = () => {
// handles settings
const { settings } = useSettingsContext();

// handles styles
const { styles } = useStylesContext();

// handles chat history
const { showChatHistory } = useChatHistoryInternal();

// tracks if view history button is hovered
const [isHovered, setIsHovered] = useState<boolean>(false);

// styles for view chat history hovered button
const chatHistoryButtonHoveredStyle: React.CSSProperties = {
color: settings.general?.primaryColor,
borderColor: settings.general?.primaryColor,
...styles.chatHistoryButtonStyle, // by default inherit the base style
...styles.chatHistoryButtonHoveredStyle
};

/**
* Handles mouse enter event on view chat history button.
*/
const handleMouseEnter = () => {
setIsHovered(true);
};

/**
* Handles mouse leave event on view chat history button.
*/
const handleMouseLeave = () => {
setIsHovered(false);
};

return (
<div className="rcb-view-history-container">
<div
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
style={isHovered ? chatHistoryButtonHoveredStyle : {...styles.chatHistoryButtonStyle}}
onMouseDown={(event: MouseEvent) => {
event.preventDefault();
showChatHistory();
}}
className="rcb-view-history-button"
role="button"
tabIndex={0}
>
<p>
{settings.chatHistory?.viewChatHistoryButtonText}
</p>
</div>
</div>
);
};

export default ChatHistoryButton;
// ChatHistoryButton.tsx — 히스토리 버튼 완전 비활성화(렌더 X)
export default function ChatHistoryButton() {
return null;
}
1 change: 0 additions & 1 deletion src/context/BotStatesContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ const BotStatesProvider = ({
?? window.innerWidth);
useEffect(() => {
setUnreadCount(0); // ✅ 앱 처음 켰을 때 무조건 0부터 시작
// setHasFlowStarted(false); // 기본값이 false면 생략
}, []);

// ✅ 앱 최초 진입 시각 기록
Expand Down
2 changes: 1 addition & 1 deletion src/types/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type Message = {
timestamp: string;
tags?: Array<string>;
contentWrapper?: React.ComponentType<{ children: React.ReactNode }>;
// 👇 추가
// 밑에 추가
isHistory?: boolean; // 과거 로드된 메시지
isRead?: boolean; // 읽음 여부
}