Add user context notes field to timeline tool

Adds an optional textarea below the main text input where users can provide
clarifications to guide the LLM — e.g. year anchors, actor aliases, or focus
instructions. Notes are injected into the prompt as a clearly delimited block
and translated across all four UI languages (en/no/uk/pl).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 12:36:37 +02:00
parent dfb9692f45
commit 28932297b3
4 changed files with 28 additions and 3 deletions
+13
View File
@@ -260,6 +260,9 @@ const TIMELINE_I18N = {
sortDocOrder: 'Document order',
sortChronological: 'Chronological',
timelineExportCsv: 'Download CSV',
timelineNotesLabel: 'Context notes',
timelineNotesPlaceholder: 'Add any clarifications to guide the AI — e.g. "All dates are 2024", "Focus on the mother\'s actions", "D refers to the defendant throughout".',
timelineNotesHint: 'These notes are included in the prompt to help the model interpret ambiguous dates, actors, or abbreviations. Not stored.',
},
no: {
timelineEngine: 'Motor',
@@ -298,6 +301,9 @@ const TIMELINE_I18N = {
sortDocOrder: 'Dokumentrekkefølge',
sortChronological: 'Kronologisk',
timelineExportCsv: 'Last ned CSV',
timelineNotesLabel: 'Kontekstnotes',
timelineNotesPlaceholder: 'Legg til avklaringer for å veilede AI-en — f.eks. "Alle datoer er 2024", "Fokuser på morens handlinger", "D refererer til saksøkte gjennom hele dokumentet".',
timelineNotesHint: 'Disse notatene inkluderes i ledeteksten for å hjelpe modellen med å tolke uklare datoer, aktører eller forkortelser. Lagres ikke.',
},
uk: {
timelineEngine: 'Рушій',
@@ -336,6 +342,9 @@ const TIMELINE_I18N = {
sortDocOrder: 'Порядок документа',
sortChronological: 'Хронологічний',
timelineExportCsv: 'Завантажити CSV',
timelineNotesLabel: 'Контекстні нотатки',
timelineNotesPlaceholder: 'Додайте пояснення для ШІ — напр. "Усі дати відносяться до 2024 року", "Зосередьтесь на діях матері", "D — відповідач по всьому документу".',
timelineNotesHint: 'Ці нотатки включаються до запиту, щоб допомогти моделі інтерпретувати неоднозначні дати, учасників або скорочення. Не зберігаються.',
},
pl: {
timelineEngine: 'Silnik',
@@ -374,6 +383,9 @@ const TIMELINE_I18N = {
sortDocOrder: 'Kolejność dokumentu',
sortChronological: 'Chronologicznie',
timelineExportCsv: 'Pobierz CSV',
timelineNotesLabel: 'Notatki kontekstowe',
timelineNotesPlaceholder: 'Dodaj wyjaśnienia dla AI — np. "Wszystkie daty dotyczą 2024", "Skup się na działaniach matki", "D odnosi się do pozwanego w całym dokumencie".',
timelineNotesHint: 'Te notatki są dołączane do zapytania, aby pomóc modelowi interpretować niejednoznaczne daty, uczestników lub skróty. Nie są przechowywane.',
},
};
@@ -1087,6 +1099,7 @@ async function runTool(event) {
payload.confidence_filter = currentConfidenceFilter();
payload.include_relative = currentIncludeRelative();
payload.include_background = currentIncludeBackground();
payload.user_notes = (document.getElementById('timelineNotes')?.value || '').trim();
}
setBusy(true);