We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41a396e commit 22aba4dCopy full SHA for 22aba4d
1 file changed
apps/code/src/renderer/features/sessions/components/session-update/parseFileMentions.tsx
@@ -91,12 +91,15 @@ export function parseMentionTags(content: string): ReactNode[] {
91
92
if (match[1]) {
93
const filePath = match[1];
94
- const fileName = filePath.split("/").pop() ?? filePath;
+ const segments = filePath.split("/").filter(Boolean);
95
+ const fileName = segments.pop() ?? filePath;
96
+ const parentDir = segments.pop();
97
+ const label = parentDir ? `${parentDir}/${fileName}` : fileName;
98
parts.push(
99
<MentionChip
100
key={`file-${matchIndex}`}
101
icon={<File size={12} />}
- label={fileName}
102
+ label={label}
103
/>,
104
);
105
} else if (match[2]) {
0 commit comments