Skip to content

Commit f6d573c

Browse files
francescoopiccoliFrancesco Piccoli
andauthored
fix: add visibleName property to fix empty directory name when the directory ends with a slash (#1302)
* fix: add visibleName property to fix empty directory name when the directory ends with a slash * fix: format --------- Co-authored-by: Francesco Piccoli <[email protected]>
1 parent 312b04d commit f6d573c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

chat-client/src/client/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export function toMynahFileList(fileList: ChatMessage['fileList']): ChatItemCont
4040
)
4141
.join(', ') || '',
4242
description: fileDetails.description,
43+
visibleName:
44+
filePath.split('/').filter(Boolean).pop() || filePath.split('/').slice(-2, -1)[0] || filePath,
4345
clickable: true,
4446
data: {
4547
fullPath: fileDetails.fullPath || '',

0 commit comments

Comments
 (0)