mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
SemanticTree: implement interactiveOnly filter and optimize token usage
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user