fix: allow empty text field when doc_ids supplied to all tool APIs

dbnToolsString was called with required=true (default), so it aborted
before dbnToolsInjectDocContent could inject content from the doc picker.
Now passes required=false and validates after injection so doc-only
submissions work in timeline, redact, ask, and summarize.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-24 00:39:46 +02:00
parent fa42c7223a
commit 0fcfed1a86
4 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ $emit = static function (string $event, array $payload): void {
};
try {
$text = dbnToolsInjectDocContent($input, dbnToolsString($input, 'text', 128000));
$text = dbnToolsInjectDocContent($input, dbnToolsString($input, 'text', 128000, false));
if (mb_strlen(trim($text), 'UTF-8') < 50) {
$emit('error', [