Skip to content

Read/search tools improvements #230

@konard

Description

@konard

We need to support long lines in tools.

Example of wrong behavior:

⏺ Search(pattern: "ivu-modal-header", path: "/Users/konard/Code/iview")
  ⎿  Found 1 line
     iview/dist/iview.css:1:[Omitted long matching line]

instead it should become:

⏺ Search(pattern: "ivu-modal-header", path: "/Users/konard/Code/iview")
  ⎿  Found 1 line
     iview/dist/iview.css:1: [omitted columns X..Y of line 1] ... ivu-modal-header{cursor:move} ... [omitted columns N..M of line 1]

Read tool should allow to set not only lines, but also columns for reading long single lines.

Search tool should show part of the line that matched omitting parts of it printing omitted range.

Also by default read tool should read the whole file, if it does not fit the limit, so AI can just read omitted lines if needed.

first N lines
... [omitted 1700-2300 lines] ...
last N lines

And now also read tool should support not only lines as parameter for reading, but also columns.

And if file is one long line it can be shown like this:

first N columns ... [omitted 1700-2300 columns of line 1] ... last N columns

So AI will have the idea of the contents from the first tool call, and by subsequent calls can get anything required.

These improvements will allows us to beat competition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions