Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
This repository was archived by the owner on May 15, 2026. It is now read-only.

Add collapsible view operations #66

Description

@ryanhoangt

W&B SWE agent uses an interesting approach to achieve top score on SWE-bench Verified, inspired by collapse a specific range in a code editor:

  • open_module(path): view a file with all functions collapsed by default
Example output Image
  • expand_function(path, fn_name): view that file again but with the fn_name function expanded
Example output Image Image

We can implement this by adjusting the str_replace_editor tool:

  • Modify the view command on file path to print file content with functions collapsed by default
  • Add an extra command expand_function

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