diff options
| -rw-r--r-- | llm-tools.el | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/llm-tools.el b/llm-tools.el index cf86b6b..56aeddd 100644 --- a/llm-tools.el +++ b/llm-tools.el | |||
| @@ -6,10 +6,11 @@ | |||
| 6 | :name "read_file" | 6 | :name "read_file" |
| 7 | :function 'llm-tools--hl-file-read | 7 | :function 'llm-tools--hl-file-read |
| 8 | :description "\ | 8 | :description "\ |
| 9 | Read an entire file and return its contents in hashline format. Each | 9 | Read a file (or a range of lines) and return its contents in hashline |
| 10 | line is represented as LINE_NUMBER HASH|CONTENT, where LINE_NUMBER is | 10 | format. Each line is represented as LINE_NUMBER HASH|CONTENT, where |
| 11 | the 1-based line number, HASH is a 2-character content-derived bigram, | 11 | LINE_NUMBER is nthe 1-based line number, HASH is a 2-character |
| 12 | and CONTENT is the verbatim line text. Example output: | 12 | content-derived bigram, and CONTENT is the verbatim line text. Example |
| 13 | output: | ||
| 13 | 14 | ||
| 14 | 1aa|const char *TITLE = \"Mr\"; | 15 | 1aa|const char *TITLE = \"Mr\"; |
| 15 | 2ab|void greet(char *name) { | 16 | 2ab|void greet(char *name) { |
| @@ -20,10 +21,40 @@ uniquely identifies a line by position and content. Copy anchors | |||
| 20 | verbatim from the output when referencing lines in edit operations. Do | 21 | verbatim from the output when referencing lines in edit operations. Do |
| 21 | not fabricate or modify hashes. Call this tool before editing any file | 22 | not fabricate or modify hashes. Call this tool before editing any file |
| 22 | to obtain current content and valid anchors. Re-call if anchors no | 23 | to obtain current content and valid anchors. Re-call if anchors no |
| 23 | longer match after external changes." | 24 | longer match after external changes. |
| 25 | |||
| 26 | Use optional BEG and END arguments to read only a specific range of | ||
| 27 | lines (1-based, inclusive). Use ONLY_ANCHORS to retrieve just the line | ||
| 28 | anchors without content. Use AS_LIST to receive output as a list rather | ||
| 29 | than a newline-delimited string." | ||
| 24 | :args '((:name "file" | 30 | :args '((:name "file" |
| 25 | :type string | 31 | :type string |
| 26 | :description "Path to the file to read, relative to the working directory.")) | 32 | :description "\ |
| 33 | Path to the file to read, relative to the working directory.") | ||
| 34 | (:name "beg" | ||
| 35 | :type integer | ||
| 36 | :description "\ | ||
| 37 | Optional 1-based line number (inclusive) to start reading from. Omit to | ||
| 38 | read from the beginning." | ||
| 39 | :optional t) | ||
| 40 | (:name "end" | ||
| 41 | :type integer | ||
| 42 | :description "\ | ||
| 43 | Optional 1-based line number (inclusive) to stop reading at. Omit to | ||
| 44 | read to the end." | ||
| 45 | :optional t) | ||
| 46 | (:name "only_anchors" | ||
| 47 | :type boolean | ||
| 48 | :description "\ | ||
| 49 | Optional boolean. When true, returns only the anchor (line number + | ||
| 50 | hash) without the content portion after the pipe." | ||
| 51 | :optional t) | ||
| 52 | (:name "as_list" | ||
| 53 | :type boolean | ||
| 54 | :description "\ | ||
| 55 | Optional boolean. When true, returns each hashline as a list element | ||
| 56 | instead of a single newline-delimited string." | ||
| 57 | :optional t)) | ||
| 27 | :async nil | 58 | :async nil |
| 28 | :confirm nil | 59 | :confirm nil |
| 29 | :include t) | 60 | :include t) |
