Commit Graph

62 Commits

Author SHA1 Message Date
root
1e8149fdcc Fix repeated 'don't know' detection and infinite questioning loop
PROBLEM SOLVED:
- AI was stuck in infinite questioning loop when child repeatedly said 'I don't know'
- Both chat and step-by-step modes weren't properly detecting repeated frustration
- System should switch to explanations after 2+ 'don't know' responses

FIXES IMPLEMENTED:
- Enhanced conversation history tracking with better selectors
- Added more comprehensive 'don't know' phrase detection (German variations)
- Improved server-side logic to detect repeated scenarios
- Added specific context handling for repeated_dont_know scenarios
- Better debugging logs to track conversation patterns
- Fixed variable name conflicts in server.js

RESULT:
- Children now get helpful explanations instead of endless questions
- System respects when child needs direct help vs. discovery guidance
- More natural conversation flow that adapts to child's needs
- Both German and English patterns properly detected
2025-06-30 16:08:37 +02:00
root
c451be7be9 Fix step-by-step question parsing and improve AI prompts
FIXED ISSUES:
- AI was giving introductions instead of direct numbered questions
- Parser wasn't correctly extracting numbered questions
- Missing detailed debugging for response parsing

IMPROVEMENTS:
- Enhanced prompts to explicitly request ONLY numbered questions
- Improved parsing function with detailed logging
- Better numbered question detection with regex
- Fallback question detection for non-numbered items
- Comprehensive debugging output for troubleshooting

