feat: vllm support

This commit is contained in:
jialin
2024-09-25 16:17:25 +08:00
parent 0652f850d6
commit 3cd96ba2e8
47 changed files with 1610 additions and 252 deletions
+8 -1
View File
@@ -1,10 +1,16 @@
.editor-wrap {
border-radius: var(--border-radius-mini);
overflow: hidden;
font-size: 0;
.code-pre {
margin-bottom: 0;
}
.editor-header {
display: flex;
padding: 6px 10px;
height: 40px;
padding: 0 10px;
justify-content: space-between;
align-items: center;
background-color: rgb(56, 56, 56);
@@ -12,6 +18,7 @@
.ant-select-selector {
background-color: rgba(255, 255, 255, 9%) !important;
color: rgba(255, 255, 255, 70%);
border-radius: var(--border-radius-2px);
.ant-select-selection-item {
color: rgba(255, 255, 255, 70%);
+7 -1
View File
@@ -10,6 +10,11 @@ interface EditorwrapProps {
copyText: string;
defaultValue?: string;
langOptions?: { label: string; value: string }[];
styles?: {
wrapper?: React.CSSProperties;
header?: React.CSSProperties;
content?: React.CSSProperties;
};
onChangeLang?: (value: string) => void;
}
const EditorWrap: React.FC<EditorwrapProps> = ({
@@ -19,6 +24,7 @@ const EditorWrap: React.FC<EditorwrapProps> = ({
langOptions,
onChangeLang,
defaultValue,
styles = {},
showHeader = true
}) => {
const handleChangeLang = (value: string) => {
@@ -52,7 +58,7 @@ const EditorWrap: React.FC<EditorwrapProps> = ({
return null;
};
return (
<div className="editor-wrap">
<div className="editor-wrap" style={{ ...styles.wrapper }}>
{renderHeader()}
<div className="editor-content">{children}</div>
</div>