feat(document_query): expose parser concurrency setting
Add a Document Query plugin settings panel that maps to the existing parser_concurrency runtime limit, with a focused regression test so the UI remains wired to the backend setting.
Alessandro committed
May 29, 2026 at 16:30 UTC
59dd1c99cb550232c17054e6a67988ccadd5193d
2 files changed
+43
plugins/_document_query/webui/config.html
new
+33
@@ -0,0 +1,33 @@
1
+<html>
2
+<head>
3
+ <title>Document Query</title>
4
+</head>
5
+
6
+<body>
7
+ <div x-data>
8
+ <template x-if="config">
9
+ <div>
10
+ <div class="section-title">Document Query</div>
11
+ <div class="section-description">
12
+ Settings for document parsing and retrieval.
13
+ </div>
14
+
15
+ <div class="field">
16
+ <div class="field-label">
17
+ <div class="field-title">Max parser concurrency</div>
18
+ <div class="field-description">
19
+ Maximum document parser jobs allowed to run at the same time in this Agent Zero process.
20
+ </div>
21
+ </div>
22
+ <div class="field-control">
23
+ <input type="number" min="1" step="1"
24
+ x-init="config.parser_concurrency = Math.max(1, parseInt(config.parser_concurrency || 1, 10) || 1)"
25
+ x-model.number="config.parser_concurrency" />
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </template>
30
+ </div>
31
+</body>
32
+
33
+</html>
tests/test_document_query_plugin.py
+10
@@ -122,6 +122,16 @@ def test_default_config_bounds_liteparse_runtime_concurrency():
122
assert "liteparse_subprocess: true" in default_config
123
124
125
+def test_config_panel_exposes_parser_concurrency_setting():
126
+ config_html = (
127
+ ROOT / "plugins" / "_document_query" / "webui" / "config.html"
128
+ ).read_text(encoding="utf-8")
129
+
130
+ assert "Max parser concurrency" in config_html
131
+ assert 'x-model.number="config.parser_concurrency"' in config_html
132
+ assert 'min="1"' in config_html
133
+
134
+
135
def test_liteparse_parser_caps_workers_by_default():
136
parser = LiteParseParser()
137