Commit graph

2 commits

Author SHA1 Message Date
linkliti
f342a8ef39 feat(document-query): render document_query tool calls through a dedicated badge
The document_query tool logs its message as its own `document_query` type with an `icon://manage_search Querying: <document>` headline when queries are supplied and `Reading: <document>` without them, naming the first document and appending `+ N more` for multi-document queries. A plugin message handler renders it as a DOC badge with blue and blue-violet accents across modes, each clearly bluer than the a2a chat family so document queries read like the other dedicated tool surfaces. Agent-facing failure messages render from plugin prompt files, and the Q&A answer streams into the tool log while the model writes it; helpers built without the streaming callback still answer without streaming. Regression tests cover the log entry, headline words, and empty-query reading mode.

Validation: pytest tests/test_document_query_tool_ui.py tests/test_document_query_fallback.py
2026-10-21 23:37:32 +03:00
Deimos Agent
5fd7a6a79e feat: extract document_query into _document_query plugin with parser strategy pattern
- Create plugins/_document_query/ with full plugin structure:
  plugin.yaml, default_config.yaml, tools/, helpers/, helpers/parsers/, prompts/, README.md
- Add BaseParser ABC with asyncio.to_thread offload and configurable timeouts
- Implement 5 parsers: PDF (PyMuPDF+Tesseract), HTML (Markdownify),
  Text (expanded mimetypes: YAML, XML, TOML, JS, TS, shell),
  Image (Unstructured), Unstructured (catch-all)
- Add MIME type registry with priority-based routing via get_parser_for_mimetype()
- Add gather_timeout on asyncio.gather for bounded concurrent fetches
- All config externalized to default_config.yaml
- Disable core files (._py.bak) replaced by plugin
- Update knowledge_tool._py import to plugin path
2026-05-29 12:45:05 +02:00