Skip to content

Share the :ai / :ide commands and AI settings (v1.16.0) - #47

Merged
gmpassos merged 1 commit into
masterfrom
feat/share-ai-command-settings
Jul 15, 2026
Merged

Share the :ai / :ide commands and AI settings (v1.16.0)#47
gmpassos merged 1 commit into
masterfrom
feat/share-ai-command-settings

Conversation

@gmpassos

Copy link
Copy Markdown
Contributor

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, registerIdeCommand and AiSettingsController already ship in this package but aren't exported from any barrel (only reachable by internal path), and showSettingsPanel is coupled to this app's AppContext. A sibling dashboard couldn't reuse any of it cleanly.

Changes

  • terminal.dart exports registerAiCommand / resolveAiWiring and registerIdeCommand.
  • client.dart exports AiSettingsController.
  • New aiSettingsSection(AiSettingsController) in ui_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 of AppContext.
  • The built-in settings panel now composes aiSettingsSection instead of building those controls inline — one source of truth for the AI UI.

Additive and backward-compatible; no signatures changed.

Tests

  • New test/ui/ai_settings_section_test.dart (browser): the section renders from just a controller (no AppContext) and a change round-trips through it.
  • Existing settings_panel_test.dart still green (now exercises the extracted section).
  • 151 VM tests + browser suite pass; analyze/format clean; no new doc warnings.

🤖 Generated with Claude Code

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>
@gmpassos
gmpassos merged commit 09e4a27 into master Jul 15, 2026
4 checks passed
@gmpassos
gmpassos deleted the feat/share-ai-command-settings branch July 15, 2026 03:53
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.

1 participant