diff --git a/client/src/components/Assistant/assistantParts.ts b/client/src/components/Assistant/assistantParts.ts index d0cd58bd7..5ba2dd7ee 100644 --- a/client/src/components/Assistant/assistantParts.ts +++ b/client/src/components/Assistant/assistantParts.ts @@ -440,6 +440,8 @@ export const CHANGE_LABELS: Record> = { const dayId = id(args, 'dayId'); const rows = new Rows() .add('day', dayLabel(ctx, dayId)) - .add('time', text(args.time)) + .add('content', text(args.time)) .add('icon', text(args.icon)) .add('color', text(args.color)); return { subject: text(args.text), rows, dayId, placeIds: [] }; @@ -203,8 +203,8 @@ const DESCRIBERS: Readonly> = { update_day_note: (ctx, args) => { const note = ctx.card.notes.get(id(args, 'noteId') ?? 0); const rows = new Rows(); - if (has(args, 'text')) rows.change('text', note?.text ?? null, text(args.text)); - if (has(args, 'time')) rows.change('time', note?.time ?? null, text(args.time)); + if (has(args, 'text')) rows.change('title', note?.text ?? null, text(args.text)); + if (has(args, 'time')) rows.change('content', note?.time ?? null, text(args.time)); if (has(args, 'icon')) rows.change('icon', note?.icon ?? null, text(args.icon)); if (has(args, 'color')) rows.change('color', note?.color ?? null, text(args.color)); return { subject: note?.text ?? text(args.text), rows, dayId: id(args, 'dayId'), placeIds: [] }; diff --git a/server/src/nest/day-notes/day-notes.mcp.ts b/server/src/nest/day-notes/day-notes.mcp.ts index eda1467fa..892ad3961 100644 --- a/server/src/nest/day-notes/day-notes.mcp.ts +++ b/server/src/nest/day-notes/day-notes.mcp.ts @@ -11,7 +11,13 @@ import { } from '../../nest-mcp'; import { McpToolGuardsService } from '../mcp-shared/mcp-tool-guards.service'; import { DayNotesService } from './day-notes.service'; -import { idSchema, NOTE_COLORS, type NoteColor } from '@trek/shared'; +import { + dayNoteCreateRequestSchema, + dayNoteUpdateRequestSchema, + idSchema, + NOTE_COLORS, + type NoteColor, +} from '@trek/shared'; import { z } from 'zod'; @@ -23,6 +29,18 @@ import { z } from 'zod'; */ const noteColorSchema = z.enum(NOTE_COLORS); +/** + * The note's two text fields carry their names from the time a note was a line + * with a clock time: `text` is the heading and `time` the Markdown body under it. + * The REST contract holds the bounds, so a note written in the planner can always + * be edited here; the descriptions are what tells a model which field is which. + */ +const NOTE_TITLE = 'The note title, shown as its heading in the day plan. Keep it short'; +const NOTE_BODY = + 'The note body shown under the title: details, links, reminders, Markdown allowed. ' + + 'Despite the field name this is the content, not a clock time'; +const noteTitleSchema = dayNoteCreateRequestSchema.shape.text.describe(NOTE_TITLE); + function parseId(value: string | string[]): number | null { const n = Number(Array.isArray(value) ? value[0] : value); return Number.isInteger(n) && n > 0 ? n : null; @@ -52,12 +70,12 @@ export class DayNotesMcp { @Tool({ name: 'create_day_note', - description: 'Add a note to a specific day in a trip.', + description: 'Add a note to a specific day in a trip: a title in `text` and its body in `time`.', inputSchema: { tripId: idSchema, dayId: idSchema, - text: z.string().min(1).max(500), - time: z.string().max(250).optional().describe('Time label (e.g. "09:00" or "Morning")'), + text: noteTitleSchema, + time: dayNoteCreateRequestSchema.shape.time.describe(NOTE_BODY), icon: z.string().max(64).optional().describe('Emoji icon for the note'), color: noteColorSchema .nullable() @@ -86,7 +104,7 @@ export class DayNotesMcp { tripId: number; dayId: number; text: string; - time?: string; + time?: string | null; icon?: string; color?: NoteColor | null; sort_order?: number; @@ -104,18 +122,14 @@ export class DayNotesMcp { @Tool({ name: 'update_day_note', - description: 'Edit an existing note on a specific day.', + description: 'Edit an existing note on a specific day: its title is `text`, its body `time`.', inputSchema: { tripId: idSchema, dayId: idSchema, noteId: idSchema, - text: z.string().min(1).max(500).optional(), - time: z - .string() - .max(250) - .nullable() - .optional() - .describe('Time label (e.g. "09:00" or "Morning"), or null to clear'), + // The create bound, so an update cannot blank the title the planner requires. + text: noteTitleSchema.optional(), + time: dayNoteUpdateRequestSchema.shape.time.describe(`${NOTE_BODY}, or null to clear it`), icon: z.string().max(64).optional().describe('Emoji icon for the note'), color: noteColorSchema .nullable() diff --git a/server/tests/unit/mcp/tools-notes.test.ts b/server/tests/unit/mcp/tools-notes.test.ts index 2b8541291..4ab0ee7f8 100644 --- a/server/tests/unit/mcp/tools-notes.test.ts +++ b/server/tests/unit/mcp/tools-notes.test.ts @@ -99,6 +99,43 @@ describe('Tool: create_day_note', () => { }); }); + it('describes text as the title and time as the body, as the planner shows them', async () => { + const { user } = createUser(testDb); + await withHarness(user.id, async (h) => { + const { tools } = await h.client.listTools(); + for (const name of ['create_day_note', 'update_day_note']) { + const props = tools.find((t) => t.name === name)?.inputSchema.properties as Record; + // The nullable body may come out as an anyOf, so read the property whole. + const time = JSON.stringify(props.time); + expect(JSON.stringify(props.text)).toMatch(/title/i); + expect(time).toMatch(/body/i); + expect(time).not.toMatch(/time label/i); + expect(time).toContain('"maxLength":2000'); + } + }); + }); + + it('takes a body of 2000 characters, the bound the planner allows, and refuses one more', async () => { + const { user } = createUser(testDb); + const trip = createTrip(testDb, user.id); + const day = createDay(testDb, trip.id); + await withHarness(user.id, async (h) => { + const body = 'b'.repeat(2000); + const result = await h.client.callTool({ + name: 'create_day_note', + arguments: { tripId: trip.id, dayId: day.id, text: 'Museum day', time: body }, + }); + const data = parseToolResult(result) as any; + expect((await dayNote(data.note.id)).time).toBe(body); + const tooLong = await h.client.callTool({ + name: 'create_day_note', + arguments: { tripId: trip.id, dayId: day.id, text: 'Museum day', time: `${body}b` }, + }); + expect(tooLong.isError).toBe(true); + expect(await countRows(orm, DayNotes, { day: day.id })).toBe(1); + }); + }); + it('defaults icon to 📝', async () => { const { user } = createUser(testDb); const trip = createTrip(testDb, user.id); @@ -220,6 +257,45 @@ describe('Tool: update_day_note', () => { }); }); + it('edits a note whose body is longer than 250 characters without shortening it', async () => { + const { user } = createUser(testDb); + const trip = createTrip(testDb, user.id); + const day = createDay(testDb, trip.id); + const longBody = 'Opening hours and the ticket links. '.repeat(20); + const note = createDayNote(testDb, day.id, trip.id, { text: 'Museum day', time: longBody }); + await withHarness(user.id, async (h) => { + const renamed = await h.client.callTool({ + name: 'update_day_note', + arguments: { tripId: trip.id, dayId: day.id, noteId: note.id, text: 'Museums' }, + }); + expect(renamed.isError).toBeFalsy(); + const longer = `${longBody}Bring the pass.`; + const rewritten = await h.client.callTool({ + name: 'update_day_note', + arguments: { tripId: trip.id, dayId: day.id, noteId: note.id, time: longer }, + }); + expect(rewritten.isError).toBeFalsy(); + const row = await dayNote(note.id); + expect(row.text).toBe('Museums'); + expect(row.time).toBe(longer); + }); + }); + + it('refuses an empty title on update and keeps the stored one', async () => { + const { user } = createUser(testDb); + const trip = createTrip(testDb, user.id); + const day = createDay(testDb, trip.id); + const note = createDayNote(testDb, day.id, trip.id, { text: 'Keep me' }); + await withHarness(user.id, async (h) => { + const result = await h.client.callTool({ + name: 'update_day_note', + arguments: { tripId: trip.id, dayId: day.id, noteId: note.id, text: '' }, + }); + expect(result.isError).toBe(true); + expect((await dayNote(note.id)).text).toBe('Keep me'); + }); + }); + it('trims text whitespace', async () => { const { user } = createUser(testDb); const trip = createTrip(testDb, user.id); diff --git a/server/tests/unit/nest/assistant/tool-call-preview.helpers.test.ts b/server/tests/unit/nest/assistant/tool-call-preview.helpers.test.ts index e2bf76a42..e58af2d05 100644 --- a/server/tests/unit/nest/assistant/tool-call-preview.helpers.test.ts +++ b/server/tests/unit/nest/assistant/tool-call-preview.helpers.test.ts @@ -142,7 +142,7 @@ describe('describeToolCall', () => { }); expect(describe_('update_day_note', { dayId: 31, noteId: 41, time: null })).toMatchObject({ subject: 'Rail pass', - rows: [{ op: 'change', labelKey: 'time', before: '09:00', after: '' }], + rows: [{ op: 'change', labelKey: 'content', before: '09:00', after: '' }], }); expect(describe_('create_day_note', { dayId: 33, text: 'Laundry', icon: '🧺' }).rows).toEqual([ { op: 'add', labelKey: 'day', before: null, after: 'Spare day' }, diff --git a/shared/src/assistant/assistant.schema.ts b/shared/src/assistant/assistant.schema.ts index f9875e862..8fcd96c1d 100644 --- a/shared/src/assistant/assistant.schema.ts +++ b/shared/src/assistant/assistant.schema.ts @@ -154,6 +154,9 @@ export const ASSISTANT_CHANGE_LABEL_KEYS = [ 'currency', 'stopType', 'text', + // A day note's heading and its body; `text` and `time` stay for rows already stored. + 'title', + 'content', 'icon', 'color', 'position', diff --git a/shared/src/i18n/ar/assistant.ts b/shared/src/i18n/ar/assistant.ts index d7de4b89c..d277f5559 100644 --- a/shared/src/i18n/ar/assistant.ts +++ b/shared/src/i18n/ar/assistant.ts @@ -191,6 +191,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'العملة', 'assistant.change.label.stopType': 'نوع التوقف', 'assistant.change.label.text': 'النص', + 'assistant.change.label.title': 'العنوان', + 'assistant.change.label.content': 'المحتوى', 'assistant.change.label.icon': 'الأيقونة', 'assistant.change.label.color': 'اللون', 'assistant.change.label.position': 'الترتيب', diff --git a/shared/src/i18n/az/assistant.ts b/shared/src/i18n/az/assistant.ts index a05d2f8ad..f7b13568b 100644 --- a/shared/src/i18n/az/assistant.ts +++ b/shared/src/i18n/az/assistant.ts @@ -182,6 +182,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Valyuta', 'assistant.change.label.stopType': 'Dayanacaq növü', 'assistant.change.label.text': 'Mətn', + 'assistant.change.label.title': 'Başlıq', + 'assistant.change.label.content': 'Məzmun', 'assistant.change.label.icon': 'İkon', 'assistant.change.label.color': 'Rəng', 'assistant.change.label.position': 'Sıra', diff --git a/shared/src/i18n/br/assistant.ts b/shared/src/i18n/br/assistant.ts index c763fc59c..e704d028c 100644 --- a/shared/src/i18n/br/assistant.ts +++ b/shared/src/i18n/br/assistant.ts @@ -182,6 +182,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Moeda', 'assistant.change.label.stopType': 'Tipo de parada', 'assistant.change.label.text': 'Texto', + 'assistant.change.label.title': 'Título', + 'assistant.change.label.content': 'Conteúdo', 'assistant.change.label.icon': 'Ícone', 'assistant.change.label.color': 'Cor', 'assistant.change.label.position': 'Ordem', diff --git a/shared/src/i18n/ca/assistant.ts b/shared/src/i18n/ca/assistant.ts index 96d7447f0..3ae758601 100644 --- a/shared/src/i18n/ca/assistant.ts +++ b/shared/src/i18n/ca/assistant.ts @@ -183,6 +183,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Moneda', 'assistant.change.label.stopType': 'Tipus de parada', 'assistant.change.label.text': 'Text', // same-as-en + 'assistant.change.label.title': 'Títol', + 'assistant.change.label.content': 'Contingut', 'assistant.change.label.icon': 'Icona', 'assistant.change.label.color': 'Color', 'assistant.change.label.position': 'Ordre', diff --git a/shared/src/i18n/cs/assistant.ts b/shared/src/i18n/cs/assistant.ts index 3d3cdb268..1ba3d68ad 100644 --- a/shared/src/i18n/cs/assistant.ts +++ b/shared/src/i18n/cs/assistant.ts @@ -184,6 +184,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Měna', 'assistant.change.label.stopType': 'Typ zastávky', 'assistant.change.label.text': 'Text', // same-as-en + 'assistant.change.label.title': 'Název', + 'assistant.change.label.content': 'Obsah', 'assistant.change.label.icon': 'Ikona', 'assistant.change.label.color': 'Barva', 'assistant.change.label.position': 'Pořadí', diff --git a/shared/src/i18n/de/assistant.ts b/shared/src/i18n/de/assistant.ts index 3aedabdbb..c6d120b57 100644 --- a/shared/src/i18n/de/assistant.ts +++ b/shared/src/i18n/de/assistant.ts @@ -182,6 +182,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Währung', 'assistant.change.label.stopType': 'Art des Stopps', 'assistant.change.label.text': 'Text', // same-as-en + 'assistant.change.label.title': 'Titel', + 'assistant.change.label.content': 'Inhalt', 'assistant.change.label.icon': 'Symbol', 'assistant.change.label.color': 'Farbe', 'assistant.change.label.position': 'Reihenfolge', diff --git a/shared/src/i18n/en/assistant.ts b/shared/src/i18n/en/assistant.ts index 93025da13..33857f751 100644 --- a/shared/src/i18n/en/assistant.ts +++ b/shared/src/i18n/en/assistant.ts @@ -178,6 +178,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Currency', 'assistant.change.label.stopType': 'Stop type', 'assistant.change.label.text': 'Text', + 'assistant.change.label.title': 'Title', + 'assistant.change.label.content': 'Content', 'assistant.change.label.icon': 'Icon', 'assistant.change.label.color': 'Colour', 'assistant.change.label.position': 'Position', diff --git a/shared/src/i18n/es/assistant.ts b/shared/src/i18n/es/assistant.ts index 6042bbf0e..b8d09b43d 100644 --- a/shared/src/i18n/es/assistant.ts +++ b/shared/src/i18n/es/assistant.ts @@ -181,6 +181,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Moneda', 'assistant.change.label.stopType': 'Tipo de parada', 'assistant.change.label.text': 'Texto', + 'assistant.change.label.title': 'Título', + 'assistant.change.label.content': 'Contenido', 'assistant.change.label.icon': 'Icono', 'assistant.change.label.color': 'Color', 'assistant.change.label.position': 'Orden', diff --git a/shared/src/i18n/et/assistant.ts b/shared/src/i18n/et/assistant.ts index 2d9865931..6452cd66b 100644 --- a/shared/src/i18n/et/assistant.ts +++ b/shared/src/i18n/et/assistant.ts @@ -182,6 +182,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Valuuta', 'assistant.change.label.stopType': 'Peatuse tüüp', 'assistant.change.label.text': 'Tekst', + 'assistant.change.label.title': 'Pealkiri', + 'assistant.change.label.content': 'Sisu', 'assistant.change.label.icon': 'Ikoon', 'assistant.change.label.color': 'Värv', 'assistant.change.label.position': 'Järjekord', diff --git a/shared/src/i18n/fr/assistant.ts b/shared/src/i18n/fr/assistant.ts index 138c989d1..453110166 100644 --- a/shared/src/i18n/fr/assistant.ts +++ b/shared/src/i18n/fr/assistant.ts @@ -183,6 +183,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Devise', 'assistant.change.label.stopType': 'Type d’arrêt', 'assistant.change.label.text': 'Texte', + 'assistant.change.label.title': 'Titre', + 'assistant.change.label.content': 'Contenu', 'assistant.change.label.icon': 'Icône', 'assistant.change.label.color': 'Couleur', 'assistant.change.label.position': 'Ordre', diff --git a/shared/src/i18n/gr/assistant.ts b/shared/src/i18n/gr/assistant.ts index 79a09a958..6e6a29504 100644 --- a/shared/src/i18n/gr/assistant.ts +++ b/shared/src/i18n/gr/assistant.ts @@ -185,6 +185,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Νόμισμα', 'assistant.change.label.stopType': 'Τύπος στάσης', 'assistant.change.label.text': 'Κείμενο', + 'assistant.change.label.title': 'Τίτλος', + 'assistant.change.label.content': 'Περιεχόμενο', 'assistant.change.label.icon': 'Εικονίδιο', 'assistant.change.label.color': 'Χρώμα', 'assistant.change.label.position': 'Σειρά', diff --git a/shared/src/i18n/hu/assistant.ts b/shared/src/i18n/hu/assistant.ts index 618f87d41..75f9953f0 100644 --- a/shared/src/i18n/hu/assistant.ts +++ b/shared/src/i18n/hu/assistant.ts @@ -184,6 +184,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Pénznem', 'assistant.change.label.stopType': 'Megálló típusa', 'assistant.change.label.text': 'Szöveg', + 'assistant.change.label.title': 'Cím', + 'assistant.change.label.content': 'Tartalom', 'assistant.change.label.icon': 'Ikon', 'assistant.change.label.color': 'Szín', 'assistant.change.label.position': 'Pozíció', diff --git a/shared/src/i18n/id/assistant.ts b/shared/src/i18n/id/assistant.ts index bc012b635..6cbb4e18d 100644 --- a/shared/src/i18n/id/assistant.ts +++ b/shared/src/i18n/id/assistant.ts @@ -176,6 +176,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Mata uang', 'assistant.change.label.stopType': 'Jenis pemberhentian', 'assistant.change.label.text': 'Teks', + 'assistant.change.label.title': 'Judul', + 'assistant.change.label.content': 'Isi', 'assistant.change.label.icon': 'Ikon', 'assistant.change.label.color': 'Warna', 'assistant.change.label.position': 'Posisi', diff --git a/shared/src/i18n/it/assistant.ts b/shared/src/i18n/it/assistant.ts index c851cac98..fa6645279 100644 --- a/shared/src/i18n/it/assistant.ts +++ b/shared/src/i18n/it/assistant.ts @@ -184,6 +184,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Valuta', 'assistant.change.label.stopType': 'Tipo di tappa', 'assistant.change.label.text': 'Testo', + 'assistant.change.label.title': 'Titolo', + 'assistant.change.label.content': 'Contenuto', 'assistant.change.label.icon': 'Icona', 'assistant.change.label.color': 'Colore', 'assistant.change.label.position': 'Posizione', diff --git a/shared/src/i18n/ja/assistant.ts b/shared/src/i18n/ja/assistant.ts index 5101c1bc2..1e0444442 100644 --- a/shared/src/i18n/ja/assistant.ts +++ b/shared/src/i18n/ja/assistant.ts @@ -176,6 +176,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': '通貨', 'assistant.change.label.stopType': '立ち寄りの種類', 'assistant.change.label.text': 'テキスト', + 'assistant.change.label.title': 'タイトル', + 'assistant.change.label.content': '内容', 'assistant.change.label.icon': 'アイコン', 'assistant.change.label.color': '色', 'assistant.change.label.position': '位置', diff --git a/shared/src/i18n/ko/assistant.ts b/shared/src/i18n/ko/assistant.ts index 90e3fd33f..ba61e34ae 100644 --- a/shared/src/i18n/ko/assistant.ts +++ b/shared/src/i18n/ko/assistant.ts @@ -174,6 +174,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': '통화', 'assistant.change.label.stopType': '경유지 유형', 'assistant.change.label.text': '텍스트', + 'assistant.change.label.title': '제목', + 'assistant.change.label.content': '내용', 'assistant.change.label.icon': '아이콘', 'assistant.change.label.color': '색상', 'assistant.change.label.position': '위치', diff --git a/shared/src/i18n/nl/assistant.ts b/shared/src/i18n/nl/assistant.ts index 718190ebc..4394f48a8 100644 --- a/shared/src/i18n/nl/assistant.ts +++ b/shared/src/i18n/nl/assistant.ts @@ -182,6 +182,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Valuta', 'assistant.change.label.stopType': 'Soort stop', 'assistant.change.label.text': 'Tekst', + 'assistant.change.label.title': 'Titel', + 'assistant.change.label.content': 'Inhoud', 'assistant.change.label.icon': 'Pictogram', 'assistant.change.label.color': 'Kleur', 'assistant.change.label.position': 'Positie', diff --git a/shared/src/i18n/pl/assistant.ts b/shared/src/i18n/pl/assistant.ts index 6cef78538..bdc7859d4 100644 --- a/shared/src/i18n/pl/assistant.ts +++ b/shared/src/i18n/pl/assistant.ts @@ -189,6 +189,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Waluta', 'assistant.change.label.stopType': 'Rodzaj przystanku', 'assistant.change.label.text': 'Tekst', + 'assistant.change.label.title': 'Tytuł', + 'assistant.change.label.content': 'Treść', 'assistant.change.label.icon': 'Ikona', 'assistant.change.label.color': 'Kolor', 'assistant.change.label.position': 'Pozycja', diff --git a/shared/src/i18n/ru/assistant.ts b/shared/src/i18n/ru/assistant.ts index e8c1a5869..ea6ad02f2 100644 --- a/shared/src/i18n/ru/assistant.ts +++ b/shared/src/i18n/ru/assistant.ts @@ -189,6 +189,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Валюта', 'assistant.change.label.stopType': 'Тип остановки', 'assistant.change.label.text': 'Текст', + 'assistant.change.label.title': 'Заголовок', + 'assistant.change.label.content': 'Содержание', 'assistant.change.label.icon': 'Значок', 'assistant.change.label.color': 'Цвет', 'assistant.change.label.position': 'Позиция', diff --git a/shared/src/i18n/sk/assistant.ts b/shared/src/i18n/sk/assistant.ts index 03a5d7ba5..59980ca8b 100644 --- a/shared/src/i18n/sk/assistant.ts +++ b/shared/src/i18n/sk/assistant.ts @@ -184,6 +184,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Mena', 'assistant.change.label.stopType': 'Typ zastávky', 'assistant.change.label.text': 'Text', // same-as-en + 'assistant.change.label.title': 'Názov', + 'assistant.change.label.content': 'Obsah', 'assistant.change.label.icon': 'Ikona', 'assistant.change.label.color': 'Farba', 'assistant.change.label.position': 'Poradie', diff --git a/shared/src/i18n/sv/assistant.ts b/shared/src/i18n/sv/assistant.ts index 55fe59b8f..5849b8fd3 100644 --- a/shared/src/i18n/sv/assistant.ts +++ b/shared/src/i18n/sv/assistant.ts @@ -183,6 +183,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Valuta', 'assistant.change.label.stopType': 'Typ av stopp', 'assistant.change.label.text': 'Text', // same-as-en + 'assistant.change.label.title': 'Titel', + 'assistant.change.label.content': 'Innehåll', 'assistant.change.label.icon': 'Ikon', 'assistant.change.label.color': 'Färg', 'assistant.change.label.position': 'Position', // same-as-en diff --git a/shared/src/i18n/th/assistant.ts b/shared/src/i18n/th/assistant.ts index 484b2c6f8..cf315437a 100644 --- a/shared/src/i18n/th/assistant.ts +++ b/shared/src/i18n/th/assistant.ts @@ -174,6 +174,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'สกุลเงิน', 'assistant.change.label.stopType': 'ประเภทจุดแวะ', 'assistant.change.label.text': 'ข้อความ', + 'assistant.change.label.title': 'หัวข้อ', + 'assistant.change.label.content': 'เนื้อหา', 'assistant.change.label.icon': 'ไอคอน', 'assistant.change.label.color': 'สี', 'assistant.change.label.position': 'ลำดับ', diff --git a/shared/src/i18n/tr/assistant.ts b/shared/src/i18n/tr/assistant.ts index 76b0ad8c0..c253f5dc6 100644 --- a/shared/src/i18n/tr/assistant.ts +++ b/shared/src/i18n/tr/assistant.ts @@ -181,6 +181,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Para birimi', 'assistant.change.label.stopType': 'Durak türü', 'assistant.change.label.text': 'Metin', + 'assistant.change.label.title': 'Başlık', + 'assistant.change.label.content': 'İçerik', 'assistant.change.label.icon': 'Simge', 'assistant.change.label.color': 'Renk', 'assistant.change.label.position': 'Sıra', diff --git a/shared/src/i18n/uk/assistant.ts b/shared/src/i18n/uk/assistant.ts index fb04854ba..50e336f6b 100644 --- a/shared/src/i18n/uk/assistant.ts +++ b/shared/src/i18n/uk/assistant.ts @@ -189,6 +189,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Валюта', 'assistant.change.label.stopType': 'Тип зупинки', 'assistant.change.label.text': 'Текст', + 'assistant.change.label.title': 'Заголовок', + 'assistant.change.label.content': 'Вміст', 'assistant.change.label.icon': 'Значок', 'assistant.change.label.color': 'Колір', 'assistant.change.label.position': 'Позиція', diff --git a/shared/src/i18n/vi/assistant.ts b/shared/src/i18n/vi/assistant.ts index baf8b0b36..4224d1cfe 100644 --- a/shared/src/i18n/vi/assistant.ts +++ b/shared/src/i18n/vi/assistant.ts @@ -176,6 +176,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': 'Tiền tệ', 'assistant.change.label.stopType': 'Loại điểm dừng', 'assistant.change.label.text': 'Văn bản', + 'assistant.change.label.title': 'Tiêu đề', + 'assistant.change.label.content': 'Nội dung', 'assistant.change.label.icon': 'Biểu tượng', 'assistant.change.label.color': 'Màu', 'assistant.change.label.position': 'Vị trí', diff --git a/shared/src/i18n/zh-TW/assistant.ts b/shared/src/i18n/zh-TW/assistant.ts index ebde4c656..0dd2552d5 100644 --- a/shared/src/i18n/zh-TW/assistant.ts +++ b/shared/src/i18n/zh-TW/assistant.ts @@ -170,6 +170,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': '貨幣', 'assistant.change.label.stopType': '停靠類型', 'assistant.change.label.text': '文字', + 'assistant.change.label.title': '標題', + 'assistant.change.label.content': '內容', 'assistant.change.label.icon': '圖示', 'assistant.change.label.color': '顏色', 'assistant.change.label.position': '位置', diff --git a/shared/src/i18n/zh/assistant.ts b/shared/src/i18n/zh/assistant.ts index f1b0d1318..1fa89a826 100644 --- a/shared/src/i18n/zh/assistant.ts +++ b/shared/src/i18n/zh/assistant.ts @@ -170,6 +170,8 @@ const assistant: TranslationStrings = { 'assistant.change.label.currency': '货币', 'assistant.change.label.stopType': '停靠类型', 'assistant.change.label.text': '文本', + 'assistant.change.label.title': '标题', + 'assistant.change.label.content': '内容', 'assistant.change.label.icon': '图标', 'assistant.change.label.color': '颜色', 'assistant.change.label.position': '位置', diff --git a/wiki/MCP-Tools-and-Resources.md b/wiki/MCP-Tools-and-Resources.md index ccb1d445c..944d667fe 100644 --- a/wiki/MCP-Tools-and-Resources.md +++ b/wiki/MCP-Tools-and-Resources.md @@ -101,8 +101,8 @@ Requires `trips:read` or `trips:write` scope. | Tool | Description | |---|---| -| `create_day_note` | Add a note to a specific day with optional time label and emoji icon. | -| `update_day_note` | Edit a day note's text, time, or icon. | +| `create_day_note` | Add a note to a specific day: `text` is the title, `time` the Markdown body (up to 2000 characters), plus an optional icon and colour. | +| `update_day_note` | Edit a day note's title (`text`), body (`time`), icon, colour or position. | | `delete_day_note` | Remove a note from a day. | ### Accommodations