RESULT:
- Step-by-step mode now properly displays 3-4 Socratic questions
- Questions guide children through discovery process
- Better instruction following with GPT-4o-mini model
2025-06-30 16:02:08 +02:00
root
a2aeff7ecd Upgrade from GPT-3.5-turbo to GPT-4o-mini for better performance and cost efficiency
- Updated all 13 OpenAI API calls to use gpt-4o-mini model
- Updated source labels to reflect new model usage
- Benefits: Better performance, more recent training data, improved instruction following
- Cost: Significantly lower (/usr/bin/bash.15//usr/bin/bash.60 vs /usr/bin/bash.50/.50 per 1M tokens)
- Enhanced multilingual support for German/English conversations
- Improved Socratic teaching capabilities for children
2025-06-30 15:52:52 +02:00
root
fd63a4617a Fix syntax error in ternary operator for repeated 'don't know' detection
- Fixed malformed ternary operator in step-by-step mode
- Properly structured conditional logic for needsExplanationDueToRepeatedDontKnow
- Server now starts without syntax errors
2025-06-30 15:42:04 +02:00
root
9a7db8cff1 Enhance definition detection for location and relationship questions
IMPROVEMENTS:
- Added detection for 'was hat...zu tun' (what does...have to do with), 'wo ist' (where is), 'wo sind' (where are)
- Added detection for 'wie funktioniert' (how does) and 'warum ist' (why is)
- Enhanced server-side definition prompts to handle location and relationship questions
- Added topic-specific fallback explanations for Earth/seasons/temperature questions
- Improved OpenAI prompt context for better definition responses

This ensures children asking direct questions like 'wo ist die erde?' or 'was hat die position damit zu tun?' get explanations instead of more Socratic questions.
2025-06-30 15:34:45 +02:00
root
7e8ab4bae1 Fix critical chat mode confusion detection bug
CRITICAL FIXES:
- Fixed isPureDontKnow logic in chat mode to properly exclude confusion/help requests
- Added detection for repetition frustration: 'hab ich doch schon gesagt', 'already said that'
- Enhanced confusion detection in both chat and step-by-step modes
- Added topic-specific fallback explanations for bird flight questions
- Ensures confused/frustrated children get explanations instead of more questions

This resolves the issue where children expressing confusion in chat mode were still getting Socratic questions instead of helpful explanations.
2025-06-30 15:28:06 +02:00
root
fe8209427d Fix critical confusion detection bug
- Enhanced confusion detection to catch 'verstehe den zusammenhang nicht', 'das erklärt nicht', etc.
- Reordered logic to prioritize confusion/help requests over other classifications
- Added topic-aware fallback explanations for water/wetness questions
- Fixed chat mode to properly handle mid-conversation confusion
- Removed duplicate confusion handling logic

This resolves the issue where children expressing confusion were stuck in endless Socratic questioning loops instead of getting explanations they needed.
2025-06-30 15:21:12 +02:00
root
9686a5de39 Fix: Add server-side definition request handling with proper context matching
- Added definition_request context handling in server.js /api/respond-to-answer endpoint
- Uses OpenAI for intelligent definition responses with child-friendly explanations
- Provides fallback definition responses when OpenAI is unavailable
- Fixed client-server context name consistency (definition_request)
- Ensures all mid-conversation definition requests are properly handled
- Completes comprehensive answer analysis and response routing system
2025-06-30 15:14:07 +02:00
root
cd9838cd15 Critical fix: Detect explicit help requests like 'bitte verrate es mir', 'wie komme ich zur finalen antwort' and provide explanations instead of more questions 2025-06-30 15:05:31 +02:00
root
f610db5c6e Fix confusion detection: 'mehr fällt mir nicht ein' now properly triggers explanations instead of more questions, and uses correct API endpoint 2025-06-30 14:07:00 +02:00
root
9018d8772e Major improvement: Detect child confusion and provide explanations. Always show input area after AI explanations so kids can ask follow-up questions about concepts like prisms. 2025-06-30 13:59:33 +02:00
root
d693ac7228 Add specific question detection: Detect when child asks 'woher kommt die farbe?' and provide concrete explanations instead of more abstract questions 2025-06-30 13:32:06 +02:00
root
90096bb361 Add definition detection: When child asks 'what is X?' provide simple explanations instead of more questions. Prevents infinite question loops. 2025-06-30 13:20:55 +02:00
root
c22771e4bb Improve Socratic guidance: Better detection of 'don't know' responses and more concrete building-block prompts to avoid abstract question loops 2025-06-30 13:11:55 +02:00
root
902dd284ce Add missing submitChatAnswerFromInput method to handle dynamic input areas when AI asks follow-up questions 2025-06-30 13:06:27 +02:00
root
d314a96478 🧠 Improve answer analysis to handle mixed responses
- Enhanced detection logic to distinguish between pure 'I don't know' and thoughtful hypotheses
- When child says 'I don't know but maybe it's temperature', now treats as substantial thinking, not ignorance
- Added detection for substantive content: hypotheses, questions, specific topics (temperature, weather)
- Updated server to provide Socratic follow-up questions for thoughtful answers instead of just validation
- Improved fallback responses to be contextually aware of specific topics mentioned
- Better handling of answers that show reasoning even when prefixed with 'I don't know'

Now 'das weis ich nicht. hat es etwas mit der temperatur zu tun?' gets proper Socratic questioning about temperature instead of generic encouragement.
2025-06-30 12:59:23 +02:00
root
589a45e94e 🎯 Fix conversational flow and remove redundant encouragements
- Enhanced 'I don't know' detection to include German variants (ich weiß es nicht, warum, etc.)
- When child says 'I don't know', system now directly provides Socratic guidance instead of asking for deeper exploration
- Removed redundant phrases like 'Danke, dass du deine Gedanken geteilt hast' for obvious interactions
- Improved fallback responses to be more concise and natural ('Perfekt! Lass uns das gemeinsam herausfinden.')
- Updated both chat mode and step-by-step mode to have consistent behavior
- System now automatically continues to next question for 'don't know' responses, only shows choice buttons for substantial answers

This creates a smoother, more natural learning flow without interrupting the Socratic discovery process.
2025-06-30 12:54:08 +02:00
root
d316e3ceca 🧠 Enhance deeper exploration and fix validation responses
- Fixed /api/explore-deeper to use OpenAI for contextual Socratic questions instead of generic random prompts
- Added proper system prompts that focus on asking single, thoughtful follow-up questions
- Updated fallback prompts to be complete, engaging questions that encourage hands-on exploration
- Fixed /api/respond-to-answer to provide ONLY encouragement without giving explanations or facts
- Clarified prompts to prevent AI from revealing answers during validation responses
- Improved Socratic teaching approach for 'Tell me more' deeper exploration

This ensures both validation responses and deeper exploration maintain pure Socratic methodology.
2025-06-30 12:35:05 +02:00
root
b7c7bbfcb1 🔧 Fix Socratic teaching logic
- Fixed the critical issue where AI was giving direct answers instead of asking guiding questions
- Now when child answers 'no' or 'don't know', system calls /api/ask for Socratic guidance
- When child gives substantial answers, system calls /api/respond-to-answer for validation
- Applied fix to both chat mode and step-by-step mode
- Enhanced answer analysis to detect negative/unknown responses vs substantial answers
- Updated response handling to work with both guidance format and simple response format

This ensures the AI acts as a true Socratic teacher, guiding discovery rather than giving answers.
2025-06-30 11:32:19 +02:00
root
7c98ab3094 Improve AI responses to be more Socratic and educational
- Add explicit instructions to AI server for Socratic teaching method
- Tell AI to NEVER give direct answers, only ask follow-up questions
- Encourage AI to use 'What would happen if...?' and observation prompts
- Improve fallback responses to be more engaging and question-based
- Make deeper exploration more focused on discovery and experimentation
- Replace generic responses with curiosity-driven questions
- Guide children toward their own discoveries rather than giving answers
2025-06-30 11:22:39 +02:00
root
951e38bcb1 Fix translation errors and improve conversation flow
- Add proper German fallbacks for all user-facing text
- Fix 'Share your thoughts', 'Submit', 'You' translations
- Improve context sent to AI with originalTopic and context type
- Reset conversation state properly to prevent duplicate messages
- Add better German translations for welcome messages and fallback questions
- Improve choice button translations and prompts
- Fix weird AI responses by providing better context to server
2025-06-30 11:11:49 +02:00
root
402d6d9f05 Fix missing askNextQuestion and related methods
- Re-add askNextQuestion() method that was accidentally removed
- Re-add continueToNextQuestion() method for flow control
- Re-add addUserInputArea() for regular chat input
- Re-add submitChatAnswer() for regular answer submission
- Resolves TypeError: this.askNextQuestion is not a function
- Restores complete chat conversation flow functionality
2025-06-30 11:05:34 +02:00
root
4e7e4a2c4d Improve deeper exploration chat flow in KidsAI
- Fix issue where deeper exploration questions weren't allowing user responses
- Add addDeeperExplorationInputArea() for dedicated deeper exploration input
- Add submitDeeperExplorationAnswer() to handle deeper exploration responses
- Add generateDeeperExplorationResponse() for contextual AI responses
- Detect if deeper exploration contains questions vs statements
- Improve conversation flow control between regular questions and deeper exploration
- Kids now get proper chance to answer 'tell me more' follow-up questions
2025-06-30 11:01:50 +02:00
root
54c10c23af Fix missing askNextQuestion method in KidsAI Explorer
- Add askNextQuestion() method to handle conversation flow
- Add addUserInputArea() for user input interface
- Add submitChatAnswer() to handle user responses
- Add showCompletionMessage() for conversation completion
- Add scrollToBottomSmoothly() utility method
- Resolves TypeError: this.askNextQuestion is not a function
- Completes the interactive chat-based learning system
2025-06-30 10:34:39 +02:00
root
c7ea7a3286 Add robust translation handling and safe template string method
🔧 Translation Improvements:
- Enhanced getTranslation() with better error checking
- Added t() method as safe alternative for template strings
- Added extra validation for translation key existence
- Better error logging for debugging translation issues

 Result: More robust translation system that handles edge cases
2025-06-30 10:12:25 +02:00
root
a5d58de53f Fix translation context issues in template strings
🐛 Context Fix:
- Extracted translation calls from template strings to avoid 'this' context issues
- Fixed addContinueChoiceButtons() method translation calls
- Fixed displayGuidance() method translation calls
- Store translation values in variables before using in innerHTML

 Result: Should resolve 'this.getTranslation is not a function' errors
2025-06-30 10:09:02 +02:00
root
b923f4d9b0 Fix JavaScript error: Replace this.translate() with this.getTranslation()
🐛 Bug Fix:
- Fixed TypeError: this.translate is not a function
- Replaced all calls to this.translate() with this.getTranslation()
- The choice button feature was using non-existent translate method
- Now uses the correct getTranslation method that exists in the class

 Result: Choice buttons and translations now work correctly
2025-06-30 10:00:26 +02:00
root
2bfaf63c10 Add 'Tell me more' choice buttons to improve chat flow
🎯 Chat Flow Improvement:
- Added choice buttons after AI responses: 'Tell me more' vs 'Next question'
- Children can now explore current topic deeper before moving on
- Prevents confusing topic jumps in middle of exploration

🔧 Frontend Changes (script-new.js):
- Added addContinueChoiceButtons() method
- Added exploreCurrentTopicDeeper() for deeper exploration
- Added continueToNextQuestion() to move forward
- Replaced automatic question progression with user choice
- Enhanced mobile-friendly interaction

🎨 Styling (style.css):
- Added choice-container and choice-btn styles
- Responsive design for mobile devices
- Enhanced exploration message styling with visual indicators
- Improved touch targets for mobile users

�� Translations (translations.js):
- Added 'tell-me-more', 'next-question' translation keys
- Added 'explore-deeper', 'continue-learning' prompts
- Complete German/English support for new UI elements

🚀 Backend (server.js):
- Added /api/explore-deeper endpoint
- Generates contextual deeper exploration responses
- Language-aware deeper exploration prompts

 Result: Better learning flow - kids control pace and depth of exploration
2025-06-30 09:54:49 +02:00
root
ca5099f5e8 Clean up workspace: remove outdated, backup, and test files
🧹 Workspace Cleanup:
- Removed old script versions (script.js, script.js.backup, script_broken.js)
- Removed backup server files (server_backup.js, server_new.js)
- Removed temporary files (temp_method.js, favicon-data.txt)
- Removed test files (test-*.html)
- Removed completed documentation (*.md status reports)
- Removed redundant PHP wrapper (index.php)
- Removed log files (server.log)

 Remaining Essential Files:
- script-new.js (active main script)
- translations.js (complete localization)
- server.js (active backend)
- style.css, fallback.css (styling)
- index.html (main interface)
- ai-responses.js (AI interaction)
- Favicon and manifest files
- Package files and dependencies

🎯 Result: Clean, production-ready workspace with only necessary files
2025-06-30 09:37:41 +02:00
root
bff0e6f861 Complete translation refactoring and remove all hardcoded strings
🌍 Translation & Localization Improvements:
- Added missing translation keys for UI elements (ai-teacher, scientific-explanation, etc.)
- Replaced all hardcoded 'AI Teacher' labels with translation lookups
- Updated input placeholders and button text to use translations
- Fixed answer reveal section to use proper translation keys
- Added fallback messages and thinking prompts in both EN/DE

🔧 Technical Changes:
- Updated script-new.js: 7+ instances of hardcoded text → translation keys
- Enhanced translations.js: Added 7 new translation keys with EN/DE versions
- Ensured all user-facing text uses translation system
- Maintained emoji consistency across languages

 Verification:
- No compilation errors in JavaScript files
- All translation keys exist in both English and German
- No remaining hardcoded user-facing strings
- Backend service running correctly with systemd
- Language switching functionality preserved

🎯 Result: Complete localization - no language mixing, all UI text properly translated
2025-06-30 09:16:39 +02:00
root
0a26fb6b9c Comprehensive mobile optimization for KidsAI Explorer
- Added extensive mobile-responsive CSS with proper breakpoints
- Optimized chat interface for mobile devices with better touch targets
- Improved mobile scrolling with hardware acceleration and touch-friendly scrollbars
- Added mobile device detection for enhanced UX on smartphones/tablets
- Prevented iOS zoom on input focus with proper font sizing
- Enhanced textarea auto-resize functionality for mobile
- Added mobile-friendly keyboard handling and focus management
- Improved button sizing to meet iOS 44px minimum touch target requirements
- Optimized conversation container for better mobile viewport handling
- Added landscape orientation support and extra small device breakpoints
- Enhanced visual feedback with proper active states for touch interactions
- Fixed viewport jumping issues when virtual keyboard appears
- Improved mobile-specific JavaScript event handling and scrolling behavior
2025-06-29 21:55:23 +02:00
root
88a03c51a7 🔢 MAJOR: Improve math question handling and accuracy
PROBLEMS WITH MATH:
- AI giving wrong feedback (said 8 was correct for 2+7=9)
- Generic responses not building mathematical understanding
- No validation of correct/incorrect math answers
- Poor pedagogical approach for arithmetic

SOLUTIONS IMPLEMENTED:
 Mathematical Expression Detection
- Added regex to detect math expressions (+, -, ×, ÷, =)
- Special handling for arithmetic vs science questions

 Math Answer Validation
- Evaluates basic arithmetic (2+7, 10+5, etc.)
- Validates if child's answer matches correct result
- Provides accurate feedback for right/wrong answers

 Better Math Pedagogy
- Correct answers: 'Excellent! 2+7 does equal 9!'
- Incorrect answers: 'Close thinking! Let's count together...'
- Don't know: 'Let's solve this step by step using counting!'

 Enhanced AI Prompts
- Math context awareness in AI responses
- Focus on counting, number sense, arithmetic understanding

NOW: Math questions get proper mathematical validation and education!
2025-06-29 18:15:37 +02:00
root
9929efee27 ENHANCE: Subject-aware AI responses for Math vs Science
IMPROVEMENTS:
🔢 Math Questions:
- Detects math questions (contains +, -, numbers, sum, total, count)
- AI responses focus on mathematical thinking and counting
- 'yes' → 'Great! Math is fun when we take it step by step.'
- Answer reveals show '🔢 Mathematical Solution' not 'Scientific Explanation'
- Button text: 'Show Solution!' instead of 'Reveal Answer!'

🔬 Science Questions:
- Maintains scientific focus for how/why questions
- AI responses focus on scientific discovery and exploration
- Proper 'Scientific Explanation' labeling for science topics

🎯 Better Fallback Responses:
- Math-specific encouragement for numbers and counting
- Subject-appropriate emojis and language
- More relevant feedback for different question types

BEFORE: '10+5' → 'Scientific Explanation' 
NOW: '10+5' → '🔢 Mathematical Solution' 
2025-06-29 18:06:35 +02:00
root
16bd2bc6ec 🔧 CRITICAL FIX: Question progression not working
PROBLEM: Same question being asked twice instead of progressing
- Question 1 answered → AI responds → Question 1 asked again (not Question 2)

ROOT CAUSE: currentQuestionIndex not being incremented after answer
- askNextQuestion() was using same index repeatedly

SOLUTION:
- Added currentQuestionIndex++ before askNextQuestion() calls
- Fixed both success and fallback code paths
- Now properly progresses: Q1 → Answer → AI Response → Q2

FLOW NOW:
1) Fish live where? → 'in water' → AI validates → 2) Next question
NOT: 1) Fish live where? → 'in water' → AI validates → 1) Fish live where?
2025-06-29 17:49:28 +02:00
root
6a26fb7db4 🔧 FIX: Remove duplicate questions from AI responses
PROBLEM: AI was generating follow-up questions AND system was asking pre-programmed questions
RESULT: Confusing double questions like 'Now, can you think about...' + '1) Do you know...'

