Round-2 bake-off confirms haiku dominates on every dimension (summarize 100/100/100,
timeline date_acc 95.8%). Flip UI defaults from azure_mini to claude_haiku for both
tools. Azure options remain available.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Summarize: new depth param (brief/standard/detailed) with depth-aware prompt
instructions and coverage mandate; wired through API + JS
- Korrespond: new letter length param (concise/standard/detailed) injected as
Lengde: instruction in draft pass; wired through API + JS
- Korrespond draft prompt: add §-discipline rule (cite only directly relevant §§)
plus Opphevet guard (aligned with dobetterlegal-tools)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add doc_picker_btn/audio_picker_btn to i18n.php (en/no/uk/pl), add
docPickerBtn to REDACT_I18N + TIMELINE_I18N and audioPickerBtn to
TRANSCRIBE_I18N in tools.js. PHP-render picker labels in legal-analysis,
translate, summarize, tool_form, and layout_footer using dbnToolsT().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- summarize.php: full custom inline form (replaces tool_form.php wrapper) with
lang switcher, azure_mini/azure_full/gpu engine selector, 8 corpus-slice
toggles (all off by default), doc picker, file upload zone, and textarea
- api/summarize.php: rewritten to streaming NDJSON (matches barnevernet pattern);
accepts JSON payload with text, language, engine, slices[], doc_ids[]
- includes/LegalTools.php: adds corpusContextForSummarize() (keyword search via
ClientRagPipeline) and summarizeWithContext() (engine-aware LLM call with
optional corpus prepend); returns structured JSON matching existing summarize format
- assets/js/summarize.js: self-contained IIFE handling file upload via
api/extract.php, slice toggles, NDJSON stream reader, result rendering,
and trace panel update
- includes/i18n.php: adds 'summarize' to nav in all 4 languages (EN/NO/UK/PL),
inserted after 'redact' in the tool order with icon 'SZ'
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Split monolithic index.php into per-tool pages (ask, search, summarize,
timeline, redact, transcribe), each with its own URL and bookmarkable state
- Shared shell: includes/layout.php + layout_footer.php; shared form:
includes/tool_form.php used by all text-tool pages
- index.php now redirects authenticated users to ask.php; unauthenticated
users see the login gate only
- transcribe.php: engine selector (GPU/OpenAI/Azure), model size (small/
medium/large-v3), diarize, language, expert settings (beam, VAD, task,
initial prompt)
- api/transcribe.php: engine routing — GPU (cuttlefish), OpenAI BYOK,
Azure AI Speech; passes model/beam/task/vad/prompt to Whisper server
- tools.js: data-active-tool body attr drives setTool() on load; <a> nav
tabs skip click listeners; null guards on form/passcodeForm; engine radio
toggle shows/hides BYOK key inputs and model selector; RTF shown in status
- tools.css: styles for BYOK inputs, expert settings panel, prompt textarea
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>