fix: editor agent add frontend & backend attachment label normalization, and fallback for display
Project CI / Repository checks (pull_request) Successful in 3m36s
Project CI / Native shell tests (pull_request) Successful in 9m58s
Project CI / Frontend tests (pull_request) Failing after 1m23s
Project CI / Backend tests (pull_request) Failing after 7m10s

This commit is contained in:
2026-07-22 15:01:46 +08:00
parent 2540c13ddb
commit e846eb387f
5 changed files with 186 additions and 89 deletions
@@ -10,7 +10,7 @@ function AttachmentChip({
attachment: EditorAgentAttachmentRef;
onRemove?: () => void;
}) {
const label = attachment.label;
const label = attachment.label?.trim() || attachment.referenceId;
return (
<span className="group relative inline-flex max-w-full items-center gap-1.5 rounded-full border border-slate-200 bg-white px-2.5 py-1 text-xs text-slate-600 shadow-sm">
<ImageIcon className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />