{# One document as it was chunked. This is the view that tells a chunking problem apart from a retrieval one, so it shows the units the index is built from rather than the file. #}{% extends layout %} {% import "macros.html" as m %} {% block content %} {% if panels.workbench.ok %} {% set doc = panels.workbench.data.document %}

{{ doc.title or doc.source_id }}

Identifier
{{ doc.id }}
Source
{{ doc.source }} · {{ doc.source_id }}
URI
{{ doc.uri }}
Media type
{{ doc.media_type }}
Status
{{ m.state(doc.status) }}{% if doc.status_detail %} {{ doc.status_detail }}{% endif %}
Content hash
{{ doc.content_hash }}
Blocks
{{ panels.workbench.data.count }} · {{ panels.workbench.data.tokens }} tokens
{# Both identities, side by side, for a document that carries authoritative source metadata. The section above describes the *file*; this describes what the file is a copy of, and the two are shown apart rather than merged so that neither can be read as the other. Every value here is rendered as text, including the canonical URI. It is restricted to http and https before it can be stored, so a link would be safe — but a URI that is never an `href` has no sink to get wrong, and the URI above it is plain text for the same reason. #} {% if doc.provenance %} {% set src = doc.provenance %}

Source

{% if src.unavailable_reason %}

This document has a manifest that could not be used, so it is cited by its local filename. {{ src.unavailable_reason }}

{% endif %}
{% if src.title %}
Title at source
{{ src.title }}
{% endif %} {% if src.canonical_uri %}
Canonical URI
{{ src.canonical_uri }}
{% endif %} {% if src.source_id %}
Source identifier
{{ src.source_id }}
{% endif %} {% if src.version %}
Source version
{{ src.version }}
{% endif %} {% if src.section_path %}
Section
{{ m.trail(src.section_path) }}
{% endif %} {% if src.modified_at %}
Modified at source
{{ src.modified_at }}
{% endif %} {% if src.snapshot_path %}
Local snapshot
{{ src.snapshot_path }}
{% endif %} {% if src.retrieved_at %}
Snapshot taken
{{ src.retrieved_at }}
{% endif %} {% if src.indexed_at %}
Indexed here
{{ src.indexed_at }}
{% endif %}
{% endif %} {# A structured memory's claim and what it rests on. Separate from the Source panel above for the reason that panel gives: a document is a copy of something published elsewhere, or it is a claim that cites where it was said, and showing both in one place would let one be read as the other. #} {% if doc.knowledge %}

Memory

{{ m.knowledge(doc.knowledge) }}
{% endif %}

Blocks

{% if panels.workbench.data.blocks %}
    {% for block in panels.workbench.data.blocks %}
  1. #{{ block.position }} · {{ block.kind }} · {{ block.token_count }} tokens {{ m.trail(block.heading_path) }}

    {{ block.text }}
  2. {% endfor %}
{% else %}{{ m.empty('This document produced no blocks.') }}{% endif %}
{% else %}{{ m.failed(panels.workbench) }}{% endif %} {% endblock %}