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

fix: properly handle object type parameters in tools #112

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix issue where object parameters are incorrectly stringified in tools.

Link to Devin run: https://app.devin.ai/sessions/d4d101f3e1204c3cb247953a415c0d12

- Add special handling for object type parameters
- Parse JSON input for object parameters
- Maintain raw input if JSON parsing fails
- Fixes #110

Co-Authored-By: ashwin@anthropic.com <ashwin@anthropic.com>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

@@ -159,13 +159,15 @@ const ToolsTab = ({
{key}
</Label>
{
/* @ts-expect-error value type is currently unknown */
// @ts-expect-error Tool schema types are not fully typed
Copy link
Member

Choose a reason for hiding this comment

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

nit: no need to modify unrelated code.

Comment on lines 208 to 211
type={
// @ts-expect-error Tool schema types are not fully typed
value.type === "number" ? "number" : "text"
}
Copy link
Member

Choose a reason for hiding this comment

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

same here as above, let's not change unrelated code in this PR

- Reverted @ts-expect-error messages back to original text
- Removed unnecessary line breaks in placeholder and type properties
- Kept object parameter handling functionality intact

Co-Authored-By: ashwin@anthropic.com <ashwin@anthropic.com>
@ashwin-ant ashwin-ant merged commit 7edde50 into main Dec 17, 2024
4 checks passed
@ashwin-ant ashwin-ant deleted the devin/1734088716-fix-object-params branch December 17, 2024 22:50
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.

Cannot pass an object correctly
1 participant