Skip to content

[Fix] move '无' option to top of model/vector store selection lists#687

Merged
dingyi222666 merged 1 commit intov1-devfrom
fix/model-select
Jan 6, 2026
Merged

[Fix] move '无' option to top of model/vector store selection lists#687
dingyi222666 merged 1 commit intov1-devfrom
fix/model-select

Conversation

@dingyi222666
Copy link
Member

This PR improves the UX of model and vector store selection dropdowns by moving the '无' (none) option to the top of the list.

Bug fixes

  • Fixed the position of '无' option in model selection dropdown - now appears first instead of last
  • Fixed the position of '无' option in vector store selection dropdown - now appears first instead of last

Move the '无' (none) option to be the first item in dropdown lists
for model selection and vector store selection, improving UX by
having the default empty option appear at the top.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

Caution

Review failed

The pull request is closed.

流程说明

调整了两个工具函数中的选项排序,将"无"选项从列表末尾移至首位。getModelNames 函数和 getVectorStores 函数的选项顺序均进行了重新排列,其余功能逻辑保持不变。

变更内容

内聚 / 文件 变更摘要
选项排序调整
packages/core/src/utils/schema.ts
getModelNamesgetVectorStores 中重新排列选项顺序,将"无"选项从末尾移至首位,改变 UI 下拉列表的呈现顺序

诗文

🐰 选项重排列,
无字上台阶,
首位已占得,
UI 更顺哉!

代码审查工作量评估

🎯 1 (简单) | ⏱️ ~3 分钟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/model-select

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f050ef and ee37216.

📒 Files selected for processing (1)
  • packages/core/src/utils/schema.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dingyi222666, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a user experience enhancement by reordering options within selection dropdowns. Specifically, it ensures that the '无' (none) option, which represents no selection, consistently appears at the very top of both model and vector store selection lists. This change aims to improve the intuitiveness and efficiency of these UI components for users.

Highlights

  • Improved User Experience: The '无' (none) option has been moved to the top of both model selection and vector store selection dropdown lists, enhancing usability by making this common choice more accessible.
  • Model Selection List Ordering: The getModelNames function now explicitly prepends the '无' option to the list of available models.
  • Vector Store Selection List Ordering: Similarly, the getVectorStores function now places the '无' option at the beginning of the vector store names list.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dingyi222666 dingyi222666 merged commit 5b9afcb into v1-dev Jan 6, 2026
2 of 3 checks passed
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly moves the '无' (none) option to the top of the model and vector store selection lists, improving the user experience as intended. The changes are straightforward and effective. I've added a couple of minor suggestions to use a more modern and concise syntax (spread operator instead of concat), which could improve code readability. Overall, good work.

Comment on lines +137 to +140
['无']
.concat(
models.value.map((model) => model.platform + '/' + model.name)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For improved readability and to use more modern syntax, you could use the spread operator (...) instead of concat() to prepend the '无' option. It's generally more concise for this use case.

Suggested change
['无']
.concat(
models.value.map((model) => model.platform + '/' + model.name)
)
['无', ...models.value.map((model) => model.platform + '/' + model.name)]

Comment on lines +149 to +150
['无']
.concat(vectorStoreNamesRef.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the comment above, you can use the spread operator here for a more concise and modern syntax.

Suggested change
['无']
.concat(vectorStoreNamesRef.value)
['无', ...vectorStoreNamesRef.value]

@dingyi222666 dingyi222666 deleted the fix/model-select branch January 6, 2026 16:08
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.

1 participant