Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(codersdk/toolsdk): ensure all tools include required fields of aisdk.Schema #17632

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented May 1, 2025

No description provided.

@johnstcn johnstcn self-assigned this May 1, 2025
@johnstcn johnstcn requested review from Copilot and ThomasK33 May 1, 2025 12:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds validation tests for the AISDK Schema in all tools and ensures that each tool’s schema includes the required "Properties" and "Required" fields.

  • Added a new test (TestToolSchemaFields) in toolsdk_test.go to validate that all tools have non-nil Schema.Properties and Schema.Required, and that each required field has a corresponding property.
  • Updated toolsdk.go for the ListWorkspaces and DeleteTemplate tools to include or enforce the Required fields as part of the tool schema.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
codersdk/toolsdk/toolsdk_test.go Added tests to verify that each tool contains the required Schema fields.
codersdk/toolsdk/toolsdk.go Updated tool definitions to include the "Required" field in the schema.

@johnstcn johnstcn enabled auto-merge (squash) May 1, 2025 12:16
@johnstcn johnstcn merged commit 4ac71e9 into main May 1, 2025
36 checks passed
@johnstcn johnstcn deleted the cj/toolsdk-required-fields branch May 1, 2025 12:19
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants