Update chat-plugin to support model-proxy#101
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies the chat plugin architecture by removing job-based model management and replacing it with a unified model proxy endpoint. The refactoring eliminates the complexity of managing jobs, job servers, and associated state, streamlining both the UI and backend logic to focus solely on direct model selection.
Key Changes:
- Removed all job-related state, types, and UI components, including job selection dropdowns and job server configuration
- Replaced job-based model fetching with a single
fetchAllModelsfunction that queries a unified model proxy endpoint - Updated API functions to use the model proxy path instead of job-specific endpoints for chat requests
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| contrib/chat-plugin/src/libs/state.ts | Removed Job type and job-related state properties; replaced with simplified model proxy path and model list |
| contrib/chat-plugin/src/libs/api.ts | Replaced job-based model fetching with unified fetchAllModels function; updated chat endpoints to use model proxy |
| contrib/chat-plugin/src/index.tsx | Removed model token parameter from plugin initialization |
| contrib/chat-plugin/src/app/index.tsx | Updated App component to remove job server path and token initialization |
| contrib/chat-plugin/src/app/JobBar.tsx | Removed job selection UI and logic; simplified to only handle model selection and refresh |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
yukirora
approved these changes
Oct 22, 2025
hippogr
approved these changes
Nov 5, 2025
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.
This pull request refactors the chat plugin to simplify model selection and API interactions by removing job-based model fetching and related state. The code now fetches all available models directly from a unified model proxy endpoint, eliminating the need for job management logic. This streamlines the user interface and backend logic, making the codebase easier to maintain and understand.
Major refactoring and simplification:
Jobtype, job selection UI, and associated API calls. The application no longer fetches or manages jobs, focusing solely on model selection. [1] [2] [3] [4] [5] [6] [7]API and state management changes:
fetchModelsInCurrentJob) with a newfetchAllModelsfunction that retrieves all models from a single model proxy endpoint, updating related API calls and state accordingly. [1] [2]Component and prop updates:
Appcomponent and plugin initialization to remove job server and token props, reflecting the new simplified model. [1] [2] [3]These changes collectively result in a cleaner, more maintainable codebase focused on direct model selection without the complexity of job management.