summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/StyledMarkdownPreview.tsx
diff options
context:
space:
mode:
authorNate Sesti <33237525+sestinj@users.noreply.github.com>2023-09-28 01:02:52 -0700
committerGitHub <noreply@github.com>2023-09-28 01:02:52 -0700
commit95363a5b52f3bf73531ac76b00178fa79ca97661 (patch)
tree9b9c1614556f1f0d21f363e6a9fe950069affb5d /extension/react-app/src/components/StyledMarkdownPreview.tsx
parentd4acf4bb11dbd7d3d6210e2949d21143d721e81e (diff)
downloadsncontinue-95363a5b52f3bf73531ac76b00178fa79ca97661.tar.gz
sncontinue-95363a5b52f3bf73531ac76b00178fa79ca97661.tar.bz2
sncontinue-95363a5b52f3bf73531ac76b00178fa79ca97661.zip
Past input (#513)
* feat: :construction: use ComboBox in place of UserInputContainer * feat: :construction: adding context to previous inputs steps * feat: :sparkles: preview context items on click * feat: :construction: more work on context items ui * style: :construction: working out the details of ctx item buttons * feat: :sparkles: getting the final details * fix: :bug: fix height of ctx items bar * fix: :bug: last couple of details * fix: :bug: pass model param through to hf inference api * fix: :loud_sound: better logging for timeout * feat: :sparkles: option to set the meilisearch url * fix: :bug: fix height of past inputs
Diffstat (limited to 'extension/react-app/src/components/StyledMarkdownPreview.tsx')
-rw-r--r--extension/react-app/src/components/StyledMarkdownPreview.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/extension/react-app/src/components/StyledMarkdownPreview.tsx b/extension/react-app/src/components/StyledMarkdownPreview.tsx
index 78d4234c..f53e5289 100644
--- a/extension/react-app/src/components/StyledMarkdownPreview.tsx
+++ b/extension/react-app/src/components/StyledMarkdownPreview.tsx
@@ -12,12 +12,13 @@ import { getFontSize } from "../util";
const StyledMarkdownPreview = styled(MarkdownPreview)<{
light?: boolean;
fontSize?: number;
+ maxHeight?: number;
}>`
pre {
background-color: ${(props) =>
props.light ? vscBackground : secondaryDark};
border-radius: ${defaultBorderRadius};
- border: 0.5px solid ${lightGray};
+ /* border: 0.5px solid ${lightGray}; */
max-width: calc(100vw - 24px);
}
@@ -34,6 +35,15 @@ const StyledMarkdownPreview = styled(MarkdownPreview)<{
props.light ? vscBackground : secondaryDark};
color: ${vscForeground};
padding: 12px;
+
+ ${(props) => {
+ if (props.maxHeight) {
+ return `
+ max-height: ${props.maxHeight}px;
+ overflow-y: auto;
+ `;
+ }
+ }}
}
background-color: ${(props) => (props.light ? "transparent" : vscBackground)};