-
Notifications
You must be signed in to change notification settings - Fork 19.8k
fix(plugins): The endpoint form of the extension plugin is missing th… #26388
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
base: main
Are you sure you want to change the base?
fix(plugins): The endpoint form of the extension plugin is missing th… #26388
Conversation
|
/gemini review |
There was a problem hiding this 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 addresses an issue where boolean fields in the plugin's endpoint form were not rendering as checkboxes. The fix involves mapping the tool credential type to the correct form schema type, which is a good and necessary change. I've added one suggestion to improve consistency with a similar function in the codebase, which will enhance maintainability.
| ...parameter, | ||
| variable: parameter.name, | ||
| label: parameter.label, | ||
| type: toType(parameter.type), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the toolParametersToFormSchemas function, it would be beneficial to also store the original type in a _type property. This makes this function's behavior consistent with other utility functions in the codebase and could prevent potential issues if downstream logic needs to differentiate between the original data type (e.g., 'boolean') and the form component type (e.g., 'checkbox').
| type: toType(parameter.type), | |
| type: toType(parameter.type), | |
| _type: parameter.type, |
67e8655 to
3c0f166
Compare
…e input field. The `toolCredentialToFormSchemas` function in `web/app/components/tools/utils/to-form-schema.ts` was not correctly mapping the `type` property for tool credentials. This resulted in boolean fields not being rendered as checkboxes in the plugin's endpoint form. This commit adds the type mapping to the function, ensuring that all form fields, including booleans, are rendered correctly.
3c0f166 to
01842d0
Compare
…e input field.
The
toolCredentialToFormSchemasfunction inweb/app/components/tools/utils/to-form-schema.tswas not correctly mapping thetypeproperty for tool credentials. This resulted in boolean fields not being rendered as checkboxes in the plugin's endpoint form.This commit adds the type mapping to the function, ensuring that all form fields, including booleans, are rendered correctly.
Important
Fixes #<issue number>.Summary
try #26344
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods