Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Set the initial value of the chat modal to the recently created token #2864

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Nov 20, 2024

resolves #2865

Changes:
Adds automatic token population in the chat UI modal by passing the most recently created endpoint token to the chat interface.

Details:

  • Extends ChatUIModal to accept endpoint token fragment data
  • Adds logic to find the newest token from the endpoint token list
  • Automatically populates the token field in the chat interface with the most recent token
  • Enhances user experience by removing manual token entry requirement

How to test:

  1. Click the LLM Chat Test from the serving page.
  2. If it is not a public vllm model, you can get the custom modal.
  3. If there are tokens, the most recently created and valid token will be set as the placeholder.
  4. If there is no valid token, the placeholder is empty.

Checklist:

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Review Requirements:

  1. Verify that the newest token is correctly identified from the endpoint token list
  2. Confirm the token field is pre-populated in the chat interface
  3. Test that the chat functionality works with the auto-populated token

Copy link

graphite-app bot commented Nov 20, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

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

@github-actions github-actions bot added the size:M 30~100 LoC label Nov 20, 2024
Copy link
Contributor Author

agatha197 commented Nov 20, 2024


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.

@agatha197 agatha197 requested a review from yomybaby November 20, 2024 05:19
Copy link

github-actions bot commented Nov 20, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
5.37% (+0.08% 🔼)
395/7352
🔴 Branches
4.67% (+0.08% 🔼)
237/5080
🔴 Functions
3.22% (+0.06% 🔼)
78/2422
🔴 Lines
5.28% (+0.08% 🔼)
380/7192

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from cf3c4b3

@agatha197 agatha197 marked this pull request as draft November 20, 2024 06:11
@yomybaby yomybaby changed the title refactor: Set the most recently created token as the placeholder. refactor: Set the recently created token to initial value of chat modal Nov 20, 2024
@yomybaby yomybaby changed the title refactor: Set the recently created token to initial value of chat modal refactor: Set the initial value of the chat modal to the recently created token Nov 20, 2024
@yomybaby yomybaby changed the title refactor: Set the initial value of the chat modal to the recently created token feat: Set the initial value of the chat modal to the recently created token Nov 20, 2024
@agatha197 agatha197 force-pushed the refactor/set-the-most-recently-created-token-as-the-placeholder branch from bd8f2bc to cf3c4b3 Compare November 20, 2024 13:38
@agatha197 agatha197 marked this pull request as ready for review November 20, 2024 13:40
Copy link
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.

LGTM

Copy link

graphite-app bot commented Dec 23, 2024

Merge activity

… token (#2864)

resolves #2865

**Changes:**
Adds automatic token population in the chat UI modal by passing the most recently created endpoint token to the chat interface.

**Details:**
- Extends `ChatUIModal` to accept endpoint token fragment data
- Adds logic to find the newest token from the endpoint token list
- Automatically populates the token field in the chat interface with the most recent token
- Enhances user experience by removing manual token entry requirement

**How to test:**
1. Click the LLM Chat Test from the serving page.
2. If it is not a public vllm model, you can get the custom modal.
3. If there are tokens, the most recently created and valid token will be set as the placeholder.
4. If there is no valid token, the placeholder is empty.

**Checklist:**
- [x] Mention to the original issue
- [ ] Documentation
- [ ] Minium required manager version
- [x] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

**Review Requirements:**
1. Verify that the newest token is correctly identified from the endpoint token list
2. Confirm the token field is pre-populated in the chat interface
3. Test that the chat functionality works with the auto-populated token
@yomybaby yomybaby force-pushed the refactor/set-the-most-recently-created-token-as-the-placeholder branch from cf3c4b3 to cec0a33 Compare December 23, 2024 09:23
@graphite-app graphite-app bot merged commit cec0a33 into main Dec 23, 2024
5 of 6 checks passed
@graphite-app graphite-app bot deleted the refactor/set-the-most-recently-created-token-as-the-placeholder branch December 23, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M 30~100 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set the initial value of the chat modal to the recently created token
2 participants