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

frontend: Allow toggling tools for non-default agents #839

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented Nov 12, 2024

Allow toggling tools for custom Assistants too

AI Description

This pull request makes changes to the DataSourceMenu.tsx, AssistantTools.tsx, and Welcome.tsx components.

Summary

The changes remove the checkIsBaseAgent function from the imports and usage in the DataSourceMenu.tsx and AssistantTools.tsx components. Instead, the isBaseAgent variable is replaced with a paramsTools variable, which is used to determine the number of tools and the state of the switch component.

Changes

  • The checkIsBaseAgent function is removed from the imports in DataSourceMenu.tsx and AssistantTools.tsx.
  • In DataSourceMenu.tsx, the isBaseAgent variable is replaced with a paramsTools variable, which is used to determine the number of tools and the state of the switch component.
  • In AssistantTools.tsx, the disabled prop of the ToggleCard component is removed, and the onToggle prop is updated to use the name property of the tool.
  • In Welcome.tsx, the isBaseAgent variable is removed, and the Toggle Tools On/Off text is always displayed.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.22%. Comparing base (535a77a) to head (d4f3e51).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #839   +/-   ##
=======================================
  Coverage   79.22%   79.22%           
=======================================
  Files         250      250           
  Lines       10587    10587           
=======================================
  Hits         8388     8388           
  Misses       2199     2199           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tianjing-li tianjing-li merged commit ccf41ea into main Nov 13, 2024
7 checks passed
@tianjing-li tianjing-li deleted the fix-agent-toggles branch November 13, 2024 15:23
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.

4 participants