You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added zero-input template chaining 5 tag types across 6 blocks: `AI → Think → Translate → TTS → Agent`
7
+
- Template auto-generates a country briefing with analysis, translated phrases, pronunciation audio, and a 3-step action plan
8
+
- No file uploads, voice recording, or API keys required — just set variables and click Run All
9
+
10
+
### Variable Resolution Fix
11
+
-**`templates.js`**: `loadTemplate()` now auto-populates `M._vars.setManual()` with template variable values on load
12
+
-**`templates.js`**: `applyTemplateVariables()` syncs parsed variables into `M._vars` when ⚡ Vars is clicked
13
+
-**`exec-sandbox.js`**: `ctxResolveReferences()` falls back to `M._vars.get()` when SQLite context returns null — fixes `$(country)` unresolved during Run All
14
+
15
+
### Display Fix: Metadata Stripping
16
+
-**`ai-docgen.js`**: STT card renderer now strips `@var:` and `@input:` from display text
17
+
-**`ai-docgen.js`**: TTS and Translate card renderers now strip `@input:` from display text
18
+
19
+
## Files Modified
20
+
-`js/templates/ai.js` — New template (+116 lines)
21
+
-`js/templates.js` — Auto-populate M._vars on template load (+13 lines)
Copy file name to clipboardExpand all lines: js/templates/ai.js
+115-1Lines changed: 115 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1557,5 +1557,119 @@ Models use ONNX format for efficient browser inference via [Transformers.js](htt
1557
1557
> 💡 **How to use:** This template serves as a reference card for managing your local AI models. Click **✨ Fill** to generate the storage guide section.
description: 'Zero-input tag chain — AI researches a country, Think analyzes, Translate phrases, TTS speaks them, Image generates visuals, Agent builds a report. Just click Run All.',
1566
+
variables: [
1567
+
{name: 'country',value: 'Japan',desc: 'Country to research'},
{name: 'purpose',value: 'business trip',desc: 'Purpose: business trip / vacation / relocation / study abroad'},
1570
+
],
1571
+
content: `# 🌍 Country Briefing — $(country)
1572
+
1573
+
**Purpose:** $(purpose)
1574
+
**Local Language:** $(localLang)
1575
+
**Generated:** $(date)
1576
+
1577
+
> 💡 **Zero input required.** Every block auto-generates from the previous one. Click **⚡ Run All** to chain: AI → Think → Translate → TTS → Image → Agent.
1578
+
1579
+
---
1580
+
1581
+
## ✨ Step 1 — Country Overview (AI)
1582
+
1583
+
{{@AI:
1584
+
@search: duckduckgo, wikipedia
1585
+
@var: country_overview
1586
+
@prompt: Write a comprehensive briefing on $(country) for someone preparing a $(purpose). Cover:
@step 1: Build a detailed $(purpose) preparation checklist for $(country). Include: documents needed, vaccinations, insurance, banking setup, phone plan, apps to install, items to pack. Organize by timeline (4 weeks before, 1 week before, day of departure).
1653
+
@step 2: Create a first-week schedule for $(country). Day-by-day plan with morning/afternoon/evening activities tailored to a $(purpose). Include specific neighborhoods, restaurant names, and transport instructions between locations.
1654
+
@step 3: Write a quick-reference cheat sheet — a single-page summary with emergency numbers, embassy address, key phrases from the translation, cultural do's and don'ts, and the top 5 things to experience. Format it as a compact card that could be printed or saved to a phone.
0 commit comments