mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
migrate nextui to heroui
This commit is contained in:
parent
ee5b6d477d
commit
4bd72ba245
47 changed files with 8412 additions and 3316 deletions
|
|
@ -4,7 +4,7 @@ import Image from 'next/image';
|
|||
import logo from "@/public/rowboat-logo.png";
|
||||
import { useUser } from "@auth0/nextjs-auth0/client";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
import { LogInIcon } from "lucide-react";
|
||||
|
||||
export function App() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Select, SelectItem } from "@nextui-org/react";
|
||||
import { Select, SelectItem } from "@heroui/react";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
export interface DropdownOption {
|
||||
|
|
@ -28,7 +28,7 @@ export function Dropdown({
|
|||
onSelectionChange={(keys) => onChange(keys.currentKey as string)}
|
||||
>
|
||||
{options.map((option) => (
|
||||
<SelectItem key={option.key} value={option.key}>
|
||||
<SelectItem key={option.key}>
|
||||
{option.label}
|
||||
</SelectItem>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Button, Input, InputProps, Kbd, Textarea } from "@nextui-org/react";
|
||||
import { Button, Input, InputProps, Kbd, Textarea } from "@heroui/react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useClickAway } from "../../../hooks/use-click-away";
|
||||
import MarkdownContent from "./markdown-content";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Divider } from "@nextui-org/react";
|
||||
import { Divider } from "@heroui/react";
|
||||
import { Label } from "./label";
|
||||
|
||||
export function FormSection({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { useFormStatus } from "react-dom";
|
||||
import { Button, ButtonProps } from "@nextui-org/react";
|
||||
import { Button, ButtonProps } from "@heroui/react";
|
||||
|
||||
export function FormStatusButton({
|
||||
props
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { Pagination as NextUiPagination } from "@nextui-org/react";
|
||||
import { Pagination as NextUiPagination } from "@heroui/react";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
|
||||
export function Pagination({
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestProfile } from "@/app/lib/types/testing_types";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { listProfiles } from "@/app/actions/testing_actions";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@nextui-org/react";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
|
||||
interface ProfileSelectorProps {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestScenario } from "@/app/lib/types/testing_types";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { listScenarios } from "@/app/actions/testing_actions";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@nextui-org/react";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
|
||||
interface ScenarioSelectorProps {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestSimulation } from "@/app/lib/types/testing_types";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { listSimulations } from "@/app/actions/testing_actions";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Chip } from "@nextui-org/react";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Chip } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { Workflow } from "@/app/lib/types/workflow_types";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { listWorkflows } from "@/app/actions/workflow_actions";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@nextui-org/react";
|
||||
import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { WorkflowIcon } from "../icons";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import clsx from "clsx";
|
||||
import { InfoIcon } from "lucide-react";
|
||||
import { Tooltip } from "@nextui-org/react";
|
||||
import { Tooltip } from "@heroui/react";
|
||||
|
||||
export function ActionButton({
|
||||
icon = null,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { Moon, Sun } from "lucide-react"
|
||||
import { useTheme } from "@/app/providers/theme-provider"
|
||||
import { Button } from "@nextui-org/react"
|
||||
import { Button } from "@heroui/react"
|
||||
|
||||
export function ThemeToggle() {
|
||||
const { theme, toggleTheme } = useTheme()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
import { useUser } from '@auth0/nextjs-auth0/client';
|
||||
import { Avatar, Dropdown, DropdownItem, DropdownSection, DropdownTrigger, DropdownMenu } from '@nextui-org/react';
|
||||
import { Avatar, Dropdown, DropdownItem, DropdownSection, DropdownTrigger, DropdownMenu } from "@heroui/react";
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
export function UserButton() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Spinner } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
|
||||
export default function Loading() {
|
||||
// Stack uses React Suspense, which will render this page while user data is being fetched.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { Metadata } from "next";
|
||||
import { Spinner, Textarea, Button, Dropdown, DropdownMenu, DropdownItem, DropdownTrigger, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Input, useDisclosure, Divider } from "@nextui-org/react";
|
||||
import { Spinner, Textarea, Button, Dropdown, DropdownMenu, DropdownItem, DropdownTrigger, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Input, useDisclosure, Divider } from "@heroui/react";
|
||||
import { ReactNode, useEffect, useState, useCallback } from "react";
|
||||
import { getProjectConfig, updateProjectName, updateWebhookUrl, createApiKey, deleteApiKey, listApiKeys, deleteProject, rotateSecret } from "../../../actions/project_actions";
|
||||
import { CopyButton } from "../../../lib/components/copy-button";
|
||||
|
|
@ -272,8 +272,9 @@ export function ApiKeysSection({
|
|||
</DropdownTrigger>
|
||||
<DropdownMenu>
|
||||
<DropdownItem
|
||||
key='delete'
|
||||
className="text-destructive"
|
||||
onClick={() => handleDeleteKey(key._id)}
|
||||
onPress={() => handleDeleteKey(key._id)}
|
||||
>
|
||||
Delete
|
||||
</DropdownItem>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
import { usePathname } from "next/navigation";
|
||||
import { Tooltip } from "@nextui-org/react";
|
||||
import { Tooltip } from "@heroui/react";
|
||||
import Link from "next/link";
|
||||
import { DatabaseIcon, SettingsIcon, WorkflowIcon, PlayIcon } from "lucide-react";
|
||||
import MenuItem from "../../lib/components/menu-item";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { Tooltip } from "@nextui-org/react";
|
||||
import { Tooltip } from "@heroui/react";
|
||||
import Link from "next/link";
|
||||
import { useEffect, useState } from "react";
|
||||
import clsx from "clsx";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Spinner } from "@nextui-org/react";
|
||||
import { Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Spinner } from "@heroui/react";
|
||||
import { useEffect, useState, useMemo, useCallback } from "react";
|
||||
import { z } from "zod";
|
||||
import { PlaygroundChat } from "../../../lib/types/types";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { convertWorkflowToAgenticAPI } from "../../../lib/types/agents_api_types
|
|||
import { AgenticAPIChatRequest } from "../../../lib/types/agents_api_types";
|
||||
import { Workflow } from "../../../lib/types/workflow_types";
|
||||
import { ComposeBox } from "./compose-box";
|
||||
import { Button, Spinner, Tooltip } from "@nextui-org/react";
|
||||
import { Button, Spinner, Tooltip } from "@heroui/react";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { CopyAsJsonButton } from "./copy-as-json-button";
|
||||
import { TestProfile } from "@/app/lib/types/testing_types";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { Button, Spinner, Textarea } from "@nextui-org/react";
|
||||
import { Button, Spinner, Textarea } from "@heroui/react";
|
||||
import { CornerDownLeftIcon } from "lucide-react";
|
||||
import { useRef, useState, useEffect } from "react";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { Button, Spinner, Textarea } from "@nextui-org/react";
|
||||
import { Button, Spinner, Textarea } from "@heroui/react";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import z from "zod";
|
||||
import { Workflow } from "../../../lib/types/workflow_types";
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { useCallback, useEffect, useState } from "react";
|
|||
import { useDropzone } from "react-dropzone";
|
||||
import { deleteDocsFromDataSource, getUploadUrlsForFilesDataSource, addDocsToDataSource, getDownloadUrlForFile, listDocsInDataSource } from "../../../../actions/datasource_actions";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { Pagination, Spinner } from "@nextui-org/react";
|
||||
import { Pagination, Spinner } from "@heroui/react";
|
||||
import { DownloadIcon } from "lucide-react";
|
||||
|
||||
function FileListItem({
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import { z } from "zod";
|
|||
import { Recrawl } from "./web-recrawl";
|
||||
import { deleteDocsFromDataSource, listDocsInDataSource, recrawlWebDataSource, addDocsToDataSource } from "../../../../actions/datasource_actions";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Pagination } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
import { Pagination } from "@heroui/react";
|
||||
import { ExternalLinkIcon } from "lucide-react";
|
||||
import { Textarea } from "@nextui-org/react";
|
||||
import { Textarea } from "@heroui/react";
|
||||
import { FormStatusButton } from "../../../../lib/components/form-status-button";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { WithStringId } from "../../../../lib/types/types";
|
|||
import { DataSource } from "../../../../lib/types/datasource_types";
|
||||
import { PageSection } from "../../../../lib/components/page-section";
|
||||
import { ToggleSource } from "../toggle-source";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
import { SourceStatus } from "../source-status";
|
||||
import { DeleteSource } from "./delete";
|
||||
import { useEffect, useState } from "react";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { Input, Select, SelectItem, Textarea } from "@nextui-org/react"
|
||||
import { Input, Select, SelectItem, Textarea } from "@heroui/react"
|
||||
import { useState } from "react";
|
||||
import { createDataSource, addDocsToDataSource } from "../../../../actions/datasource_actions";
|
||||
import { FormStatusButton } from "../../../../lib/components/form-status-button";
|
||||
|
|
@ -90,14 +90,12 @@ export function Form({
|
|||
</SelectItem> */}
|
||||
<SelectItem
|
||||
key="urls"
|
||||
value="urls"
|
||||
startContent={<DataSourceIcon type="urls" />}
|
||||
>
|
||||
Scrape URLs
|
||||
</SelectItem>
|
||||
<SelectItem
|
||||
key="files"
|
||||
value="files"
|
||||
startContent={<DataSourceIcon type="files" />}
|
||||
>
|
||||
Upload files
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { DataSource } from "../../../lib/types/datasource_types";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Link } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
import { Link } from "@heroui/react";
|
||||
import { z } from 'zod';
|
||||
|
||||
export function SourceStatus({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { Button, Link, Spinner } from "@nextui-org/react";
|
||||
import { Button, Link, Spinner } from "@heroui/react";
|
||||
import { ToggleSource } from "./toggle-source";
|
||||
import { SelfUpdatingSourceStatus } from "./self-updating-source-status";
|
||||
import { DataSourceIcon } from "../../../lib/components/datasource-icon";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
import { toggleDataSource } from "../../../actions/datasource_actions";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Switch } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
import { Switch } from "@heroui/react";
|
||||
import { useState } from "react";
|
||||
|
||||
export function ToggleSource({
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestProfile } from "@/app/lib/types/testing_types";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { createProfile, getProfile, listProfiles, updateProfile, deleteProfile, setDefaultProfile } from "@/app/actions/testing_actions";
|
||||
import { Button, Input, Pagination, Spinner, Switch, Textarea, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Tooltip } from "@nextui-org/react";
|
||||
import { Button, Input, Pagination, Spinner, Switch, Textarea, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Tooltip } from "@heroui/react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
import { PlusIcon, ArrowLeftIcon, StarIcon } from "lucide-react";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestSimulation, TestRun } from "@/app/lib/types/testing_types";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { createRun, getRun, getSimulation, listRuns } from "@/app/actions/testing_actions";
|
||||
import { Button, Input, Pagination, Spinner, Chip } from "@nextui-org/react";
|
||||
import { Button, Input, Pagination, Spinner, Chip } from "@heroui/react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
import { ArrowLeftIcon, PlusIcon, WorkflowIcon } from "lucide-react";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestScenario } from "@/app/lib/types/testing_types";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { createScenario, getScenario, listScenarios, updateScenario, deleteScenario } from "@/app/actions/testing_actions";
|
||||
import { Button, Input, Pagination, Spinner, Textarea, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@nextui-org/react";
|
||||
import { Button, Input, Pagination, Spinner, Textarea, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
import { ArrowLeftIcon, PlusIcon } from "lucide-react";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { WithStringId } from "@/app/lib/types/types";
|
|||
import { TestProfile, TestScenario, TestSimulation } from "@/app/lib/types/testing_types";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { createSimulation, getSimulation, listSimulations, updateSimulation, deleteSimulation, listScenarios, getScenario, getProfile } from "@/app/actions/testing_actions";
|
||||
import { Button, Input, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@nextui-org/react";
|
||||
import { Button, Input, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
import { PlusIcon, ArrowLeftIcon } from "lucide-react";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { WithStringId } from "../../../lib/types/types";
|
|||
import { AgenticAPITool } from "../../../lib/types/agents_api_types";
|
||||
import { WorkflowPrompt, WorkflowAgent, Workflow } from "../../../lib/types/workflow_types";
|
||||
import { DataSource } from "../../../lib/types/datasource_types";
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Radio, RadioGroup, Divider } from "@nextui-org/react";
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Radio, RadioGroup, Divider } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
import { DataSourceIcon } from "../../../lib/components/datasource-icon";
|
||||
import { ActionButton, StructuredPanel } from "../../../lib/components/structured-panel";
|
||||
|
|
@ -14,8 +14,8 @@ import { PlusIcon, SparklesIcon, ChevronRight, ChevronDown } from "lucide-react"
|
|||
import { List } from "./config_list";
|
||||
import { useState, useEffect, useRef } from "react";
|
||||
import { usePreviewModal } from "./preview-modal";
|
||||
import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@nextui-org/react";
|
||||
import { Textarea } from "@nextui-org/react";
|
||||
import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react";
|
||||
import { Textarea } from "@heroui/react";
|
||||
import { PreviewModalProvider } from "./preview-modal";
|
||||
import { CopilotMessage } from "@/app/lib/types/copilot_types";
|
||||
import { getCopilotAgentInstructions } from "@/app/actions/copilot_actions";
|
||||
|
|
@ -57,272 +57,274 @@ export function AgentConfig({
|
|||
const [showGenerateModal, setShowGenerateModal] = useState(false);
|
||||
const { showPreview } = usePreviewModal();
|
||||
|
||||
return <StructuredPanel title={agent.name} actions={[
|
||||
<ActionButton
|
||||
key="close"
|
||||
onClick={handleClose}
|
||||
icon={<svg className="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" d="M6 18 17.94 6M18 18 6.06 6" />
|
||||
</svg>}
|
||||
>
|
||||
Close
|
||||
</ActionButton>
|
||||
]}>
|
||||
<div className="flex flex-col gap-4">
|
||||
{!agent.locked && (
|
||||
return (
|
||||
<StructuredPanel title={agent.name} actions={[
|
||||
<ActionButton
|
||||
key="close"
|
||||
onClick={handleClose}
|
||||
icon={<svg className="w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" d="M6 18 17.94 6M18 18 6.06 6" />
|
||||
</svg>}
|
||||
>
|
||||
Close
|
||||
</ActionButton>
|
||||
]}>
|
||||
<div className="flex flex-col gap-4">
|
||||
{!agent.locked && (
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="name"
|
||||
label="Name"
|
||||
value={agent.name}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
name: value
|
||||
});
|
||||
}}
|
||||
placeholder="Enter agent name"
|
||||
validate={(value) => {
|
||||
if (value.length === 0) {
|
||||
return { valid: false, errorMessage: "Name cannot be empty" };
|
||||
}
|
||||
if (usedAgentNames.has(value)) {
|
||||
return { valid: false, errorMessage: "This name is already taken" };
|
||||
}
|
||||
if (!/^[a-zA-Z0-9_-\s]+$/.test(value)) {
|
||||
return { valid: false, errorMessage: "Name must contain only letters, numbers, underscores, hyphens, and spaces" };
|
||||
}
|
||||
return { valid: true };
|
||||
}}
|
||||
/>
|
||||
</FormSection>
|
||||
)}
|
||||
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="name"
|
||||
label="Name"
|
||||
value={agent.name}
|
||||
key="description"
|
||||
label="Description"
|
||||
value={agent.description || ""}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
name: value
|
||||
description: value
|
||||
});
|
||||
}}
|
||||
placeholder="Enter agent name"
|
||||
validate={(value) => {
|
||||
if (value.length === 0) {
|
||||
return { valid: false, errorMessage: "Name cannot be empty" };
|
||||
}
|
||||
if (usedAgentNames.has(value)) {
|
||||
return { valid: false, errorMessage: "This name is already taken" };
|
||||
}
|
||||
if (!/^[a-zA-Z0-9_-\s]+$/.test(value)) {
|
||||
return { valid: false, errorMessage: "Name must contain only letters, numbers, underscores, hyphens, and spaces" };
|
||||
}
|
||||
return { valid: true };
|
||||
placeholder="Enter a description for this agent"
|
||||
multiline
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="instructions"
|
||||
label="Instructions"
|
||||
value={agent.instructions}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
instructions: value
|
||||
});
|
||||
}}
|
||||
markdown
|
||||
multiline
|
||||
mentions
|
||||
mentionsAtValues={atMentions}
|
||||
showSaveButton={true}
|
||||
showDiscardButton={true}
|
||||
showGenerateButton={{
|
||||
show: showGenerateModal,
|
||||
setShow: setShowGenerateModal
|
||||
}}
|
||||
/>
|
||||
</FormSection>
|
||||
)}
|
||||
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="description"
|
||||
label="Description"
|
||||
value={agent.description || ""}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
description: value
|
||||
});
|
||||
}}
|
||||
placeholder="Enter a description for this agent"
|
||||
multiline
|
||||
/>
|
||||
</FormSection>
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="examples"
|
||||
label="Examples"
|
||||
value={agent.examples || ""}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
examples: value
|
||||
});
|
||||
}}
|
||||
placeholder="Enter examples for this agent"
|
||||
markdown
|
||||
multiline
|
||||
mentions
|
||||
mentionsAtValues={atMentions}
|
||||
showSaveButton={true}
|
||||
showDiscardButton={true}
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="instructions"
|
||||
label="Instructions"
|
||||
value={agent.instructions}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
instructions: value
|
||||
});
|
||||
}}
|
||||
markdown
|
||||
multiline
|
||||
mentions
|
||||
mentionsAtValues={atMentions}
|
||||
showSaveButton={true}
|
||||
showDiscardButton={true}
|
||||
showGenerateButton={{
|
||||
show: showGenerateModal,
|
||||
setShow: setShowGenerateModal
|
||||
}}
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<FormSection showDivider>
|
||||
<EditableField
|
||||
key="examples"
|
||||
label="Examples"
|
||||
value={agent.examples || ""}
|
||||
onChange={(value) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
examples: value
|
||||
});
|
||||
}}
|
||||
placeholder="Enter examples for this agent"
|
||||
markdown
|
||||
multiline
|
||||
mentions
|
||||
mentionsAtValues={atMentions}
|
||||
showSaveButton={true}
|
||||
showDiscardButton={true}
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<FormSection label="RAG (beta)" showDivider>
|
||||
<div className="flex flex-col gap-3">
|
||||
<Dropdown>
|
||||
<DropdownTrigger>
|
||||
<Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
startContent={<PlusIcon size={16} />}
|
||||
className="w-fit text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
|
||||
>
|
||||
Add data source
|
||||
</Button>
|
||||
</DropdownTrigger>
|
||||
<DropdownMenu onAction={(key) => handleUpdate({
|
||||
...agent,
|
||||
ragDataSources: [...(agent.ragDataSources || []), key as string]
|
||||
})}>
|
||||
{dataSources.filter((ds) => !(agent.ragDataSources || []).includes(ds._id)).map((ds) => (
|
||||
<DropdownItem
|
||||
key={ds._id}
|
||||
startContent={<DataSourceIcon type={ds.data.type} />}
|
||||
className="text-foreground dark:text-gray-300"
|
||||
<FormSection label="RAG (beta)" showDivider>
|
||||
<div className="flex flex-col gap-3">
|
||||
<Dropdown>
|
||||
<DropdownTrigger>
|
||||
<Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
startContent={<PlusIcon size={16} />}
|
||||
className="w-fit text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"
|
||||
>
|
||||
{ds.name}
|
||||
</DropdownItem>
|
||||
))}
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
Add data source
|
||||
</Button>
|
||||
</DropdownTrigger>
|
||||
<DropdownMenu onAction={(key) => handleUpdate({
|
||||
...agent,
|
||||
ragDataSources: [...(agent.ragDataSources || []), key as string]
|
||||
})}>
|
||||
{dataSources.filter((ds) => !(agent.ragDataSources || []).includes(ds._id)).map((ds) => (
|
||||
<DropdownItem
|
||||
key={ds._id}
|
||||
startContent={<DataSourceIcon type={ds.data.type} />}
|
||||
className="text-foreground dark:text-gray-300"
|
||||
>
|
||||
{ds.name}
|
||||
</DropdownItem>
|
||||
))}
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
||||
<div className="flex flex-col gap-2">
|
||||
{(agent.ragDataSources || []).map((source) => {
|
||||
const ds = dataSources.find((ds) => ds._id === source);
|
||||
return (
|
||||
<div
|
||||
key={source}
|
||||
className="group flex items-center justify-between p-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-750 transition-colors"
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="p-1 rounded-md bg-white dark:bg-gray-700">
|
||||
<DataSourceIcon type={ds?.data.type} />
|
||||
<div className="flex flex-col gap-2">
|
||||
{(agent.ragDataSources || []).map((source) => {
|
||||
const ds = dataSources.find((ds) => ds._id === source);
|
||||
return (
|
||||
<div
|
||||
key={source}
|
||||
className="group flex items-center justify-between p-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-750 transition-colors"
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="p-1 rounded-md bg-white dark:bg-gray-700">
|
||||
<DataSourceIcon type={ds?.data.type} />
|
||||
</div>
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">
|
||||
{ds?.name || "Unknown"}
|
||||
</span>
|
||||
</div>
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">
|
||||
{ds?.name || "Unknown"}
|
||||
</span>
|
||||
<Button
|
||||
isIconOnly
|
||||
size="sm"
|
||||
variant="light"
|
||||
className="opacity-0 group-hover:opacity-100 transition-opacity text-gray-500 hover:text-red-500"
|
||||
onClick={() => {
|
||||
const newSources = agent.ragDataSources?.filter((s) => s !== source);
|
||||
handleUpdate({
|
||||
...agent,
|
||||
ragDataSources: newSources
|
||||
});
|
||||
}}
|
||||
>
|
||||
<svg className="w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
isIconOnly
|
||||
size="sm"
|
||||
variant="light"
|
||||
className="opacity-0 group-hover:opacity-100 transition-opacity text-gray-500 hover:text-red-500"
|
||||
onClick={() => {
|
||||
const newSources = agent.ragDataSources?.filter((s) => s !== source);
|
||||
handleUpdate({
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{agent.ragDataSources !== undefined && agent.ragDataSources.length > 0 && (
|
||||
<>
|
||||
<button
|
||||
onClick={() => setIsAdvancedConfigOpen(!isAdvancedConfigOpen)}
|
||||
className="flex items-center gap-2 text-xs font-medium text-gray-400 dark:text-gray-500 uppercase hover:text-gray-500 dark:hover:text-gray-400"
|
||||
>
|
||||
{isAdvancedConfigOpen ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
|
||||
Advanced RAG configuration
|
||||
</button>
|
||||
|
||||
{isAdvancedConfigOpen && (
|
||||
<div className="ml-4 flex flex-col gap-4">
|
||||
<Label label="Return type" />
|
||||
<RadioGroup
|
||||
size="sm"
|
||||
orientation="horizontal"
|
||||
value={agent.ragReturnType}
|
||||
onValueChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
ragDataSources: newSources
|
||||
});
|
||||
}}
|
||||
>
|
||||
<svg className="w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
ragReturnType: value as z.infer<typeof WorkflowAgent>['ragReturnType']
|
||||
})}
|
||||
classNames={{
|
||||
label: "text-foreground dark:text-gray-300"
|
||||
}}
|
||||
>
|
||||
<Radio value="chunks">Chunks</Radio>
|
||||
<Radio value="content">Content</Radio>
|
||||
</RadioGroup>
|
||||
<Label label="No. of matches" />
|
||||
<Input
|
||||
variant="bordered"
|
||||
size="sm"
|
||||
className="w-20 text-foreground dark:text-gray-300"
|
||||
value={agent.ragK.toString()}
|
||||
onValueChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
ragK: parseInt(value)
|
||||
})}
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
{agent.ragDataSources !== undefined && agent.ragDataSources.length > 0 && (
|
||||
<>
|
||||
<button
|
||||
onClick={() => setIsAdvancedConfigOpen(!isAdvancedConfigOpen)}
|
||||
className="flex items-center gap-2 text-xs font-medium text-gray-400 dark:text-gray-500 uppercase hover:text-gray-500 dark:hover:text-gray-400"
|
||||
>
|
||||
{isAdvancedConfigOpen ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
|
||||
Advanced RAG configuration
|
||||
</button>
|
||||
|
||||
{isAdvancedConfigOpen && (
|
||||
<div className="ml-4 flex flex-col gap-4">
|
||||
<Label label="Return type" />
|
||||
<RadioGroup
|
||||
size="sm"
|
||||
orientation="horizontal"
|
||||
value={agent.ragReturnType}
|
||||
onValueChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
ragReturnType: value as z.infer<typeof WorkflowAgent>['ragReturnType']
|
||||
})}
|
||||
classNames={{
|
||||
label: "text-foreground dark:text-gray-300"
|
||||
}}
|
||||
>
|
||||
<Radio value="chunks">Chunks</Radio>
|
||||
<Radio value="content">Content</Radio>
|
||||
</RadioGroup>
|
||||
<Label label="No. of matches" />
|
||||
<Input
|
||||
variant="bordered"
|
||||
size="sm"
|
||||
className="w-20 text-foreground dark:text-gray-300"
|
||||
value={agent.ragK.toString()}
|
||||
onValueChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
ragK: parseInt(value)
|
||||
})}
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
<FormSection label="Model" showDivider>
|
||||
<CustomDropdown
|
||||
value={agent.model}
|
||||
options={WorkflowAgent.shape.model.options.map((model) => ({
|
||||
key: model.value,
|
||||
label: model.value
|
||||
}))}
|
||||
onChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
model: value as z.infer<typeof WorkflowAgent>['model']
|
||||
})}
|
||||
className="w-40"
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<FormSection label="Conversation control after turn">
|
||||
<CustomDropdown
|
||||
value={agent.controlType}
|
||||
options={[
|
||||
{ key: "retain", label: "Retain control" },
|
||||
{ key: "relinquish_to_parent", label: "Relinquish to parent" },
|
||||
{ key: "relinquish_to_start", label: "Relinquish to 'start' agent" }
|
||||
]}
|
||||
onChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
controlType: value as z.infer<typeof WorkflowAgent>['controlType']
|
||||
})}
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<Divider />
|
||||
|
||||
<PreviewModalProvider>
|
||||
<GenerateInstructionsModal
|
||||
projectId={projectId}
|
||||
workflow={workflow}
|
||||
agent={agent}
|
||||
isOpen={showGenerateModal}
|
||||
onClose={() => setShowGenerateModal(false)}
|
||||
currentInstructions={agent.instructions}
|
||||
onApply={(newInstructions) => {
|
||||
handleUpdate({
|
||||
<FormSection label="Model" showDivider>
|
||||
<CustomDropdown
|
||||
value={agent.model}
|
||||
options={WorkflowAgent.shape.model.options.map((model) => ({
|
||||
key: model.value,
|
||||
label: model.value
|
||||
}))}
|
||||
onChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
instructions: newInstructions
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</PreviewModalProvider>
|
||||
</div>
|
||||
</StructuredPanel>;
|
||||
model: value as z.infer<typeof WorkflowAgent>['model']
|
||||
})}
|
||||
className="w-40"
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<FormSection label="Conversation control after turn">
|
||||
<CustomDropdown
|
||||
value={agent.controlType}
|
||||
options={[
|
||||
{ key: "retain", label: "Retain control" },
|
||||
{ key: "relinquish_to_parent", label: "Relinquish to parent" },
|
||||
{ key: "relinquish_to_start", label: "Relinquish to 'start' agent" }
|
||||
]}
|
||||
onChange={(value) => handleUpdate({
|
||||
...agent,
|
||||
controlType: value as z.infer<typeof WorkflowAgent>['controlType']
|
||||
})}
|
||||
/>
|
||||
</FormSection>
|
||||
|
||||
<Divider />
|
||||
|
||||
<PreviewModalProvider>
|
||||
<GenerateInstructionsModal
|
||||
projectId={projectId}
|
||||
workflow={workflow}
|
||||
agent={agent}
|
||||
isOpen={showGenerateModal}
|
||||
onClose={() => setShowGenerateModal(false)}
|
||||
currentInstructions={agent.instructions}
|
||||
onApply={(newInstructions) => {
|
||||
handleUpdate({
|
||||
...agent,
|
||||
instructions: newInstructions
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</PreviewModalProvider>
|
||||
</div>
|
||||
</StructuredPanel>
|
||||
);
|
||||
}
|
||||
|
||||
function GenerateInstructionsModal({
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { z } from "zod";
|
|||
import { useCallback, useEffect, useState } from "react";
|
||||
import { WorkflowEditor } from "./workflow_editor";
|
||||
import { WorkflowSelector } from "./workflow_selector";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Spinner } from "@heroui/react";
|
||||
import { cloneWorkflow, createWorkflow, fetchPublishedWorkflowId, fetchWorkflow } from "../../../actions/workflow_actions";
|
||||
import { listDataSources } from "../../../actions/datasource_actions";
|
||||
import { TestProfile } from "@/app/lib/types/testing_types";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { Button, Textarea } from "@nextui-org/react";
|
||||
import { Button, Textarea } from "@heroui/react";
|
||||
import { ActionButton, StructuredPanel } from "../../../lib/components/structured-panel";
|
||||
import { useEffect, useRef, useState, createContext, useContext, useCallback } from "react";
|
||||
import { CopilotChatContext } from "../../../lib/types/copilot_types";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { z } from "zod";
|
|||
import { AgenticAPITool } from "../../../lib/types/agents_api_types";
|
||||
import { WorkflowPrompt } from "../../../lib/types/workflow_types";
|
||||
import { WorkflowAgent } from "../../../lib/types/workflow_types";
|
||||
import { Dropdown, DropdownItem, DropdownTrigger, DropdownMenu } from "@nextui-org/react";
|
||||
import { Dropdown, DropdownItem, DropdownTrigger, DropdownMenu } from "@heroui/react";
|
||||
import { useRef, useEffect } from "react";
|
||||
import { ActionButton, StructuredPanel } from "../../../lib/components/structured-panel";
|
||||
import clsx from "clsx";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import MarkdownContent from "../../../lib/components/markdown-content";
|
|||
import React, { PureComponent } from 'react';
|
||||
import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer-continued';
|
||||
import { XIcon } from "lucide-react";
|
||||
import { Button } from "@nextui-org/react";
|
||||
import { Button } from "@heroui/react";
|
||||
|
||||
// Create the context type
|
||||
export type PreviewModalContextType = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
import { WorkflowAgent, WorkflowPrompt, WorkflowTool } from "../../../lib/types/workflow_types";
|
||||
import { Divider } from "@nextui-org/react";
|
||||
import { Divider } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
import { ActionButton, StructuredPanel } from "../../../lib/components/structured-panel";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
"use client";
|
||||
import { WorkflowTool } from "../../../lib/types/workflow_types";
|
||||
import { Accordion, AccordionItem, Button, Checkbox, Select, SelectItem, Switch, RadioGroup, Radio } from "@nextui-org/react";
|
||||
import { Accordion, AccordionItem, Button, Checkbox, Select, SelectItem, Switch, RadioGroup, Radio } from "@heroui/react";
|
||||
import { z } from "zod";
|
||||
import { ActionButton, StructuredPanel } from "../../../lib/components/structured-panel";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { Divider } from "@nextui-org/react";
|
||||
import { Divider } from "@heroui/react";
|
||||
import { Label } from "../../../lib/components/label";
|
||||
import { TrashIcon, XIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { Link as NextUILink } from "@nextui-org/react";
|
||||
import { Link as NextUILink } from "@heroui/react";
|
||||
import Link from "next/link";
|
||||
|
||||
export function ParameterConfig({
|
||||
|
|
@ -71,7 +71,7 @@ export function ParameterConfig({
|
|||
}}
|
||||
>
|
||||
{['string', 'number', 'boolean', 'array', 'object'].map(type => (
|
||||
<SelectItem key={type} value={type}>
|
||||
<SelectItem key={type}>
|
||||
{type}
|
||||
</SelectItem>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { AgentConfig } from "./agent_config";
|
|||
import { ToolConfig } from "./tool_config";
|
||||
import { App as ChatApp } from "../playground/app";
|
||||
import { z } from "zod";
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Spinner, Tooltip } from "@nextui-org/react";
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Spinner, Tooltip } from "@heroui/react";
|
||||
import { PromptConfig } from "./prompt_config";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useEffect, useState, useCallback } from "react";
|
|||
import { PublishedBadge } from "./published_badge";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { listWorkflows } from "../../../actions/workflow_actions";
|
||||
import { Button, Divider, Pagination } from "@nextui-org/react";
|
||||
import { Button, Divider, Pagination } from "@heroui/react";
|
||||
import { WorkflowIcon } from "../../../lib/components/icons";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import { Link, Button, Spinner } from "@nextui-org/react";
|
||||
import { Link, Button, Spinner } from "@heroui/react";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { Project } from "../lib/types/project_types";
|
||||
import { default as NextLink } from "next/link";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { cn, Input } from "@nextui-org/react";
|
||||
import { cn, Input } from "@heroui/react";
|
||||
import { createProject } from "../../actions/project_actions";
|
||||
import { templates } from "../../lib/project_templates";
|
||||
import { WorkflowTemplate } from "../../lib/types/workflow_types";
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
// app/providers.tsx
|
||||
'use client'
|
||||
|
||||
import { NextUIProvider } from '@nextui-org/react'
|
||||
import { HeroUIProvider } from "@heroui/react"
|
||||
import { useRouter } from 'next/navigation'
|
||||
|
||||
export function Providers({ className, children }: { className: string, children: React.ReactNode }) {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<NextUIProvider className={className} navigate={router.push}>
|
||||
<HeroUIProvider className={className} navigate={router.push}>
|
||||
{children}
|
||||
</NextUIProvider >
|
||||
</HeroUIProvider >
|
||||
)
|
||||
}
|
||||
11101
apps/rowboat/package-lock.json
generated
11101
apps/rowboat/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -22,9 +22,9 @@
|
|||
"@langchain/core": "^0.3.7",
|
||||
"@langchain/textsplitters": "^0.1.0",
|
||||
"@mendable/firecrawl-js": "^1.0.3",
|
||||
"@nextui-org/react": "^2.4.6",
|
||||
"@nextui-org/system": "^2.2.5",
|
||||
"@nextui-org/theme": "^2.2.9",
|
||||
"@heroui/react": "2.7.4",
|
||||
"@heroui/system": "2.4.11",
|
||||
"@heroui/theme": "2.4.11",
|
||||
"@primer/react": "^36.27.0",
|
||||
"@qdrant/js-client-rest": "^1.13.0",
|
||||
"ai": "^3.3.28",
|
||||
|
|
@ -72,4 +72,4 @@
|
|||
"tsx": "^4.19.1",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { nextui } from '@nextui-org/theme';
|
||||
import { heroui } from "@heroui/theme";
|
||||
import type { Config } from "tailwindcss";
|
||||
|
||||
const config: Config = {
|
||||
|
|
@ -7,8 +7,8 @@ const config: Config = {
|
|||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./node_modules/@nextui-org/theme/dist/components/[object Object].js",
|
||||
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
|
||||
"./node_modules/@heroui/theme/dist/components/[object Object].js",
|
||||
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
|
|
@ -66,7 +66,7 @@ const config: Config = {
|
|||
}
|
||||
},
|
||||
plugins: [
|
||||
nextui(),
|
||||
heroui(),
|
||||
require("tailwindcss-animate")
|
||||
],
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue