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 -13
View File
@@ -114,22 +114,10 @@ export class V8InspectorProvider implements JavaScriptRuntimeObservationPort {
allowed.sort((left, right) =>
left.id < right.id ? -1 : left.id > right.id ? 1 : 0,
);
const items = allowed
.slice(input.offset, input.offset + input.limit)
.map(projectTarget);
const nextOffset = input.offset + items.length;
return ok(
javascriptRuntimeTargetListSchema.parse({
schema_version: 1,
runtime: discovery.runtime,
targets: {
items,
offset: input.offset,
limit: input.limit,
total: allowed.length,
next_offset: nextOffset < allowed.length ? nextOffset : null,
has_more: nextOffset < allowed.length,
},
targets: allowed.map(projectTarget),
excluded: { ...excluded, unconnectable: 0 },
limitations: describeInspectorTargetLimitations(),
}),