- Date: 2026-01-27
- File: D:\opcdcfg\opencode_config_manager_fluent.py
- Lines: 6379-8879 (approx 2500 lines)
- Type: Major Refactoring - UI Merge
- ProviderPage (lines 6379-7446): Custom Provider management, ~1067 lines
- NativeProviderPage (lines 7447-8879): Native Provider management, ~1432 lines
- Two independent pages, occupying two navigation menu entries
- Merge two pages into unified ProviderPage
- Use Pivot tabs to switch between custom/native providers
- Preserve all existing functionality
- Optimize navigation menu
- PluginPage (line 19802): Successfully merged plugin management and Oh My OpenCode
- Uses Pivot + QStackedWidget pattern
- Each tab content created in separate _create_xxx_widget() method
| Function | Custom Provider | Native Provider |
|---|---|---|
| Data Load | _load_custom_data() | _load_native_data() |
| Add | _on_custom_add() | - |
| Edit | _on_custom_edit() | - |
| Delete | _on_custom_delete() | _on_native_delete() |
| Config | - | _on_native_config() |
| Test | - | _on_native_test() |
| Fetch Models | _on_custom_fetch_models() | - |
| Query Balance | _on_custom_query_balance() | _on_native_query_balance() |
Add AuthManager and EnvVarDetector initialization.
Create Pivot + QStackedWidget structure.
Implement _create_custom_provider_widget() with toolbar and table.
Implement _create_native_provider_widget() with toolbar and table.
Add custom_ prefix to all ProviderPage methods.
Add native_ prefix to all NativeProviderPage methods.
Add to locales/zh_CN.json and locales/en_US.json:
Remove NativeProviderPage registration from _init_navigation().
- Custom Provider: Add/Edit/Delete
- Custom Provider: Fetch Models/Query Balance
- Native Provider: Config/Test/Delete
- Native Provider: Detect Configured/Query Balance
- Tab switching works correctly
- Both tabs refresh on config change
- Variable References: Update all self.table to self.custom_table or self.native_table
- Keep NativeProviderPage Class: Do not delete original class definition
- ModelFetchService: Preserve for custom provider model fetching
- Dialog References: ProviderDialog, NativeProviderDialog remain unchanged
- Signal Connections: Ensure all button signals connect to correct methods
- Lines to modify: ~2500
- New methods: 2 (_create_custom_provider_widget, _create_native_provider_widget)
- Methods to rename: ~30
- Translation keys to add: 2