fix(tool): improve formatting of escaping rules in CLI tool prompt
This commit is contained in:
parent
41904018e2
commit
df0d7e20e6
1 changed files with 3 additions and 1 deletions
|
|
@ -26,7 +26,9 @@ func buildCLIToolsPrompt(tools []ToolDefinition) string {
|
|||
sb.WriteString("Escaping rules for string arguments:\n")
|
||||
sb.WriteString("- `\\n` means a real newline.\n")
|
||||
sb.WriteString("- To pass a literal backslash+n (`\\n`), encode it as `\\\\n` inside arguments JSON.\n")
|
||||
sb.WriteString("- Because `arguments` is itself a JSON string, this often appears as `\\\\\\\\n` in the outer payload.\n\n")
|
||||
sb.WriteString(
|
||||
"- Because `arguments` is itself a JSON string, this often appears as `\\\\\\\\n` in the outer payload.\n\n",
|
||||
)
|
||||
sb.WriteString("### Tool Definitions:\n\n")
|
||||
|
||||
for _, tool := range tools {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue