Basic handling of non-AI response

This commit is contained in:
shamoon 2025-04-23 09:25:54 -07:00
parent a59fe0cb3c
commit 5cd54f833a
No known key found for this signature in database

View File

@ -17,26 +17,31 @@
</button> </button>
<div ngbDropdownMenu aria-labelledby="suggestionsDropdown" class="shadow suggestions-dropdown"> <div ngbDropdownMenu aria-labelledby="suggestionsDropdown" class="shadow suggestions-dropdown">
<div class="list-group list-group-flush small"> <div class="list-group list-group-flush small pb-0">
@if (suggestions?.suggested_tags.length > 0) { @if (!suggestions?.suggested_tags && !suggestions?.suggested_document_types && !suggestions?.suggested_correspondents) {
<small class="list-group-item text-uppercase text-muted small">Tags</small> <div class="list-group-item text-muted fst-italic">
@for (tag of suggestions.suggested_tags; track tag) { <small class="text-muted small fst-italic" i18n>No novel suggestions</small>
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addTag.emit(tag)" i18n>{{ tag }}</button> </div>
} }
@if (suggestions?.suggested_tags?.length > 0) {
<small class="list-group-item text-uppercase text-muted small">Tags</small>
@for (tag of suggestions.suggested_tags; track tag) {
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addTag.emit(tag)" i18n>{{ tag }}</button>
} }
@if (suggestions?.suggested_document_types.length > 0) { }
<div class="list-group-item text-uppercase text-muted small">Document Types</div> @if (suggestions?.suggested_document_types?.length > 0) {
@for (type of suggestions.suggested_document_types; track type) { <div class="list-group-item text-uppercase text-muted small">Document Types</div>
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addDocumentType.emit(type)" i18n>{{ type }}</button> @for (type of suggestions.suggested_document_types; track type) {
} <button type="button" class="list-group-item list-group-item-action bg-light" (click)="addDocumentType.emit(type)" i18n>{{ type }}</button>
} }
@if (suggestions?.suggested_correspondents.length > 0) { }
<div class="list-group-item text-uppercase text-muted small">Correspondents</div> @if (suggestions?.suggested_correspondents?.length > 0) {
@for (correspondent of suggestions.suggested_correspondents; track correspondent) { <div class="list-group-item text-uppercase text-muted small">Correspondents</div>
<button type="button" class="list-group-item list-group-item-action bg-light" (click)="addCorrespondent.emit(correspondent)" i18n>{{ correspondent }}</button> @for (correspondent of suggestions.suggested_correspondents; track correspondent) {
} <button type="button" class="list-group-item list-group-item-action bg-light" (click)="addCorrespondent.emit(correspondent)" i18n>{{ correspondent }}</button>
} }
</div> }
</div>
</div> </div>
</div> </div>
</div> </div>