diff --git a/src/components/label-selector/index.tsx b/src/components/label-selector/index.tsx index 38eb85ee..b02180dc 100644 --- a/src/components/label-selector/index.tsx +++ b/src/components/label-selector/index.tsx @@ -80,13 +80,12 @@ const LabelSelector: React.FC = ({ if (!clipboardText || clipboardText.indexOf('=') === -1) return; e.preventDefault(); - const lines = clipboardText - .split(/\r?\n/) - .map((line) => line.trim()) - .filter((line) => line && line.includes('=')); + const lines = _.split(clipboardText, /\r?\n/) + .map((line: string) => line.trim()) + .filter((line: string) => line && line.includes('=')); - const parsedData = lines.map((line) => { - const [key, value] = line.split('=').map((part) => part.trim()); + const parsedData = lines.map((line: string) => { + const [key, value] = line.split(/=(.+)/).map((s) => s.trim()); return { key, value }; }); diff --git a/src/pages/playground/hooks/use-chat-completion.ts b/src/pages/playground/hooks/use-chat-completion.ts index 5a001f32..7f63bc79 100644 --- a/src/pages/playground/hooks/use-chat-completion.ts +++ b/src/pages/playground/hooks/use-chat-completion.ts @@ -61,7 +61,6 @@ export default function useChatCompletion( _.get(chunk, 'choices.0.delta.content', '') === null ? '' : _.get(chunk, 'choices.0.delta.content', ''); - console.log('deltaContent:', deltaContent); reasonContentRef.current = reasonContentRef.current + deltaReasoningContent; contentRef.current = contentRef.current + deltaContent;