Skip to content

feat(FR-783): Refresh with baseURL and token#3494

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix/modal-form-endpoint
Apr 24, 2025
Merged

feat(FR-783): Refresh with baseURL and token#3494
graphite-app[bot] merged 1 commit into
mainfrom
fix/modal-form-endpoint

Conversation

@ragingwind
Copy link
Copy Markdown
Contributor

@ragingwind ragingwind commented Apr 14, 2025

resolves 3466 (FR-783)

Improved Custom Model Integration in Chat Component

This PR enhances the custom model integration in the Chat component by:

  1. Refactoring the model fetching logic to properly handle errors and display user-friendly messages
  2. Adding a dedicated ChatModelError class to standardize error handling
  3. Creating a new EndpointTokenSelect component to allow users to select from available endpoint tokens
  4. Improving the CustomModelForm to better handle base URL and token inputs
  5. Separating the model selection UI logic to only show when models are available
  6. Implementing proper state management for base URL and token values

@github-actions github-actions Bot added the size:L 100~500 LoC label Apr 14, 2025
Copy link
Copy Markdown
Contributor Author

ragingwind commented Apr 14, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ragingwind ragingwind changed the title refresh with baseURL and token feat(FR-78refresh with baseURL and token Apr 14, 2025
@ragingwind ragingwind changed the title feat(FR-78refresh with baseURL and token feat(FR-783): refresh with baseURL and token Apr 14, 2025
Comment thread react/src/components/Chat/ChatCard.tsx Fixed
@ragingwind ragingwind force-pushed the fix/modal-form-endpoint branch from d588d38 to a7578f6 Compare April 14, 2025 04:36
Comment thread react/src/components/Chat/ChatCard.tsx
Comment thread react/src/components/Chat/ChatCard.tsx Outdated
@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization labels Apr 14, 2025
Comment thread react/src/components/Chat/ChatCard.tsx
Comment thread react/src/components/Chat/ChatCard.tsx Outdated
Comment thread react/src/components/Chat/ModelSelect.tsx
@ragingwind ragingwind force-pushed the fix/modal-form-endpoint branch from cc6586d to c01fd19 Compare April 14, 2025 06:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.13% (-0.02% 🔻)
409/9892
🔴 Branches
3.52% (-0.01% 🔻)
240/6819
🔴 Functions
2.52% (-0.01% 🔻)
79/3139
🔴 Lines
4.07% (-0.02% 🔻)
394/9675
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / EndpointTokenSelect.tsx
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / ChatModel.tsx
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 82dfce5

@ragingwind ragingwind marked this pull request as ready for review April 16, 2025 09:16
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image.png

Let's use same words.

Comment thread react/src/components/Chat/ChatModel.tsx
Comment thread react/src/components/Chat/CustomModelForm.tsx Outdated
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check my comments

@ragingwind ragingwind force-pushed the fix/modal-form-endpoint branch from c01fd19 to 72ebe44 Compare April 21, 2025 03:30
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Apr 21, 2025

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Apr 21, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ragingwind
❌ Jimmy Moon


Jimmy Moon seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Apr 21, 2025
@ragingwind ragingwind requested a review from yomybaby April 21, 2025 03:32
Comment thread react/src/components/Chat/EndpointTokenSelect.tsx Outdated
Copy link
Copy Markdown
Contributor

Please sign CLA

@ragingwind ragingwind requested a review from agatha197 April 21, 2025 10:04
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Recording 2025-04-22 at 10.46.51 AM.mov (uploaded via Graphite)
If the base path is empty, select the token and refresh, every input is initialized. But after refreshing again, Base Path has 'v1' automatically.

Screen Recording 2025-04-22 at 10.48.49 AM.mov (uploaded via Graphite)
If the base path is empty and refresh model information, the base path valid message disappears.

@ragingwind ragingwind requested a review from agatha197 April 22, 2025 07:41
Copy link
Copy Markdown
Contributor Author

Fixed

  • Empty base path is allowed
  • Keep token and base path while refreshing model information

Comment thread react/src/components/Chat/ChatCard.tsx Outdated
Comment thread react/src/components/Chat/ChatCard.tsx Outdated
Comment thread react/src/components/Chat/EndpointTokenSelect.tsx Outdated
Comment thread react/src/components/Chat/CustomModelForm.tsx Outdated
@ragingwind ragingwind requested a review from yomybaby April 23, 2025 04:46
@ragingwind ragingwind changed the title feat(FR-783): refresh with baseURL and token feat(FR-783): Refresh with baseURL and token Apr 23, 2025
@yomybaby yomybaby force-pushed the fix/modal-form-endpoint branch from 5d0d46e to 82dfce5 Compare April 24, 2025 01:38
@ragingwind ragingwind force-pushed the fix/modal-form-endpoint branch 3 times, most recently from 5f8ae64 to ac20500 Compare April 24, 2025 06:12
@yomybaby yomybaby force-pushed the fix/modal-form-endpoint branch from ac20500 to 74e7e26 Compare April 24, 2025 07:25
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has a bug, but with #3573 it work properly. I'll merge 2 PRs.

@yomybaby yomybaby dismissed agatha197’s stale review April 24, 2025 07:31

This review already resolved

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 24, 2025

Merge activity

resolves 3466 (FR-783)

Improved Custom Model Integration in Chat Component

This PR enhances the custom model integration in the Chat component by:

1. Refactoring the model fetching logic to properly handle errors and display user-friendly messages
2. Adding a dedicated `ChatModelError` class to standardize error handling
3. Creating a new `EndpointTokenSelect` component to allow users to select from available endpoint tokens
4. Improving the `CustomModelForm` to better handle base URL and token inputs
5. Separating the model selection UI logic to only show when models are available
6. Implementing proper state management for base URL and token values
@graphite-app graphite-app Bot force-pushed the fix/modal-form-endpoint branch from 74e7e26 to 51835df Compare April 24, 2025 07:39
@graphite-app graphite-app Bot merged commit 51835df into main Apr 24, 2025
7 of 8 checks passed
@graphite-app graphite-app Bot deleted the fix/modal-form-endpoint branch April 24, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants