If documents have no title display uri alone, ag-ui-example

This commit is contained in:
Yiorgis Gozadinos 2025-12-18 09:42:55 +02:00
parent bf5711f7ab
commit 440ec123c6
No known key found for this signature in database

View file

@ -298,6 +298,7 @@ export default function DocumentSelector({
}} }}
/> />
<div style={{ flex: 1, minWidth: 0 }}> <div style={{ flex: 1, minWidth: 0 }}>
{doc.title && (
<div <div
style={{ style={{
fontSize: "0.875rem", fontSize: "0.875rem",
@ -308,12 +309,18 @@ export default function DocumentSelector({
textOverflow: "ellipsis", textOverflow: "ellipsis",
}} }}
> >
{doc.title || "Untitled"} {doc.title}
</div> </div>
)}
<div <div
style={{ style={{
fontSize: "0.7rem", fontSize: doc.title ? "0.7rem" : "0.875rem",
color: "#718096", fontWeight: doc.title
? "400"
: isSelected
? "600"
: "400",
color: doc.title ? "#718096" : "#2d3748",
whiteSpace: "nowrap", whiteSpace: "nowrap",
overflow: "hidden", overflow: "hidden",
textOverflow: "ellipsis", textOverflow: "ellipsis",