{sidebar &&
{title &&
-
{typeof title === "string" ? title : title}
+ {title}
}
{sidebar}
}
diff --git a/apps/server/src/etapi/notes.ts b/apps/server/src/etapi/notes.ts
index 9949b7abd2..74faf7aabe 100644
--- a/apps/server/src/etapi/notes.ts
+++ b/apps/server/src/etapi/notes.ts
@@ -192,7 +192,7 @@ function register(router: Router) {
eu.route<{ noteId: string }>(router, "post", "/etapi/notes/:noteId/revision", (req, res, next) => {
const note = eu.getAndCheckNote(req.params.noteId);
- const description = req.body?.description || "";
+ const description = typeof req.body?.description === "string" ? req.body.description : "";
note.saveRevision({ description, source: "etapi" });
return res.sendStatus(204);
diff --git a/apps/server/src/routes/api/notes.ts b/apps/server/src/routes/api/notes.ts
index 8aec006a09..e8e7d92ff2 100644
--- a/apps/server/src/routes/api/notes.ts
+++ b/apps/server/src/routes/api/notes.ts
@@ -351,7 +351,7 @@ function forceSaveRevision(req: Request<{ noteId: string }>) {
throw new ValidationError(`Note revision of a protected note cannot be created outside of a protected session.`);
}
- const description = req.body?.description || "";
+ const description = typeof req.body?.description === "string" ? req.body.description : "";
const revision = note.saveRevision({ description, source: "manual" });
return {
diff --git a/apps/server/src/services/llm/tools/note_tools.ts b/apps/server/src/services/llm/tools/note_tools.ts
index 8a4ec1c97b..d1ce83e3e0 100644
--- a/apps/server/src/services/llm/tools/note_tools.ts
+++ b/apps/server/src/services/llm/tools/note_tools.ts
@@ -101,11 +101,10 @@ export const noteTools = defineTools({
description: "Replace the entire content of a note. Use this to completely rewrite a note's content. For text notes, provide Markdown content.",
inputSchema: z.object({
noteId: z.string().describe("The ID of the note to update"),
- content: z.string().describe("The new content for the note (Markdown for text notes, plain text for code notes)"),
- changeDescription: z.string().describe("A concise description of what was changed and why (e.g. 'Fix typos in introduction', 'Add section on error handling'). Keep it short, under 100 characters.")
+ content: z.string().describe("The new content for the note (Markdown for text notes, plain text for code notes)")
}),
mutates: true,
- execute: ({ noteId, content, changeDescription }) => {
+ execute: ({ noteId, content }) => {
const note = becca.getNote(noteId);
if (!note) {
return { error: "Note not found" };
@@ -117,7 +116,7 @@ export const noteTools = defineTools({
return { error: `Cannot update content for note type: ${note.type}` };
}
- note.saveRevision({ description: changeDescription, source: "llm" });
+ note.saveRevision({ source: "llm" });
setNoteContentFromLlm(note, content);
return {
success: true,
@@ -131,11 +130,10 @@ export const noteTools = defineTools({
description: "Append content to the end of an existing note. For text notes, provide Markdown content.",
inputSchema: z.object({
noteId: z.string().describe("The ID of the note to append to"),
- content: z.string().describe("The content to append (Markdown for text notes, plain text for code notes)"),
- changeDescription: z.string().describe("A concise description of what was appended (e.g. 'Add meeting notes for May 15', 'Append troubleshooting section'). Keep it short, under 100 characters.")
+ content: z.string().describe("The content to append (Markdown for text notes, plain text for code notes)")
}),
mutates: true,
- execute: ({ noteId, content, changeDescription }) => {
+ execute: ({ noteId, content }) => {
const note = becca.getNote(noteId);
if (!note) {
return { error: "Note not found" };
@@ -160,7 +158,7 @@ export const noteTools = defineTools({
newContent = existingContent + (existingContent.endsWith("\n") ? "" : "\n") + content;
}
- note.saveRevision({ description: changeDescription, source: "llm" });
+ note.saveRevision({ source: "llm" });
note.setContent(newContent);
return {
success: true,