Skip to content

Commit

Permalink
Merge branch 'corpus-dev' into fix-505
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Dec 12, 2024
2 parents 3c39035 + fdb86b5 commit 6ba57ab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ragna/deploy/_ui/central_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,17 @@ def on_click_chat_info_wrapper(self, event):
# `MetadataFilter`s provided as dict
title = "Metadata Filters"

metadata_filters_readable = str(
MetadataFilter.from_primitive(self.current_chat["metadata"]["input"])
).replace("\n", "<br>")
metadata_filters_readable = (
str(
MetadataFilter.from_primitive(
self.current_chat["metadata"]["input"]
)
)
.replace("\n", "<br>")
.replace(" ", "&nbsp;")
)

details = f"<div class='details details_block' style='display:block;'>{metadata_filters_readable}</div><br />\n\n"
details = f"<div class='details details_block' style='display:block;'><pre>{metadata_filters_readable}</pre></div><br />\n\n"
grid_height = 1

elif self.current_chat["metadata"]["input"] is None:
Expand Down
7 changes: 7 additions & 0 deletions ragna/deploy/_ui/css/chat_info/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@
:host(.chat_info_markdown) ul {
list-style-type: none;
}

:host(.chat_info_markdown) .details_block pre {
width: calc(100% - 10px);
overflow-x: scroll;
padding-right: 10px;
margin-right: 10px;
}

0 comments on commit 6ba57ab

Please sign in to comment.