Commit graph

76 commits

Author SHA1 Message Date
060a91d2e1 Fix voice persistence and dynamic room link updates
Voice Persistence:
- Add voice/model saving to localStorage for persistent settings
- Load voice from URL → localStorage → default priority order
- Voice selection now persists across browser sessions and page refreshes

Dynamic Room Links:
- Add updateRoomLinksWithCurrentParams() function to update sidebar room links
- Room links now dynamically update with current username, model, and voice settings
- Both desktop and mobile room links stay synchronized with current parameters
- Fixes issue where clicking room links would lose user's current settings

Technical improvements:
- Enhanced syncInputsAndQueryString() to save to localStorage and update room links
- Initial sync call on page load ensures proper state from the start
- Maintains backwards compatibility with existing functionality
2025-08-11 16:14:13 -04:00
acdf653eaa Enhance user experience with multiple improvements
- Add username field to right sidebar and mobile modal with 'guest' default
- Implement real-time username sync with URL query string updates
- Add opencompletion.com button and new room creation in left sidebar
- Implement room name slugification (e.g. "a whole new world" → "a-whole-new-world")
- Create shared utils.js for common functions like slugify
- Add single search result auto-redirect functionality
- Remove redundant UI elements ("Create New Room" header, docs link)
- Preserve user settings (username, model, voice) across redirects and room creation

Technical improvements:
- Consolidated duplicate code into shared utility functions
- Enhanced search logic with parameter preservation
- Improved mobile/desktop sync for all input fields
- Better URL handling and query string management
2025-08-11 16:01:51 -04:00
88f68e4adc Fix streaming message display and TTS issues
- Separate username/model header from message content using distinct DOM elements
- Fix button positioning to appear on left side of messages
- Ensure TTS only reads clean message content, not username/model header
- Add support for stopping current TTS when auto-play is toggled off
- Improve DOM structure with message-body wrapper for proper layout
- Fix streaming messages to maintain header display throughout entire stream
2025-08-11 15:26:52 -04:00
4e122e708c Refactor streaming protocol to separate username/model from content
Backend changes:
- Send username, model_name, and is_first_chunk as separate fields
- Keep actual content separate from header formatting
- Cleaner separation of concerns in streaming protocol

Frontend changes:
- Build display content with header only for visual rendering
- Keep messageBuffers clean (content only) for TTS processing
- TTS now processes pure content without username headers

This fixes the issue where TTS was reading 'fxhp (model):' prefix
2025-08-11 13:46:51 -04:00
5d78911d5b Fix TTS queue bug for streamed messages
- Fixed querySelector to find Play button specifically, not first button
- Regular messages used Array.from().find() correctly
- Streaming messages were using querySelector('button') which found Delete button
- This explains why streamed messages never got added to TTS queue
2025-08-11 13:35:06 -04:00
853fac95a4 Add debug logging to diagnose TTS queue issue with streamed messages
- Added console.log statements to streaming TTS logic
- Will help identify why streamed messages aren't being added to TTS queue
- Debug info includes autoPlayTTS state, completion status, buffer content
2025-08-11 13:34:17 -04:00
d4d697db59 Implement per-prompt metadata filtering and fix battleship feedback system
Major improvements to battleship game feedback accuracy and user experience:

## New Multi-Prompt Feedback System
- Replaced single feedback with 3 specialized prompts: Shot Report, Ship Status, Game Over
- Each prompt has individual metadata filtering to see only relevant data
- Shot Report only sees hit/miss data, Ship Status only sees ship destruction data
- Added STFU token system to suppress empty messages (filtered out automatically)

## Technical Implementation
- Added per-prompt metadata_filter support in YAML structure
- Updated app.py and guarded_ai.py to handle prompt-specific filtering
- Legacy single-prompt system still works with transition-level filtering
- Added comprehensive test suite for feedback system validation

## User Experience Fixes
- Fixed TTS queue blocking JavaScript execution (async promises instead of await)
- Ship Status now correctly reports who destroyed which ship (role confusion fixed)
- Game Over only appears when game actually ends (no more random messages)
- Maintained dramatic storytelling while ensuring factual accuracy

## Battleship-Specific Improvements
- Ship destruction messages only appear when ships actually sink
- Clear separation of concerns: hits/misses vs ship destruction vs game over
- Eliminated false positive ship destruction reports
- Fixed role reversal where wrong player got credit for destruction

The battleship narrator now provides accurate, contextual feedback while preserving the dramatic naval warfare atmosphere.
2025-08-11 11:39:49 -04:00
e28dc11f04 Improve user experience with battleship feedback and auto-play TTS
- Fix battleship feedback perspective confusion with better Hermes prompting
- Add auto-play TTS button with localStorage persistence and queueing system
- Move activity controls below model/voice selectors in sidebar
- Add activity controls to mobile hamburger menu
- Fix model/activity dropdowns to stay within container bounds
- Filter activities API to only show .yaml/.yml files
- Clean up system message labels by moving to usernames (System (Feedback), System (Question))
- Apply black formatting to app.py
2025-08-11 09:34:29 -04:00
648df5a0b2 embed videos like a damn pro! 2025-06-20 17:13:32 -04:00
Russell Ballestrini
9bfd1c9b5a dynamic models for all the platforms!
modified:   .gitignore
	modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
	new file:   vars.sh.sample
