Skip to content

Commit 1e512e9

Browse files
committed
feat(ai): add attach file button styles and i18n strings
1 parent b4be9b9 commit 1e512e9

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

src/nls/root/strings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,6 +1914,8 @@ define({
19141914
"AI_CHAT_QUESTION_OTHER": "Type a custom answer\u2026",
19151915
"AI_CHAT_IMAGE_LIMIT": "Maximum {0} images allowed",
19161916
"AI_CHAT_IMAGE_REMOVE": "Remove image",
1917+
"AI_CHAT_ATTACH_FILE": "Attach files",
1918+
"AI_CHAT_FILE_REMOVE": "Remove file",
19171919
"AI_CHAT_QUEUED": "Queued",
19181920
"AI_CHAT_QUEUED_EDIT": "Edit",
19191921
"AI_CHAT_TOOL_CLARIFICATION": "Reading your follow-up",

src/styles/Extn-AIChatPanel.less

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,34 @@
293293
}
294294
}
295295

296+
/* ── User message file chips ────────────────────────────────────────── */
297+
.ai-user-files {
298+
display: flex;
299+
flex-wrap: wrap;
300+
gap: 4px;
301+
margin-top: 6px;
302+
justify-content: flex-end;
303+
304+
.ai-user-file-chip {
305+
display: inline-flex;
306+
align-items: center;
307+
gap: 4px;
308+
padding: 2px 8px;
309+
background: rgba(255, 255, 255, 0.06);
310+
border: 1px solid rgba(255, 255, 255, 0.1);
311+
border-radius: 4px;
312+
font-size: 11px;
313+
color: @project-panel-text-2;
314+
max-width: 180px;
315+
316+
.ai-file-chip-name {
317+
overflow: hidden;
318+
text-overflow: ellipsis;
319+
white-space: nowrap;
320+
}
321+
}
322+
}
323+
296324
/* ── User message image thumbnails ──────────────────────────────────── */
297325
.ai-user-images {
298326
display: flex;
@@ -1352,6 +1380,73 @@
13521380
display: flex;
13531381
}
13541382
}
1383+
1384+
.ai-file-chip {
1385+
display: inline-flex;
1386+
align-items: center;
1387+
gap: 4px;
1388+
padding: 2px 6px;
1389+
background: rgba(255, 255, 255, 0.08);
1390+
border: 1px solid rgba(255, 255, 255, 0.12);
1391+
border-radius: 4px;
1392+
font-size: 11px;
1393+
color: @project-panel-text-2;
1394+
max-width: 150px;
1395+
position: relative;
1396+
1397+
.ai-file-chip-name {
1398+
overflow: hidden;
1399+
text-overflow: ellipsis;
1400+
white-space: nowrap;
1401+
}
1402+
1403+
.ai-file-remove {
1404+
position: absolute;
1405+
top: -6px;
1406+
right: -6px;
1407+
width: 16px;
1408+
height: 16px;
1409+
border-radius: 50%;
1410+
background: rgba(0, 0, 0, 0.7);
1411+
border: 1px solid rgba(255, 255, 255, 0.2);
1412+
color: @project-panel-text-2;
1413+
font-size: 11px;
1414+
padding: 0;
1415+
display: none;
1416+
align-items: center;
1417+
justify-content: center;
1418+
cursor: pointer;
1419+
}
1420+
1421+
&:hover .ai-file-remove {
1422+
display: flex;
1423+
}
1424+
}
1425+
}
1426+
1427+
.ai-attach-btn {
1428+
background: none;
1429+
border: none;
1430+
color: @project-panel-text-2;
1431+
width: 28px;
1432+
cursor: pointer;
1433+
display: flex;
1434+
align-items: center;
1435+
justify-content: center;
1436+
flex-shrink: 0;
1437+
align-self: stretch;
1438+
border-radius: 7px 0 0 7px;
1439+
opacity: 0.5;
1440+
transition: opacity 0.15s ease, color 0.15s ease;
1441+
1442+
&:hover {
1443+
opacity: 1;
1444+
color: @project-panel-text-1;
1445+
}
1446+
1447+
i {
1448+
font-size: @sidebar-content-font-size;
1449+
}
13551450
}
13561451

13571452
.ai-chat-textarea {

0 commit comments

Comments
 (0)