Commit graph

211 commits

Author SHA1 Message Date
86718974ac fix: add missing toggleUncloseaiEmbeddedModal function for floating button
- Add toggleUncloseaiEmbeddedModal function that was missing after refactoring
- Function properly toggles modal open/close state
- Export function globally for floating button onclick handler
- This fixes the floating button not appearing/working issue
2025-07-03 16:41:13 -04:00
76d0fb448a fix: correct import path from page-content.js to content.js
- Fix CORS error caused by incorrect import in translate-modal.js
- Change import from ./page-content.js to ./content.js
- Resolves module loading issues
2025-07-03 16:36:40 -04:00
e1a1da464d fix: remove duplicate initializeSystem function causing syntax error
- Remove duplicate initializeSystem function that was causing export at wrong level
- Fix syntax error: export declarations may only appear at top level
- Reduce ui.js to 532 lines (from 567)
2025-07-03 16:25:21 -04:00
e99db238b6 refactor: major ui.js modularization - extract 3000+ lines
- Extract massive modal functions to uncloseai-embed-modal.js (399 lines)
- Extract widget creation functions to widget-library.js (447 lines)
- Move addFileUploadButton to file-upload.js for better organization
- Reduce ui.js from 3,595 lines to 567 lines (84% reduction)
- Transform ui.js into clean coordinator as requested
- All functionality preserved with proper imports and exports

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 16:16:46 -04:00
f9bf7d001c refactor: extract modal functions to separate files
- Move openTTSModal to tts-modal.js (335 lines)
- Move openTranslateModal to translate-modal.js (540 lines)
- Reduce ui.js from 4,832 to 4,028 lines
- Add imports and global exports for onclick handlers
- Each modal is now self-contained with its own imports
- No functionality changes, just code organization
2025-07-03 15:20:50 -04:00
9659236bc2 fix: add theme-aware styling to modal textareas for blog sites
- Fix main chat input textarea in openUncloseaiEmbeddedModal (line 3837)
- Fix TTS modal textarea with conditional styling (line 4070)
- Fix translation modal textarea with conditional styling (line 4417)
- All textareas now use rgba glassmorphism when USE_CUSTOM_STYLING=false
- Should resolve white-on-white text issue in blog dark mode
2025-07-03 14:52:09 -04:00
3e01e9c713 complete: add 4 missing translation keys to all 18 languages
- Add askAnythingPlaceholder, askPagePlaceholder, enterTextToSpeakPlaceholder, processingTokens
- All 18 language files now complete with 67 translation keys each
- Verified with translation completeness script - all languages pass
- Update CLAUDE.md documentation to reflect new key count
- All UI placeholder text now fully internationalized
2025-07-03 14:28:13 -04:00
9c9c5ec1c3 fix: internationalize placeholder text in chat inputs
- Add askPagePlaceholder, askAnythingPlaceholder, enterTextToSpeakPlaceholder keys
- Replace hardcoded 'Ask about this page...', 'Ask anything...', 'Enter text to speak...'
- All input placeholders now use translation system
- Ensures consistent multilingual experience across all UI elements
2025-07-03 14:20:34 -04:00
d3e6b78166 fix: correct theme-agnostic styling approach for blog sites
- Fixed understanding: index.html uses PicoCSS (custom=true), blog uses fallback (custom=false)
- Replace CSS variables with rgba transparency and glassmorphism effects
- Semi-transparent backgrounds adapt to any light/dark theme
- Backdrop-filter blur creates modern glass effect that works universally
- No longer assumes CSS variables exist on blog sites
2025-07-03 14:18:21 -04:00
6e0ace6717 fix: improve dark theme compatibility for blog site (PicoCSS)
- Add USE_CUSTOM_STYLING checks to main chat interfaces
- Use PicoCSS variables (--background-color, --color, --border-color) when USE_CUSTOM_STYLING=false
- Fix white-on-white text issue in dark mode for blog embedding
- Chat input, textarea, and buttons now respect PicoCSS dark theme
- Maintains backward compatibility with index.html (custom styling)
2025-07-03 14:15:15 -04:00
22861ad4f9 fix: replace hardcoded UI text with translation keys
- Fix all remaining 'Read Page' hardcoded strings
- Replace 'Processing...' and 'Detecting...' with translation keys
- Update createReadFeature to use proper translation system
- Add processingTokens translation key for token count display
- UI should now properly internationalize all button text
2025-07-03 14:10:47 -04:00
95ea67228b complete: finalize all 18 language files with 63 translation keys
- Add missing 17 keys to final 8 languages (id, mr, sw, te, tr, ur, zh-tw)
- Fix translation verifier to exclude helper scripts
- Update CLAUDE.md with translation management documentation
- All languages now complete: ar, bn, de, en, es, fr, hi, id, ja, ko, mr, pt, ru, sw, te, tr, ur, zh, zh-tw
- Verified with translation completeness script - all 18 languages pass
2025-07-03 14:02:54 -04:00
48d8aa642f fix: complete translation modal internationalization
- Fix all hardcoded text in translation modal content
- Add translatePageInfo, translateToLabel, translateButton keys
- Fix dynamic button text for page/text modes
- Fix hardcoded Processing text during translation
- Fix Translation Modal button labels in UI
- Fix TTS Anything and Smart Translate button labels
- Add data-i18n attributes for dynamic refresh
- All modal content now fully localizes on language switch
2025-07-03 13:43:50 -04:00
63cb565dc5 fix: connect UI refresh functions for complete auto-refresh support 2025-07-03 13:31:11 -04:00
64b91d69de fix: resolve hardcoded text in modals and auto-refresh issues
- Fix TTS modal hardcoded 'Speed:' and 'Play Text' buttons
- Fix translation modal hardcoded tab text
- Fix system prompt to respect user's selected language
- Fix DOM auto-refresh by connecting both refresh functions
- Add TTS and system prompt translation keys to 10 languages
- Translation modal tabs and TTS controls now localize properly
- Language switching works without hard refresh for data-i18n elements
2025-07-03 13:27:53 -04:00
65504b2d19 docs: document translation system and update ui-translations module 2025-07-03 12:51:52 -04:00
b9ab0e83b3 feat(i18n): complete modular translation system with dynamic refresh
- Create individual language files for all 19 supported languages
- Add complete 46-key translations for Hindi, Spanish, French, Arabic, Bengali, Russian, Portuguese, Urdu, Indonesian, German, Japanese, Swahili, Marathi, Telugu, Turkish, Chinese Traditional, and Korean
- Implement dynamic UI refresh mechanism for real-time language switching
- Add translation verification script for consistency checks
- Update ui-translations.js to use new modular structure
- Document complete workflow for adding new languages in journal.rst

