refactor: return complete tool results inline

This commit is contained in:
morluto
2026-09-29 07:08:46 +08:00
parent 2160d4fae5
commit 0d96275b68
535 changed files with 4084 additions and 13537 deletions
+1 -11
View File
@@ -90,20 +90,10 @@ export class CdpElectronProvider implements ElectronObservationPort {
allowed.sort((left, right) =>
left.target_id.localeCompare(right.target_id),
);
const items = allowed.slice(input.offset, input.offset + input.limit);
const next = input.offset + items.length;
return ok(
electronTargetListSchema.parse({
schema_version: 1,
browser: discovery.version,
targets: {
items,
offset: input.offset,
limit: input.limit,
total: allowed.length,
next_offset: next < allowed.length ? next : null,
has_more: next < allowed.length,
},
targets: allowed,
excluded: {
outside_root: outsideRoot,
unsupported_url: unsupportedUrl,