Skip to content

Conversation

@liangfung
Copy link
Contributor

@liangfung liangfung commented Dec 31, 2025

Summary

  • Show a reload button in the model selector dropdown when hosted models (Super/Swift) fail to load or are empty
  • Add refreshModelList method to the vscode host bridge to trigger model list refresh
  • Implement refresh logic in useModelList hook with loading state management
  • Update i18n translations for reload button text across all languages
  • Only display reload button for authenticated users
  • Button shows spinning animation while refreshing

Demo

https://jam.dev/c/daa7eb4d-63ed-451c-8c3e-329ac933cee8

Test plan

  • Verify reload button appears when model list fails to load
  • Test that clicking the reload button triggers a refresh
  • Confirm button shows spinning animation during refresh
  • Verify button only appears for authenticated users
  • Test that model list updates correctly after refresh

🤖 Generated with Pochi

This commit adds a reload functionality to the model selection component:
- Shows a reload button when hosted models (Super/Swift) fail to load or are empty
- Adds refreshModelList method to vscode host bridge
- Implements refresh logic in useModelList hook with loading state
- Updates i18n translations for reload button text
- Only displays reload button for authenticated users
- Button shows spinning animation while refreshing

🤖 Generated with [Pochi](https://getpochi.com)

Co-Authored-By: Pochi <[email protected]>
@liangfung
Copy link
Contributor Author

liangfung commented Dec 31, 2025

fix #984

@liangfung liangfung requested review from wsxiaoys and zhanba December 31, 2025 05:03
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 0% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.24%. Comparing base (934a1d2) to head (309999a).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...kages/vscode-webui/src/components/model-select.tsx 0.00% 21 Missing ⚠️
...rc/components/__stories__/model-select.stories.tsx 0.00% 17 Missing ⚠️
...kages/vscode-webui/src/lib/hooks/use-model-list.ts 0.00% 16 Missing ⚠️
...scode/src/integrations/webview/vscode-host-impl.ts 0.00% 10 Missing ⚠️
packages/vscode/src/lib/model-list.ts 0.00% 10 Missing ⚠️
...src/features/settings/hooks/use-selected-models.ts 0.00% 8 Missing ⚠️
...ebui/src/features/chat/components/chat-toolbar.tsx 0.00% 4 Missing ⚠️
...src/features/chat/components/create-task-input.tsx 0.00% 4 Missing ⚠️
...ges/common/src/vscode-webui-bridge/webview-stub.ts 0.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1000      +/-   ##
==========================================
- Coverage   15.90%   15.24%   -0.66%     
==========================================
  Files         576      576              
  Lines       52884    52679     -205     
  Branches     1701     1667      -34     
==========================================
- Hits         8411     8031     -380     
- Misses      44236    44409     +173     
- Partials      237      239       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

4 participants