Commit graph

478 commits

Author SHA1 Message Date
5fc300ecc2 move ollama model context windows to config.js endpoint configuration 2025-10-11 09:37:27 -04:00
39db3f1004 add qwen.ai.unturf.com endpoint to model registry 2025-10-11 09:30:07 -04:00
90645cc899 fix code block width - use min(72vw, 900px) to handle both narrow and wide viewports 2025-10-11 09:19:25 -04:00
202e877b34 Revert "fix code block width - use 90% for desktop (relative to modal), 85vw for mobile"
This reverts commit 7406950040.
2025-10-11 09:18:58 -04:00
7406950040 fix code block width - use 90% for desktop (relative to modal), 85vw for mobile 2025-10-11 09:15:35 -04:00
0ede23a4db fix code block width - use 72vw for desktop, 85vw for mobile 2025-10-11 09:11:43 -04:00
86ef139a1d simplify code block width to 80vw for all screen sizes 2025-10-11 09:01:05 -04:00
ac0ff18308 make code block widths responsive using min() function
Changed code block max-width to use min() with both pixel and viewport units:
- Mobile: min(400px, 85vw)
- Desktop: min(850px, 70vw)

This ensures code blocks scale appropriately at all resolutions and never
cause horizontal overflow when resizing the browser window.
2025-10-11 08:46:04 -04:00
8f2395f7ce Revert "change code blocks to use 100% width with box-sizing"
This reverts commit 3192a9a75b.
2025-10-11 08:35:51 -04:00
3192a9a75b change code blocks to use 100% width with box-sizing
Replaced fixed pixel max-width values with 100% for pre and code elements.
Added box-sizing border-box to ensure padding is included in width calculation.
Code blocks now adapt to message bubble size while still scrolling when content is too wide.
2025-10-11 08:23:22 -04:00
1762f8cf20 fix message overflow - use fit-content and auto margins instead of justify-self
Replaced justify-self with margin-left/right auto and width fit-content
to prevent messages from expanding the grid column and causing horizontal
scrollbars. User messages now align right and AI messages align left
without affecting each other's positioning.
2025-10-11 08:13:15 -04:00
a082f8dbf6 fix modal code block overflow - add responsive max-width to prevent horizontal scrollbars
Added max-width constraints to code blocks in AI messages:
- Mobile (< 768px): 340px max-width
- Desktop (≥ 768px): 720px max-width

