diff --git a/src/components/input/ToolCodeInput.tsx b/src/components/input/ToolCodeInput.tsx index c23553b..bc3ce4a 100644 --- a/src/components/input/ToolCodeInput.tsx +++ b/src/components/input/ToolCodeInput.tsx @@ -5,7 +5,10 @@ import InputHeader from '../InputHeader'; import InputFooter from './InputFooter'; import { useTranslation } from 'react-i18next'; import Editor from '@monaco-editor/react'; -import { globalInputHeight } from '../../config/uiConfig'; +import { + globalInputHeight, + codeInputHeightOffset +} from '../../config/uiConfig'; export default function ToolCodeInput({ value, @@ -53,14 +56,62 @@ export default function ToolCodeInput({ return ( - - onChange(value ?? '')} - /> + + ({ + height: '100%', + display: 'flex', + flexDirection: 'column', + backgroundColor: 'background.paper', + '.monaco-editor': { + height: '100% !important', + outline: 'none !important', + '.overflow-guard': { + height: '100% !important', + border: + theme.palette.mode === 'light' + ? '1px solid rgba(0, 0, 0, 0.23)' + : '1px solid rgba(255, 255, 255, 0.23)', + borderRadius: 1, + transition: theme.transitions.create( + ['border-color', 'background-color'], + { + duration: theme.transitions.duration.shorter + } + ) + }, + '&:hover .overflow-guard': { + borderColor: theme.palette.text.primary + } + }, + '.decorationsOverviewRuler': { + display: 'none !important' + } + })} + > + onChange(value ?? '')} + options={{ + scrollbar: { + vertical: 'visible', + horizontal: 'visible', + verticalScrollbarSize: 10, + horizontalScrollbarSize: 10, + alwaysConsumeMouseWheel: false + } + }} + /> +