export function getEditFilePaths(parameters: unknown): string[] {
if (typeof parameters === 'string') {
// string. Copilot SDK delivers `apply_patch` arguments as a bare
// patch string (custom tool format), so when JSON parsing fails
// fall back to treating it as the patch body.
try {
parameters = JSON.parse(parameters);
} catch {
return getApplyPatchFiles(parameters as string);
}