Commit graph

55 commits

Author SHA1 Message Date
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
525a4317b8 fix(mobile): simplify modal sizing with 95% viewport usage
- Use 95vw x 95vh for both TTS and translate modals
- Remove complex mobile/desktop detection logic
- Keep elegant styling with borders and shadows
- Minimize whitespace while maintaining good design
- Works consistently across all screen sizes
2025-07-01 21:58:19 -04:00
ef9919ce84 feat(mobile): full-screen modals on mobile devices
- Make TTS and translate modals take full viewport on mobile (≤768px)
- Remove borders, shadows, and border-radius for native app experience
- Keep centered modal design with shadows on desktop (>768px)
- Improve mobile usability with maximum screen real estate
2025-07-01 21:49:53 -04:00
bdd33652a3 fix(ui): restore natural modal sizing while keeping mobile positioning
- Remove forced width/height constraints that broke modal appearance
- Keep transform-based centering to fix mobile viewport issues
- Let content determine modal size naturally for better visual design
- Preserve original styling while maintaining mobile compatibility
2025-07-01 21:44:46 -04:00
88644403b6 fix(mobile): fix modal positioning and mobile support
- Replace margin: auto with explicit centering using transform: translate(-50%, -50%)
- Use showModal() instead of modal.open for proper mobile behavior
- Add responsive sizing with 90vw width and proper max-width constraints
- Add backdrop click handlers for modal closing
- Add touch-action: manipulation for better touch responsiveness
- Fix both TTS and translation modals disappearing on small viewports

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 21:38:57 -04:00
caaa347b35 fix(preview): separate button creation from initialization for preview windows
- Separate DOM creation from event handler setup in floating button
- Add self-contained click handler with multiple fallback methods
- Enable floating button in preview windows with UNCLOSEAI_SKIP_INIT flag
- Improve modal function detection with dynamic imports
- Add extensive debugging for button click issues

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 21:10:37 -04:00
5a05201fd9 fix(ui): correct import path for estimateProcessingTime function
Import estimateProcessingTime from translation.js instead of token_estimator.js
where it's actually defined
2025-07-01 20:46:24 -04:00
fc22c4a60d fix(translation): wait for preview document.body before adding notice
Prevents 'previewWindow.document.body is null' error by polling
until body is available before appending the AI functionality notice
2025-07-01 20:42:23 -04:00
9e6bbe4b19 refactor: rename tokenizer to token_estimator for clarity
- Rename tokenizer.js to token_estimator.js to reflect its purpose
- Update import in translation.js
- Add development journal documenting NVIDIA 4090 performance metrics
2025-07-01 20:31:07 -04:00
2845bb16d8 feat(tokenizer): add BPE tokenizer with real vLLM performance metrics
- Create simplified BPE tokenizer based on tiktoken core logic
- Use real production metrics: 3,144 tokens/s prompt, 121 tokens/s generation
- Add accurate processing time estimates for translation ETA
2025-07-01 20:26:23 -04:00
796887fb38 fix(translation): open preview in new tab with full browser controls
Remove popup window restrictions to provide better user experience
with address bar, navigation buttons, and other browser features
2025-07-01 20:00:05 -04:00
02fff63f73 fix(translation): improve error handling and preview functionality
- Add HTTP error checking for 404 endpoint issues
- Ensure models are loaded before translation attempts
- Add response validation with clear error messages
- Fix floating button DOM timing in preview windows
2025-07-01 19:56:26 -04:00
2e8fa6e30b fix(translation): resolve preview issues and endpoint errors
- Remove modal/dialog DOM from translation preview content
- Fix 404 errors by properly checking model registry for endpoints
- Enable floating button in preview windows with partial initialization
2025-07-01 19:44:12 -04:00
17e3883bff fix(translation): correct syntax and logic in translation modal
- Reverted the broken openTranslateModal function to a working state.
- Re-implemented the logic to correctly inject the <base> tag for relative paths and to ensure the translation notice is displayed correctly.
- Ran biome to format the code and ensure there are no syntax errors.
2025-07-01 18:23:02 -04:00
206731c589 fix(translation): restore nested placeholders correctly
- The placeholder restoration logic now processes placeholders in reverse order, ensuring that nested content (like links within HTML tags) is restored correctly.
2025-07-01 17:53:10 -04:00
c3b5c94497 fix(translation): ensure CSS and JS work in preview
- The translation preview now includes the full HTML document, ensuring that stylesheets, scripts, and other resources are loaded correctly.
- A <base> tag is injected into the preview to handle relative resource paths.
- Removed a script flag that was incorrectly disabling JavaScript in the translated page, which fixes the issue with dialog boxes not appearing.
2025-07-01 17:49:33 -04:00
7aeba010d6 modified: src/ui.js 2025-07-01 17:31:56 -04:00
fb38570227 modified: src/ui.js 2025-07-01 17:29:27 -04:00
9a71e71873 Add DOCTYPE html and inject uncloseai.js script into preview window 2025-07-01 17:03:50 -04:00
c78a6a231f Auto-open preview window immediately when HTML translation completes 2025-07-01 16:56:48 -04:00
b1ea03fe21 Enhance popup preview with base URL and AI functionality support 2025-07-01 16:51:45 -04:00
4fa252f73d Replace iframe with popup window for HTML translation preview 2025-07-01 16:48:40 -04:00
fad29c828b Add HTML preview with iframe rendering for translations 2025-07-01 16:39:57 -04:00
5d0f299b39 Increase translation limits: 70k max_tokens and 50k content length 2025-07-01 16:33:43 -04:00
6e4770c07e Fix script tag preservation and increase translation content limit 2025-07-01 15:40:39 -04:00
bd09659d3b Implement minimal translation system prompt following Russell's approach 2025-07-01 15:32:12 -04:00
12662d67c9 Add: Translation as standalone feature and in 'full' feature set
- Add createTranslateFeature() function for standalone translate button
- Include 'translate' in custom interface feature switch
- Add translate-only demo section with live example
- Update documentation to show translate in available features
- Translation now works as data-features='translate' or part of 'full'
- Update table of contents and section numbering
2025-07-01 13:09:40 -04:00
7386dd0032 Fix: Proper code block preservation to prevent comment translation
- Track placeholder types and content separately
- Use exact placeholder matching in restoration
- Strengthen prompt with CRITICAL warning about placeholders
- Prevent JavaScript comments from being translated inside code blocks
- Ensure code blocks remain completely unchanged during translation
2025-07-01 12:54:00 -04:00
af50d0823f Update: Use real Hermes-supported language list and Russell's placeholder technique
- Update to 19 languages actually supported by Hermes 3 model
- Match Russell's placeholder naming: __CODE_X__, __URI_X__, __HTML_X__
- Use exact preservation technique from translate_content.py
- Add Bengali, Urdu, Indonesian, Swahili, Marathi, Telugu
- Include Traditional Chinese (zh-tw) support
- Match Team Hermes implementation approach
2025-07-01 12:42:55 -04:00
0fc73e4e33 Add: Omni-directional translation feature with code block preservation
- Add translation.js with 20+ language support
- Implement code block, URL, and HTML tag preservation during translation
- Add translation modal with page translation and custom text modes
- Integrate translation button in all interfaces
- Add translation demo section with live examples
- Support Russell's approach of preserving technical content during translation
- Enable translation of current page content or custom text
2025-07-01 12:35:09 -04:00
061a04f1fe Improve: TTS buttons auto-play with proper state transitions (processing -> pause -> play) 2025-07-01 12:17:27 -04:00
340241c886 Fix: Filter system messages when loading from localStorage to handle legacy data 2025-07-01 10:40:58 -04:00
f13fc85d21 Fix: Remove system message display from file upload functionality 2025-07-01 10:27:52 -04:00
b9d52dc727 Fix: Remove await from non-async context that broke floating button 2025-07-01 10:15:36 -04:00
7e5fa104ca Fix: Hermes modal conversation state and add system message customization
- Fix modal conversation persistence between sessions
- Fix system messages appearing in DOM by filtering display
- Add configurable system message with setSystemMessageAppend()
- Reorganize demo.html with table of contents and code-example pattern
- Add comprehensive documentation for system message customization
- Make all code blocks open by default in demo page
2025-07-01 10:07:12 -04:00
d327d98f77 feat: Restore TTS Anything modal with speed slider and voice selection 2025-06-30 22:17:17 -04:00
d9185376e7 Improve: Add loading state to floating button and optimize modal opening speed
- Show 'loading...' text in floating button while modal opens
- Display modal immediately with loading placeholders
- Load models and Hermes intro asynchronously after modal appears
- Prevent blocking UI during slow network operations
2025-06-30 21:34:46 -04:00