64
*/
65
export function extractAiChunks(toolName: string, input: unknown, forFilePath?: string): string[] {
67
>
// ---- Claude SDK -------------------------------------------------
68
>
case 'Write':
69
return readStringField(input, 'content');
71
return readStringField(input, 'new_string');
73
return readMultiEdit(input, 'new_string');
75
>
// ---- Copilot CLI ------------------------------------------------
76
>
case 'create':
77
return readStringField(input, 'file_text');
79
>
case 'str_replace':
80
>
case 'insert':
81
return readStringField(input, 'new_str');
83
return readStrReplaceEditor(input);
85
>
case 'git_apply_patch':
86
return readApplyPatch(input, forFilePath);
88
>
default:
89
return [];
91
>
}
92
93
function readStringField(input: unknown, field: string): string[] {