Spaces:
Running
Running
Commit History
-
Add first-run guided tour (non-intrusive coachmarks, in-world copy)
web/tutorial.js: a small coachmark engine — region-anchored callouts that advance as the player acts (or via Next), always skippable, first-run only, progress persisted to localStorage. tiny.js defines the 12 game-flavored steps (recruit → fight → forge → talk) and emits the advance events (create-open / persona / spawn / move / kill / sheet / forge); auto-starts ~0.9s after the Game mounts. Settings → Gameplay gets a 'Replay tutorial' button (window.tinyArmyReplayTutorial). Verified end-to-end: opener → create step (2/12) with Skip, positioned above the picker without blocking it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>620430e -
Diagnostics: timeouts + structured logging on all model/media calls
Root cause of 'stuck at loading': none of the image/voice/skill/text fetches had a timeout, so a slow/hung backend spun forever. Added web/diag.js — diagFetch (timeout + timing + console log + ring buffer) and diagStream (connect + idle timeouts for SSE): - image /portrait: 120s ceiling - voice /qwen-tts + /voxcpm (synth + clone): 90s - skill + text /text/generate/stream: 30s connect, 60s idle-stall Calls now FAIL LOUDLY with a clear timing-stamped error instead of hanging. Every call is logged ([tinyarmy:kind] ✓/✗ in Ns) and recorded; dump with tinyDiag() in the console, or open Settings → Diagnostics for a live readout. Skill-forge icon failures now warn too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>c90f2a6 -
Phase 5: wire emotes into the Game + settings toggle + asset
Pass the emote sheet URL into comboBattler, fire a level-up heart via heroEmote, add a Gameplay > 'Show character emotes' toggle, copy the emote sheet to web/assets (served at /sprites/emotes.png) and add it to build.sh. Rebuilt comboBattler bundle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>46e3cc5
-
Coding model in presets + Mellum2→Nemotron NIM fallback
- Quality presets now set the coding model (Mellum2 across all presets; BUILD SMALL sub shows "Mellum2"). Manual coding-model changes flip the preset to Custom, like the other axes. - mellum2-zerogpu falls back to Nemotron via NVIDIA NIM when the ZeroGPU sidecar is unavailable (asleep / quota / error) before any token streams; a mid-stream failure still propagates (can't restart cleanly). - Settings → Coding Model mentions the fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>353687b -
Add Coding Model setting + Skill Forge sandbox
New "Coding Model" settings section (below Persona Prompt) selecting between two backends: • Nemotron 3 Nano 30B-A3B via NVIDIA NIM (integrate.api.nvidia.com, reasoning off) — too large to self-host on ZeroGPU. • Mellum2 12B-A2.5B via a ZeroGPU sidecar (polats/tiny-army-mellum-zerogpu), same /generate(+_stream) contract as the Aya/MiniCPM5 sidecars. New "Skill Forge" tab (Sandbox group, after Sprite Animations): pick a recruited hero, describe a skill, and the chosen coding model authors a tailored skill definition. Reuses personaStore (roster) + streamCoding. Backend: app.py routes mellum2-zerogpu and nemotron-3-nano-30b-nim model ids in /text/generate/stream; _nim_text_stream() streams NIM's OpenAI-compatible SSE. Frontend: codingModel.js store (separate from the persona/diary model), codingModelBar.js picker, shared sseText.js SSE reader (extracted from engineServer.js). Needs Space config: TINY_MELLUM_SPACE + NVIDIA_NIM_API_KEY. Co-Authored-By: Claude Opus 4.8 (1M c…1f1908e -
Add Tiny Aya text generation option
f9dd2fe
-
Portraits step 2: /portrait engine routing + imagen facade + Settings picker
- app.py /portrait now honors an `engine` hint ('local' | 'cloud' | auto), so the frontend can pick Z-Image-on-GPU vs cloud FLUX explicitly. Local loader uses 4-bit NF4 + a per-process VRAM cap (peak ~8 GB) so it can't crash the display. - web/imagen.js — image facade mirroring tts.js (engines, persisted activeId, onImageEngineChange, generatePortrait → PNG Blob). - web/imagenServer.js — engines backed by /portrait: zimage-local (your GPU, localhost-only) + flux / flux-dev (cloud NIM, HF fallback). - web/imagenBar.js + settingsPanel.js — a "Portrait" provider picker section, injected after Voice, persisted and synced like the voice picker. Verified locally: picker renders/persists; engine:'local' generates a 1024² PNG; engine:'cloud' cleanly 503s without keys (cloud verified in prod). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>2151ea1
-
Settings: recommended quality presets + device readout; persist all choices
New "Recommended settings" section at the top of Settings (above Local AI Model): - High / Medium / Low presets that set the LLM model AND voice provider together, like a game's graphics presets: High = Qwen3 0.6B + Kokoro 82M Medium = Qwen2.5 0.5B + Kitten TTS Low = Qwen2.5 0.5B + Web Speech Presets resolve the model within the active engine's catalog (family fallback). Changing the model or voice by hand drops to Custom. - Expandable "Your device" readout (CPU threads, RAM, WebGPU/GPU, storage, screen, UA) for debugging and benchmarking. Persistence: the LLM engine + per-engine model (runtime.js), the voice provider (tts.js), and the preset choice (qualityPreset.js) are all saved to localStorage, so settings survive a refresh. runtime.js now validates a stored model against the active engine and emits onModelChange; the model/voice bars re-sync when a preset changes them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>750ca83 -
Voice: provider-driven per-hero voices; settings is provider-only
Settings → Voice is now just a provider picker (no global voice dropdown, no "narrate war diaries" checkbox) — the voice belongs to the hero, not the app. Copy updated to explain the model. Persona panel now respects the chosen provider: - Qwen3-TTS (design): voice-design text stays editable; designs/clones as before. - Kokoro/Kitten/Web Speech (fixed-voice): the design text goes read-only and a per-hero "Voice" dropdown of the provider's named voices appears. Play synthesizes the quote in that voice (cached as a WAV for Kokoro/Kitten via a new PCM→WAV encoder; spoken live for Web Speech). The pick is saved per hero (voiceId) and the cache tracks voiceIdUsed for staleness, mirroring Qwen3. The provider is set on another tab, so tts.js now emits onTtsEngineChange and the panel re-renders its voice controls live (no reliance on tab visibility). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>e648dca -
Persona: simplify prompt to name/about/quote/voice; editable in Settings
- Drop the specialty/personality/vibe tags from the generation prompt and the hero panel — only name, about, quote and voice design remain. - New Settings → "Persona Prompt" section: view and edit the system prompt that writes each hero. Saved locally (tinyarmy.personaPrompt) and used on the next "Recruit hero"; Reset restores the built-in default. - personaPrompts.js exposes PERSONA_SYSTEM_DEFAULT + get/set/reset/isCustom; personaPanel.js calls getPersonaSystem() so an override wins. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>575fb61 -
Move Voice settings into the Settings page; add a sidebar ⚙ Settings button
- settingsPanel.js injects two sections into Gradio's settings page now: "Local AI Model" + "Voice" (the TTS engine/voice picker, moved off the diary page). Both ride the shared singletons. Auto-narrate is now global facade state (getAutoNarrate / setAutoNarrate) so the diary reads it without the bar being mounted. - diaryPanel: drop the voice bar; keep the Read-aloud button + narration; read getAutoNarrate() for "narrate as it writes". - Sidebar gains a "⚙ Settings" item (nav.json) that opens the SAME Gradio settings page as the footer link (tiny.js wraps tacNavigate to click the footer button). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>dffe06d -
Fix empty-JSON: keep the answer when a model leaves <think> unclosed
Root cause (from a real debug report): Qwen3 on WebLLM opens a <think> tag and jumps straight to the answer WITHOUT closing it. Our stripThink had a rule that deletes an unterminated <think> all the way to end-of-string — so it nuked the entire JSON answer and the parser saw 0 chars ("model returned empty / unparseable JSON"). The model was actually producing a perfect, fully-filled persona. Add stripThinkFinal() (drop closed <think>…</think> blocks + stray unclosed tags, KEEP the answer) and use it for the final persona parse + diary display; keep the aggressive stripThink only for the live streaming preview. Verified against the exact failing output: parses name/about/specialty/personality/vibe correctly. Also: settings section now inserts directly above "Display Theme" (below the Settings title), not at the very top of the page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>62070d0 -
Settings: model section to top; default WebLLM + Qwen3 0.6B; copyable debug
- Inject the "Local AI Model" section at the TOP of Gradio's settings page. - Default engine = WebLLM (best on mobile WebGPU; falls back to wllama with no WebGPU) and default model = Qwen3 0.6B. - Persona + diary panels gain a "📋 Copy debug" button that copies a paste-ready report (engine · backend · model · input · outcome · raw output · stripped text, plus exception/stack), so failures like the empty-JSON persona can be sent back verbatim. Clipboard-blocked contexts fall back to selecting the text. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>898540a -
Put the model picker in Gradio's OWN settings page (not a custom tab)
Per the clarification: inject the engine/model picker into Gradio's native settings page (footer "Settings" → ?view=settings) instead of a custom sidebar tab. Gradio's settings page isn't an official extension point (footer_links only toggles which of api/gradio/settings show), so settingsPanel.js anchors on its "Display Theme" section, clones the section + heading classes, and appends a native-looking "Local AI Model" section driving the shared runtime.js singleton. Reverts the custom Settings tab + nav item + #settings-stage. Graceful no-op if Gradio's DOM changes (app still runs on the default model). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>cd43499 -
Move engine/model settings to a Settings page; share one model across both pages
The model picker was duplicated on Personas and War Diaries. Move the engine + model selector and cache controls into a new Settings tab (settingsPanel.js); both pages now read the same selection from the runtime.js singleton, so there's one place to choose the model and it's guaranteed identical on both. The diary page keeps its Voice (TTS) controls. nav.json gains an "App › Settings" item (Space-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>627d835