Skip to content

I/Q: Implement AutoSave option and make various smaller improvements#237

Open
hanno-becker wants to merge 4 commits into
mainfrom
autosave
Open

I/Q: Implement AutoSave option and make various smaller improvements#237
hanno-becker wants to merge 4 commits into
mainfrom
autosave

Conversation

@hanno-becker
Copy link
Copy Markdown
Contributor

This PR adds a default-on configuration option for auto-saving files upon edit through I/Q. This is enabled by default because agents can't seem to work out that switching between file-system tools and I/Q otherwise leads to conflicts.

The PR also fixes a unicode issue whereby initial file contents written by openFile would not be ascii-encoded, making the Isabelle build fail.

Finally, some smaller fixes to pre-existing test issues.

createFileWithContent wrote Symbol.decode'd content verbatim, leaving raw
Unicode glyphs on disk that isabelle build's symbol-strict loader rejects.
Re-encode to named form, matching the jEdit buffer.save path.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Persist write_file edits to disk immediately so the jEdit buffer and the
file system stay in sync. Shared IQAutoSave state, on by default, toggled via
the set_auto_save MCP tool or the dockable checkbox, kept in sync via a
listener.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Handler validation failures now return MCP results with isError:true rather
than JSON-RPC errors (since c1c3967). Assert the new shape via an
assertToolError helper; protocol- and auth-level errors keep the old check.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
The README tool-list check only scanned numbered entries, so the bulleted
authenticate entry showed as a spurious mismatch. Accept both styles and stop
before the I/R REPL subsection, which is excluded server-side too.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I/Q: Allow auto-safe upon edits

1 participant