picoclaw/pkg/utils
King Tai cb0c8703fb
test(tools,utils): add ToolRegistry unit tests and fix Truncate panic on negative maxLen (#517)
Add comprehensive unit tests for the ToolRegistry covering registration,
lookup, execution, context injection, async callbacks, schema generation,
provider definition conversion, and concurrent access.

Fix a defensive edge case in Truncate where a negative maxLen would cause
a slice bounds panic, and add table-driven tests covering boundary
conditions, zero/negative lengths, and Unicode handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 21:40:59 +11:00
..
download.go feat(fmt): Fix formatting 2026-02-20 20:03:11 +02:00
media.go feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
message.go Update pkg/utils/message.go 2026-02-18 23:26:39 +01:00
message_test.go remove unicode 2026-02-18 23:18:17 +01:00
skills.go Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332) 2026-02-20 18:55:04 +08:00
string.go test(tools,utils): add ToolRegistry unit tests and fix Truncate panic on negative maxLen (#517) 2026-02-22 21:40:59 +11:00
string_test.go test(tools,utils): add ToolRegistry unit tests and fix Truncate panic on negative maxLen (#517) 2026-02-22 21:40:59 +11:00
zip.go feat(fmt): Fix formatting 2026-02-20 20:03:11 +02:00