fix(multilingual): Improve color extraction for Spanish/French in both server rule-based and client-side fallbackβ
indroniel
709a035
- Added full color_map with common translations (rojo/rouge β red, azul/bleu β blue, etc.)
- Rule-based fallback and localRuleBasedFallback now correctly extract colors from non-English phrases.
- Updated Gemma prompt with stronger instructions to always normalize colors to English names.
- This should stop the 'color always wrong' issue in other languages without needing manual correction every time.
fix(demo): jsonBox now always contains pure actions array (for correction/preview editing)β
indroniel
193c4b5
- Stop polluting jsonBox with {canonical, actions} wrapper β it broke JSON parse in preview/correction
- jsonBox.value is now always a plain [array of actions] so editing + Preview works
- Canonical is shown as a note appended to transcriptionBox (demo visibility)
- Improved validation messages to guide users
- Backend canonical now consistently uses intent='draw_shape' (with shape in slots)
- Added clear error messages for the array requirement
This resolves the 'JSON must be an array of actions' exception when editing for preview.
fix: Gemma CPU fallback now reliably produces actions from canonical when model returns empty actions arrayβ
indroniel
f204d66
- Added canonical_slots_to_action() helper
- Strengthened parser in query_gemma_interpreter to synthesize actions from canonical when 'actions': [] is returned (common on CPU-only fallback)
- Stricter prompt emphasizing non-empty actions
- Robust fallback in transcribe_endpoint + client-side safety synthesis in processASRResult
- Ensures drawing and JSON box are populated even if Gemma only partially follows the new canonical+actions format
This fixes the empty actions issue seen in logs on HF Space CPU fallback.
feat(hackathon-demo): Language-agnostic canonical templates + RAG for multilingual MemRLβ
indroniel
fe2726b
- Fresh DB schema with canonical_intent, canonical_slots, language
- Gemma prompt now requests canonical + actions + receives RAG few-shot examples from past memories (cross-language)
- Rule/Gemma paths derive & expose canonical for UI
- Richer /transcribe + /memories responses (canonical, language)
- Reinforce stores canonical (especially on preview correction +1.0)
- UI: Multilingual example pills (Spanish, Hindi, noisy ASR), richer memory table (lang + intent badges), demo-focused status badges ('MEMRL TEMPLATE (lang-agnostic)', 'GEMMA+RAG (canonical)')
- Subtitle & footer updated to advertise the multilingual canonical MemRL story
- Correction preview UI remains the way to teach new templates
Ready for stellar offline multilingual Hackathon demo on HF Space.
feat: text shape support + preview-before-reinforce MemRL correction flowβ
indroniel
1fef58b
- Added dynamic text labels (Roadmap item #1 from Agents.md):
'text' shape now supported in Gemma prompt, rule-based fallback (both py + JS), canvas rendering (with fade), hit-testing for drag, manual toolbar button, click-to-place with prompt, and example pill.
- Major improvement to command processing / MemRL feedback:
When user corrects an outcome, new flow: 'Start Correction' β edit JSON details (with live validation) β explicit 'Preview / Sample Execution on Canvas' to see the drawing result first β only then 'Accept Preview & +1.0 Reinforce to MemRL'.
- Decouples preview (temporary canvas mutation from snapshot) from DB update.
- Positive reinforcement (+1.0) is applied only after user visually approves the sample execution.
- Backend updated so reward=1.0 path respects corrected_action_json for trusted high-Q mappings.
- Better UX: validation status, dedicated correction controls, auto-reset on new commands.
- Added Agents.md (developer handbook) to the repo for fuβ¦
feat: upgrade canvas to support multi-command lists, relative freehand paths, shape dragging, trace animations, and blueprint grids
indroniel
9d62419
feat: implement MemRL Audio Canvas with Whisper and Gemma 4