Skip to content

Commit

Permalink
move warning to hover tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
abeatrix committed Mar 25, 2024
1 parent a2e831d commit bf6ae1e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
}

.item {
display: flex;
min-height: calc(var(--item-height) - 2*var(--item-padding-y));
padding: var(--item-padding-y) var(--item-padding-x);
}
Expand Down Expand Up @@ -103,3 +104,6 @@ body[data-vscode-theme-kind='vscode-high-contrast'] .option-item.selected {
opacity: 0.7;
}

.title-help-icon {
margin-left: 0.25rem;
}
26 changes: 17 additions & 9 deletions vscode/webviews/promptEditor/plugins/atMentions/OptionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,23 @@ export const OptionsList: FunctionComponent<
return (
<div className={styles.container}>
<h3 className={classNames(styles.item, styles.helpItem)}>
{mentionQuery.type === 'empty'
? 'Search for a file to include, or type # for symbols...'
: mentionQuery.type === 'symbol'
? options.length > 0 || mentionQuery.text.length < 2
? 'Search for a symbol to include...'
: 'No symbols found (make sure workspace symbols are available)'
: options.length > 0
? 'Search for a file to include...'
: 'No files found'}
<span>
{mentionQuery.type === 'empty'
? 'Search for a file to include, or type # for symbols...'
: mentionQuery.type === 'symbol'
? options.length > 0 || !mentionQuery.text.length
? 'Search for a symbol to include...'
: 'No symbols found '
: options.length > 0
? 'Search for a file to include...'
: 'No files found'}
</span>
{mentionQuery.type === 'symbol' && !options.length && !!mentionQuery.text.length && (
<i
className={classNames('codicon codicon-question', styles.titleHelpIcon)}
title="Please try opening a file to make sure symbols are ready and available in your workspace."
/>
)}
<br />
</h3>
{options.length > 0 && (
Expand Down

0 comments on commit bf6ae1e

Please sign in to comment.