Skip to content

Commit

Permalink
feat(ui): rename LLM into TextGeneration components
Browse files Browse the repository at this point in the history
  • Loading branch information
dvalleri committed Dec 13, 2024
1 parent 139df06 commit 6775cb2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions ui/src/components/modals/add-new-model/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
} from '@radicalbit/radicalbit-design-system';
import useModals from '@Src/hooks/use-modals';
import { ModelTypeEnum } from '@Src/store/state/models/constants';
import { LlmActionButton, LlmBody, LlmHeader } from './llm-components';
import ModalContextProvider, { useModalContext } from './modal-context-provider';
import ActionsStepFourth from './step-four/actions';
import BodyStepFour from './step-four/new-body';
Expand All @@ -13,6 +12,10 @@ import ActionsStepThree from './step-three/actions';
import BodyStepThree from './step-three/body';
import ActionsStepTwo from './step-two/actions';
import BodyStepTwo from './step-two/body';
import {
TextGenerationActionButton, TextGenerationBody,
TextGenerationHeader,
} from './text-generation';

const { Step } = Steps;

Expand Down Expand Up @@ -77,7 +80,7 @@ function Header() {

switch (modelType) {
case ModelTypeEnum.TEXT_GENERATION:
return (<LlmHeader />);
return (<TextGenerationHeader />);

default:
return (
Expand Down Expand Up @@ -165,7 +168,7 @@ function Body() {

switch (modelType) {
case ModelTypeEnum.TEXT_GENERATION:
return <LlmBody />;
return <TextGenerationBody />;

default:
return <BodyInner />;
Expand Down Expand Up @@ -199,7 +202,7 @@ function Actions() {

switch (modelType) {
case ModelTypeEnum.TEXT_GENERATION:
return (<LlmActionButton />);
return (<TextGenerationActionButton />);

default:
return <ActionsInner />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
import { useModalContext } from '../modal-context-provider';
import useHandleOnSubmit from './use-handle-on-submit';

function LlmHeader() {
function TextGenerationHeader() {
return <SectionTitle title="New Model" />;
}

function LlmBody() {
function TextGenerationBody() {
const { useFormbit } = useModalContext();
const { error } = useFormbit;

Expand Down Expand Up @@ -37,7 +37,7 @@ function LlmBody() {
);
}

function LlmActionButton() {
function TextGenerationActionButton() {
const { handleOnSubmit, args, isSubmitDisabled } = useHandleOnSubmit();

return (
Expand All @@ -56,4 +56,4 @@ function LlmActionButton() {
);
}

export { LlmHeader, LlmBody, LlmActionButton };
export { TextGenerationHeader, TextGenerationBody, TextGenerationActionButton };

0 comments on commit 6775cb2

Please sign in to comment.