Skip to content

Commit e613210

Browse files
committed
Ensure correct event handling for ChatInput's search shortcut and refine its visual presentation
1 parent dbd18bb commit e613210

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/ui/src/components/editor/ChatInput/ChatInput.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
z-index: 1;
3939
top: 0;
4040
right: 0;
41-
padding: var(--padding-1px) var(--padding-3px);
41+
padding: var(--padding-1px) var(--padding-3px) var(--padding-6px)
42+
var(--padding-3px);
4243
color: var(--vscode-icon-foreground);
4344
cursor: pointer;
4445
opacity: 0.7;

packages/ui/src/components/editor/ChatInput/ChatInput.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,10 @@ export const ChatInput: React.FC<Props> = (props) => {
262262
onClick={handle_container_click}
263263
onKeyDown={(e) => {
264264
if (e.key == 'f' && (e.ctrlKey || e.metaKey)) {
265-
e.preventDefault()
265+
e.stopPropagation()
266266
props.on_search_click()
267267
}
268268
}}
269-
tabIndex={0}
270269
ref={container_ref}
271270
>
272271
<div
@@ -303,7 +302,7 @@ export const ChatInput: React.FC<Props> = (props) => {
303302
onClick={props.on_search_click}
304303
title={`${props.translations.search} (${
305304
navigator.userAgent.toUpperCase().indexOf('MAC') >= 0 ? '⌘' : 'Ctrl'
306-
}F)`}
305+
}+F)`}
307306
></button>
308307

309308
<div className={styles.footer}>

packages/vscode/src/view/backend/message-handlers/handle-show-history-quick-pick.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const handle_show_history_quick_pick = async (
6262
}
6363

6464
const quick_pick = vscode.window.createQuickPick()
65-
quick_pick.placeholder = 'Search chat history'
65+
quick_pick.placeholder = 'Search prompt history'
6666

6767
const to_quick_pick_item = (
6868
text: string,

0 commit comments

Comments
 (0)