Skip to content

Make tool calls more robust regarding invalid JSON #239

@xai

Description

@xai

Bug Description:

I sometimes run into these kind of issues during tool calls:

Running changeSet_replaceContentInFile(...{"path": "packages/ai-core/src/browser/platform-compatibility.spec.ts", "replacements":[{"oldContent": " static requestPermission = (): Promise<NotificationPermission> => Promise.resolve('granted');\n \n constructor(title: string, options?: NotificationOptions) {", "newContent": " static requestPermission = (): Promise<NotificationPermission> => Promise.resolve('granted');\n\n constructor(title: string, options?: NotificationOptions) {"}]</parameter> </invoke>":)
Expected ',' or '}' after property value in JSON at position 512 (line 1 column 513)

This results in an error, stopped execution of the agent and potentially lost progress.

Steps to Reproduce:

no idea

Additional Information

  • Operating System: Linux
  • Theia Version: 1.62.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions