Skip to content

Commit

Permalink
Improve Shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Nov 8, 2023
1 parent fc81265 commit 73d0f43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/apps/chat/components/applayout/useLLMDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import * as React from 'react';
import { shallow } from 'zustand/shallow';

import { ListItemButton, ListItemDecorator, Tooltip } from '@mui/joy';
import { Box, ListItemButton, ListItemDecorator } from '@mui/joy';
import BuildCircleIcon from '@mui/icons-material/BuildCircle';
import SettingsIcon from '@mui/icons-material/Settings';

import { DLLM, DLLMId, DModelSourceId, useModelsStore } from '~/modules/llms/store-llms';

import { AppBarDropdown, DropdownItems } from '~/common/layout/AppBarDropdown';
import { KeyStroke } from '~/common/components/KeyStroke';
import { hideOnMobile } from '~/common/theme';
import { openLayoutLLMOptions, openLayoutModelsSetup } from '~/common/layout/store-applayout';


Expand Down Expand Up @@ -52,12 +53,13 @@ function AppBarLLMDropdown(props: {
</ListItemButton>
)}

<Tooltip title={<KeyStroke combo='Ctrl + Shift + M' />}>
<ListItemButton key='menu-llms' onClick={openLayoutModelsSetup}>
<ListItemDecorator><BuildCircleIcon color='success' /></ListItemDecorator>
<ListItemButton key='menu-llms' onClick={openLayoutModelsSetup}>
<ListItemDecorator><BuildCircleIcon color='success' /></ListItemDecorator>
<Box sx={{ flexGrow: 1, display: 'flex', justifyContent: 'space-between', gap: 1 }}>
Models
</ListItemButton>
</Tooltip>
<KeyStroke light combo='Ctrl + Shift + M' sx={hideOnMobile} />
</Box>
</ListItemButton>

</>}
/>
Expand Down
9 changes: 7 additions & 2 deletions src/apps/chat/components/composer/Composer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,16 @@ const pasteClipboardLegend =
<Box sx={{ p: 1, lineHeight: 2 }}>
<b>Paste as 📚 Markdown attachment</b><br />
Also converts Code and Tables<br />
<KeyStroke combo='Ctrl + Shift + V' />
<KeyStroke light combo='Ctrl + Shift + V' />
</Box>;

const MicButton = (props: { variant: VariantProp, color: ColorPaletteProp, onClick: () => void, sx?: SxProps }) =>
<Tooltip title={<KeyStroke combo='Ctrl + M' />} placement='top'>
<Tooltip placement='top' title={
<Box sx={{ p: 1, lineHeight: 2, gap: 1 }}>
Voice input<br />
<KeyStroke light combo='Ctrl + M' />
</Box>
}>
<IconButton variant={props.variant} color={props.color} onClick={props.onClick} sx={props.sx}>
<MicIcon />
</IconButton>
Expand Down

1 comment on commit 73d0f43

@vercel
Copy link

@vercel vercel bot commented on 73d0f43 Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

big-agi – ./

get.big-agi.com
big-agi-enricoros.vercel.app
big-agi-git-main-enricoros.vercel.app

Please sign in to comment.