Skip to content

Commit 447304a

Browse files
committed
Stabilize UI list selection hover behavior and improve file path extraction logic in the response parser
1 parent 90a832b commit 447304a

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

‎packages/ui/src/components/editor/panel/Configurations/Configurations.module.scss‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151

5252
&--highlighted {
5353
background-color: var(--vscode-list-inactiveSelectionBackground);
54-
55-
&:hover {
56-
background-color: var(--vscode-list-inactiveSelectionBackground);
57-
}
5854
}
5955

6056
&__left {

‎packages/ui/src/components/editor/panel/Presets/Presets.module.scss‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949

5050
&--highlighted {
5151
background-color: var(--vscode-list-inactiveSelectionBackground);
52-
53-
&:hover {
54-
background-color: var(--vscode-list-inactiveSelectionBackground);
55-
}
5652
}
5753

5854
&__left {

‎packages/ui/src/components/editor/panel/ResponsePreview/ResponsePreview.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const ResponsePreview: FC<Props> = (props) => {
120120
)}
121121
<div className={styles.list}>
122122
{props.items.map((item, index) => {
123-
if (item.type === 'file') {
123+
if (item.type == 'file') {
124124
const file = item
125125
const last_slash_index = file.file_path.lastIndexOf('/')
126126
const file_name = file.file_path.substring(last_slash_index + 1)
@@ -148,6 +148,9 @@ export const ResponsePreview: FC<Props> = (props) => {
148148
? '\nUsed aggressive fallback method. Call Intelligent Update API tool, if needed.'
149149
: ''
150150
}`}
151+
onMouseEnter={() => {
152+
set_last_clicked_file_index(-1)
153+
}}
151154
>
152155
<div className={styles['list__file__left']}>
153156
<Checkbox

‎packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/parsers/multiple-files-parser.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ export const parse_multiple_files = (params: {
183183
(potential_path.includes('/') ||
184184
potential_path.includes('\\') ||
185185
potential_path.includes('.')) &&
186-
!potential_path.includes(' ')
186+
!potential_path.includes(' ') &&
187+
/[a-zA-Z0-9]/.test(potential_path)
187188
) {
188189
extracted_filename = potential_path
189190
}

0 commit comments

Comments
 (0)