Merge pull request #275 from devchat-ai/109-remove-icons-from-commands

Remove commandMenuIcon function and update UI
This commit is contained in:
Rankin Zheng 2023-08-29 22:05:48 -05:00 committed by GitHub
commit c7fd90ca8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,23 +182,6 @@ const InputMessage = observer((props: any) => {
</Flex>);
});
const commandMenuIcon = (pattern: string) => {
if (pattern === 'commit_message') {
return (<IconBook size={16}
color='var(--vscode-menu-foreground)'
style={{
marginTop: 8,
marginLeft: 12,
}} />);
}
return (<IconShellCommand size={16}
color='var(--vscode-menu-foreground)'
style={{
marginTop: 8,
marginLeft: 12,
}} />);
};
useEffect(() => {
input.fetchContextMenus().then();
input.fetchCommandMenus().then();
@ -268,10 +251,11 @@ const InputMessage = observer((props: any) => {
input.closeMenu();
}}
aria-checked={index === currentMenuIndex}
data-pattern={pattern}
>
{commandMenuIcon(pattern)}
<Stack spacing={0}>
data-pattern={pattern}>
<Stack spacing={0}
sx={{
paddingLeft: 10,
}}>
<Text sx={{
fontSize: 'sm',
fontWeight: 'bolder',