Merge branch 'main' into fix/pr2371-btw-complete

This commit is contained in:
yiliang114 2026-03-21 01:10:48 +08:00
commit 905f2c3f36
108 changed files with 5064 additions and 965 deletions

View file

@ -181,10 +181,7 @@ function calculateFileStats(records: ChatRecord[]): FileOperationStats {
let filePath: string;
if (typeof display.fileName === 'string') {
// Prefer args.file_path for full path, fallback to fileName (which may be basename)
filePath =
(args?.['file_path'] as string) ||
(args?.['absolute_path'] as string) ||
display.fileName;
filePath = (args?.['file_path'] as string) || display.fileName;
} else {
// Fallback if fileName is not a string
filePath = 'unknown';

View file

@ -100,6 +100,10 @@ function formatToolDescription(
const invocation = tool.build(args);
return invocation.getDescription();
} catch {
// Fallback: use the description arg directly if available
if (typeof args['description'] === 'string') {
return args['description'];
}
return '';
}
}