Skip to content

refactor(ModelEditContent): enhance model capabilities management and… #8562

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DeJeune
Copy link
Collaborator

@DeJeune DeJeune commented Jul 26, 2025

… introduce uniqueObjectArray utility

  • Updated ModelEditContent to improve handling of model capabilities, ensuring user selections are accurately reflected.
  • Introduced a new utility function, uniqueObjectArray, to filter out duplicate objects in arrays, enhancing data integrity.
  • Refactored logic for updating model capabilities to utilize the new utility, streamlining the process and improving code clarity.

What this PR does

现在可以同时选择多个类型

Fixes #8529

Special notes for your reviewer

参照原issue验证即可

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

… introduce uniqueObjectArray utility

- Updated ModelEditContent to improve handling of model capabilities, ensuring user selections are accurately reflected.
- Introduced a new utility function, uniqueObjectArray, to filter out duplicate objects in arrays, enhancing data integrity.
- Refactored logic for updating model capabilities to utilize the new utility, streamlining the process and improving code clarity.
@DeJeune DeJeune requested review from EurFelux and alephpiece July 26, 2025 18:15
@EurFelux
Copy link
Collaborator

还有bug,部分模型默认的选项无法取消,勾选其他选项后又能动了。deepseek-r1deepseek-v3上出现

…h useEffect and improved type handling

- Added useEffect to manage model capabilities based on user selections and showMoreSettings state.
- Refactored logic to streamline the handling of default and selected model types, improving clarity and maintainability.
- Utilized useRef to track changed types, ensuring accurate updates to model capabilities during user interactions.
@DeJeune
Copy link
Collaborator Author

DeJeune commented Jul 27, 2025

done

@EurFelux
Copy link
Collaborator

EurFelux commented Jul 27, 2025

  1. 选择模型类型为重排或嵌入,其他类型失效,保存
  2. 再编辑,取消重排或嵌入,其他类型可以选了,但处于未选状态
  3. 选择一个类型,比如推理
  4. 发现没有选择的类型也被保存了

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.

[错误]: 模型选择模型功能,如果选择多个会只保存其中一个
2 participants