Make marked alternatives selectable and the document editable on the case page #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Request
When the LLM is unsure, it wraps material in
[...]and/or==...==. On the case page these annotations are currently copied verbatim into the clipboard, so the doctor has to clean them up after pasting into the practice software — defeating the purpose of the annotation.Two improvements are wanted, both on the case page (
server/templates/case_page.html):Current behaviour (verified)
==...==→ highlight.server/src/analyze/render.rs(md_to_html/substitute_marks) converts==text==to<mark>text</mark>; it is the only live HTML injected.[...]→ not specially rendered.render.rsonly handles==; square brackets pass through as literal text.server/prompts/default_system_prompt.md:21— brackets hold the replaced original text.server/prompts/llama_system_prompt.md:8—==Originaltext [<Hinweistext>]==: brackets hold an optional hint.server/prompts/llama_system_prompt.md:18— any non-transcript output "MUSS IN "[...]" GESETZT UND MARKIERT WERDEN".server/prompts/llama_system_prompt.md:22— hints tagged as[Hinweis].server/templates/case_page.html:622injects{{ html|safe }}into a static#doc-bodydiv.#doc-body.innerTextverbatim (server/templates/case_page.html:630), so brackets, hints and marks all land in the clipboard unchanged. This is the reported friction.Claim (unverified, based on the route map in
server/src/routes/mod.rs): there is no write-back route fordocument.jsontoday — only close/reopen/analyze/reset/delete exist. Editing therefore needs a new persistence path.Design considerations / open questions
This is design-heavy and likely warrants a
brainstormspec before implementation. Open points:[...]is too overloaded (replaced-original vs. hint vs. non-transcript marker) to drive selection unambiguously. The annotation syntax in both prompt files andrender.rswould need to be designed together.==/[...]decoration is stripped, so a subsequent copy yields clean text.document.json, and the interaction with re-analysis must be defined (a lateranalyze/resetregeneratesdocument.jsonand would otherwise discard manual edits).#14and the charset normalization in#13.Acceptance checklist
==/[...]artefacts.