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