diff --git a/src/games/storywriter/components/chat-sidebar.tsx b/src/games/storywriter/components/chat-sidebar.tsx
index 9ac820a..178d0df 100644
--- a/src/games/storywriter/components/chat-sidebar.tsx
+++ b/src/games/storywriter/components/chat-sidebar.tsx
@@ -361,15 +361,6 @@ export const ChatPanel = ({ visible }: { visible: boolean }) => {
}
};
- const handleClear = () => {
- if (!currentStory || !currentWorld) return;
- dispatch({
- type: 'CLEAR_CHAT',
- worldId: currentWorld.id,
- storyId: currentStory.id,
- });
- };
-
const handleDeleteMessage = useCallback((messageId: string) => {
if (!currentStory || !currentWorld) return;
dispatch({
@@ -542,9 +533,6 @@ export const ChatPanel = ({ visible }: { visible: boolean }) => {
{error}
)}
-
)}
{currentStory && (
diff --git a/src/games/storywriter/contexts/state.tsx b/src/games/storywriter/contexts/state.tsx
index 7582651..c972f51 100644
--- a/src/games/storywriter/contexts/state.tsx
+++ b/src/games/storywriter/contexts/state.tsx
@@ -154,7 +154,6 @@ type Action =
| { type: 'SET_CHAT_OPEN'; open: boolean }
// Chat
| { type: 'ADD_CHAT_MESSAGE'; worldId: string; storyId: string; message: ChatMessage }
- | { type: 'CLEAR_CHAT'; worldId: string; storyId: string }
| { type: 'DELETE_CHAT_MESSAGES_FROM'; worldId: string; storyId: string; messageId: string }
| { type: 'EDIT_CHAT_MESSAGE'; worldId: string; storyId: string; messageId: string; content: string }
// Connection
@@ -440,9 +439,6 @@ function reducer(state: IState, action: Action): IState {
return { ...s, chatMessages: [...s.chatMessages, action.message] };
});
}
- case 'CLEAR_CHAT': {
- return updateStory(state, action.worldId, action.storyId, s => ({ ...s, chatMessages: [] }));
- }
case 'DELETE_CHAT_MESSAGES_FROM': {
return updateStory(state, action.worldId, action.storyId, s => {
const messageIndex = s.chatMessages.findIndex(m => m.id === action.messageId);