Skip to content

Releases: xezpeleta/Idaztian

v1.3.1 — Fix ONNX Runtime crash with q4 dtype

Choose a tag to compare

@xezpeleta xezpeleta released this 27 Jun 12:12

What's Changed

  • Default dtype changed from q4f16 to q4 — 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

Choose a tag to compare

@xezpeleta xezpeleta released this 27 Jun 12:01

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 q4 to q4f16 (~500MB download)
  • Uses Transformers.js v3+ native chat template (messages API instead of manual <|im_start|> formatting)
  • Default maxNewTokens increased 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

Choose a tag to compare

@xezpeleta xezpeleta released this 27 Jun 11:44

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 in document.head

v1.2.1

Choose a tag to compare

@xezpeleta xezpeleta released this 27 Jun 11:39

Changed

  • Default model upgraded: SmolLM-135M-Instruct → SmolLM2-135M-Instruct — ~2× better instruction following (IFEval 29.9 vs 17.2), trained on 2T tokens vs ~600B. Same 135M parameter count, no speed regression.

v1.2.0 — Built-in Transformers.js Browser-Side AI Provider

Choose a tag to compare

@xezpeleta xezpeleta released this 27 Jun 11:14

🤖 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-local AiCompletionProvider backed by Transformers.js
  • transformersJs: true in aiCompletion config — one-line opt-in to browser-side AI
  • getTransformersJsState() — query loading/ready/error state for UI
  • preload() — 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/transformers loaded 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/transformers v4 (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

Choose a tag to compare

@xezpeleta xezpeleta released this 27 Jun 10:57

🆕 AI Inline Completion

Copilot-style ghost text completions, powered by any OpenAI-compatible API.

✨ Features

  • Pluggable providerAiCompletionProvider.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.aiCompletion in 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

Choose a tag to compare

@xezpeleta xezpeleta released this 26 Jun 21:56
0644fb2

Fixes

Mouse Click Position Correction

  • Added click-correction plugin that uses DOM-based position lookup (posAtDOM + character-level text node walk) instead of CM6's posAtCoords, 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 moveVertically can'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 + coordsAt on TableWidget for proper height oracle tracking
  • Horizontal rules: Decoration.line + inline spacer widget (estimatedHeight: 49px) for accurate line height
  • Removed line-height: 1.45 from .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

v1.0.3

Choose a tag to compare

@xezpeleta xezpeleta released this 20 Feb 20:37
ci: Configure GitHub Actions workflow for npm package publishing.

v1.0.2

Choose a tag to compare

@xezpeleta xezpeleta released this 20 Feb 20:31
chore: remove static NPM_TOKEN to establish full OIDC publishing prov…

v1.0.1

Choose a tag to compare

@xezpeleta xezpeleta released this 20 Feb 20:23
chore: enable npm provenance flag