Commit graph

81 commits

Author SHA1 Message Date
eee33986cf feat(ui): add comprehensive language localization system
- Add complete UI translations for all 19 supported languages
- Add language preference dropdown in modal settings
- Store language preference in localStorage
- Inject language preference into Hermes system prompts
- Add smart translation dropdown with AI-powered language detection
- Keep both original translation modal and new smart dropdown
- Remove non-functional upload button from modal
- Add biome.json config to ignore third-party CSS files
2025-07-03 11:09:10 -04:00
cae51b3578 feat(translation): add smart translate dropdown with native language names
- Add smart-translate widget feature with AI language detection
- Implement triple-format language display (code • English • Native)
- Add native script names with proper Unicode (中文, Español, العربية, etc.)
- Export handleSmartTranslate to global scope for HTML onclick
- Update demo.html to showcase both translate and smart-translate options
- Add comprehensive widget documentation with code examples

🤖 Generated with Hermes Staff

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-02 18:43:35 -04:00
6a4e9f9f72 feat(translate): add smart AI-powered translation dropdown
- Replace translation modal with intelligent dropdown interface
- Add AI-powered language detection using Hermes classifier
- Send page markdown sample to Hermes for accurate language detection
- Create themed dropdown with current language indicator
- Support all 18+ languages with quick selection
- Open translations in new tab automatically
- Add fallback language detection for reliability
- Show translation progress with loading states
- Auto-close dropdown on outside clicks
2025-07-02 18:18:40 -04:00
90842ebaac fix(ui): ensure batman toolbelt button text is visible in all themes
- Add !important to color property for control buttons
- Fix text visibility issue on mobile devices
- Apply same fix to download button
- Update theme change handler to use !important for dynamic updates
2025-07-02 17:21:34 -04:00
f8210bfe39 fix(hermes): use theme colors for bottom control buttons to ensure visibility 2025-07-02 16:20:07 -04:00
1b04cb5f15 feat(ui): add comprehensive dark/light mode support to uncloseai modal
- Add theme detection that checks data-theme attribute and prefers-color-scheme
- Create theme-aware color palette for both light and dark modes
- Update modal container, headers, panels, inputs, and buttons with theme colors
- Apply theme colors to user/AI message bubbles and action buttons
- Add dynamic theme change monitoring with MutationObserver and media queries
- Update historical messages to respect current theme on load
- Ensure proper cleanup of theme listeners when modal is closed
- Improve accessibility with proper contrast in both light and dark modes
2025-07-02 16:10:11 -04:00
72ccec472f fix: Read Page pause functionality and add download button 2025-07-02 15:32:54 -04:00
fa4eaa57da feat: rename batman toolbelt buttons and add Full Page Raw with HTML to markdown conversion 2025-07-02 15:24:16 -04:00
b5defdde58 fix: import getChatHistory for copy buttons 2025-07-02 15:08:37 -04:00
ae6e3baa35 feat: add TTS buttons to user messages and fix delete persistence bug 2025-07-02 14:47:50 -04:00
ba76f1dbcd feat: move delete buttons inside user message bubbles 2025-07-02 14:43:47 -04:00
36289d6f5c feat: add copy buttons to code blocks in AI responses 2025-07-02 14:41:13 -04:00
35f84c4b57 fix: move copy buttons to main interface next to translate button 2025-07-02 13:41:25 -04:00
4acf2be811 feat: move copy buttons to main modal settings panel 2025-07-02 13:32:56 -04:00
9173c9bdc0 feat: replace ugly red X buttons with proper action buttons for user messages 2025-07-02 13:21:30 -04:00
5c2137a485 fix: repair syntax error and format all files with biome 2025-07-02 13:08:48 -04:00
7063e382a9 feat: add copy buttons and user message delete, remove confirmation dialogs 2025-07-02 13:05:09 -04:00
f55e7e3ac4 feat: add ChunkFive font with absolute path and uncloseai branding to all modals 2025-07-02 12:45:09 -04:00
087e828583 refactor: rename hermes modal to uncloseai embedded modal 2025-07-02 12:33:34 -04:00
05cfcf2b95 fix(hermes): remove upload button from modal 2025-07-02 12:16:25 -04:00
2048e25cd5 fix(hermes): ensure AI responses are saved to conversation history
- Manually add AI response to chatHistory after streaming completes
- Fix missing Hermes responses when reopening modal
- Update modal title to 'uncloseai.' with link to Nous Research Hermes
- Add comprehensive debugging for conversation history save/load
- Ensure proper history synchronization between modules
2025-07-02 10:11:51 -04:00
76e168cecf feat(hermes): restore localStorage for model and voice settings
- Save selected voice to localStorage and restore on modal open
- Improve model selection restoration from localStorage
- Save settings panel open/close state
- Add console logging for settings changes
- Maintain user preferences across sessions
2025-07-02 09:56:24 -04:00
de112973e6 fix(hermes): sync conversation history between ui.js and chat.js modules
- Fix follow-up Hermes responses not showing when modal reopens
- Properly sync chatHistory between ui.js and chat.js modules
- Use getChatHistory() and updateChatHistory() for consistent state
- Ensure AI responses are saved and loaded correctly
2025-07-02 09:54:33 -04:00
8d8ee38e96 debug(hermes): add logging to track conversation history display
- Add console logs to track which messages are being loaded and displayed
- Debug why Hermes messages might not be showing when modal reopens
- Log message details and chatBox append operations
- Help identify if issue is with loading, processing, or displaying messages
2025-07-02 09:38:57 -04:00
ecae7e9b4c fix(hermes): save intro message to history and prevent regeneration
- Only generate intro message when no conversation history exists
- Save generated intro to chatHistory so it persists across modal opens
- Set up page context when loading existing conversation history
- Prevent intro from being regenerated every time modal opens
- Intro message now properly saved and reused like other messages
2025-07-02 09:26:32 -04:00
4486cec23b fix(hermes): create custom sendMessageWithCustomHistory function
- Add sendMessageWithCustomHistory function to handle intro generation
- Fix TypeError: sendMessageWithHistory is not a function
- Custom function allows intro to use different system prompt than conversation
- Maintains streaming response for real-time intro generation
- Fixes intro message generation with proper API call handling
2025-07-02 09:05:18 -04:00
4110a8130b feat(hermes): implement dual system prompts for intro vs conversation
- Create specialized intro system prompt for 3-paragraph welcome generation
- Use separate conversation system prompt for follow-up questions
- Intro prompt: focused on generating structured welcome message
- Conversation prompt: optimized for answering questions about page content
- Use translation sendMessage for custom history in intro generation
- Maintain page context throughout conversation while separating concerns
2025-07-02 08:36:43 -04:00
712473f516 fix(hermes): set page context in system message for entire conversation
- Use setSystemMessageAppend to add page context to system message
- All follow-up questions now have full page context available
- Update existing system message in chatHistory with page content
- Hermes can now reference specific details (like Nathan) in follow-up questions
- Maintains coherent conversation with proper page context throughout
2025-07-02 08:34:51 -04:00
71a2c3d00d improve(hermes): enhance context setup for coherent conversations
- Provide full page content to Hermes instead of just preview
- Include complete page context in initial system message
- Tell Hermes to maintain context for future questions in conversation
- Enable Hermes to reference specific details, names, and topics from page
- Fix issue where follow-up questions lacked proper page context
- Should now be able to answer questions about Nathan and other page details
2025-07-02 08:33:35 -04:00
3cbcd64e92 fix(hermes): add TTS and delete buttons to contextual intro message
- Add play/pause TTS button to the generated intro message
- Include delete button for consistency with other AI messages
- Full pause/resume functionality for intro message TTS
- Intro message now has same interaction capabilities as chat responses
- Uses speakChatText for clean audio generation
2025-07-02 08:15:30 -04:00
e8bef319da feat(hermes): generate contextual intro message using LLM
- Use Hermes AI to generate page-specific welcome message
- Extract current page content and title for context
- Create 3-paragraph intro that acknowledges specific page content
- Show loading message while generating contextual intro
- Fallback to basic intro if generation fails
- Make intro relevant to what user is actually viewing
2025-07-02 08:08:46 -04:00
051f589c4e fix(hermes): properly sync chat history with imported module
- Import chatHistory and sendMessage at top level instead of dynamic imports
- Use imported chatHistory directly in loadHistory and clearChat functions
- Ensure Hermes has proper conversation context when resuming chats
- Fix issue where Hermes responses weren't loading from conversation history
- Add debug logging to verify chat history synchronization
2025-07-02 08:03:01 -04:00
d8d4b2a47b feat(tts): add pause/resume functionality to chat TTS buttons
- TTS buttons now toggle between play (🔊), pause (⏸️), and loading () states
- Click once to generate and play audio
- Click again to pause playing audio
- Click third time to resume paused audio
- Audio automatically resets icon to 🔊 when playback ends
- Added to both new message and historical message TTS buttons
2025-07-02 08:01:00 -04:00
bab44f680b refactor(tts): create dedicated speakChatText function for chat messages
- Add speakChatText function that skips extractSpokenTokens preprocessing
- Chat messages are already clean text that don't need markdown/HTML cleanup
- Simplify chat TTS button handlers to use clean direct TTS approach
- Separate chat TTS from webpage TTS which needs content preprocessing
- Much faster and more reliable for chat conversations
2025-07-02 07:58:24 -04:00
59aacd7954 fix(tts): bypass extractSpokenTokens for chat TTS buttons
- Use direct TTS API calls for chat and historical message TTS buttons
- Skip the extractSpokenTokens preprocessing that was causing failures
- Import TTS_API_URL and API_KEY constants for direct API access
- Maintain same audio result format for compatibility
- Fix chat TTS buttons not responding due to extractSpokenTokens hanging
2025-07-02 07:55:16 -04:00
a59b7a2395 fix(hermes): properly sync chat history between modal and chat module
- Sync loaded conversation history with chat.js module on modal open
- Clear chat history in both localStorage and chat.js module when clearing
- Make loadHistory async to properly await chat module import
- Ensure conversation continuity across page refreshes and modal sessions
- Add comprehensive logging for history synchronization
2025-07-02 07:42:54 -04:00
d996a1351b enhance(tts): improve auto-play handling with browser policy support
- Add proper error handling for browser auto-play restrictions
- Set button text correctly based on auto-play success/failure
- Add console logging for debugging auto-play behavior
- Gracefully handle cases where auto-play is blocked
2025-07-02 07:36:04 -04:00
831f91e585 fix(hermes): resolve const actions redeclaration error
- Rename second actions array to controlActions to avoid variable conflict
- Fix SyntaxError: redeclaration of const actions
2025-07-02 07:30:46 -04:00
a8ef25ef6c fix(hermes): persist conversation history across modal sessions
- Save chat history to localStorage after each AI response
- Load complete conversation history with TTS buttons on modal open
- Add TTS and delete buttons to historical AI messages
- Ensure conversation continuity when reopening modal
- Add debugging logs for history save operations
2025-07-02 07:29:04 -04:00
8651aaa54a fix(hermes): make TTS button responsive on AI messages
- Add ID to voice select element for reliable access
- Fix TTS button click handler to find voice selection properly
- Add debugging logs for voice selection
- Use document.getElementById instead of variable scope
2025-07-02 07:24:28 -04:00
af580c67ac feat(hermes): restore page context in modal header
- Add subtitle showing uncloseai branding and current page title
- Display 'You are discussing: [page title]' context
- Maintain mobile-responsive header layout with title container
2025-07-02 07:22:00 -04:00
2a8e020f9c fix(hermes): remove duplicate action buttons 2025-07-02 07:20:16 -04:00
f7241e0d0d fix(hermes): complete mobile-first modal with all features
- Fix sendMessage iteration error by importing from chat module
- Add missing imports for storage functions (loadConversationHistory, clearConversationHistory)
- Fix function calls to use imported modules instead of window globals
- Include all features: model selection, voice selection, file upload, page reading, translation, conversation history, clear chat, TTS for responses
- Maintain collapsible settings panel for mobile optimization
2025-07-02 07:14:05 -04:00
532de5519f fix: template literal syntax errors in hermes modal 2025-07-02 07:03:14 -04:00
3b2f1acf86 feat: complete mobile-first hermes modal redesign
- Full screen on mobile, centered modal on desktop
- Simple flex layout instead of complex grid
- Modern chat bubble design
- Auto-resizing input with proper mobile keyboard handling
- Minimal UI - only essential controls
- Better touch targets and mobile interactions
2025-07-02 07:01:17 -04:00
e972cbfd0a wip: start mobile-first hermes modal redesign 2025-07-02 06:51:16 -04:00
24c696638c fix(hermes): prevent modal overflow, only chat area scrolls 2025-07-01 22:25:34 -04:00
06ce02bc29 fix(hermes): remove max-width constraint from hermes modal
- Remove max-width: 800px that was forcing modal to be too wide
- Let modal use only 95vw to scale properly with viewport
- Should prevent overflow on smaller screens
2025-07-01 22:19:29 -04:00
42c3246684 fix(mobile): prevent modal overflow issues
- Add box-sizing: border-box to Hermes modal and content to prevent width overflow
- Add flex-wrap to TTS voice selection to prevent horizontal overflow
- Ensure all modal content respects 95vw width constraints
- Fix layout issues on mobile devices
2025-07-01 22:12:39 -04:00
ec9853be45 fix(ui): remove unwanted model dropdowns and standardize hermes modal
- Remove automatic model dropdown creation that was breaking blog layout
- Update Hermes modal to use 95vw sizing like other modals
- Add showModal() and backdrop click handling for consistency
- Use transform-based centering for proper mobile positioning
- All modals now have consistent sizing and behavior
2025-07-01 22:04:21 -04:00