If documents have no title display uri alone, ag-ui-example
This commit is contained in:
parent
bf5711f7ab
commit
440ec123c6
1 changed files with 21 additions and 14 deletions
|
|
@ -298,22 +298,29 @@ export default function DocumentSelector({
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div style={{ flex: 1, minWidth: 0 }}>
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
|
{doc.title && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "0.875rem",
|
||||||
|
fontWeight: isSelected ? "600" : "400",
|
||||||
|
color: "#2d3748",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{doc.title}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
fontSize: "0.875rem",
|
fontSize: doc.title ? "0.7rem" : "0.875rem",
|
||||||
fontWeight: isSelected ? "600" : "400",
|
fontWeight: doc.title
|
||||||
color: "#2d3748",
|
? "400"
|
||||||
whiteSpace: "nowrap",
|
: isSelected
|
||||||
overflow: "hidden",
|
? "600"
|
||||||
textOverflow: "ellipsis",
|
: "400",
|
||||||
}}
|
color: doc.title ? "#718096" : "#2d3748",
|
||||||
>
|
|
||||||
{doc.title || "Untitled"}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
fontSize: "0.7rem",
|
|
||||||
color: "#718096",
|
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue