Fix truncation issues in piplan, SQLite storage, and history compression; add PIPlanMaxChars configuration
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user