Share the :ai / :ide commands and AI settings (v1.16.0) - #47
Merged
Conversation
The browser shell commands and the AI settings that back them shipped in the package but were not reachable without importing internal paths, and the settings dialog was welded to this app's AppContext — so a sibling dashboard that embeds the same terminal could not offer :ai/:ide without copying code. - terminal.dart exports registerAiCommand/resolveAiWiring (:ai) and registerIdeCommand (:ide); client.dart exports AiSettingsController. - Extract aiSettingsSection(AiSettingsController) into ui_kit — the portable half of the settings dialog (provider/model/key, Hub-default toggle, mode, reply language), bound only to a controller, no AppContext. The built-in settings panel now composes it, so the shell app and an embedding app render the same UI from one source. Additive and backward-compatible. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Makes the browser shell commands (
:ai,:ide) and their AI settings reusable, so the OmnyServer fleet dashboard can offer the same terminal commands without duplicating code.Why
registerAiCommand,registerIdeCommandandAiSettingsControlleralready ship in this package but aren't exported from any barrel (only reachable by internal path), andshowSettingsPanelis coupled to this app'sAppContext. A sibling dashboard couldn't reuse any of it cleanly.Changes
terminal.dartexportsregisterAiCommand/resolveAiWiringandregisterIdeCommand.client.dartexportsAiSettingsController.aiSettingsSection(AiSettingsController)inui_kit.dart— the portable half of the settings dialog (AI provider/model/key, Hub-default toggle, agent mode, reply language), bound only to a controller, free ofAppContext.aiSettingsSectioninstead of building those controls inline — one source of truth for the AI UI.Additive and backward-compatible; no signatures changed.
Tests
test/ui/ai_settings_section_test.dart(browser): the section renders from just a controller (no AppContext) and a change round-trips through it.settings_panel_test.dartstill green (now exercises the extracted section).🤖 Generated with Claude Code