Skip to content

0.10.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 02:33
· 9 commits to master since this release

A version number for the data files, a panel that starts clean, and settings that survive the trip between machines.

What changed in how it behaves

Two defaults are different from 0.9.0. Both can be turned off in the settings.

A run from a note starts a new conversation. Every path counts: the quick menu, a one-off
prompt, "ask about the selection", and — new in this release — an action that rewrites the text
in place. The panel is cleared first, so the card you are waiting for is the only thing on
screen, and the conversation before it is not paid for again on the next question. The cleared
conversation comes back if you click the notice, which stands for eight seconds.

The edit log is cleared along with it. The cards used to survive because each one carries an
"Undo edit" button. But the text is rewritten in the note itself, and Ctrl+Z was never taken
away. If you want the button within reach anyway, turn on Keep the edit log — it sits under
the toggle above and appears only when there is a clearing to be kept from.

The data files have a version now

data.json and history.json carry a schemaVersion, and the format they describe is written
down in docs/data-format.md. Nothing about this is visible in use; it matters because after
1.0 these files may not be broken, and until now there was no number to check.

Four outcomes are told apart when a file is read: absent, current, written by a newer version of
the plugin, and unreadable. The interesting one is the last.

A settings file that will not parse is copied aside, not silently replaced. Obsidian's own
loadData() returns nothing both when the file is missing and when it is corrupt, and the
plugin used to treat the two the same — which means a stray byte in data.json cost you every
API key you had entered, without a word. The broken file is now copied next to the original
under a free name with a timestamp, and you are told where it went. The chat log gets the same
treatment, quietly: there are no keys in it.

Settings arriving from the other machine are no longer trampled

If your vault syncs, data.json written on another machine used to be overwritten by whatever
this machine happened to hold — and since a draft in the input field is saved as you type, the
overwriting was armed on every keystroke. The plugin now notices the file changing underneath it
and re-reads the settings.

Only the settings: re-reading everything would throw away a live conversation. And only when the
file parses — a file that arrives broken, or vanishes mid-read, leaves what you have alone.

Worth knowing: Obsidian Sync carries manifest.json, main.js, styles.css and data.json,
and nothing else. history.json — your conversations — stays on the machine that wrote it.

Under the hood

455 checks, up from 412. Reading and writing the two files moved into store.ts, which imports
nothing from Obsidian, so the tests can drive it directly against deliberately damaged files.
The rules for what survives a clearing and what a restore keeps live in history.ts for the same
reason.

One race is fixed along the way: the undo notice lives for eight seconds — exactly as long as the
model spends rewriting — and clicking it used to swap the whole feed for the snapshot, carrying
off the card of the edit in flight along with its undo button, while the note had already been
rewritten. The restore now merges the snapshot with whatever arrived after it.