Skip to content

Improve @file form, remove surrounding chars #168

@zikajk

Description

@zikajk

Adding @file.clj to the user-prompt or system-message adds something like this:
<file partial=true path="/Users/user/project/file.clj">...\n(defn smth [a] a)\n...</file>

I tried to send a prompt like

Is this a good code <file partial=true path="/Users/user/project/file.clj">...\n(defn smth [a] a)\n...</file>

which simulates something like:

Is this a good code @file.cljc (10-10)

And LLM decides to read the file. Once I remove /n ..., then it reviews just the inserted code without trying to read the file.

I guess that partial=true is a good enough indicator, but we may also want to add line range, so smth like seems best:
<file partial=true line-range=10-10 path="/Users/user/project/file.clj">(defn smth [a] a)</file>

I am not sure about the line-range in system-prompt thought which is something mentioned in the #163 . But I would remove ...\n from both.

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions