This commit is contained in:
parent
ce1b44ac79
commit
c750bb2beb
|
|
@ -6,12 +6,15 @@ import { Tables } from "@/supabase/types"
|
|||
import { IconPencil } from "@tabler/icons-react"
|
||||
import { FC, useState } from "react"
|
||||
import { SidebarItem } from "../all/sidebar-display-item"
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
interface PromptItemProps {
|
||||
prompt: Tables<"prompts">
|
||||
}
|
||||
|
||||
export const PromptItem: FC<PromptItemProps> = ({ prompt }) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const [name, setName] = useState(prompt.name)
|
||||
const [content, setContent] = useState(prompt.content)
|
||||
const [isTyping, setIsTyping] = useState(false)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { TOOL_DESCRIPTION_MAX, TOOL_NAME_MAX } from "@/db/limits"
|
|||
import { validateOpenAPI } from "@/lib/openapi-conversion"
|
||||
import { TablesInsert } from "@/supabase/types"
|
||||
import { FC, useContext, useState } from "react"
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
interface CreateToolProps {
|
||||
isOpen: boolean
|
||||
|
|
@ -14,6 +15,8 @@ interface CreateToolProps {
|
|||
}
|
||||
|
||||
export const CreateTool: FC<CreateToolProps> = ({ isOpen, onOpenChange }) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { profile, selectedWorkspace } = useContext(ChatbotUIContext)
|
||||
|
||||
const [name, setName] = useState("")
|
||||
|
|
|
|||
|
|
@ -7,12 +7,15 @@ import { Tables } from "@/supabase/types"
|
|||
import { IconBolt } from "@tabler/icons-react"
|
||||
import { FC, useState } from "react"
|
||||
import { SidebarItem } from "../all/sidebar-display-item"
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
interface ToolItemProps {
|
||||
tool: Tables<"tools">
|
||||
}
|
||||
|
||||
export const ToolItem: FC<ToolItemProps> = ({ tool }) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const [name, setName] = useState(tool.name)
|
||||
const [isTyping, setIsTyping] = useState(false)
|
||||
const [description, setDescription] = useState(tool.description)
|
||||
|
|
|
|||
Loading…
Reference in New Issue