Remove scan queue and enable parallel plugin scans

Remove the scan queue mechanism that serialized plugin scans. Each scan now runs in its own temporary chat context immediately upon request, allowing multiple scans to execute in parallel. Update UI to reflect that scans are no longer queued and remove the "queued" state tracking from store and API.
This commit is contained in:
frdel 2026-03-28 18:52:17 +01:00
parent 4cbb320587
commit 1eb78607c9
4 changed files with 16 additions and 54 deletions

View file

@ -4,12 +4,11 @@ from helpers import message_queue as mq
class PluginScanQueue(ApiHandler):
"""Log the scan prompt into a chat. Optionally set progress to 'Queued'."""
"""Log the scan prompt into a chat before the scan starts."""
async def process(self, input: Input, request: Request) -> Output:
ctxid: str = input.get("context", "")
text: str = input.get("text", "")
queued: bool = input.get("queued", False)
if not ctxid or not text:
return Response("Missing 'context' or 'text'.", 400)
@ -20,7 +19,4 @@ class PluginScanQueue(ApiHandler):
mq.log_user_message(context, text, [])
if queued:
context.log.set_progress("icon://hourglass_empty Queued - waiting for another scan to finish", 0, True)
return {"ok": True, "context": ctxid}