fix(app): support text attachments (#17335)

This commit is contained in:
Adam
2026-03-13 06:58:24 -05:00
committed by GitHub
parent 05cb3c87ca
commit 843f188aaa
28 changed files with 422 additions and 136 deletions

View File

@@ -38,10 +38,12 @@
flex-direction: column;
align-items: center;
justify-content: center;
min-width: 0;
border-radius: 6px;
overflow: hidden;
background: var(--surface-weak);
border: 1px solid var(--border-weak-base);
cursor: default;
transition:
border-color 0.15s ease,
opacity 0.3s ease;
@@ -50,14 +52,19 @@
border-color: var(--border-strong-base);
}
&[data-clickable] {
cursor: pointer;
}
&[data-type="image"] {
width: 48px;
height: 48px;
}
&[data-type="file"] {
width: 48px;
width: min(220px, 100%);
height: 48px;
padding: 0 10px;
}
}
@@ -81,6 +88,30 @@
}
}
[data-slot="user-message-attachment-file"] {
width: 100%;
min-width: 0;
display: flex;
align-items: center;
gap: 8px;
[data-component="file-icon"] {
width: 20px;
height: 20px;
flex: none;
}
}
[data-slot="user-message-attachment-name"] {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text-base);
font-size: var(--font-size-small);
line-height: var(--line-height-large);
}
[data-slot="user-message-body"] {
width: fit-content;
max-width: min(82%, 64ch);