{item.data?.task_type && (
- Task Type:
+
+ Task Type:
+
- {item.data.task_type.replace(/_/g, ' ').replace(/\b\w/g, (c: string) => c.toUpperCase())}
+ {item.data.task_type
+ .replace(/_/g, ' ')
+ .replace(/\b\w/g, (c: string) =>
+ c.toUpperCase()
+ )}
)}
{item.data?.domain && (
- Domain:
- {item.data.domain}
+
+ Domain:
+
+
+ {item.data.domain}
+
)}
{item.data?.target_languages?.length > 0 && (
-
Target Languages:
+
+ Target Languages:
+
- {item.data.target_languages.map((lang: string, idx: number) => (
- {lang}
- ))}
+ {item.data.target_languages.map(
+ (lang: string, idx: number) => (
+ {lang}
+ )
+ )}
)}
{item.data?.prompt_format && (
- Prompt Format:
- {item.data.prompt_format}
+
+ Prompt Format:
+
+
+ {item.data.prompt_format}
+
)}
{item.data?.target_model_types?.length > 0 && (
-
Target Model Types:
+
+ Target Model Types:
+
- {item.data.target_model_types.map((model: string, idx: number) => (
- {model.replace(/_/g, ' ').replace(/\b\w/g, (c: string) => c.toUpperCase())}
- ))}
+ {item.data.target_model_types.map(
+ (model: string, idx: number) => (
+
+ {model
+ .replace(/_/g, ' ')
+ .replace(/\b\w/g, (c: string) =>
+ c.toUpperCase()
+ )}
+
+ )
+ )}
)}
- Has System Prompt:
- {item.data?.has_system_prompt ? 'Yes' : 'No'}
+
+ Has System Prompt:
+
+
+ {item.data?.has_system_prompt ? 'Yes' : 'No'}
+
- Has Example Responses:
- {item.data?.has_example_responses ? 'Yes' : 'No'}
+
+ Has Example Responses:
+
+
+ {item.data?.has_example_responses
+ ? 'Yes'
+ : 'No'}
+
) : item.name !== 'Metadata' ? (
diff --git a/app/[locale]/dashboard/[entityType]/[entitySlug]/usecases/edit/[id]/publish/page.tsx b/app/[locale]/dashboard/[entityType]/[entitySlug]/usecases/edit/[id]/publish/page.tsx
index df69d052..c7dd1b16 100644
--- a/app/[locale]/dashboard/[entityType]/[entitySlug]/usecases/edit/[id]/publish/page.tsx
+++ b/app/[locale]/dashboard/[entityType]/[entitySlug]/usecases/edit/[id]/publish/page.tsx
@@ -151,12 +151,19 @@ const Publish = () => {
const PUBLISH_ERROR_TOAST_ID = 'usecase-publish-error';
const { mutate, isLoading: mutationLoading } = useMutation(
- () => GraphQL(publishUseCaseMutation, {
- [params.entityType]: params.entitySlug,
- }, { useCaseId: params.id }),
+ () =>
+ GraphQL(
+ publishUseCaseMutation,
+ {
+ [params.entityType]: params.entitySlug,
+ },
+ { useCaseId: params.id }
+ ),
{
onSuccess: () => {
- toast('UseCase Published Successfully', { id: PUBLISH_SUCCESS_TOAST_ID });
+ toast('UseCase Published Successfully', {
+ id: PUBLISH_SUCCESS_TOAST_ID,
+ });
router.push(
`/dashboard/${params.entityType}/${params.entitySlug}/usecases`
);
@@ -246,7 +253,7 @@ const Publish = () => {
value={`item-${index}`}
className=" border-none"
>
-