diff --git a/frontend/src/components/ChatMessage.vue b/frontend/src/components/ChatMessage.vue index 63de22d..a859d53 100644 --- a/frontend/src/components/ChatMessage.vue +++ b/frontend/src/components/ChatMessage.vue @@ -81,7 +81,7 @@ const timingParts = computed((): string[] => { class="context-badge" > - Note #{{ message.context_note_id }} + {{ message.context_note_title || `Note #${message.context_note_id}` }} diff --git a/frontend/src/components/ToolCallCard.vue b/frontend/src/components/ToolCallCard.vue index 742ae5e..298494a 100644 --- a/frontend/src/components/ToolCallCard.vue +++ b/frontend/src/components/ToolCallCard.vue @@ -20,6 +20,14 @@ const label = computed(() => { return "Created note"; case "note_updated": return "Updated note"; + case "note_deleted": + return "Deleted note"; + case "task_deleted": + return "Deleted task"; + case "note_content": + return "Note"; + case "notes_list": + return "Notes"; case "tasks": return "Tasks"; case "todo_updated": @@ -166,6 +174,32 @@ const searchResults = computed(() => { return results && results.length > 0 ? results : null; }); +const deletedNote = computed(() => { + const data = props.toolCall.result.data; + const type = props.toolCall.result.type; + if (!data || (type !== "note_deleted" && type !== "task_deleted")) return null; + return data as { id: number; title: string }; +}); + +const noteContent = computed(() => { + const data = props.toolCall.result.data; + if (!data || props.toolCall.result.type !== "note_content") return null; + return data as { id: number; title: string; body: string; tags: string[] }; +}); + +const noteList = computed(() => { + const data = props.toolCall.result.data; + if (!data || props.toolCall.result.type !== "notes_list") return null; + const results = data.results as Array<{ id: number; title: string; tags: string[]; preview: string }> | undefined; + return results ?? []; +}); + +const noteListCount = computed(() => { + const data = props.toolCall.result.data; + if (!data || props.toolCall.result.type !== "notes_list") return 0; + return (data.total as number) ?? 0; +}); + async function applyTag(tag: string) { if (!noteId.value || appliedTags.value.has(tag) || applyingTag.value) return; applyingTag.value = tag; @@ -189,6 +223,30 @@ async function applyTag(tag: string) { + + +