Update component imports and add conditional focus in PlaygroundForm

This commit is contained in:
n4ze3m
2024-03-03 23:30:42 +05:30
parent 0351beeaae
commit a87c56061c
12 changed files with 180 additions and 25 deletions

View File

@@ -2,7 +2,6 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
import {
Skeleton,
Table,
Tag,
Tooltip,
notification,
Modal,
@@ -10,7 +9,7 @@ import {
Form,
Switch
} from "antd"
import { Trash2, Pen } from "lucide-react"
import { Trash2, Pen, Computer, Zap } from "lucide-react"
import { useState } from "react"
import {
deletePromptById,
@@ -131,14 +130,21 @@ export const PromptBody = () => {
key: "content"
},
{
title: "Is System Prompt",
title: "Prompt Type",
dataIndex: "is_system",
key: "is_system",
render: (is_system) => (
<Tag color={is_system ? "green" : "blue"}>
{is_system ? "Yes" : "No"}
</Tag>
)
render: (is_system) =>
is_system ? (
<span className="flex justify-between">
<Computer className="w-5 h-5 mr-3" />
System Prompt
</span>
) : (
<span className="flex justify-between">
<Zap className="w-5 h-5 mr-3" />
Quick Prompt
</span>
)
},
{
title: "Action",