Repository navigation
0.2.0: settings fixes, and credentials set while the app is open - #4
Open
jeffreyaven wants to merge 3 commits into
Open
jeffreyaven wants to merge 3 commits into
jeffreyaven wants to merge 3 commits into
Conversation
…aths Save model backend was disabled with the reason only in a hover tooltip. In the case reported, Remove model backend had also deleted the stored Gemini key, so Gemini asked for a key again and an OpenAI-compatible server asked for a model, and neither said so on screen. - The reason a backend cannot be saved yet is said beside the button. - Whether a key is stored is reported for each backend, not only for the configured one, so switching back to a backend does not ask for its key again. Remove model backend says on hover that it deletes the key. - The model of an API key backend is chosen from the list its provider gives: Gemini's models that take generateContent, Anthropic's models without retired ones, and everything an OpenAI-compatible server lists. The list is read when the pane opens on a backend whose key is stored, or a local server with an address, and otherwise on List models. A key typed and not saved yet is sent with that request and kept nowhere. When the list cannot be read the model stays a text field. - Every path in Settings has a Browse button: the engine, the data folder, the credentials file and the Copilot CLI. The host opens the system's file or folder dialog through tauri-plugin-dialog, which was already used for exports. The webview names what the path is for. - The address field now comes before the key and the model, since the list depends on both. No new dependencies. The model list uses reqwest as the backends do, with the query string built through its Url type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edentials A Windows process keeps the environment it was started with. A provider credential set with setx, or in the system settings, while the app was open reached the engine only after the app itself was closed and opened again. Reload Credentials restarted the engine with the same stale environment. Every child the supervisor starts now gets the app's own environment with the user's and the machine's variables applied, as the registry holds them when the child starts. They are read with CreateEnvironmentBlock, which builds what a newly started process of the user would get, PATHs joined and values expanded. A variable the app's environment lacks is added. One changed or removed in the registry since the app started is changed or removed. A value the app was started with, such as one set in a terminal for that launch, keeps winning until the registry's value changes. The agent's engine session and a delegated agent keep the environment they started with, so they are now opened again on the next turn after an engine restart. The connection exposes its existing start counter for that. On the API key path the conversation carries over. The Copilot CLI starts a new session and says why. macOS has no such store. There the app's own environment is used as before, and a dotenv file in Settings remains the route. No new dependencies. Two windows-sys features are added: Win32_System_Environment for CreateEnvironmentBlock, and Win32_System_Threading for the app's own token. userenv.dll, which CreateEnvironmentBlock is in, is part of Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeffreyaven
marked this pull request as ready for review
November 23, 2026 05:44
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes three things in Settings, lets the engine use credentials set while the app is open, and sets the version to 0.2.0.
Save model backend never became available
The button was disabled with its reason only in a hover tooltip. In the case reported, Remove model backend had also deleted the stored Gemini key. After that Gemini needed a key again and an OpenAI-compatible server needed a model name, and neither said so on screen.
The model is chosen from a list
For the API key backends the host asks the provider which models the key can use:
GET /v1beta/models, narrowed to the models that takegenerateContent.GET /v1/models, without retired models. Deprecated ones are marked.GET {address}/models, everything the server lists, sorted.The list is read when the pane opens on a backend whose key is stored, or a local server with an address, and otherwise on List models. A key typed and not saved yet is sent with that request and kept nowhere. When the list cannot be read, the model stays a text field with the provider's message under it. The address field now comes before the key and the model, since the list depends on both.
Browse on every path
The engine, the data folder, the credentials file and the Copilot CLI each have a Browse button. The host opens the system's file or folder dialog through
tauri-plugin-dialog, which was already used for exports. The webview names what the path is for, and the host picks the kind of dialog, its title and the file types it offers first.Credentials set while the app is open
On Windows a process keeps the environment it was started with, so a credential set with
setxor in the system settings reached the engine only after the app was closed and opened again. Now every child the supervisor starts gets the app's own environment with the user's and the machine's variables applied, as the registry holds them at that moment (CreateEnvironmentBlock, the same block a newly started process gets). Missing variables are added, and ones changed or removed in the registry since the app started are changed or removed. A value the app was started with keeps winning until the registry's value changes. Providers > Reload Credentials is then enough.After an engine restart the agent's next turn opens a new engine session, and a delegated agent a new process, since both keep the environment they started with. macOS has no such store, so there the dotenv file in Settings remains the route.
Checked in a debug build without closing it: a made-up
DIGITALOCEAN_TOKENstored for the user while the app ran reached the engine after Reload Credentials (DigitalOcean answered 401), and deleting it put the engine back to "credentialsenvvar references empty string". A unit test does the same against the real registry with a throwaway variable, and an integration test checks the new engine session after a restart.What was run
npm run lint,npm run typecheck,npm test(474 tests),cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo test(292 unit tests, 24 integration tests againststackqlv1.1.959) on Windows 11 x64.No new dependencies. Two windows-sys features are added for the environment block.
🤖 Generated with Claude Code