Redact: multi-doc upload, contextual person naming, aliases

- Extract limit raised from 32K to 128K chars per file (long legal docs now fit)
- Redact API body/text limits raised (400KB / 128K chars) to match
- Upload zone accepts multiple files (up to 5); extracted text concatenated with
  doc separator and combined before redaction; shows per-file char counts
- LLM redact pass now infers contextual person roles (FATHER, MOTHER, CHILD,
  ATTORNEY, JUDGE, etc.) instead of generic [PERSON] for all names; same
  individual gets consistent tag throughout the document
- Tag validation widened to allow any [A-Za-z0-9_- ] pattern (not just the
  five hardcoded tags), supporting contextual and alias tags
- Alias UI added to Redact mode: user maps real names to bracketed aliases
  (e.g. "David Jr" -> [Junior]); aliases injected into LLM system prompt as
  override instructions; max 20 aliases, 100 chars each
- max_tokens raised from 2000 to 4000; timeout from 60s to 90s for larger docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 07:17:02 +02:00
parent bbe5307c03
commit 95685862ab
6 changed files with 276 additions and 55 deletions
+110
View File
@@ -963,3 +963,113 @@ p {
color: var(--coral);
border-color: #f5c6aa;
}
/* ─── Multi-file list ─────────────────────────────────────────────────────── */
.upload-file-list {
list-style: none;
padding: 0;
margin: 0;
text-align: left;
width: 100%;
}
.upload-file-list li {
display: flex;
align-items: baseline;
gap: 0.5rem;
padding: 2px 0;
font-size: 0.85rem;
}
.upload-chars {
color: var(--muted);
font-size: 0.78rem;
flex-shrink: 0;
}
/* ─── Name aliases (Redact tool) ──────────────────────────────────────────── */
.alias-section {
margin-top: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--line);
}
.alias-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 0.5rem;
}
.alias-add-btn {
background: var(--soft-teal);
color: var(--teal-dark);
border: 1px solid transparent;
border-radius: 6px;
padding: 3px 10px;
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
transition: background 0.12s;
}
.alias-add-btn:hover {
background: #c4ece5;
}
.alias-row {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.4rem;
}
.alias-original,
.alias-label {
flex: 1;
padding: 0.3rem 0.55rem;
border: 1px solid var(--line);
border-radius: 6px;
font-size: 0.875rem;
background: var(--panel);
color: var(--ink);
min-width: 0;
}
.alias-original:focus,
.alias-label:focus {
outline: 3px solid rgba(15, 118, 110, 0.28);
outline-offset: 1px;
border-color: var(--teal);
}
.alias-arrow {
color: var(--muted);
font-size: 1rem;
flex-shrink: 0;
}
.alias-remove {
flex-shrink: 0;
background: transparent;
color: var(--muted);
font-size: 1.1rem;
line-height: 1;
padding: 2px 6px;
border-radius: 4px;
border: 1px solid transparent;
}
.alias-remove:hover {
background: var(--soft-coral);
color: var(--coral);
border-color: #f5c6aa;
}
.alias-hint {
font-size: 0.76rem;
color: var(--muted);
margin: 0.35rem 0 0;
}