Skip to content

Releases

AI Assistant v0.1.5

Choose a tag to compare

@SugarFatFree SugarFatFree released this 11 Sep 06:54

Changed

  • Writing and proofreading open under the document rather than beside it.
    A rewrite is read against the paragraph it rewrites, and that comparison is
    made by dropping down a line of the same width — not by looking across two
    narrow columns. Both now fill the bottom slot, which is how a plugin says
    "under" as of this editor version; translation still opens beside, because a
    translation is read on its own rather than compared line for line.

    The reader can flip either one back with the button in the pane's title bar.

Fixed

  • A document that itself contained {{instruction}} had it replaced by the
    brief you just typed.
    The prompt was filled one placeholder at a time, so
    each replacement was scanned again by the next: once the document went in as
    {{text}}, the round that filled {{instruction}} found the reader's braces
    inside it. Measured — a document reading A: {{instruction}} reached the
    model as A: MAKE-IT-SHORT, and the rewrite came back with that in it.
    Anyone writing about Jinja, Handlebars, Vue or this plugin's own prompt
    settings writes {{...}} all day.

    Which key won depended on the order pairs happened to give, so only one of
    the three commands showed it and the same document could differ between
    runs. The template is now walked once: a value goes into the output and is
    never looked at again. A {{name}} the plugin has no value for is left as it
    stands — the prompts are yours to edit and the braces may be yours too.

  • A translated document was left behind in this plugin's settings file.
    Translating works through the document a batch at a time, and what has not
    been sent yet has to survive between two calls — storage is the only place
    there is, so the document goes in there. That part is right. What was
    missing is letting go of it afterwards: measured on a 210 KB document,
    209 636 bytes of it stayed in settings.json once the translation had
    finished, for as long as the plugin stayed installed, and nothing read it
    again or said it was there.

    The copy is dropped as the last batch goes out. A translation abandoned
    half-way still leaves one, and the next translation overwrites it; what must
    not happen is a finished translation keeping the reader's document on
    disk. The editor now also writes a line to its log when any plugin's
    settings file passes four megabytes, which is far above anything that is
    actually settings.

  • A guard that did not guard, in every blocks.lua closure. The editor's
    Lua treats a valueless return inside a nested function as nothing at all
    and runs the next line anyway. Four guards here were written that way. Three
    had a second check behind them and survived by luck; the fourth sent an
    empty request to the model. All now say return nil, and the SDK's README
    documents the trap — if not ok then return end is how everyone writes a
    guard, and inside while true the same fault is a loop with no exit.

  • A heading was sent with the paragraph above it instead of the text below.
    Batching never breaks on a heading, so it joined whichever batch was open —
    the one above. Then the block it introduces overflowed, broke there, and
    went out on its own: a bare "## Results" glued to an unrelated paragraph,
    and its own text with nothing to say what it was. Trailing headings now move
    forward with the batch they belong to. The last batch keeps them, because
    there is nothing after it to carry them to.

  • A template that dropped {{instruction}} or {{language}} dropped what
    you had just told it.
    The prompts are yours to edit, and one that forgets
    {{text}} has always had the source appended rather than sent an empty
    request. Its two siblings had no such net: remove {{instruction}} from the
    writing template and the brief you typed a second earlier went nowhere;
    remove {{language}} and the language you picked from the list did too.

    Worse than an error, because there is no error. The model answers a prompt
    that is missing them, so nothing looks wrong — the answer is simply to a
    question nobody asked. All three are now appended if their placeholder is in
    neither the system prompt nor the user one.

  • The writing ideas were English in every language. Asking what to write
    offers six suggestions as chips — "Make it shorter", "More formal" — and
    they were written into prompts.lua as sentences rather than as keys, so a
    reader working in Japanese was asked a Japanese question and handed English
    answers. They are locales keys now, translated into all twelve.

  • A code block containing a fence was cut in half. Splitting a document
    for translation ended a block on any fence at all, so the a document shows inside a ```` block ended it — and the blank line underneath became a cut, handing the model half a program. What closes a block now depends on what opened it: the same character, at least as long, with nothing after it. `~~~` and no longer close each other, and a ```js line inside a
    block is code rather than the end of it.

Internal

  • The copy of the API module this plugin ships had fallen five options behind
    the SDK's — as, append, ai, apply and replaces, every one of them
    added for this plugin's own features. The module is meant to be copied and
    owned, so drifting is allowed; drifting behind while being the reference
    plugin is not. It is the SDK's current file again, and the editor's test
    suite now compares the two.
  • The panes are built with sdk.pane rather than as table literals. They were
    literals because the older constructor could not carry those five options —
    which is the situation the constructor exists to prevent, since a literal's
    spelling is checked by nothing. Behaviour is unchanged and the thirty-four
    tests that run this plugin say so.

AI Assistant v0.1.4

Choose a tag to compare

@SugarFatFree SugarFatFree released this 04 Sep 22:43

AI Assistant — writing, proofreading and translation, through whichever
model you have configured in MarkText Plus.

The first release rather than a pre-release. Same repository and same id as
the translate plugin, so it arrives as an update.

What is new

  • AI writing. Right-click, say what it should do — or take one of the
    usual answers — and the rewrite appears in a pane with an Apply button. With
    nothing selected it rewrites the document; with nothing in the document it
    is a blank page, which is what the side bar icon is for.
  • AI proofreading. Spelling, typing slips, grammar and punctuation, and
    nothing else: the voice is the author's.
  • Shown before applied. What a model returns is worth reading before it
    lands in what you were writing, and Apply goes through the editor's history,
    so one press of undo takes it back.
  • Six prompts, all yours. A system prompt and a user prompt for each
    command. {{text}} is where the source goes, {{language}} what you chose,
    {{instruction}} what you asked for.
  • Translation now sends paragraphs in batches rather than one request each,
    and its pane opens before the first request rather than after it.
  • Twelve languages, matching the editor's.

Requires

MarkText Plus v1.6.1 or newer. Applying a rewrite needs the editor to let
a plugin write to the document, which older versions do not.

Still 0.x: the editor's plugin protocol is settling but not settled.

v0.1.3 (pre-release)

v0.1.3 (pre-release) Pre-release
Pre-release

Choose a tag to compare

@SugarFatFree SugarFatFree released this 03 Sep 12:23

Pre-release. Stays at 0.x while its shape settles, and is updated in place
while it does — the tag does not move for every change to something unsettled.

Updated 2026-09-04

  • It says what it is in the plugin list, in the twelve languages the
    application ships. The list had only a name to show, and the five languages
    here covered fewer than half its readers.
  • The pane opens before the first request rather than after it, so it says
    it is working instead of sitting empty for the seconds the first paragraph
    takes.

SHA-256 b272a00e7728d64e6c971ed79e8feb39c1d1fbb4d8a7114c52419378fd258e9d

What changed

  • A whole document is translated a paragraph at a time, and appears a paragraph at a time, in a pane beside your text. It used to go to the model in one request: slow on a long file, past what the model will take on a longer one, and losing everything rather than one paragraph when it failed.
  • The translation is drawn the way you are reading: as source beside the source view, rendered beside the preview. Raw Markdown next to a rendered preview cannot be compared with what it sits beside.
  • Splitting on blank lines keeps fenced code whole, and the paragraph above a code block is its own block.

Requires MarkText Plus 1.6.1 or newer. Community / Unverified — read plugin.lua before installing.

v0.1.2 (pre-release)

v0.1.2 (pre-release) Pre-release
Pre-release

Choose a tag to compare

@SugarFatFree SugarFatFree released this 03 Sep 09:31

Pre-release. Stays at 0.x while its shape settles.

What changed

  • Uses the SDK's API module, lib/marktext-plus.lua, loaded with require. The plugin reads as sdk.show(result, language) rather than as a table literal whose spelling nothing checks.
  • Two files instead of one — which is the point: a plugin was limited to one file until require landed in the editor.

Everything else is as in 0.1.1: the two commands appear only when they apply, a translated selection comes back in a small window and a translated document in a panel beside your text, and the language question offers ten common ones to press.

What it asks for

document.read, ai.chat, storage.local, ui.contextMenu, ui.settings, ui.notifications.

It does not ask for document.write, so it cannot change your document, and it does not ask for network.request, so it cannot send your text anywhere the editor did not. The editor holds your API key and makes the request; the plugin never sees it.

Requires MarkText Plus 1.6.1 or newer. Community / Unverified — read plugin.lua before installing.

v0.1.1 (pre-release)

v0.1.1 (pre-release) Pre-release
Pre-release

Choose a tag to compare

@SugarFatFree SugarFatFree released this 03 Sep 08:05

Pre-release. Stays at 0.x while its shape settles, and changes when it needs to.

Rewritten as a Lua script plugin. The previous version shipped Dart source and could not run on anyone machine: the editor started it with Platform.resolvedExecutable, which in a release build is the editor own binary, so it launched a second editor and waited for it to speak JSON-RPC.

What changed

  • One Lua file that runs inside the editor. No build, no dependencies, the same on Windows, macOS and Linux.
  • The two commands are in the editor right-click menu, and each appears only when it applies — no Translate selection with nothing selected.
  • A translated selection comes back in a small window; a translated document opens in a panel beside your text. Neither replaces your selection.
  • The language question offers ten common languages to press; anything typed instead is used as it stands.
  • Menu entries, prompts and settings in English, 简体中文, 日本語, Deutsch and Français.

What it asks for

document.read, ai.chat, storage.local, ui.contextMenu, ui.settings, ui.notifications.

It does not ask for document.write, so it cannot change your document, and it does not ask for network.request, so it cannot send your text anywhere the editor did not. The editor holds your API key and makes the request; the plugin never sees it.

Requires MarkText Plus 1.6.1 or newer. Community / Unverified — read plugin.lua before installing; it is one file.

v0.1.0

v0.1.0 Pre-release
Pre-release

Choose a tag to compare

@SugarFatFree SugarFatFree released this 02 Sep 03:22

Initial community AI translation plugin for MarkText Plus.