diff --git a/public/components/settings.html b/public/components/settings.html index 3abfa5e..fbf1794 100644 --- a/public/components/settings.html +++ b/public/components/settings.html @@ -151,7 +151,7 @@

My Templates

-

Save reusable templates for physical exam, ROS, encounter format, etc. The AI will use these when generating notes. You can reference them by saying "use my normal physical exam" in dictation.

+

Save reusable templates for physical exam, ROS, encounter format, etc. Only template categories are sent to AI when generating notes. You can reference them by saying "use my normal physical exam" in dictation.

diff --git a/public/index.html b/public/index.html index 9b62030..0e1ff99 100644 --- a/public/index.html +++ b/public/index.html @@ -491,7 +491,7 @@ - + @@ -501,7 +501,7 @@ - + diff --git a/public/js/extensions.js b/public/js/extensions.js index 3b9c787..ad0b9fc 100644 --- a/public/js/extensions.js +++ b/public/js/extensions.js @@ -1,7 +1,6 @@ // ============================================================ // PAGERS & EXTENSIONS — personal directory with async search + soft delete // ============================================================ -(function () { var _inited = false; var _items = []; var _mode = 'active'; // 'active' | 'trash' @@ -352,5 +351,3 @@ if (s == null) return ''; return String(s).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); } - -})(); diff --git a/public/js/memories.js b/public/js/memories.js index ef297bc..d570ba5 100644 --- a/public/js/memories.js +++ b/public/js/memories.js @@ -2,8 +2,6 @@ // MEMORIES.JS — User template/memory storage + settings UI // ============================================================ -(function() { - var _memories = []; var _editingId = null; @@ -18,7 +16,7 @@ template_wellvisit: 'Well Visit Template', template_sickvisit: 'Sick Visit Template', template_ed: 'ED Template', - custom: 'Custom' + custom: 'Custom (not used by AI)' }; // ── Load memories ──────────────────────────────────────────────────────── @@ -176,5 +174,3 @@ } console.log('✅ Memories module loaded'); - -})(); diff --git a/test/module-entrypoints.test.js b/test/module-entrypoints.test.js index 83c10e5..9d9d428 100644 --- a/test/module-entrypoints.test.js +++ b/test/module-entrypoints.test.js @@ -10,7 +10,9 @@ const moduleEntrypoints = [ 'public/js/admin.js', 'public/js/diagrams.js', 'public/js/ed-encounters.js', + 'public/js/extensions.js', 'public/js/hospitalCourse.js', + 'public/js/memories.js', 'public/js/milestones.js', 'public/js/nextcloud.js', 'public/js/notes.js', diff --git a/test/transcription-memory-policy.test.js b/test/transcription-memory-policy.test.js index f7e4fdb..0007a6a 100644 --- a/test/transcription-memory-policy.test.js +++ b/test/transcription-memory-policy.test.js @@ -18,6 +18,15 @@ test('AI memory context is limited to saved template categories', () => { assert.doesNotMatch(route.match(/var AI_CONTEXT_CATEGORIES = \[[\s\S]*?\];/)[0], /'custom'/); }); +test('template settings do not offer new custom AI memories', () => { + const settings = read('public/components/settings.html'); + const memories = read('public/js/memories.js'); + assert.doesNotMatch(settings, /