Releases: xezpeleta/Idaztian
Release list
v1.3.1 — Fix ONNX Runtime crash with q4 dtype
What's Changed
- Default dtype changed from
q4f16toq4— fixes ONNX Runtime crash in browsers.
The Bug
q4f16 uses fp16 activations, which trigger a known graph optimization bug in ONNX Runtime WASM:
SimplifiedLayerNormFusion / InsertedPrecisionFreeCast
This happens across all fp16 models in browsers, not just Qwen2.5.
The Fix
q4 uses fp32 activations — fully compatible with ONNX Runtime WASM, no crashes.
Tradeoff
| dtype | Size | Compatible |
|---|---|---|
| q4 (new default) | ~750MB | ✅ Browser + Node |
| q4f16 (old) | ~500MB | ❌ Crashes in browser |
| fp16 | ~1GB | ❌ Crashes in browser |
References
v1.2.3 — Qwen2.5-0.5B-Instruct default model
What's Changed
- Default Transformer.js model upgraded to Qwen2.5-0.5B-Instruct (from SmolLM2-135M-Instruct)
- 500M params (3.7× larger), significantly better completions
- IFEval ~51 vs 29.9 (SmolLM2-135M)
- Default dtype changed from
q4toq4f16(~500MB download) - Uses Transformers.js v3+ native chat template (messages API instead of manual
<|im_start|>formatting) - Default
maxNewTokensincreased from 30 to 40
Model comparison
| Model | Params | IFEval | Download |
|---|---|---|---|
| SmolLM2-135M-Instruct (old) | 135M | 29.9 | ~30MB (q4) |
| Qwen2.5-0.5B-Instruct (new) | 500M | ~51 | ~500MB (q4f16) |
v1.2.2 — Ghost text styling
Changed
- Ghost text now rendered dimmed (opacity 0.38) and italic — visually distinct from actual editor text, matching Copilot-style UX expectations
- Action buttons styled — accept/reject hint buttons now have subtle borders and hover states
- Styles injected once via
<style>element indocument.head
v1.2.1
v1.2.0 — Built-in Transformers.js Browser-Side AI Provider
🤖 Transformers.js AI Provider (Browser-Side)
Run AI ghost text completions entirely in the browser — no server, no API keys, no setup. Powered by Transformers.js + SmolLM3-135M-Instruct with WebGPU acceleration.
✨ What's New
createTransformersJsProvider()— Creates a fully-localAiCompletionProviderbacked by Transformers.jstransformersJs: trueinaiCompletionconfig — one-line opt-in to browser-side AIgetTransformersJsState()— query loading/ready/error state for UIpreload()— trigger model download programmatically (e.g., when user clicks "Enable AI")- Zero API keys — model runs on the user's machine using WebGPU or WASM fallback
- ~30MB download — SmolLM3-135M-Instruct, q4 quantized, cached in IndexedDB
- Optional peer dependency —
@huggingface/transformersloaded dynamically, core library stays lean
📋 Usage
With the shorthand:
new IdaztianEditor({
extensions: {
aiCompletion: { transformersJs: true },
},
})With full configuration:
import { createTransformersJsProvider } from 'idaztian'
const provider = createTransformersJsProvider({
modelId: 'HuggingFaceTB/SmolLM3-135M-Instruct',
dtype: 'q4',
maxNewTokens: 30,
temperature: 0.3,
onProgress: (pct, status) => console.log(`${pct}%: ${status}`),
onReady: () => console.log('AI ready!'),
})
new IdaztianEditor({
extensions: {
aiCompletion: { provider },
},
})🚀 GitHub Pages Demo
The Idaztian web demo now includes an AI button in the header. Click it to download and load the SmolLM3 model — once cached, completions appear as inline ghost text when you type. Ctrl+Shift+I toggles AI on/off.
🔧 Technical
- Uses
@huggingface/transformersv4 (WebGPU runtime, C++ ONNX backend) - Model:
HuggingFaceTB/SmolLM3-135M-Instruct(q4, ~30MB) - Automatically falls back from WebGPU to WASM if WebGPU is unavailable
- English-only completions (configurable via
systemPrompt) - Works in Chrome, Edge, Firefox (WebGPU), and Safari (WASM fallback)
Full Changelog: v1.1.0...v1.2.0
v1.1.0 — AI Inline Ghost Text Completion
🆕 AI Inline Completion
Copilot-style ghost text completions, powered by any OpenAI-compatible API.
✨ Features
- Pluggable provider —
AiCompletionProvider.fetchCompletion(context, signal)works with OpenAI, Ollama, Groq, LM Studio, or your own backend - Ghost text — dimmed inline suggestion after the cursor
- Tab to accept, Escape to dismiss
- Debounced — configurable
debounceMs, auto-cancels in-flight requests on new input - Staleness-safe — completions from old document states are discarded
- Opt-in — disabled by default, enable via
extensions.aiCompletionin config
📦 Usage
new IdaztianEditor({
parent: document.getElementById('editor'),
extensions: {
aiCompletion: {
provider: {
async fetchCompletion(context, signal) {
const res = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`,
},
body: JSON.stringify({
model: 'gpt-4o-mini',
messages: [
{ role: 'system', content: 'Continue the text naturally. Output ONLY the continuation.' },
{ role: 'user', content: context },
],
max_tokens: 150,
}),
signal,
});
const data = await res.json();
return data.choices?.[0]?.message?.content?.trim() || null;
},
},
debounceMs: 500,
},
},
});📄 Documentation
- Updated README with full AI completion example
- New CHANGELOG.md with full release history
- Updated landing page with AI Autocompletion feature card
Full Changelog: v1.0.4...v1.1.0
v1.0.4 — UX cursor navigation fixes
Fixes
Mouse Click Position Correction
- Added click-correction plugin that uses DOM-based position lookup (
posAtDOM+ character-level text node walk) instead of CM6'sposAtCoords, which accumulates errors across block widgets - Prevents clicks from landing 2-4 lines away from the intended target
ArrowUp/Down Navigation
- ArrowUp from document end (trailing empty line) correctly moves to end of previous line
- After CM6 processes arrow keys, detects incorrect line placement and corrects it (CM6's
moveVerticallycan't navigate through block widgets) - Table ArrowUp/Down handlers now scan up to 3 lines for adjacent table widgets (not just immediately adjacent lines)
estimatedHeight+coordsAton TableWidget for proper height oracle tracking- Horizontal rules:
Decoration.line+ inline spacer widget (estimatedHeight: 49px) for accurate line height - Removed
line-height: 1.45from.idz-code-line(variable line-heights caused height oracle drift)
Other
- Cleaned up unused CSS (removed
.idz-hr-line, unused Vite boilerplate) - Bump to v1.0.4
- 14 tests all passing