mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Enable tool call type coersion (#477)
* feat: enable tool call type coercion * fix: tests for type coercion --------- Co-authored-by: Mingholy <mingholy.lmh@gmail.com>
This commit is contained in:
@@ -191,14 +191,12 @@ describe('ReadManyFilesTool', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw error if include array contains non-string elements', () => {
|
||||
it('should coerce non-string elements in include array', () => {
|
||||
const params = {
|
||||
paths: ['file1.txt'],
|
||||
include: ['*.ts', 123] as string[],
|
||||
};
|
||||
expect(() => tool.build(params)).toThrow(
|
||||
'params/include/1 must be string',
|
||||
);
|
||||
expect(() => tool.build(params)).toBeDefined();
|
||||
});
|
||||
|
||||
it('should throw error if exclude array contains non-string elements', () => {
|
||||
|
||||
Reference in New Issue
Block a user