Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jrrobison1 committed Jul 27, 2024
1 parent b031747 commit 3457888
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
34 changes: 18 additions & 16 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/src/components/MainEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface Props {

setText: (text: string) => void;
onSubmit: () => void;
isLoading: boolean; // New prop to indicate loading state
isLoading: boolean;
}

const MainEditor: React.FC<Props> = ({ text, setText, onSubmit, isLoading }) => {
Expand Down
5 changes: 3 additions & 2 deletions ui/src/components/WorkshopMember.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { useState } from 'react';

const MODELS = ['gpt-4-turbo', 'GPT-4', 'gpt-3.5-turbo', 'mistral-small', 'mistral-medium', 'mistral-large-latest', 'gemini-pro-1.5', 'gemini-pro', 'claude-3-haiku-20240307', 'claude-3-sonnet-20240229', 'claude-3-opus-20240229'];

interface Props {
role: string;
response: string;
Expand All @@ -8,7 +10,6 @@ interface Props {
}

const WorkshopMember: React.FC<Props> = ({ role, response, model, onModelChange }) => {
const models = ['gpt-4-turbo', 'GPT-4', 'gpt-3.5-turbo', 'mistral-small', 'mistral-medium', 'mistral-large-latest', 'gemini-pro-1.5', 'gemini-pro', 'claude-3-haiku-20240307', 'claude-3-sonnet-20240229', 'claude-3-opus-20240229'];
const [expanded, setExpanded] = useState(false);

const handleClick = () => {
Expand All @@ -22,7 +23,7 @@ const WorkshopMember: React.FC<Props> = ({ role, response, model, onModelChange
<p className="click-instruction">Click review text to expand</p>
</div>
<select value={model} onChange={(e) => onModelChange(e.target.value)}>
{models.map((m) => (
{MODELS.map((m) => (
<option key={m} value={m}>
{m}
</option>
Expand Down

0 comments on commit 3457888

Please sign in to comment.