Code blocks now get their own horizontal scrollbar when content is too wide,
preventing the modal from getting horizontal scrollbars. All code formatting
and whitespace is preserved.
2025-10-11 07:55:00 -04:00
23dc8dffd9 modified: index.html 2025-09-12 18:44:49 -04:00
8b29615fcb adjust sidebar spacing for large monitors - center layout and reduce gap 2025-09-12 10:01:41 -04:00
91d2ed9170 modified: index.html 2025-09-09 08:49:28 -04:00
04b49530b6 fix mobile zoom issue - remove overflow-x hidden and improve viewport constraints 2025-09-06 19:50:23 -04:00
3ac6386234 modified: css/sidebar-theme.css 2025-09-01 18:58:59 -04:00
35193b1c09 modified: css/sidebar-theme.css 2025-09-01 18:43:52 -04:00
17a19d53ea new file: css/sidebar-theme.css
modified:   index.html
2025-09-01 18:41:48 -04:00
88dece974a remove 2000 token hard cap for introduction messages - allow full model completion limits 2025-07-28 10:49:29 -04:00
eff2eee69b create centralized Groq TPM rate limit handling for all requests
- new groq-fetch.js provides groqAwareStreamingFetch for all API calls
- automatically detects Groq endpoints and handles TPM rate limits
- works for chat, translation, TTS - any request to Groq
- waits 60 seconds for TPM window reset, retries up to 3 times
- other platforms (Hermes, OpenAI, etc.) unaffected
- cleaner abstraction replaces inline retry logic in chat.js
2025-07-12 13:50:01 -04:00
bd10045c4a make TPM rate limit retry Groq-specific only - other platforms use normal error handling 2025-07-12 13:45:36 -04:00
6335b651e6 implement Groq TPM rate limit handling - wait 60s for token budget reset 2025-07-12 13:44:36 -04:00
04fa0fb05f remove artificial response caps - let models use their full completion token limits 2025-07-12 13:32:56 -04:00
471d61176d allow chat responses to use full available space for coherent answers - cap at 4096 tokens max 2025-07-12 13:31:39 -04:00
8467f58d6b optimize chat token allocation for maximum input/output space
- replace aggressive 1.5x buffer with smart model-based allocation
- 128k+ models: only 2k buffer (was wasting 10k+ tokens)
- 32k models: 1.5k buffer max
- 8k models: conservative buffer
- follow-up responses now have maximum room for both history and output
- especially important for long conversations on large context models
2025-07-12 13:29:58 -04:00
539121a165 increase intro generation tokens to prevent cutoffs - min 500, max 2000 2025-07-12 13:28:13 -04:00
c014adde73 fix intro generation getting cut off by being more generous with output tokens
- reduce aggressive buffering that was leaving too little room for intro output
- reserve up to 1000 tokens or 30% of model capacity for intro generation
- increase minimum output tokens from 100 to 200
- should fix truncated intros especially on Groq models with 8K completion limits
2025-07-12 13:27:08 -04:00
6645061372 make active tab even lighter green - very subtle background with dark green text 2025-07-12 11:46:00 -04:00
5198805155 replace blue active tab with lighter green - much better visual harmony 2025-07-12 11:42:04 -04:00
97af1d9b1a change tab colors from green to blue/gray to reduce visual competition
- tabs now use neutral gray (inactive) and blue (active) instead of green
- prevents distraction from green translate button (call-to-action)
- inactive tabs: light gray background with dark gray text
- active tab: blue background with white text
- hover: slightly darker gray
- updated both builtin and pico CSS versions
2025-07-12 11:37:22 -04:00
3bd518ff20 adjust progress timing: keep Hermes as default, speed up for Groq only 2025-07-12 11:26:05 -04:00
34e5e25bfb replace URL constructor with regex validation for remote URLs
- URL constructor was too strict and failing on valid domains
- new regex pattern validates common URL formats more permissively
- ensures scheme prepending works in both main logic and fetchRemotePageHTML
- fixes issues with domains like www.inrupt.com
2025-07-12 11:13:40 -04:00
c4c216316f auto-add https:// scheme to remote URLs when missing 2025-07-12 11:06:53 -04:00
e6e7a77fa3 use selected model name in translation progress messages
- replace hardcoded "Hermes AI" with actual selected model
- progress now shows "Translating with <model-name>..."
- makes progress messages accurate for all model selections
2025-07-12 11:03:43 -04:00
79377af49a switch tab order: remote URL tab now comes before custom text tab 2025-07-12 11:02:27 -04:00
e87e27b2a2 show both English and native language names in translation dropdown 2025-07-12 11:01:00 -04:00
7851c5747c fix remote URL input height - make it single line instead of textarea height 2025-07-12 08:35:18 -04:00
4c75f7cd6e fix chat and ui max_tokens errors with Groq models
- cap all max_tokens to model's max completion tokens limit
- fixes sendMessageWithCustomHistory in chat.js
- fixes intro generation in ui.js
- fixes TTS processing token calculation
- prevents "max_tokens must be less than or equal to 8192" errors
2025-07-12 07:51:31 -04:00
337f9970a8 improve translation prompt to prevent explanatory text prefixes 2025-07-12 07:40:38 -04:00
41ba59db1b use API-provided max completion tokens instead of hardcoding
Fetch and store maxCompletionTokens from models endpoint to respect
each model's specific output limits. This fixes 400 errors from
Groq models that have different completion limits than context windows.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 07:36:31 -04:00
a864366c80 add hardcoded context windows for Groq models 2025-07-12 07:28:13 -04:00
fd71442331 remove chunking complexity, use simple fit-or-error approach 2025-07-12 07:19:00 -04:00
50a0487bcd fix chunking to work directly with body children and handle edge cases 2025-07-12 07:14:51 -04:00
d4aa30e454 implement sibling-level chunking to prevent DOM duplication 2025-07-12 07:10:14 -04:00
e2c211b9c6 add chunk content debugging to identify duplication source 2025-07-11 22:10:46 -04:00
60743c5bfb add better error logging for fragment translation debugging 2025-07-11 22:04:44 -04:00
b7563d0f2b create separate translation functions for full pages vs fragments 2025-07-11 22:00:07 -04:00
e975e97ea3 fix chunk reassembly stacking and increase batch size for speed 2025-07-11 21:54:54 -04:00
a8a4359e96 auto-detect and cache endpoints without tokenization support
When upstream tokenization fails (404, errors), cache the endpoint
and automatically use JS tokenizer for future requests. This fixes
chunking for APIs like Groq that don't have tokenize endpoints.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 21:52:24 -04:00