const resolution = await client.ai.suggestConflictResolution.mutate({
repoId: 'repo-uuid',
path: 'src/config.ts',
ours: '// our version...',
theirs: '// their version...',
base: '// original version...',
context: {
ourBranch: 'feature/auth',
theirBranch: 'main',
},
});
if (resolution.confidence === 'high') {
// Apply the suggestion
await fs.writeFile('src/config.ts', resolution.resolved);
} else {
// Show alternatives to user
console.log('Manual review recommended');
console.log('Suggestion:', resolution.explanation);
for (const alt of resolution.alternatives || []) {
console.log(`Alternative: ${alt.description}`);
}
}