2025-03-11 21:15:13 -04:00
381588d6bc mistral upgrades
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2025-02-08 16:03:22 -05:00
748649d98a o3-mini and hermes 8b 8fp!
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2025-02-01 15:58:01 -05:00
0492d5b329 r1 llm support:
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2025-01-25 14:37:26 -05:00
2e7fd18ba1 more openai models
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-12-31 12:18:03 -05:00
91d6192192 bunch more models.
modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-12-09 18:25:37 -05:00
Russell Ballestrini
2449703489 modified: templates/chat.html 2024-12-06 16:09:05 -05:00
8b90bc6485 sync up mobile and desktop drop downs and user lists!
modified:   templates/base.html
	modified:   templates/chat.html
2024-11-24 17:35:54 -05:00
b01311a825 inactive uesrs now collected.
modified:   app.py
	new file:   migrations/versions/5d93cdf18549_room_inactive_users_column.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-11-24 14:16:25 -05:00
96c10fc6d6 announce when a username leaves the room.
modified:   app.py
	modified:   templates/chat.html
2024-11-24 13:32:08 -05:00
5fa37da991 sort active users, validate models and voices, fix room links
modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-11-23 12:04:48 -05:00
fab40ba60d w00t! active user list working, now we need disconnect to remove logic.
modified:   app.py
	modified:   templates/chat.html
2024-11-23 10:31:38 -05:00
f9f7da6ffc incremental progress
modified:   app.py
	modified:   templates/chat.html
2024-11-23 09:39:39 -05:00
3b3714f527 Fix defect with TTS after stream.
modified:   app.py
	modified:   templates/chat.html
2024-11-23 08:34:23 -05:00
d99ab35a71 Muhahahaa utility belt!
modified:   templates/chat.html
2024-11-23 07:38:20 -05:00
c2dcb6c4bf more html for the new utility belt
u are batman now.

	modified:   templates/base.html
	modified:   templates/chat.html
2024-11-23 07:30:25 -05:00
54fe4139a0 create grid column for room user list
modified:   templates/base.html
	modified:   templates/chat.html
2024-11-23 07:02:24 -05:00
1dc5e4a531 modified: templates/base.html 2024-11-16 15:35:55 -05:00
f18d81e1ea better for mobile
modified:   templates/base.html
2024-11-16 10:17:56 -05:00
7f332de648 * Update README.rst
* button grid vertical
* button TTS play button using the free speech.ai.unturf.com endpoint!

	modified:   README.rst
	modified:   templates/base.html
	modified:   templates/chat.html
2024-11-14 07:05:58 -05:00
75e637002b download markdown of conversation useful for github or jira
modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-09-18 16:27:40 -04:00
6086d65f9b uses the openai syntax for the conversation dump including content & role
* user
* system

	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-09-15 08:57:34 -04:00
d1998f9d1c move off message to chat_message but it doesn't fix order issue.
The app seems to queue the category, feedback/content_blocks question

The strange part is the set_background happens in the middle of the
script after category but it comes first and FAST! In about a second
while the other messages take about 4 secs to finally arrive.

	modified:   app.py
	modified:   research/activity29-battleship.yaml
	modified:   templates/chat.html
2024-08-28 07:15:18 -04:00
0d908b65d4 fully functional activity19-rock-paper-scissors.yaml
modified:   ../app.py
	new file:   activity19-rock-paper-scissors.yaml
	modified:   ../templates/base.html
2024-08-10 13:24:26 -04:00
57d8e701f2 remove username and snippet from SERP page 2024-07-04 12:04:46 -04:00
db3c15ea0d hide snippets pass room list in search page
modified:   app.py
	modified:   templates/base.html
	modified:   templates/search.html
2024-07-04 11:35:22 -04:00
926262cdaa keep keywords in search form.
modified:   app.py
	modified:   templates/base.html
2024-07-04 11:12:21 -04:00
5577821855 save username when searching
I CAN program offline without an LLM. ; )
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/search.html
2024-07-04 10:57:30 -04:00
77c2ef1d83 messing around with keyword search working but ugly!
modified:   app.py
	new file:   templates/base.html
	modified:   templates/chat.html
	new file:   templates/search.html
2024-07-04 10:21:37 -04:00
Russell Ballestrini
76e7cb83af make line numbers align on firefox
modified:   templates/chat.html
2024-04-21 11:46:49 -04:00
dabce4a954 allow user to prevent autoscrolling streamed chunks.
modified:   templates/chat.html
2024-04-04 10:01:32 -04:00
47d0b24fc4 add a link to the docs
modified:   templates/chat.html
2024-01-06 08:37:46 -05:00
65e904b286 don't duplicate previous messages if they already exist (reconnects)
modified:   templates/chat.html
2023-12-16 08:25:01 -05:00
9c3bbe169f don't scroll when users join.
modified:   templates/chat.html
2023-12-15 10:33:56 -05:00
Russell Ballestrini
caa4cd234f consolidate around data.content instead of message
modified:   app.py
	modified:   templates/chat.html
2023-12-12 13:52:05 -05:00
Russell Ballestrini
b778c7e53c modified: templates/chat.html 2023-12-12 12:14:13 -05:00
Russell Ballestrini
31a2f306e1 allow edits of streamed message chunks
modified:   templates/chat.html
2023-12-12 11:28:46 -05:00
Russell Ballestrini
bc378ce0dd Edit button, with save and cancel.
modified:   app.py
	modified:   templates/chat.html
2023-12-12 10:28:05 -05:00
Russell Ballestrini
434db03ab0 show less for large blocks 2023-12-11 13:30:18 -05:00
7d6fe1b27b fix dall-e-3 don't try to run marked on base64 images.
modified:   app.py
	modified:   templates/chat.html
2023-12-10 10:50:30 -05:00
Russell Ballestrini
29acdd9a3c new file: template.yaml
modified:   templates/chat.html
2023-12-05 07:33:02 -05:00