diff --git a/src/games/storywriter/assets/chat-sidebar.module.css b/src/games/storywriter/assets/chat-sidebar.module.css index 4162d2e..e650a0b 100644 --- a/src/games/storywriter/assets/chat-sidebar.module.css +++ b/src/games/storywriter/assets/chat-sidebar.module.css @@ -204,39 +204,97 @@ } .inputContainer { - display: flex; - flex-direction: column; - gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); } -.optionsRow { +.inputWrapper { + display: flex; + flex-direction: column; + background: var(--bg-panel); + border: 1px solid var(--border); + border-radius: 8px; + overflow: hidden; + transition: border-color 0.15s ease; + + &:focus-within { + border-color: var(--accent); + } +} + +.input { + width: 100%; + padding: 10px 12px; + font-size: 13px; + font-family: inherit; + background: transparent; + border: none; + color: var(--text); + outline: none; + + &::placeholder { + color: var(--text-muted); + } +} + +.inputFooter { display: flex; justify-content: space-between; align-items: center; + padding: 6px 8px; + border-top: 1px solid var(--border); gap: 8px; } +.inputFooterLeft { + display: flex; + align-items: center; + gap: 10px; + min-width: 0; +} + +.inputFooterRight { + display: flex; + align-items: center; + gap: 6px; + flex-shrink: 0; +} + .tokenCounter { - display: flex; - align-items: center; - gap: 8px; font-size: 11px; color: var(--text-muted); + white-space: nowrap; } -.summarizeButton { +.toggleContainer { + display: flex; + align-items: center; + gap: 6px; + font-size: 12px; + color: var(--text-muted); + cursor: pointer; + user-select: none; + white-space: nowrap; + + input[type="checkbox"] { + cursor: pointer; + accent-color: var(--accent); + } +} + +.actionButton { display: flex; align-items: center; justify-content: center; - padding: 4px; + padding: 5px; color: var(--text-muted); background: transparent; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; + height: 28px; + width: 28px; &:hover:not(:disabled) { color: var(--text); @@ -245,107 +303,24 @@ &:disabled { opacity: 0.4; - cursor: default; + cursor: not-allowed; } } -.toggleContainer { - display: flex; - align-items: center; - gap: 8px; - font-size: 12px; - color: var(--text); - cursor: pointer; - user-select: none; - - input[type="checkbox"] { - cursor: pointer; - accent-color: var(--accent); - } -} - -.input { - width: 100%; - padding: 8px; - font-size: 13px; - font-family: inherit; - resize: vertical; - background: var(--bg-panel); - border: 1px solid var(--border); - border-radius: 4px; - color: var(--text); - outline: none; - - &:focus { - border-color: var(--accent); - } - - &::placeholder { - color: var(--text-muted); - } -} - -.buttonRow { - display: flex; - gap: 6px; -} - .sendButton { - flex: 1; - padding: 8px 16px; - font-size: 14px; + padding: 5px 14px; + font-size: 13px; font-weight: bold; color: var(--bg); background: var(--accent); border: none; border-radius: 4px; cursor: pointer; - height: 32px; + height: 28px; - &:hover { + &:hover:not(:disabled) { background: var(--accent-alt); } -} - -.continueButton { - display: flex; - align-items: center; - justify-content: center; - padding: 8px; - color: var(--text-muted); - background: transparent; - border: 1px solid var(--border); - border-radius: 4px; - cursor: pointer; - height: 32px; - - &:hover:not(:disabled) { - color: var(--text); - border-color: var(--text-muted); - } - - &:disabled { - opacity: 0.5; - cursor: not-allowed; - } -} - -.regenerateButton { - display: flex; - align-items: center; - justify-content: center; - padding: 8px; - color: var(--text-muted); - background: transparent; - border: 1px solid var(--border); - border-radius: 4px; - cursor: pointer; - height: 32px; - - &:hover:not(:disabled) { - color: var(--text); - border-color: var(--text-muted); - } &:disabled { opacity: 0.5; @@ -354,7 +329,7 @@ } .stopButton { - padding: 8px 16px; + padding: 5px 14px; font-size: 13px; font-weight: bold; color: var(--bg); @@ -362,26 +337,9 @@ border: none; border-radius: 4px; cursor: pointer; - height: 32px; + height: 28px; &:hover { background: #d32f2f; } } - -.clearButton { - padding: 8px 16px; - font-size: 12px; - color: var(--text-muted); - background: transparent; - border: 1px solid var(--border); - border-radius: 4px; - cursor: pointer; - align-self: center; - margin: 8px 0 28px; - - &:hover { - color: var(--text); - border-color: var(--text-muted); - } -} \ No newline at end of file diff --git a/src/games/storywriter/components/chat-sidebar.tsx b/src/games/storywriter/components/chat-sidebar.tsx index 61a87eb..2e6086e 100644 --- a/src/games/storywriter/components/chat-sidebar.tsx +++ b/src/games/storywriter/components/chat-sidebar.tsx @@ -363,6 +363,7 @@ export const ChatPanel = ({ visible }: { visible: boolean }) => { const handleDeleteMessage = useCallback((messageId: string) => { if (!currentStory || !currentWorld) return; + if (!confirm('Delete this and all following messages?')) return; dispatch({ type: 'DELETE_CHAT_MESSAGES_FROM', worldId: currentWorld.id, @@ -542,84 +543,90 @@ export const ChatPanel = ({ visible }: { visible: boolean }) => { )} {currentStory && (