-
Notifications
You must be signed in to change notification settings - Fork 947
Bug Report: Goose fails to parse files containing both a {
and a }
#2348
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
Comments
If this is not a big blocker, I would suggest guiding goose a bit whether you want the file to be interpretted as json or not, or to ask goose to 'cat' the file |
I'm seeing something like this as well, though I don't think its curly braces specifically Output from goose:
This makes goose unusable. I can't get it to see any files. |
developer__text_editor
view
command fails for files containing "{}"{
and a }
Java files seem to work for me now. @theSherwood can you provide an example of a file that fails? Failure cases:
Success cases: public class MyClass {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
} |
The other day, it was failing on every C or TS file I tried to read. Today, it is succeeding on them all. I'm no longer able to reproduce the bug at all. |
@rolfverschuuren-groupcard @theSherwood are you still seeing issues with this? |
Description:
Edit: The problem appears to be that any file that contains both a
{
and a}
will end up being interpreted as JSON even when the file is not. This will then cause a parsing error which will return just an empty object. Examples include most programming language files (Java/JS/Rust).The
developer__text_editor
tool'sview
command fails to return the content of a file when that file contains curly braces. When attempting to read such files it will return an empty JSON object{}
instead of{"result": "{}"}
.The tool successfully views files with other content, including individual curly braces or other special characters in isolation or simple combinations, and correctly returns content like
{"result": []}
for a file containing[]
. This suggests the tool misinterprets{}
within the file content during parsing, leading to the failure to return the actual file content.To Reproduce:
{}
. This can be the sole content of the file or part of a longer string.{}
This file contains {} braces.
=[]{};':"\,./<>?
(contains{}
)developer__text_editor
tool with thecommand='view'
and the path to the created file.Expected behavior:
The
developer__text_editor
tool should consistently return the content of the file within the"result"
key of its JSON response, regardless of whether the content includes{}
or if{}
is the entire content. For a file containing{}
the expected response is{"result": "{}"}
, and for a file containingThis file contains {} braces.
the expected response is{"result": "This file contains {} braces."}
.Actual behavior:
When the file content contains
{}
, thedeveloper__text_editor
tool returns an empty JSON object{}
instead of a JSON object with the file content in the"result"
key.Isolation Steps:
Through a binary search isolation process, the issue was narrowed down:
!@#$%^&*()_+-=[]{};':"\,./<>?
.=[]{};':"\,./<>?
.= {} {} ; ' : " \
. (Corrected based on isolation results){}
.Examples:
[]
was successfully viewed, returning{"result": []}
, indicating the tool can return content within the"result"
key and handle other similar characters correctly.Environment:
The text was updated successfully, but these errors were encountered: