Skip to content

Build your personal knowledge base with Trilium Notes

fix(llm): report append to note not supporting all string content types

Elian Doran241282296e77
diff --git a/apps/server/src/services/llm/tools.ts b/apps/server/src/services/llm/tools.ts
index 9d62ef9c15..00e33b179b 100644
--- a/apps/server/src/services/llm/tools.ts
+++ b/apps/server/src/services/llm/tools.ts
@@ -138,8 +138,8 @@ export const appendToNote = tool({
if (note.isProtected) {
return { error: "Note is protected and cannot be modified" };
}
- if (note.type !== "text" && note.type !== "code") {
- return { error: `Cannot append to note type: ${note.type}` };
+ if (!note.hasStringContent()) {
+ return { error: `Cannot update content for note type: ${note.type}` };
}
const existingContent = note.getContent();