SemanticTree: implement interactiveOnly filter and optimize token usage

This commit is contained in:
Adrià Arrufat
2026-03-18 10:56:50 +09:00
parent 8372b45cc5
commit 015edc3848
3 changed files with 55 additions and 12 deletions

View File

@@ -52,6 +52,7 @@ fn getSemanticTree(cmd: anytype) !void {
const Params = struct {
format: ?enum { text } = null,
prune: ?bool = null,
interactiveOnly: ?bool = null,
};
const params = (try cmd.params(Params)) orelse Params{};
@@ -65,6 +66,7 @@ fn getSemanticTree(cmd: anytype) !void {
.page = page,
.arena = cmd.arena,
.prune = params.prune orelse false,
.interactive_only = params.interactiveOnly orelse false,
};
if (params.format) |format| {