fix: close PI-090 review findings

This commit is contained in:
2026-08-23 15:58:32 +08:00
parent 13ab383e53
commit 7e024093b1
11 changed files with 325 additions and 66 deletions

View File

@@ -29,7 +29,7 @@ export async function reportChangedFiles(
const paths = snapshot.files.map((file) => file.path);
const details: ChangedFileDetailsV1 = { schema: 'changed-file.v1', paths };
return {
content: [{ type: 'text' as const, text: JSON.stringify({ paths, changes: snapshot.files }) }],
content: [{ type: 'text' as const, text: `${paths.length} changed path(s) recorded` }],
details,
};
}

View File

@@ -306,7 +306,10 @@ export default function makeloreRuntime(pi) {
const paths = touchedPaths.get(event.toolCallId);
touchedPaths.delete(event.toolCallId);
if (paths) {
await invokeProduct(event.toolCallId, 'changed_file', { paths, refresh: true }).catch(() => undefined);
await bridge('changes.touched', {
resourceId: event.toolCallId,
paths,
}).catch(() => undefined);
}
});
pi.on('agent_end', releaseAll);