Commit graph

115 commits

Author SHA1 Message Date
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
2fed53f74b Enhance demo page with comprehensive isolated examples and integration snippets 2025-06-30 20:07:14 -04:00
7a6996bc30 Fix: Expose uncloseai.js functions to global scope
Exposed , , , , , , , , , and  functions to the global  object. This resolves  issues when these functions are called directly from HTML  attributes, particularly in .
2025-06-30 19:03:22 -04:00
a5fd6902ba Docs: Document UNCLOSEAI_FLOATING_BUTTON in index.html and demo.html
Updated index.html to correctly show the script tag for disabling the floating button. Also added the same documentation to demo.html for consistency.
2025-06-30 18:42:15 -04:00
f8a146f241 Feat: Implement per-page conversation history and ensure per-page Hermes intro caching.
This commit introduces a  function to generate unique localStorage keys based on the current page's URL. This key is now used for storing and retrieving conversation history, ensuring that each page maintains its own isolated chat thread. The Hermes introduction already uses a content-based hash for per-page caching, and this change aligns the conversation history with that behavior. Additionally, clearing the conversation history now only affects the current page and correctly repopulates the Hermes introduction for that page.
2025-06-30 18:28:24 -04:00
880c9370c0 Feat: Repopulate Hermes initial message on clear 2025-06-30 18:13:52 -04:00
50a6d39363 fix: ensure chat message delete buttons are not circular in purecss mode 2025-06-30 17:52:52 -04:00
941a5fe648 fix: remove duplicate initializeUncloseaiElements function 2025-06-30 17:30:29 -04:00
cbf48e370d feat: add debug logging to uncloseai.js 2025-06-30 17:27:32 -04:00
8f256b19fa fix: move event listener to prevent script crash 2025-06-30 17:24:31 -04:00
8c5c71eb02 fix: ensure floating button appears on all pages 2025-06-30 17:21:11 -04:00
c30194613f Reapply "fix floating button by removing duplicate check before creation"
This reverts commit e7a3371826.
2025-06-30 17:15:40 -04:00
e7a3371826 Revert "fix floating button by removing duplicate check before creation"
This reverts commit 37722fe392.
2025-06-30 17:14:52 -04:00
9a56d7f0fa fix: re-enable floating button 2025-06-30 17:10:34 -04:00
37722fe392 fix floating button by removing duplicate check before creation 2025-06-30 16:55:05 -04:00
0b573a2a86 implement class-based initialization system and DRY refactoring for uncloseai.js
- Add .uncloseai class support with data-features configuration
- Create shared utility functions for buttons, chat messages, TTS controls, voice selects, and modal headers
- Refactor class-based feature creators to use shared utilities
- Add comprehensive documentation for class-based integration in index.html
- Add live examples of class-based usage in demo.html
- Maintain backward compatibility with existing floating button and API functions
2025-06-30 16:50:16 -04:00
db57965ef4 fix unicode handling in content hash generation for hermes introduction caching 2025-06-30 15:54:53 -04:00
fac46e5afa make modal use full viewport height and react to onscreen keyboard changes 2025-06-30 15:50:02 -04:00
6c0f3df6ef improve close button styling for PureCSS with proper theming and hover effects 2025-06-30 15:43:23 -04:00
b2a63f44f4 add auto-scroll to bottom for all chat messages and streaming responses 2025-06-30 15:26:01 -04:00
6e84ee58b1 fix TTS button text, progress indicator z-index, and hermes introduction loading feedback 2025-06-30 15:14:44 -04:00
c318e68b5a fix hermes introduction to add to chat history and update system prompt with hermes identity 2025-06-30 14:55:51 -04:00
d6b28dc126 remove max-width/height constraints from modal and reduce button min-width for mobile responsiveness 2025-06-30 14:35:52 -04:00
9340c410ff align labels and dropdowns horizontally using grid layout 2025-06-30 13:21:15 -04:00
79d8c590fd convert modal layout from flexbox to CSS grid 2025-06-30 12:01:42 -04:00
0cc64921cf override min-width constraints to fix modal hiding on narrow mobile screens 2025-06-30 11:51:24 -04:00
08eae89f5b add webpage title under hermes chat and move action buttons above model selection 2025-06-30 11:44:09 -04:00
48d4261a54 make modal fullscreen on mobile - 100% width and height 2025-06-30 11:41:21 -04:00
53693f5ff0 fix voice label styling to respect USE_CUSTOM_STYLING flag 2025-06-30 09:19:25 -04:00
4cdbcbcbc3 Fix TTS modal z-index and scale down modal for PureCSS
- Fixed TTS modal z-index detection after dialog conversion (hermes-modal vs hermes-modal-backdrop)
- Added 60% scale transform to modal when custom styling disabled for better fit
- Reduced chat area minimum heights (300px->200px, 250px->150px) for more compact layout
- Modal now appears properly sized for PureCSS framework integration
2025-06-29 21:51:55 -04:00
d21913611b Convert Hermes modal to dialog element and reduce CSS in JS
- Changed Hermes modal from div+backdrop to proper dialog element like TTS modal
- Removed inline CSS when custom styling disabled, using semantic classes instead
- Added uncloseai-controls and uncloseai-button-group classes for framework styling
- Modal now properly inherits CSS framework styling without hardcoded backgrounds
- Cleaner separation between custom styling and framework integration
2025-06-29 21:36:02 -04:00