Repository navigation
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 thebottomslot, 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 readingA: {{instruction}}reached the
model asA: 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
pairshappened 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 insettings.jsononce 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.luaclosure. The editor's
Lua treats a valuelessreturninside 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 sayreturn nil, and the SDK's README
documents the trap —if not ok then return endis how everyone writes a
guard, and insidewhile truethe 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 intoprompts.luaas sentences rather than as keys, so a
reader working in Japanese was asked a Japanese question and handed English
answers. They arelocaleskeys 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 thea 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. `~~~` andno 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,applyandreplaces, 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.panerather 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.