From b5e8b774176bd4bc8d17901bdabf9e94b5c100fe Mon Sep 17 00:00:00 2001 From: h8hawk Date: Fri, 15 May 2026 19:13:06 +0330 Subject: [PATCH] fix(coding-agent): clarified pipe separator in read/search tool prompts - Added note to read tool prompt that the pipe after the hashline anchor is a separator, not part of the file content. - Added note to search tool prompt that the pipe before content is a separator. --- packages/coding-agent/src/prompts/tools/read.md | 2 +- packages/coding-agent/src/prompts/tools/search.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/src/prompts/tools/read.md b/packages/coding-agent/src/prompts/tools/read.md index 8712ff14a..7a63dde65 100644 --- a/packages/coding-agent/src/prompts/tools/read.md +++ b/packages/coding-agent/src/prompts/tools/read.md @@ -28,7 +28,7 @@ Append `:` to `path`. The bare path falls back to the default mode. - Reading a directory path returns a depth-limited dirent listing. {{#if IS_HL_MODE}} -- Reading a file with an explicit selector returns lines prefixed with `line+hash` anchors: `41th|def alpha():`. The 2-char hash is a content fingerprint that `edit` / `apply_patch` consume — copy it verbatim, NEVER fabricate. +- Reading a file with an explicit selector returns lines prefixed with `line+hash` anchors: `41th|def alpha():`. The 2-char hash is a content fingerprint that `edit` / `apply_patch` consume — copy it verbatim, NEVER fabricate. The pipe character after the hash is a separator, not part of the file content. {{else}} {{#if IS_LINE_NUMBER_MODE}} - Reading a file with an explicit selector returns lines prefixed with line numbers: `41|def alpha():`. diff --git a/packages/coding-agent/src/prompts/tools/search.md b/packages/coding-agent/src/prompts/tools/search.md index b0d5820b5..e4b5d47d9 100644 --- a/packages/coding-agent/src/prompts/tools/search.md +++ b/packages/coding-agent/src/prompts/tools/search.md @@ -8,7 +8,7 @@ Searches files using powerful regex matching. {{#if IS_HL_MODE}} -- Text output is anchor-prefixed: `*5th|content` (match) or ` 9x}|content` (context, leading space). The 2-char suffix is a content fingerprint. +- Text output is anchor-prefixed: `*5th|content` (match) or ` 9x}|content` (context, leading space). The 2-char suffix is a content fingerprint. The `|` before content is a separator, not part of the file content. {{else}} {{#if IS_LINE_NUMBER_MODE}} - Text output is line-number-prefixed