From 194ad97a95cfac0740234695a38344196ba28d14 Mon Sep 17 00:00:00 2001 From: Khalil Najjar Date: Thu, 27 Jun 2024 14:48:00 +0200 Subject: [PATCH] fix(frontend): use DEPLOYMENT_SINGLE_CONTAINER default --- .../src/components/Agents/CreateAgentForm.tsx | 10 +++++----- src/interfaces/coral_web/src/constants.ts | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/interfaces/coral_web/src/components/Agents/CreateAgentForm.tsx b/src/interfaces/coral_web/src/components/Agents/CreateAgentForm.tsx index 3dbd474e9f..794418df01 100644 --- a/src/interfaces/coral_web/src/components/Agents/CreateAgentForm.tsx +++ b/src/interfaces/coral_web/src/components/Agents/CreateAgentForm.tsx @@ -3,7 +3,7 @@ import React, { useContext, useState } from 'react'; import { AgentForm, AgentFormFieldKeys, AgentFormFields } from '@/components/Agents/AgentForm'; import { Button, Text } from '@/components/Shared'; -import { DEFAULT_AGENT_MODEL, DEPLOYMENT_COHERE_PLATFORM } from '@/constants'; +import { DEFAULT_AGENT_MODEL, DEPLOYMENT_SINGLE_CONTAINER } from '@/constants'; import { ModalContext } from '@/context/ModalContext'; import { useCreateAgent, useIsAgentNameUnique, useRecentAgents } from '@/hooks/agents'; import { useNotify } from '@/hooks/toast'; @@ -23,7 +23,7 @@ export const CreateAgentForm: React.FC = () => { name: '', description: '', preamble: '', - deployment: DEPLOYMENT_COHERE_PLATFORM, + deployment: DEPLOYMENT_SINGLE_CONTAINER, model: DEFAULT_AGENT_MODEL, tools: [], }); @@ -77,13 +77,13 @@ export const CreateAgentForm: React.FC = () => { name: '', description: '', preamble: '', - deployment: '', - model: '', + deployment: DEPLOYMENT_SINGLE_CONTAINER, + model: DEFAULT_AGENT_MODEL, tools: [], }); close(); setIsSubmitting(false); - router.push(`/a/${agent.id}`, undefined, { shallow: true }); + router.push(`/agents/${agent.id}`, undefined, { shallow: true }); } catch (e) { setIsSubmitting(false); close(); diff --git a/src/interfaces/coral_web/src/constants.ts b/src/interfaces/coral_web/src/constants.ts index b86652fd67..cb61b2d530 100644 --- a/src/interfaces/coral_web/src/constants.ts +++ b/src/interfaces/coral_web/src/constants.ts @@ -5,6 +5,7 @@ export const DEFAULT_CONVERSATION_NAME = 'New Conversation'; export const DEFAULT_TYPING_VELOCITY = 35; export const DEPLOYMENT_COHERE_PLATFORM = 'Cohere Platform'; +export const DEPLOYMENT_SINGLE_CONTAINER = 'Single Container'; export const DEFAULT_AGENT_MODEL = 'command-r-plus'; export const ACCEPTED_FILE_TYPES: FileAccept[] = [