All languages now have 100% translation key coverage with automated verification
2025-07-03 12:49:03 -04:00
8783504389 fix: apply biome linting improvements
- Fix template literal usage (string concatenation to template literals)
- Apply optional chaining for safer property access
- Reduce biome warnings from 36 to 19
- Code is now cleaner and more maintainable
2025-07-03 12:22:46 -04:00
d3c5e31bde refactor: extract UI translations, themes, and language detection into separate modules
- Create ui-translations.js with UI_TRANSLATIONS object and translation functions
- Create ui-themes.js with theme detection and styling functions
- Create language-detection.js with AI-powered language detection
- Remove duplicate code from ui.js, reducing from 5600+ to 4741 lines
- Fix import assignments and syntax errors
- All functionality preserved while improving code organization
2025-07-03 12:12:30 -04:00
c263cb9d56 feat(ui): complete core translation infrastructure
- Update batman toolbelt action buttons to use getUIText()
- Translate all modal headers (AI Assistant, TTS, Translate)
- Convert all input placeholders to use translations
- Update critical alert messages with parameter substitution
- Add comprehensive translation keys for UI elements
- Translate Hermes intro message with proper HTML formatting
- Support both English and Chinese translations for all new keys
- Maintain fallback to English for missing translations
- Fix biome style issues (template literals, optional chains)
2025-07-03 11:41:02 -04:00
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
b1e9cfca9c docs: add biome workflow requirements to prevent syntax errors 2025-07-02 15:10:52 -04:00
b5defdde58 fix: import getChatHistory for copy buttons 2025-07-02 15:08:37 -04:00
36935f0956 modified: index.html 2025-07-02 14:59:22 -04:00
21e3bbab88 modified: index.html 2025-07-02 14:55:28 -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