From ca624385a64f96e5c0304a5929fb5fa77be4bb87 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Thu, 19 Feb 2026 16:08:51 +0200 Subject: [PATCH] fix(linear): align KB sync messaging and fix log terminology MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - update_issue: handle not_indexed KB sync status with a distinct user message (matches Notion parity) - delete_issue: fix log message "not found in DB" → "not found in KB" --- .../app/agents/new_chat/tools/linear/delete_issue.py | 2 +- .../app/agents/new_chat/tools/linear/update_issue.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/surfsense_backend/app/agents/new_chat/tools/linear/delete_issue.py b/surfsense_backend/app/agents/new_chat/tools/linear/delete_issue.py index af5af8dbd..cece07b8b 100644 --- a/surfsense_backend/app/agents/new_chat/tools/linear/delete_issue.py +++ b/surfsense_backend/app/agents/new_chat/tools/linear/delete_issue.py @@ -226,7 +226,7 @@ def create_delete_linear_issue_tool( f"Deleted document {document_id} from knowledge base" ) else: - logger.warning(f"Document {document_id} not found in DB") + logger.warning(f"Document {document_id} not found in KB") except Exception as e: logger.error(f"Failed to delete document from KB: {e}") result["warning"] = ( diff --git a/surfsense_backend/app/agents/new_chat/tools/linear/update_issue.py b/surfsense_backend/app/agents/new_chat/tools/linear/update_issue.py index 7aa7a2753..89e5dc2c0 100644 --- a/surfsense_backend/app/agents/new_chat/tools/linear/update_issue.py +++ b/surfsense_backend/app/agents/new_chat/tools/linear/update_issue.py @@ -266,6 +266,8 @@ def create_update_linear_issue_tool( f"Knowledge base successfully updated for issue {final_issue_id}" ) kb_message = " Your knowledge base has also been updated." + elif kb_result["status"] == "not_indexed": + kb_message = " This issue will be added to your knowledge base in the next scheduled sync." else: logger.warning( f"KB update failed for issue {final_issue_id}: {kb_result.get('message')}"