Skip to content

Commit

Permalink
Use mui tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed May 2, 2024
1 parent 92fa8c6 commit 18e57f4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/jupyter-ai/src/components/chat-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Radio,
RadioGroup,
TextField,
Tooltip,
CircularProgress
} from '@mui/material';
import SettingsIcon from '@mui/icons-material/Settings';
Expand Down Expand Up @@ -530,23 +531,26 @@ function CompleterSettingsButton(props: {
}): JSX.Element {
if (props.selection && !props.isCompleterEnabled) {
return (
<IconButton
<Tooltip
title={
'A completer model is selected, but ' +
(props.provider === null
? 'the completion provider plugin is not available.'
: 'the inline completion provider is not enabled in the settings: click to open settings.')
}
onClick={props.openSettings}
>
<WarningAmberIcon />
</IconButton>
<IconButton onClick={props.openSettings}>
<WarningAmberIcon />
</IconButton>
</Tooltip>
);
}
return (
<IconButton onClick={props.openSettings} title="Completer settings">
<SettingsIcon />
</IconButton>
<Tooltip title="Completer settings">
<IconButton onClick={props.openSettings}>
<SettingsIcon />
</IconButton>
</Tooltip>
);
}

Expand Down

0 comments on commit 18e57f4

Please sign in to comment.