Fix truncation issues in piplan, SQLite storage, and history compression; add PIPlanMaxChars configuration

This commit is contained in:
whlaoding
2026-03-15 00:32:14 +08:00
parent ea88e1dc18
commit 38d6875ab8
8 changed files with 683 additions and 66 deletions

View File

@@ -86,8 +86,8 @@ func (t *Tool) Call(ctx context.Context, input string) (string, error) {
output := render(plan)
if len(output) > t.maxOutputChars {
output = output[:t.maxOutputChars]
if len([]rune(output)) > t.maxOutputChars {
output = string([]rune(output)[:t.maxOutputChars])
}
return output, nil
}