Skip to content

Consolidate asynchronous built-in chat mode discovery - #467

Closed
Sheng Chen (jdneo) with Copilot wants to merge 5 commits into
mainfrom
copilot/implement-refactoring-async-mode-discovery
Closed

Sheng Chen (jdneo) with Copilot wants to merge 5 commits into
mainfrom
copilot/implement-refactoring-async-mode-discovery

Conversation

Copilot AI commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

This follow-up to PR #452 consolidates built-in mode discovery behind one explicit API while preserving its nonblocking lifecycle and fetch-versus-publish boundary.

  • Unified mode management

    • Moved RPC loading, filtering, and conversion into BuiltInChatModeManager.
    • Removed BuiltInChatModeService and the global no-argument loader.
    • Preserved allowed-name filtering, InlineAgent exclusion, conversion-error handling, and exceptional RPC completion.
  • Preserved lifecycle safety

    • loadBuiltInModes(lsConnection) only returns discovered modes.
    • UserPreferenceService still validates generation, account, and disposal state before publishing with updateModes(...).
BuiltInChatModeManager.INSTANCE.loadBuiltInModes(lsConnection);
// Lifecycle validation remains in UserPreferenceService.
BuiltInChatModeManager.INSTANCE.updateModes(modes);
  • Updated coverage
    • Migrated service tests to BuiltInChatModeManagerTests.
    • Added coverage for snapshot isolation on successful, failed, and null-connection loads; exceptional propagation; conversion failures; and explicit publication.

Sheng Chen (jdneo) and others added 3 commits September 20, 2026 14:59
…ation

Centralize account-scoped preference state in lifecycle-owned storage. Restore mode, model and history through guarded Realm publication; keep preference-dependent controls disabled until ready and show loading, failure and retry states.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep cold built-in mode discovery off SWT, preserve selected-mode identity until discovery completes, and expose independent manual recovery without reloading ready preferences. Restore model vision observation, guard disposed access, tolerate unavailable image models, and reject legacy Gson JSON extensions. Harden UI regressions so SWT failures reach JUnit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI and others added 2 commits September 30, 2026 02:54
…efactoring-async-mode-discovery

Co-authored-by: jdneo <6193897+jdneo@users.noreply.github.com>
Co-authored-by: jdneo <6193897+jdneo@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor to implement async mode discovery based on previous PR Consolidate asynchronous built-in chat mode discovery Sep 30, 2026
@jdneo
Sheng Chen (jdneo) deleted the copilot/implement-refactoring-async-mode-discovery branch September 30, 2026 05:03
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.

2 participants