SOLUTION:
- Modified AI prompt to NOT include follow-up questions
- AI now only provides encouragement and validation
- System handles question flow with pre-programmed sequence
- Cleaner, less cluttered conversation experience

BEFORE: 'Great thinking! Now, what do you think happens next? 🤖 1) Do you know...'
AFTER: 'Great thinking! You understand the concept perfectly! 🤖 1) Do you know...'
2025-06-29 17:45:35 +02:00
root
071916877c COMPLETE: Fix chat system to use AI-powered responses
- FIXED chat system still using hardcoded ai-responses.js fallbacks
- REPLACED generateContextualResponse call with generateChatAIResponse
- ADDED generateChatAIResponse method for chat interface
- NOW BOTH systems (step-by-step AND chat) use server-side AI
- ADDED debugging logs to track request/response flow
- Updated cache-busting version for immediate testing

Chat responses for 'thrust?' should now be contextual and educational!
2025-06-29 17:38:49 +02:00
root
031611a585 🚀 MAJOR: Replace hardcoded responses with AI-powered contextual system
- REMOVED hardcoded bird-specific response arrays (unsustainable approach)
- ADDED generateAIResponseToAnswer() method with server-side AI integration
- ADDED /api/respond-to-answer endpoint for contextual AI responses
- NOW WORKS FOR ANY TOPIC: CPU, pneumatic tools, biology, physics, etc.
- AI generates contextual responses based on user's specific answer
- Scalable solution that doesn't require hardcoding responses for every topic
- Maintains educational approach: encourages thinking, asks follow-up questions
- Fallback system for when AI services are unavailable
2025-06-29 17:33:45 +02:00
root
c1993ba890 🔧 ADD: CPU/Computer responses and server improvements
- Added comprehensive CPU/computer responses in ai-responses.js
- Added contextual CPU detection logic in script-new.js
- Fixed server encouragements to be topic-specific
- Improved pneumatic tool responses
- Added debugging to troubleshoot response generation
- Server now provides contextual encouragements based on question content
2025-06-29 17:27:14 +02:00
root
578bccd745 🎯 IMPROVE: Contextual encouragements and pneumatic responses
- Added pneumatic hammer responses to ai-responses.js for engineering questions
- Enhanced server encouragements to be contextual based on question topic
- Removed generic 'smart question' responses
- Added specific responses for compressed air, air pressure, direction, etc.
- Server now provides topic-specific encouragements (pneumatic, bicycle, car)
- Better mechanical engineering focused feedback for students
2025-06-29 17:23:43 +02:00
root
e860ec3652 🔧 FIX: Remove corrupted code from constructor
- Fixed ReferenceError: answer is not defined
- Cleaned up corrupted code fragments in KidsAIExplorer constructor
- Removed duplicate/misplaced response generation logic
- Application now initializes properly without errors
2025-06-29 17:14:42 +02:00
root
597cd101e6 REFACTOR: Separate AI prompts into external file
- Created ai-responses.js to store all AI response prompts
- Refactored generateContextualResponse() to use external AIResponses object
- Added ai-responses.js script to index.html
- Enhanced brake-specific responses for bicycle and car questions
- Improved maintainability and prevents script corruption during edits
- All contextual responses now centralized in structured object
2025-06-29 17:11:07 +02:00
root
72900c1157 Add specific brake responses and fix generic response repetition
- Add enthusiastic responses when user correctly answers 'the brake'
- Distinguish between 'i slow down' (basic) vs 'the brake' (perfect answer)
- Add bicycle brake vs car brake specific responses
- Fix repetitive generic responses with varied feedback
- Make AI celebrate correct answers appropriately
- Ensure different answer qualities get different response levels
- Remove robotic same-response-for-everything behavior
2025-06-29 16:55:58 +02:00
root
a24b88ed75 Fix clumsy AI responses with truly contextual feedback
- Handle 'yes/no' answers appropriately instead of generic responses
- Provide proper feedback for 'I don't know' and help-seeking questions
- Give meaningful responses when user says 'the engine' vs 'clutch'
- Acknowledge when user is on right track vs completely off
- Add bicycle/mechanical connection responses for building concepts
- Fix traffic light and gear-switching specific responses
- Stop giving 'good thinking' to users who say 'no, what is it?'
- Make AI responses match the actual content and intent of user answers
- Create natural teaching flow that builds on user's existing knowledge
2025-06-29 16:49:57 +02:00
root
d6d695e324 Make AI actually engage with user answers
- Add contextual AI responses that acknowledge and build on user answers
- Analyze user responses for topic-specific keywords and concepts
- Provide meaningful feedback that shows the AI is listening
- Add clutch/car mechanics specific responses for technical topics
- Enhance bird flight and sky color topic responses
- Generate appropriate responses based on answer length and quality
- Create natural conversation flow instead of robotic question sequence
- Make users feel heard and validated for their thinking process
2025-06-29 16:44:47 +02:00
root
ad5d9b9192 Improve readability and contrast in answer reveal section
- Replace purple gradient with white background for better text readability
- Add proper contrast for answer content with black text on white background
- Improve reveal button design with better color contrast
- Add visual hierarchy with proper spacing and typography
- Make answer text more readable with gray background sections
- Add subtle shadows and borders for better visual separation
- Ensure all text meets accessibility standards for readability
2025-06-29 16:40:19 +02:00
root
c065dcfb33 Clean up chat interface: remove clutter and fix UX issues
- Remove unnecessary AI encouragement responses between questions
- Fix reveal answer section appearing too early in conversation
- Improve scrolling behavior - less jumpy, smoother transitions
- Add proper conversation container scrolling with max height
- Remove redundant generateAIResponse method
- Questions now flow naturally without excessive responses
- Reveal button appears only after all questions are completed
- Better focus management and scroll positioning
- Cleaner, more streamlined chat experience
2025-06-29 16:34:18 +02:00
root
8b497bb8e5 Improve KidsAI chat interface and pedagogical responses
- Transform conversation from separate windows to flowing chat interface
- Fix textarea layout issues that caused excessive scrolling
- Implement progressive question flow (one question at a time)
- Add modern chat bubble styling for AI and user messages
- Improve AI responses to be more pedagogical and step-by-step
- Fix bug with undefined randomResponse variable
- Add topic-specific guided learning responses
- Enhance server-side prompts for better educational guidance
- Create seamless messaging app-like user experience
- Add smooth animations and auto-scrolling for better UX
2025-06-29 16:28:06 +02:00
root
5b1b53ff3a Fix exploratory questions: implement proper conversational responses
- Modified backend to return conversationalResponse for exploratory questions instead of parsing into steps
- Updated displayAIGuidance to handle new response format
- Added displayConversationalResponse method for proper conversation interface
- Fixed 'offline guidance' fallback issue for exploratory questions
- Updated cache-busting parameter to force browser refresh
2025-06-29 14:18:20 +02:00
root
0e064c6987 Fix conversational flow for exploratory questions
- Modified backend to generate direct conversational AI responses for exploratory questions instead of step-by-step guidance
- Updated frontend to handle new conversationalResponse format
- Exploratory questions now show immediate AI conversation with reply interface
- Added AI teacher badge to conversation bubbles
- Improved user experience with natural dialogue flow
- Updated cache-busting parameter for immediate deployment
2025-06-29 14:14:04 +02:00
root
2866e89ab9 Fix conversation interface styling and text visibility
- Improve input field text contrast (dark text on light background)
- Make reply button more visible with solid green styling
- Enhance conversation bubble appearance and spacing
- Add better focus states and hover effects
- Improve overall readability of conversation interface
2025-06-29 14:04:30 +02:00