Repository navigation
Hold the built-in AI chat to its access level; redesign Migrations - #306
Merged
Merged
Conversation
- The built-in chat (Stroke Free, API keys) ran any write, asking only before destructive ones. Its execute_sql now goes through the classifier the MCP server enforces for local agents (sql_access_level), and a statement above the chat's level is refused with the SQL handed back. The access control under the composer shows for every model, and the system prompt says what the level allows. - Migrations: a stat row (applied, pending, problems, last applied) with a three-part bar, the apply command on its own line, a folder prompt when none is picked, search, and the list as a timeline grouped by the month it ran, pending last. Dates fit one line in any font. - TODO: tick off what shipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI access levels for built-in models. Before this change, Stroke Free and API-key models could run any write; the chat only asked before destructive ones. Now every
execute_sqlthey send is classified bysrc-tauri/src/mcp/access.rs, the same classifier the MCP server uses for local agents (through the newsql_access_levelcommand). Anything above the chat's level is refused, and the SQL goes back to the model to hand to the user. The Read only / Read & write / Modify schema / Dangerous control under the composer now shows for every model, and the system prompt tells the model what its level allows. The default level is Read only, the same as for local agents.Migrations redesign.
Checked in the real app in dark and light.
Tests: vitest, svelte-check, design lint, and the Rust
accesstests (16) all pass.