Skip to content

Commit e61910d

Browse files
committed
Implement tooltips showing the full path for highlighted context file names
1 parent f295dbc commit e61910d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/ui/src/components/editor/panel/ChatInput/utils/get-highlighted-text.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ export const get_highlighted_text = (params: {
6868
(path) => path.endsWith('/' + sub_part) || path == sub_part
6969
)
7070
if (is_context_file) {
71-
return `<span class="${styles['file-keyword']}"><span class="${
71+
const full_path = params.context_file_paths.find(
72+
(path) => path.endsWith('/' + sub_part) || path == sub_part
73+
)
74+
return `<span class="${styles['file-keyword']}"${
75+
full_path ? ` title="${escape_html(full_path)}"` : ''
76+
}><span class="${
7277
styles['file-keyword__icon']
7378
}"></span><span class="${
7479
styles['file-keyword__text']

0 commit comments

Comments
 (0)