Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Surface 8000-char per-value cap on prompt variable inputs with maxlength and a counter
Murtaza Nasir22575b03358b
diff --git a/templates/components/upload-view.html b/templates/components/upload-view.htmlindex 8a6427a9..f1664a67 100644--- a/templates/components/upload-view.html+++ b/templates/components/upload-view.html@@ -337,7 +337,7 @@</button><div v-show="showPromptVariablesPanel" class="mt-2 p-3 bg-[var(--bg-tertiary)] rounded-md space-y-3 border border-[var(--border-secondary)]"><p class="text-[11px] text-[var(--text-muted)] leading-snug">- The selected tag or folder uses prompt placeholders. Fill these in and they'll be substituted into the summarisation prompt for this recording.+ The selected tag or folder uses prompt placeholders. Fill these in and they'll be substituted into the summarisation prompt for this recording. Empty values substitute to an empty string. Up to 8,000 characters per value, 32,000 across all variables.</p><div v-for="variable in selectedPromptVariables" :key="variable.name" class="space-y-1"><label class="block text-xs font-medium text-[var(--text-secondary)]" :for="'pv-' + variable.name">@@ -359,8 +359,12 @@:value="uploadPromptVariables[variable.name] || ''"@input="uploadPromptVariables[variable.name] = $event.target.value"rows="2"+ maxlength="8000":placeholder="'Enter ' + variable.label.toLowerCase() + '...'"class="w-full px-2 py-1 text-sm bg-[var(--bg-primary)] text-[var(--text-primary)] border border-[var(--border-primary)] rounded focus:outline-none focus:ring-1 focus:ring-[var(--ring-focus)] resize-y font-mono"></textarea>+ <div class="flex justify-end text-[10px] text-[var(--text-muted)] font-mono">+ ${ (uploadPromptVariables[variable.name] || '').length } / 8000+ </div></div></div></div>diff --git a/templates/modals/reprocess-modal.html b/templates/modals/reprocess-modal.htmlindex 39e9bc22..6a27eb13 100644--- a/templates/modals/reprocess-modal.html+++ b/templates/modals/reprocess-modal.html@@ -109,7 +109,7 @@Prompt variables</h4><p class="text-xs text-[var(--text-muted)] leading-snug">- These values are substituted into <code>{{ '{{name}}' }}</code> placeholders in the resolved prompt. Edits here are saved on the recording.+ These values are substituted into <code>{{ '{{name}}' }}</code> placeholders in the resolved prompt. Edits here are saved on the recording. Empty values substitute to an empty string. Up to 8,000 characters per value, 32,000 across all variables.</p><div v-for="variable in reprocessAvailableVariables" :key="variable.name" class="space-y-1"><label class="block text-xs font-medium text-[var(--text-secondary)]" :for="'rpv-' + variable.name">@@ -131,8 +131,12 @@:value="reprocessPromptVariables[variable.name] || ''"@input="reprocessPromptVariables[variable.name] = $event.target.value"rows="2"+ maxlength="8000":placeholder="'Enter ' + variable.label.toLowerCase() + '...'"class="w-full px-2 py-1 text-sm bg-[var(--bg-input)] text-[var(--text-primary)] border border-[var(--border-secondary)] rounded focus:outline-none focus:ring-1 focus:ring-[var(--border-focus)] resize-y font-mono"></textarea>+ <div class="flex justify-end text-[10px] text-[var(--text-muted)] font-mono">+ ${ (reprocessPromptVariables[variable.name] || '').length } / 8000+ </div></div></div>