mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-27 09:26:23 +02:00
use relative imports in typescript
This commit is contained in:
parent
6260c64126
commit
2cdc25ab7e
50 changed files with 108 additions and 111 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use server';
|
||||
import { SimulationData, EmbeddingDoc, GetInformationToolResult, AgenticAPIChatRequest, convertFromAgenticAPIChatMessages, WebpageCrawlResponse, Workflow, WorkflowAgent, CopilotAPIRequest, CopilotAPIResponse, CopilotMessage, CopilotWorkflow, convertToCopilotWorkflow, convertToCopilotApiMessage, convertToCopilotMessage, CopilotAssistantMessage, CopilotChatContext, convertToCopilotApiChatContext, WorkflowTool, WorkflowPrompt, EmbeddingRecord } from "../lib/types";
|
||||
import { generateObject, generateText, embed } from "ai";
|
||||
import { dataSourceDocsCollection, dataSourcesCollection, embeddingsCollection, webpagesCollection } from "@/app/lib/mongodb";
|
||||
import { dataSourceDocsCollection, dataSourcesCollection, embeddingsCollection, webpagesCollection } from "../lib/mongodb";
|
||||
import { z } from 'zod';
|
||||
import { openai } from "@ai-sdk/openai";
|
||||
import FirecrawlApp, { ScrapeResponse } from '@mendable/firecrawl-js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use server';
|
||||
import { redirect } from "next/navigation";
|
||||
import { ObjectId, WithId } from "mongodb";
|
||||
import { dataSourcesCollection, dataSourceDocsCollection } from "@/app/lib/mongodb";
|
||||
import { dataSourcesCollection, dataSourceDocsCollection } from "../lib/mongodb";
|
||||
import { z } from 'zod';
|
||||
import { GetObjectCommand, PutObjectCommand } from "@aws-sdk/client-s3";
|
||||
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use server';
|
||||
import { redirect } from "next/navigation";
|
||||
import { ObjectId } from "mongodb";
|
||||
import { dataSourcesCollection, embeddingsCollection, projectsCollection, agentWorkflowsCollection, scenariosCollection, projectMembersCollection, apiKeysCollection, dataSourceDocsCollection } from "@/app/lib/mongodb";
|
||||
import { dataSourcesCollection, embeddingsCollection, projectsCollection, agentWorkflowsCollection, scenariosCollection, projectMembersCollection, apiKeysCollection, dataSourceDocsCollection } from "../lib/mongodb";
|
||||
import { z } from 'zod';
|
||||
import crypto from 'crypto';
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use server';
|
||||
import { ObjectId } from "mongodb";
|
||||
import { scenariosCollection } from "@/app/lib/mongodb";
|
||||
import { scenariosCollection } from "../lib/mongodb";
|
||||
import { z } from 'zod';
|
||||
import { Scenario, WithStringId } from "../lib/types";
|
||||
import { projectAuthCheck } from "./project_actions";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
'use server';
|
||||
|
||||
import { ObjectId } from "mongodb";
|
||||
import { scenariosCollection } from "@/app/lib/mongodb";
|
||||
import { scenariosCollection } from "../lib/mongodb";
|
||||
import { z } from 'zod';
|
||||
import { projectAuthCheck } from "./project_actions";
|
||||
import { Scenario, type WithStringId } from "@/app/lib/types";
|
||||
import { SimulationScenarioData } from "@/app/lib/types";
|
||||
import { Scenario, type WithStringId } from "../lib/types";
|
||||
import { SimulationScenarioData } from "../lib/types";
|
||||
|
||||
export async function getScenarios(projectId: string): Promise<WithStringId<z.infer<typeof Scenario>>[]> {
|
||||
await projectAuthCheck(projectId);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use server';
|
||||
import { ObjectId, WithId } from "mongodb";
|
||||
import { projectsCollection, agentWorkflowsCollection } from "@/app/lib/mongodb";
|
||||
import { projectsCollection, agentWorkflowsCollection } from "../lib/mongodb";
|
||||
import { z } from 'zod';
|
||||
import { templates } from "../lib/project_templates";
|
||||
import { projectAuthCheck } from "./project_actions";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { agentWorkflowsCollection, db, projectsCollection } from "@/app/lib/mongodb";
|
||||
import { agentWorkflowsCollection, db, projectsCollection } from "../../../../lib/mongodb";
|
||||
import { z } from "zod";
|
||||
import { ObjectId } from "mongodb";
|
||||
import { authCheck } from "@/app/api/v1/utils";
|
||||
import { convertFromApiToAgenticApiMessages, convertFromAgenticApiToApiMessages, AgenticAPIChatRequest, ApiRequest, ApiResponse, convertWorkflowToAgenticAPI } from "@/app/lib/types";
|
||||
import { getAgenticApiResponse } from "@/app/lib/utils";
|
||||
import { check_query_limit } from "@/app/lib/rate_limiting";
|
||||
import { authCheck } from "../../utils";
|
||||
import { convertFromApiToAgenticApiMessages, convertFromAgenticApiToApiMessages, AgenticAPIChatRequest, ApiRequest, ApiResponse, convertWorkflowToAgenticAPI } from "../../../../lib/types";
|
||||
import { getAgenticApiResponse } from "../../../../lib/utils";
|
||||
import { check_query_limit } from "../../../../lib/rate_limiting";
|
||||
|
||||
// get next turn / agent response
|
||||
export async function POST(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { apiKeysCollection, projectsCollection } from "@/app/lib/mongodb";
|
||||
import { apiKeysCollection, projectsCollection } from "../../lib/mongodb";
|
||||
|
||||
export async function authCheck(projectId: string, req: NextRequest, handler: () => Promise<Response>): Promise<Response> {
|
||||
const authHeader = req.headers.get('Authorization');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { db } from "@/app/lib/mongodb";
|
||||
import { db } from "../../../../../../lib/mongodb";
|
||||
import { z } from "zod";
|
||||
import { ObjectId } from "mongodb";
|
||||
import { authCheck } from "../../../utils";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { db } from "@/app/lib/mongodb";
|
||||
import { db } from "../../../../../../lib/mongodb";
|
||||
import { z } from "zod";
|
||||
import { Filter, ObjectId } from "mongodb";
|
||||
import { authCheck } from "../../../utils";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { db } from "@/app/lib/mongodb";
|
||||
import { db } from "../../../../../lib/mongodb";
|
||||
import { z } from "zod";
|
||||
import { ObjectId } from "mongodb";
|
||||
import { authCheck } from "../../utils";
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { agentWorkflowsCollection, db, projectsCollection } from "@/app/lib/mongodb";
|
||||
import { agentWorkflowsCollection, db, projectsCollection } from "../../../../../../lib/mongodb";
|
||||
import { z } from "zod";
|
||||
import { ObjectId, WithId } from "mongodb";
|
||||
import { authCheck } from "../../../utils";
|
||||
import { AgenticAPIChatRequest, convertFromAgenticAPIChatMessages, convertToAgenticAPIChatMessages, convertWorkflowToAgenticAPI } from "@/app/lib/types";
|
||||
import { callClientToolWebhook, getAgenticApiResponse } from "@/app/lib/utils";
|
||||
import { check_query_limit } from "@/app/lib/rate_limiting";
|
||||
import { AgenticAPIChatRequest, convertFromAgenticAPIChatMessages, convertToAgenticAPIChatMessages, convertWorkflowToAgenticAPI } from "../../../../../../lib/types";
|
||||
import { callClientToolWebhook, getAgenticApiResponse } from "../../../../../../lib/utils";
|
||||
import { check_query_limit } from "../../../../../../lib/rate_limiting";
|
||||
|
||||
const chatsCollection = db.collection<z.infer<typeof apiV1.Chat>>("chats");
|
||||
const chatMessagesCollection = db.collection<z.infer<typeof apiV1.ChatMessage>>("chatMessages");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { db } from "@/app/lib/mongodb";
|
||||
import { db } from "../../../../lib/mongodb";
|
||||
import { z } from "zod";
|
||||
import { ObjectId } from "mongodb";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { SignJWT, jwtVerify } from "jose";
|
|||
import { z } from "zod";
|
||||
import { Session } from "../../utils";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { projectsCollection } from "@/app/lib/mongodb";
|
||||
import { projectsCollection } from "../../../../../lib/mongodb";
|
||||
|
||||
export async function POST(req: NextRequest): Promise<Response> {
|
||||
return await clientIdCheck(req, async (projectId) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextRequest } from "next/server";
|
||||
import { z } from "zod";
|
||||
import { jwtVerify } from "jose";
|
||||
import { projectsCollection } from "@/app/lib/mongodb";
|
||||
import { projectsCollection } from "../../../lib/mongodb";
|
||||
|
||||
export const Session = z.object({
|
||||
userId: z.string(),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Button, Input, InputProps, Kbd, Textarea } from "@nextui-org/react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useClickAway } from "@/hooks/use-click-away";
|
||||
import MarkdownContent from "@/app/lib/components/markdown-content";
|
||||
import { useClickAway } from "../../../hooks/use-click-away";
|
||||
import MarkdownContent from "./markdown-content";
|
||||
import clsx from "clsx";
|
||||
import { Label } from "@/app/lib/components/label";
|
||||
import { Label } from "./label";
|
||||
|
||||
interface EditableFieldProps {
|
||||
value: string;
|
||||
|
|
|
|||
|
|
@ -814,4 +814,4 @@ export function convertFromAgenticApiToApiMessages(messages: z.infer<typeof Agen
|
|||
}
|
||||
}
|
||||
return converted;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { AgenticAPIChatMessage, AgenticAPIChatRequest, AgenticAPIChatResponse, ClientToolCallJwt, ClientToolCallRequest, ClientToolCallRequestBody, convertFromAgenticAPIChatMessages, Workflow } from "@/app/lib/types";
|
||||
import { AgenticAPIChatMessage, AgenticAPIChatRequest, AgenticAPIChatResponse, ClientToolCallJwt, ClientToolCallRequest, ClientToolCallRequestBody, convertFromAgenticAPIChatMessages, Workflow } from "../lib/types";
|
||||
import { z } from "zod";
|
||||
import { projectsCollection } from "./mongodb";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
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 { ReactNode, useEffect, useState, useCallback } from "react";
|
||||
import { getProjectConfig, updateProjectName, updateWebhookUrl, createApiKey, deleteApiKey, listApiKeys, deleteProject, rotateSecret } from "@/app/actions/project_actions";
|
||||
import { CopyButton } from "@/app/lib/components/copy-button";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { getProjectConfig, updateProjectName, updateWebhookUrl, createApiKey, deleteApiKey, listApiKeys, deleteProject, rotateSecret } from "../../../actions/project_actions";
|
||||
import { CopyButton } from "../../../lib/components/copy-button";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { EyeIcon, EyeOffIcon, CopyIcon, MoreVerticalIcon, PlusIcon, EllipsisVerticalIcon } from "lucide-react";
|
||||
import { WithStringId, ApiKey } from "@/app/lib/types";
|
||||
import { WithStringId, ApiKey } from "../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { Label } from "@/app/lib/components/label";
|
||||
import { Label } from "../../../lib/components/label";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Project config",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Link from "next/link";
|
|||
import { useEffect, useState } from "react";
|
||||
import clsx from "clsx";
|
||||
import Menu from "./menu";
|
||||
import { getProjectConfig } from "@/app/actions/project_actions";
|
||||
import { getProjectConfig } from "../../actions/project_actions";
|
||||
import { ChevronsLeftIcon, ChevronsRightIcon, FolderOpenIcon, PanelLeftCloseIcon, PanelLeftOpenIcon } from "lucide-react";
|
||||
|
||||
export function Nav({
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
import { Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Spinner } from "@nextui-org/react";
|
||||
import { useEffect, useState, useMemo, useCallback } from "react";
|
||||
import { z } from "zod";
|
||||
import { PlaygroundChat, SimulationData, SimulationScenarioData, Workflow } from "@/app/lib/types";
|
||||
import { PlaygroundChat, SimulationData, SimulationScenarioData, Workflow } from "../../../lib/types";
|
||||
import { SimulateScenarioOption, SimulateURLOption } from "./simulation-options";
|
||||
import { Chat } from "./chat";
|
||||
import { useSearchParams, useRouter } from "next/navigation";
|
||||
import { ActionButton, Pane } from "../workflow/pane";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { EllipsisVerticalIcon, MessageSquarePlusIcon, PlayIcon } from "lucide-react";
|
||||
import { getScenario } from "@/app/actions/simulation_actions";
|
||||
import { getScenario } from "../../../actions/simulation_actions";
|
||||
|
||||
function SimulateLabel() {
|
||||
return <span>Simulate<sup className="pl-1">beta</sup></span>;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
'use client';
|
||||
import { getAssistantResponse, simulateUserResponse } from "@/app/actions/actions";
|
||||
import { getAssistantResponse, simulateUserResponse } from "../../../actions/actions";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Messages } from "./messages";
|
||||
import z from "zod";
|
||||
import { AgenticAPIChatRequest, convertToAgenticAPIChatMessages, convertWorkflowToAgenticAPI, PlaygroundChat, Workflow } from "@/app/lib/types";
|
||||
import { AgenticAPIChatRequest, convertToAgenticAPIChatMessages, convertWorkflowToAgenticAPI, PlaygroundChat, Workflow } from "../../../lib/types";
|
||||
import { ComposeBox } from "./compose-box";
|
||||
import { Button, Spinner } from "@nextui-org/react";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { CopyButton } from "@/app/lib/components/copy-button";
|
||||
import { CopyButton } from "../../../lib/components/copy-button";
|
||||
|
||||
export function CopyAsJsonButton({ onCopy }: { onCopy: () => void }) {
|
||||
return <div className="absolute top-0 right-0">
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
import { Button, Spinner, Textarea } from "@nextui-org/react";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import z from "zod";
|
||||
import { GetInformationToolResult, WebpageCrawlResponse, Workflow, WorkflowTool } from "@/app/lib/types";
|
||||
import { executeClientTool, getInformationTool, scrapeWebpage, suggestToolResponse } from "@/app/actions/actions";
|
||||
import MarkdownContent from "@/app/lib/components/markdown-content";
|
||||
import { GetInformationToolResult, WebpageCrawlResponse, Workflow, WorkflowTool } from "../../../lib/types";
|
||||
import { executeClientTool, getInformationTool, scrapeWebpage, suggestToolResponse } from "../../../actions/actions";
|
||||
import MarkdownContent from "../../../lib/components/markdown-content";
|
||||
import Link from "next/link";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { MessageSquareIcon, EllipsisIcon, CircleCheckIcon, ChevronsDownIcon, ChevronsRightIcon, ChevronRightIcon, ChevronDownIcon, ExternalLinkIcon, XIcon } from "lucide-react";
|
||||
|
||||
function UserMessage({ content }: { content: string }) {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Spinner, Textarea } from "@nextui-org/react";
|
||||
import { useState, useEffect } from "react";
|
||||
import { getScenarios, createScenario, updateScenario, deleteScenario } from "@/app/actions/scenario_actions";
|
||||
import { Scenario, WithStringId } from "@/app/lib/types";
|
||||
import { getScenarios, createScenario, updateScenario, deleteScenario } from "../../../actions/scenario_actions";
|
||||
import { Scenario, WithStringId } from "../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { EllipsisVerticalIcon, PlayIcon, PlusIcon } from "lucide-react";
|
||||
|
||||
export function AddScenarioForm({
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
'use client';
|
||||
import { Input, Textarea } from "@nextui-org/react";
|
||||
import { FormStatusButton } from "@/app/lib/components/FormStatusButton";
|
||||
import { SimulationData } from "@/app/lib/types";
|
||||
import { FormStatusButton } from "../../../lib/components/FormStatusButton";
|
||||
import { SimulationData } from "../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { scrapeWebpage } from "@/app/actions/actions";
|
||||
import { scrapeWebpage } from "../../../actions/actions";
|
||||
import { ScenarioList } from "./scenario-list";
|
||||
|
||||
export function SimulateURLOption({
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import {
|
|||
createScenario,
|
||||
updateScenario,
|
||||
deleteScenario,
|
||||
} from '@/app/actions/simulation_actions';
|
||||
import { Scenario, type WithStringId } from '@/app/lib/types';
|
||||
} from '../../../actions/simulation_actions';
|
||||
import { Scenario, type WithStringId } from '../../../lib/types';
|
||||
import { z } from 'zod';
|
||||
|
||||
type ScenarioType = WithStringId<z.infer<typeof Scenario>>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { deleteDataSource } from "@/app/actions/datasource_actions";
|
||||
import { FormStatusButton } from "@/app/lib/components/FormStatusButton";
|
||||
import { deleteDataSource } from "../../../../actions/datasource_actions";
|
||||
import { FormStatusButton } from "../../../../lib/components/FormStatusButton";
|
||||
|
||||
export function DeleteSource({
|
||||
projectId,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
"use client";
|
||||
import { PageSection } from "@/app/lib/components/PageSection";
|
||||
import { DataSource, DataSourceDoc, WithStringId } from "@/app/lib/types";
|
||||
import { PageSection } from "../../../../lib/components/PageSection";
|
||||
import { DataSource, DataSourceDoc, WithStringId } from "../../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import { deleteDocsFromDataSource, getUploadUrlsForFilesDataSource, addDocsToDataSource, getDownloadUrlForFile, listDocsInDataSource } from "@/app/actions/datasource_actions";
|
||||
import { deleteDocsFromDataSource, getUploadUrlsForFilesDataSource, addDocsToDataSource, getDownloadUrlForFile, listDocsInDataSource } from "../../../../actions/datasource_actions";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { Pagination, Spinner } from "@nextui-org/react";
|
||||
import { DownloadIcon } from "lucide-react";
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
"use client";
|
||||
import { PageSection } from "@/app/lib/components/PageSection";
|
||||
import { DataSource, DataSourceDoc, WithStringId } from "@/app/lib/types";
|
||||
import { PageSection } from "../../../../lib/components/PageSection";
|
||||
import { DataSource, DataSourceDoc, WithStringId } from "../../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { Recrawl } from "./web-recrawl";
|
||||
import { deleteDocsFromDataSource, listDocsInDataSource, recrawlWebDataSource, addDocsToDataSource } from "@/app/actions/datasource_actions";
|
||||
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 { ExternalLinkIcon } from "lucide-react";
|
||||
import { Textarea } from "@nextui-org/react";
|
||||
import { FormStatusButton } from "@/app/lib/components/FormStatusButton";
|
||||
import { FormStatusButton } from "../../../../lib/components/FormStatusButton";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
|
||||
function UrlListItem({
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
'use client';
|
||||
import { DataSource, WithStringId } from "@/app/lib/types";
|
||||
import { PageSection } from "@/app/lib/components/PageSection";
|
||||
import { DataSource, WithStringId } from "../../../../lib/types";
|
||||
import { PageSection } from "../../../../lib/components/PageSection";
|
||||
import { ToggleSource } from "../toggle-source";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { SourceStatus } from "../source-status";
|
||||
import { DeleteSource } from "./delete";
|
||||
import { useEffect, useState } from "react";
|
||||
import { DataSourceIcon } from "@/app/lib/components/datasource-icon";
|
||||
import { DataSourceIcon } from "../../../../lib/components/datasource-icon";
|
||||
import { z } from "zod";
|
||||
import { TableLabel, TableValue } from "./shared";
|
||||
import { ScrapeSource } from "./scrape-source";
|
||||
import { FilesSource } from "./files-source";
|
||||
import { getDataSource } from "@/app/actions/datasource_actions";
|
||||
import { getDataSource } from "../../../../actions/datasource_actions";
|
||||
|
||||
export function SourcePage({
|
||||
sourceId,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { FormStatusButton } from "@/app/lib/components/FormStatusButton";
|
||||
import { FormStatusButton } from "../../../../lib/components/FormStatusButton";
|
||||
import { RefreshCwIcon } from "lucide-react";
|
||||
|
||||
export function Recrawl({
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
'use client';
|
||||
import { Input, Select, SelectItem, Textarea } from "@nextui-org/react"
|
||||
import { useState } from "react";
|
||||
import { createDataSource, addDocsToDataSource } from "@/app/actions/datasource_actions";
|
||||
import { FormStatusButton } from "@/app/lib/components/FormStatusButton";
|
||||
import { DataSourceIcon } from "@/app/lib/components/datasource-icon";
|
||||
import { createDataSource, addDocsToDataSource } from "../../../../actions/datasource_actions";
|
||||
import { FormStatusButton } from "../../../../lib/components/FormStatusButton";
|
||||
import { DataSourceIcon } from "../../../../lib/components/datasource-icon";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
import { getDataSource } from "@/app/actions/datasource_actions";
|
||||
import { DataSource } from "@/app/lib/types";
|
||||
import { getDataSource } from "../../../actions/datasource_actions";
|
||||
import { DataSource } from "../../../lib/types";
|
||||
import { useEffect, useState } from "react";
|
||||
import { z } from 'zod';
|
||||
import { SourceStatus } from "./source-status";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DataSource } from "@/app/lib/types";
|
||||
import { DataSource } from "../../../lib/types";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Link } from "@nextui-org/react";
|
||||
import { z } from 'zod';
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
import { Button, Link, Spinner } from "@nextui-org/react";
|
||||
import { ToggleSource } from "./toggle-source";
|
||||
import { SelfUpdatingSourceStatus } from "./self-updating-source-status";
|
||||
import { DataSourceIcon } from "@/app/lib/components/datasource-icon";
|
||||
import { DataSourceIcon } from "../../../lib/components/datasource-icon";
|
||||
import { useEffect, useState } from "react";
|
||||
import { DataSource, WithStringId } from "@/app/lib/types";
|
||||
import { DataSource, WithStringId } from "../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { listDataSources } from "@/app/actions/datasource_actions";
|
||||
import { listDataSources } from "../../../actions/datasource_actions";
|
||||
|
||||
export function SourcesList({
|
||||
projectId,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
'use client';
|
||||
import { toggleDataSource } from "@/app/actions/datasource_actions";
|
||||
import { toggleDataSource } from "../../../actions/datasource_actions";
|
||||
import { Spinner } from "@nextui-org/react";
|
||||
import { Switch } from "@nextui-org/react";
|
||||
import { useState } from "react";
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
"use client";
|
||||
import { AgenticAPITool, DataSource, WithStringId, WorkflowAgent, WorkflowPrompt } from "@/app/lib/types";
|
||||
import { AgenticAPITool, DataSource, WithStringId, WorkflowAgent, WorkflowPrompt } from "../../../lib/types";
|
||||
import { Button, Divider, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Input, Radio, RadioGroup, Select, SelectItem } from "@nextui-org/react";
|
||||
import { z } from "zod";
|
||||
import { DataSourceIcon } from "@/app/lib/components/datasource-icon";
|
||||
import { DataSourceIcon } from "../../../lib/components/datasource-icon";
|
||||
import { ActionButton, Pane } from "./pane";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { Label } from "@/app/lib/components/label";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { Label } from "../../../lib/components/label";
|
||||
import { PlusIcon, XIcon } from "lucide-react";
|
||||
import { List } from "./config_list";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
"use client";
|
||||
import { DataSource, Workflow, WithStringId } from "@/app/lib/types";
|
||||
import { DataSource, Workflow, WithStringId } from "../../../lib/types";
|
||||
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 { cloneWorkflow, createWorkflow, fetchPublishedWorkflowId, fetchWorkflow } from "@/app/actions/workflow_actions";
|
||||
import { listDataSources } from "@/app/actions/datasource_actions";
|
||||
import { cloneWorkflow, createWorkflow, fetchPublishedWorkflowId, fetchWorkflow } from "../../../actions/workflow_actions";
|
||||
import { listDataSources } from "../../../actions/datasource_actions";
|
||||
|
||||
export function App({
|
||||
projectId,
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
import { Button, Textarea } from "@nextui-org/react";
|
||||
import { ActionButton, Pane } from "./pane";
|
||||
import { useEffect, useRef, useState, createContext, useContext, useCallback } from "react";
|
||||
import { CopilotAssistantMessage, CopilotMessage, CopilotUserMessage, Workflow, CopilotChatContext, CopilotAssistantMessageActionPart } from "@/app/lib/types";
|
||||
import { CopilotAssistantMessage, CopilotMessage, CopilotUserMessage, Workflow, CopilotChatContext, CopilotAssistantMessageActionPart } from "../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { getCopilotResponse } from "@/app/actions/actions";
|
||||
import { getCopilotResponse } from "../../../actions/actions";
|
||||
import { Action } from "./copilot_actions";
|
||||
import clsx from "clsx";
|
||||
import { Action as WorkflowDispatch } from "./workflow_editor";
|
||||
import MarkdownContent from "@/app/lib/components/markdown-content";
|
||||
import MarkdownContent from "../../../lib/components/markdown-content";
|
||||
import { CopyAsJsonButton } from "../playground/copy-as-json-button";
|
||||
import { CornerDownLeftIcon, SendIcon } from "lucide-react";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { createContext, useContext, useState } from "react";
|
||||
import clsx from "clsx";
|
||||
import { z } from "zod";
|
||||
import { Workflow, CopilotAssistantMessage, CopilotAssistantMessageActionPart } from "@/app/lib/types";
|
||||
import { Workflow, CopilotAssistantMessage, CopilotAssistantMessageActionPart } from "../../../lib/types";
|
||||
import { PreviewModalProvider, usePreviewModal } from './preview-modal';
|
||||
import { getAppliedChangeKey } from "./copilot";
|
||||
import { AlertTriangleIcon, CheckCheckIcon, CheckIcon, ChevronsDownIcon, ChevronsUpIcon, EyeIcon, PencilIcon, PlusIcon } from "lucide-react";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from "zod";
|
||||
import { WorkflowAgent, WorkflowPrompt, AgenticAPITool } from "@/app/lib/types";
|
||||
import { WorkflowAgent, WorkflowPrompt, AgenticAPITool } from "../../../lib/types";
|
||||
import { Dropdown, DropdownItem, DropdownTrigger, DropdownMenu } from "@nextui-org/react";
|
||||
import { useRef, useEffect } from "react";
|
||||
import { ActionButton, Pane } from "./pane";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { createContext, useContext, useEffect, useState } from "react";
|
||||
import clsx from "clsx";
|
||||
import MarkdownContent from "@/app/lib/components/markdown-content";
|
||||
import MarkdownContent from "../../../lib/components/markdown-content";
|
||||
import React, { PureComponent } from 'react';
|
||||
import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer-continued';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
"use client";
|
||||
import { WorkflowPrompt } from "@/app/lib/types";
|
||||
import { WorkflowPrompt } from "../../../lib/types";
|
||||
import { Divider, Input, Textarea } from "@nextui-org/react";
|
||||
import { z } from "zod";
|
||||
import { ActionButton, Pane } from "./pane";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
|
||||
export function PromptConfig({
|
||||
prompt,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
"use client";
|
||||
import { WorkflowTool } from "@/app/lib/types";
|
||||
import { WorkflowTool } from "../../../lib/types";
|
||||
import { Accordion, AccordionItem, Button, Checkbox, Select, SelectItem, Switch } from "@nextui-org/react";
|
||||
import { z } from "zod";
|
||||
import { ActionButton, Pane } from "./pane";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { Divider } from "@nextui-org/react";
|
||||
import { Label } from "@/app/lib/components/label";
|
||||
import { Label } from "../../../lib/components/label";
|
||||
import { TrashIcon, XIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"use client";
|
||||
import { DataSource, Workflow, WorkflowAgent, WorkflowPrompt, WorkflowTool, WithStringId } from "@/app/lib/types";
|
||||
import { DataSource, Workflow, WorkflowAgent, WorkflowPrompt, WorkflowTool, WithStringId } from "../../../lib/types";
|
||||
import { useReducer, Reducer, useState, useCallback, useEffect, useRef } from "react";
|
||||
import { produce, applyPatches, enablePatches, produceWithPatches, Patch } from 'immer';
|
||||
import { AgentConfig } from "./agent_config";
|
||||
|
|
@ -8,19 +8,19 @@ import { App as ChatApp } from "../playground/app";
|
|||
import { z } from "zod";
|
||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, Spinner, Tooltip } from "@nextui-org/react";
|
||||
import { PromptConfig } from "./prompt_config";
|
||||
import { EditableField } from "@/app/lib/components/editable-field";
|
||||
import { EditableField } from "../../../lib/components/editable-field";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
|
||||
import {
|
||||
ResizableHandle,
|
||||
ResizablePanel,
|
||||
ResizablePanelGroup,
|
||||
} from "@/components/ui/resizable"
|
||||
} from "../../../../components/ui/resizable"
|
||||
import { Copilot } from "./copilot";
|
||||
import { apiV1 } from "rowboat-shared";
|
||||
import { publishWorkflow, renameWorkflow, saveWorkflow } from "@/app/actions/workflow_actions";
|
||||
import { publishWorkflow, renameWorkflow, saveWorkflow } from "../../../actions/workflow_actions";
|
||||
import { PublishedBadge } from "./published_badge";
|
||||
import { BackIcon, HamburgerIcon, WorkflowIcon } from "@/app/lib/components/icons";
|
||||
import { BackIcon, HamburgerIcon, WorkflowIcon } from "../../../lib/components/icons";
|
||||
import { CopyIcon, Layers2Icon, RadioIcon, RedoIcon, UndoIcon } from "lucide-react";
|
||||
import { EntityList } from "./entity_list";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
"use client";
|
||||
import { Workflow, WithStringId } from "@/app/lib/types";
|
||||
import { Workflow, WithStringId } from "../../../lib/types";
|
||||
import { z } from "zod";
|
||||
import { useEffect, useState, useCallback } from "react";
|
||||
import { PublishedBadge } from "./published_badge";
|
||||
import { RelativeTime } from "@primer/react";
|
||||
import { listWorkflows } from "@/app/actions/workflow_actions";
|
||||
import { listWorkflows } from "../../../actions/workflow_actions";
|
||||
import { Button, Divider, Pagination } from "@nextui-org/react";
|
||||
import { WorkflowIcon } from "@/app/lib/components/icons";
|
||||
import { WorkflowIcon } from "../../../lib/components/icons";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
|
||||
const pageSize = 5;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import logo from "@/public/rowboat-logo.png";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { UserButton } from "@/app/lib/components/user_button";
|
||||
import { UserButton } from "../lib/components/user_button";
|
||||
|
||||
export default function Layout({
|
||||
children,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
'use client';
|
||||
import { cn, Input } from "@nextui-org/react";
|
||||
import { createProject } from "@/app/actions/project_actions";
|
||||
import { templates } from "@/app/lib/project_templates";
|
||||
import { WorkflowTemplate } from "@/app/lib/types";
|
||||
import { FormStatusButton } from "@/app/lib/components/FormStatusButton";
|
||||
import { createProject } from "../../actions/project_actions";
|
||||
import { templates } from "../../lib/project_templates";
|
||||
import { WorkflowTemplate } from "../../lib/types";
|
||||
import { FormStatusButton } from "../../lib/components/FormStatusButton";
|
||||
import { useFormStatus } from "react-dom";
|
||||
import { z } from "zod";
|
||||
import { useState } from "react";
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@
|
|||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue