Commit graph

134 commits

Author SHA1 Message Date
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
57e29252cb Fix: Move fetchModelsFromEndpoints import to top level to prevent initialization error 2025-06-30 21:12:29 -04:00
ebb316fcf1 Fix: Add Hermes introduction and ensure modal dropdown is populated
- Add dynamic Hermes introduction generation when modal opens
- Fetch models directly in modal instead of copying from existing dropdown
- Fix empty dropdown issue by ensuring models are loaded before display
- Add page-specific intro caching and fallback handling
2025-06-30 21:10:16 -04:00
f455f17fa3 Fix: Make modal functions async to support dynamic imports 2025-06-30 20:57:50 -04:00
195cb3f864 Fix: Resolve model selection and UI issues in modular version
- Fix model dropdown to return correct model names instead of full unique IDs
- Replace problematic DOM traversal in TTS buttons with proper event handlers
- Prevent model dropdown creation on pages without chat interfaces
- Restore full-featured Hermes modal from original implementation
- Add comprehensive modal with model/voice selection, action buttons, and chat interface
- Include conversation history management and message deletion functionality
2025-06-30 20:53:28 -04:00
01df4d1e77 new file: src/chat.js
new file:   src/config.js
	new file:   src/content.js
	new file:   src/file-upload.js
	new file:   src/models.js
	new file:   src/page-reader.js
	new file:   src/storage.js
	new file:   src/tts.js
	new file:   src/ui.js
	modified:   uncloseai.js
	new file:   uncloseai.js.orig
2025-06-30 20:28:42 -04:00