diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2ba34316b2..b151ddb1aa 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,16 +9,17 @@ Generated using https://ecotrust-canada.github.io/markdown-toc/. I've copy/pasted the whole document there, without the previous two headings. --> -- [Local setup](#local-setup) - - [Requirements](#requirements) - - [Setup the repo](#setup-the-repo) - - [Install JS dependencies](#install-js-dependencies) - - [Install python dependencies](#install-python-dependencies) -- [Start the Chainlit server from source](#start-the-chainlit-server-from-source) -- [Start the UI from source](#start-the-ui-from-source) -- [Run the tests](#run-the-tests) - - [Run one test](#run-one-test) - +- [Contribute to Chainlit](#contribute-to-chainlit) + - [Table of Contents](#table-of-contents) + - [Local setup](#local-setup) + - [Requirements](#requirements) + - [Setup the repo](#setup-the-repo) + - [Install JS dependencies](#install-js-dependencies) + - [Install python dependencies](#install-python-dependencies) + - [Start the Chainlit server from source](#start-the-chainlit-server-from-source) + - [Start the UI from source](#start-the-ui-from-source) + - [Run the tests](#run-the-tests) + - [Run one test](#run-one-test) ## Local setup @@ -90,7 +91,7 @@ You need to build the UI once before starting the server. pnpm run buildUi ``` -Start by running `src/chainlit/hello.py` as an example. +Start by running `backend/hello.py` as an example. ```sh cd src @@ -108,7 +109,7 @@ First, you will have to start the server either [from source](#start-the-chainli Then, start the UI. ```sh -cd src/chainlit/frontend +cd frontend pnpm run dev --port 5174 ``` diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index a14e52a996..45e14e6ffc 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./src/ + working-directory: ./backend steps: - uses: actions/checkout@v3 - name: Set up Python diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e20314e1b9..53f488d5ea 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -37,8 +37,8 @@ jobs: python-version: "3.8" - name: Install Poetry uses: snok/install-poetry@v1 - - name: Copy readme to src - run: cp README.md src/ + - name: Copy readme to backend + run: cp README.md backend/ - name: Install JS dependencies run: pnpm install --no-frozen-lockfile - name: Build chainlit @@ -46,5 +46,5 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: src/dist + packages-dir: backend/dist password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.md index 03ea9662ad..7c3ec4e64f 100644 --- a/PRIVACY_POLICY.md +++ b/PRIVACY_POLICY.md @@ -2,7 +2,7 @@ ## 📏 Telemetry -Chainlit collects specific metadata points by default to help us better understand and improve the package based on community usage. We greatly value your privacy and ensure that the metadata we collect [is limited](/src/chainlit//telemetry.py). +Chainlit collects specific metadata points by default to help us better understand and improve the package based on community usage. We greatly value your privacy and ensure that the metadata we collect [is limited](/backend/telemetry.py). ### 🕵️‍♀️ Scope diff --git a/src/README.md b/backend/README.md similarity index 100% rename from src/README.md rename to backend/README.md diff --git a/src/chainlit/__init__.py b/backend/chainlit/__init__.py similarity index 100% rename from src/chainlit/__init__.py rename to backend/chainlit/__init__.py diff --git a/src/chainlit/__main__.py b/backend/chainlit/__main__.py similarity index 100% rename from src/chainlit/__main__.py rename to backend/chainlit/__main__.py diff --git a/src/chainlit/action.py b/backend/chainlit/action.py similarity index 99% rename from src/chainlit/action.py rename to backend/chainlit/action.py index 008d4856d0..03e450461f 100644 --- a/src/chainlit/action.py +++ b/backend/chainlit/action.py @@ -1,11 +1,10 @@ import uuid from typing import Optional -from dataclasses_json import DataClassJsonMixin -from pydantic.dataclasses import Field, dataclass - from chainlit.context import context from chainlit.telemetry import trace_event +from dataclasses_json import DataClassJsonMixin +from pydantic.dataclasses import Field, dataclass @dataclass diff --git a/src/chainlit/cache.py b/backend/chainlit/cache.py similarity index 100% rename from src/chainlit/cache.py rename to backend/chainlit/cache.py diff --git a/src/chainlit/chat_settings.py b/backend/chainlit/chat_settings.py similarity index 99% rename from src/chainlit/chat_settings.py rename to backend/chainlit/chat_settings.py index f29e40812b..d6df3bd28a 100644 --- a/src/chainlit/chat_settings.py +++ b/backend/chainlit/chat_settings.py @@ -1,9 +1,8 @@ from typing import List -from pydantic.dataclasses import Field, dataclass - from chainlit.context import context from chainlit.input_widget import InputWidget +from pydantic.dataclasses import Field, dataclass @dataclass diff --git a/src/chainlit/cli/__init__.py b/backend/chainlit/cli/__init__.py similarity index 100% rename from src/chainlit/cli/__init__.py rename to backend/chainlit/cli/__init__.py diff --git a/src/chainlit/cli/auth.py b/backend/chainlit/cli/auth.py similarity index 99% rename from src/chainlit/cli/auth.py rename to backend/chainlit/cli/auth.py index c24ef4c0e5..93554f8060 100644 --- a/src/chainlit/cli/auth.py +++ b/backend/chainlit/cli/auth.py @@ -10,7 +10,6 @@ AsymmetricSignatureVerifier, TokenVerifier, ) - from chainlit.logger import logger AUTH0_DOMAIN = "auth.chainlit.io" diff --git a/src/chainlit/cli/deploy.py b/backend/chainlit/cli/deploy.py similarity index 99% rename from src/chainlit/cli/deploy.py rename to backend/chainlit/cli/deploy.py index 6c9e4c3fe0..3a2a3d9813 100644 --- a/src/chainlit/cli/deploy.py +++ b/backend/chainlit/cli/deploy.py @@ -4,7 +4,6 @@ import tempfile import requests - from chainlit.cli.auth import get_access_token from chainlit.cli.utils import check_file from chainlit.config import config diff --git a/src/chainlit/cli/utils.py b/backend/chainlit/cli/utils.py similarity index 100% rename from src/chainlit/cli/utils.py rename to backend/chainlit/cli/utils.py diff --git a/src/chainlit/client/base.py b/backend/chainlit/client/base.py similarity index 99% rename from src/chainlit/client/base.py rename to backend/chainlit/client/base.py index ebafc65c67..db06c7a68b 100644 --- a/src/chainlit/client/base.py +++ b/backend/chainlit/client/base.py @@ -11,10 +11,6 @@ Union, ) -from dataclasses_json import DataClassJsonMixin -from pydantic.dataclasses import dataclass -from starlette.datastructures import Headers - from chainlit.prompt import Prompt from chainlit.types import ( ConversationFilter, @@ -23,6 +19,9 @@ ElementType, Pagination, ) +from dataclasses_json import DataClassJsonMixin +from pydantic.dataclasses import dataclass +from starlette.datastructures import Headers class MessageDict(TypedDict): diff --git a/src/chainlit/client/cloud.py b/backend/chainlit/client/cloud.py similarity index 99% rename from src/chainlit/client/cloud.py rename to backend/chainlit/client/cloud.py index 44ac2b4e6a..2a7ea76b76 100644 --- a/src/chainlit/client/cloud.py +++ b/backend/chainlit/client/cloud.py @@ -3,12 +3,11 @@ from typing import Any, Dict, Mapping, Optional, Union, cast import aiohttp -from python_graphql_client import GraphqlClient -from starlette.datastructures import Headers - from chainlit.client.base import MessageDict, UserDict from chainlit.config import config from chainlit.logger import logger +from python_graphql_client import GraphqlClient +from starlette.datastructures import Headers from .base import BaseAuthClient, BaseDBClient, PageInfo, PaginatedResponse, UserDict diff --git a/src/chainlit/client/local.py b/backend/chainlit/client/local.py similarity index 99% rename from src/chainlit/client/local.py rename to backend/chainlit/client/local.py index 4fb0817798..3d6b5b642f 100644 --- a/src/chainlit/client/local.py +++ b/backend/chainlit/client/local.py @@ -6,7 +6,6 @@ from typing import Dict, Optional, Union, cast import aiofiles - from chainlit.client.base import PageInfo, PaginatedResponse from chainlit.config import config from chainlit.logger import logger diff --git a/src/chainlit/client/utils.py b/backend/chainlit/client/utils.py similarity index 99% rename from src/chainlit/client/utils.py rename to backend/chainlit/client/utils.py index 708a238f1f..417898a3a2 100644 --- a/src/chainlit/client/utils.py +++ b/backend/chainlit/client/utils.py @@ -1,12 +1,11 @@ from typing import Dict, Optional -from fastapi import HTTPException, Request -from starlette.datastructures import Headers - from chainlit.client.base import BaseAuthClient, BaseDBClient, UserDict from chainlit.client.cloud import CloudAuthClient, CloudDBClient from chainlit.client.local import LocalAuthClient, LocalDBClient from chainlit.config import config +from fastapi import HTTPException, Request +from starlette.datastructures import Headers async def get_auth_client( diff --git a/src/chainlit/config.py b/backend/chainlit/config.py similarity index 99% rename from src/chainlit/config.py rename to backend/chainlit/config.py index 104a139d30..24a5ae25cd 100644 --- a/src/chainlit/config.py +++ b/backend/chainlit/config.py @@ -4,13 +4,12 @@ from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Union import tomli +from chainlit.logger import logger +from chainlit.version import __version__ from dataclasses_json import DataClassJsonMixin from pydantic.dataclasses import dataclass from starlette.datastructures import Headers -from chainlit.logger import logger -from chainlit.version import __version__ - if TYPE_CHECKING: from chainlit.action import Action from chainlit.client.base import BaseAuthClient, BaseDBClient diff --git a/src/chainlit/context.py b/backend/chainlit/context.py similarity index 99% rename from src/chainlit/context.py rename to backend/chainlit/context.py index 5ab5a49a9a..7fac133a0d 100644 --- a/src/chainlit/context.py +++ b/backend/chainlit/context.py @@ -2,9 +2,8 @@ from contextvars import ContextVar from typing import TYPE_CHECKING -from lazify import LazyProxy - from chainlit.session import Session +from lazify import LazyProxy if TYPE_CHECKING: from chainlit.emitter import ChainlitEmitter diff --git a/src/chainlit/db/__init__.py b/backend/chainlit/db/__init__.py similarity index 100% rename from src/chainlit/db/__init__.py rename to backend/chainlit/db/__init__.py diff --git a/src/chainlit/db/prisma/schema.prisma b/backend/chainlit/db/prisma/schema.prisma similarity index 100% rename from src/chainlit/db/prisma/schema.prisma rename to backend/chainlit/db/prisma/schema.prisma diff --git a/src/chainlit/element.py b/backend/chainlit/element.py similarity index 99% rename from src/chainlit/element.py rename to backend/chainlit/element.py index 77d59540e3..c4447a22ac 100644 --- a/src/chainlit/element.py +++ b/backend/chainlit/element.py @@ -6,12 +6,11 @@ import aiofiles import filetype -from pydantic.dataclasses import Field, dataclass - from chainlit.client.base import BaseDBClient, ElementDict from chainlit.context import context from chainlit.telemetry import trace_event from chainlit.types import ElementDisplay, ElementSize, ElementType +from pydantic.dataclasses import Field, dataclass mime_types = { "text": "text/plain", diff --git a/src/chainlit/emitter.py b/backend/chainlit/emitter.py similarity index 99% rename from src/chainlit/emitter.py rename to backend/chainlit/emitter.py index 0b8334bf79..d76b453820 100644 --- a/src/chainlit/emitter.py +++ b/backend/chainlit/emitter.py @@ -1,12 +1,11 @@ import uuid from typing import Any, Dict, Union, cast -from socketio.exceptions import TimeoutError - from chainlit.client.base import BaseDBClient, MessageDict from chainlit.message import Message from chainlit.session import Session from chainlit.types import AskSpec, FileSpec +from socketio.exceptions import TimeoutError class ChainlitEmitter: diff --git a/src/chainlit/haystack/__init__.py b/backend/chainlit/haystack/__init__.py similarity index 100% rename from src/chainlit/haystack/__init__.py rename to backend/chainlit/haystack/__init__.py diff --git a/src/chainlit/haystack/callbacks.py b/backend/chainlit/haystack/callbacks.py similarity index 100% rename from src/chainlit/haystack/callbacks.py rename to backend/chainlit/haystack/callbacks.py index b71a60fc91..bbedf7e57d 100644 --- a/src/chainlit/haystack/callbacks.py +++ b/backend/chainlit/haystack/callbacks.py @@ -1,11 +1,11 @@ from typing import Any, Generic, List, Optional, TypeVar +from chainlit.config import config +from chainlit.context import context from haystack.agents import Agent, Tool from haystack.agents.agent_step import AgentStep import chainlit as cl -from chainlit.config import config -from chainlit.context import context T = TypeVar("T") diff --git a/src/chainlit/hello.py b/backend/chainlit/hello.py similarity index 100% rename from src/chainlit/hello.py rename to backend/chainlit/hello.py diff --git a/src/chainlit/input_widget.py b/backend/chainlit/input_widget.py similarity index 99% rename from src/chainlit/input_widget.py rename to backend/chainlit/input_widget.py index 4e1a1e53ac..7b2624a536 100644 --- a/src/chainlit/input_widget.py +++ b/backend/chainlit/input_widget.py @@ -2,9 +2,8 @@ from collections import defaultdict from typing import Any, Dict, List, Optional -from pydantic.dataclasses import Field, dataclass - from chainlit.types import InputWidgetType +from pydantic.dataclasses import Field, dataclass @dataclass diff --git a/src/chainlit/langchain/__init__.py b/backend/chainlit/langchain/__init__.py similarity index 100% rename from src/chainlit/langchain/__init__.py rename to backend/chainlit/langchain/__init__.py diff --git a/src/chainlit/langchain/callbacks.py b/backend/chainlit/langchain/callbacks.py similarity index 99% rename from src/chainlit/langchain/callbacks.py rename to backend/chainlit/langchain/callbacks.py index f070787e86..4e61a4f4d7 100644 --- a/src/chainlit/langchain/callbacks.py +++ b/backend/chainlit/langchain/callbacks.py @@ -10,6 +10,8 @@ from chainlit.prompt import Prompt, PromptMessage from chainlit.sync import run_sync +from chainlit import input_widget + IGNORE_LIST = [] # type: List[str] DEFAULT_ANSWER_PREFIX_TOKENS = ["Final", "Answer", ":"] diff --git a/src/chainlit/langflow/__init__.py b/backend/chainlit/langflow/__init__.py similarity index 99% rename from src/chainlit/langflow/__init__.py rename to backend/chainlit/langflow/__init__.py index f433dbb492..9d314308ec 100644 --- a/src/chainlit/langflow/__init__.py +++ b/backend/chainlit/langflow/__init__.py @@ -8,7 +8,6 @@ from typing import Dict, Optional, Union import aiohttp - from chainlit.telemetry import trace_event diff --git a/src/chainlit/llama_index/__init__.py b/backend/chainlit/llama_index/__init__.py similarity index 100% rename from src/chainlit/llama_index/__init__.py rename to backend/chainlit/llama_index/__init__.py diff --git a/src/chainlit/llama_index/callbacks.py b/backend/chainlit/llama_index/callbacks.py similarity index 99% rename from src/chainlit/llama_index/callbacks.py rename to backend/chainlit/llama_index/callbacks.py index b923fcee78..34370dc0d4 100644 --- a/src/chainlit/llama_index/callbacks.py +++ b/backend/chainlit/llama_index/callbacks.py @@ -1,14 +1,13 @@ import asyncio from typing import Any, Dict, List, Optional -from llama_index.callbacks.base import BaseCallbackHandler -from llama_index.callbacks.schema import CBEventType, EventPayload -from llama_index.llms.base import ChatMessage, ChatResponse, CompletionResponse - from chainlit.context import context_var from chainlit.element import Text from chainlit.message import Message from chainlit.prompt import Prompt, PromptMessage +from llama_index.callbacks.base import BaseCallbackHandler +from llama_index.callbacks.schema import CBEventType, EventPayload +from llama_index.llms.base import ChatMessage, ChatResponse, CompletionResponse DEFAULT_IGNORE = [ CBEventType.CHUNKING, diff --git a/src/chainlit/logger.py b/backend/chainlit/logger.py similarity index 100% rename from src/chainlit/logger.py rename to backend/chainlit/logger.py diff --git a/src/chainlit/markdown.py b/backend/chainlit/markdown.py similarity index 100% rename from src/chainlit/markdown.py rename to backend/chainlit/markdown.py diff --git a/src/chainlit/message.py b/backend/chainlit/message.py similarity index 100% rename from src/chainlit/message.py rename to backend/chainlit/message.py diff --git a/src/chainlit/playground/__init__.py b/backend/chainlit/playground/__init__.py similarity index 100% rename from src/chainlit/playground/__init__.py rename to backend/chainlit/playground/__init__.py diff --git a/src/chainlit/playground/config.py b/backend/chainlit/playground/config.py similarity index 100% rename from src/chainlit/playground/config.py rename to backend/chainlit/playground/config.py diff --git a/src/chainlit/playground/provider.py b/backend/chainlit/playground/provider.py similarity index 100% rename from src/chainlit/playground/provider.py rename to backend/chainlit/playground/provider.py index b7714c1700..234af441ae 100644 --- a/src/chainlit/playground/provider.py +++ b/backend/chainlit/playground/provider.py @@ -1,14 +1,14 @@ import os from typing import Any, Dict, List, Union -from fastapi import HTTPException -from pydantic.dataclasses import dataclass - -from chainlit import input_widget from chainlit.config import config from chainlit.prompt import Prompt, PromptMessage from chainlit.telemetry import trace_event from chainlit.types import CompletionRequest +from fastapi import HTTPException +from pydantic.dataclasses import dataclass + +from chainlit import input_widget @dataclass diff --git a/src/chainlit/playground/providers/__init__.py b/backend/chainlit/playground/providers/__init__.py similarity index 100% rename from src/chainlit/playground/providers/__init__.py rename to backend/chainlit/playground/providers/__init__.py diff --git a/src/chainlit/playground/providers/anthropic.py b/backend/chainlit/playground/providers/anthropic.py similarity index 99% rename from src/chainlit/playground/providers/anthropic.py rename to backend/chainlit/playground/providers/anthropic.py index d124131c4e..8daf0ae988 100644 --- a/src/chainlit/playground/providers/anthropic.py +++ b/backend/chainlit/playground/providers/anthropic.py @@ -1,9 +1,8 @@ -from fastapi import HTTPException -from fastapi.responses import StreamingResponse - from chainlit.input_widget import Select, Slider, Tags from chainlit.playground.provider import BaseProvider from chainlit.prompt import PromptMessage +from fastapi import HTTPException +from fastapi.responses import StreamingResponse class AnthropicProvider(BaseProvider): diff --git a/src/chainlit/playground/providers/huggingface.py b/backend/chainlit/playground/providers/huggingface.py similarity index 99% rename from src/chainlit/playground/providers/huggingface.py rename to backend/chainlit/playground/providers/huggingface.py index 574048f5f6..62beef8102 100644 --- a/src/chainlit/playground/providers/huggingface.py +++ b/backend/chainlit/playground/providers/huggingface.py @@ -1,12 +1,11 @@ from typing import Optional -from fastapi import HTTPException -from fastapi.responses import StreamingResponse -from pydantic.dataclasses import dataclass - from chainlit.input_widget import Slider from chainlit.playground.provider import BaseProvider from chainlit.sync import make_async +from fastapi import HTTPException +from fastapi.responses import StreamingResponse +from pydantic.dataclasses import dataclass @dataclass diff --git a/src/chainlit/playground/providers/langchain.py b/backend/chainlit/playground/providers/langchain.py similarity index 98% rename from src/chainlit/playground/providers/langchain.py rename to backend/chainlit/playground/providers/langchain.py index 8a314fea3a..3eda1c84c7 100644 --- a/src/chainlit/playground/providers/langchain.py +++ b/backend/chainlit/playground/providers/langchain.py @@ -6,6 +6,8 @@ from chainlit.prompt import PromptMessage from chainlit.sync import make_async +from chainlit import input_widget + class LangchainGenericProvider(BaseProvider): from langchain.chat_models.base import BaseChatModel diff --git a/src/chainlit/playground/providers/openai.py b/backend/chainlit/playground/providers/openai.py similarity index 99% rename from src/chainlit/playground/providers/openai.py rename to backend/chainlit/playground/providers/openai.py index 53c4499941..f85bb486f2 100644 --- a/src/chainlit/playground/providers/openai.py +++ b/backend/chainlit/playground/providers/openai.py @@ -1,10 +1,9 @@ from contextlib import contextmanager -from fastapi import HTTPException -from fastapi.responses import StreamingResponse - from chainlit.input_widget import Select, Slider, Tags from chainlit.playground.provider import BaseProvider +from fastapi import HTTPException +from fastapi.responses import StreamingResponse openai_common_inputs = [ Slider( diff --git a/src/chainlit/prompt.py b/backend/chainlit/prompt.py similarity index 100% rename from src/chainlit/prompt.py rename to backend/chainlit/prompt.py diff --git a/src/chainlit/py.typed b/backend/chainlit/py.typed similarity index 100% rename from src/chainlit/py.typed rename to backend/chainlit/py.typed diff --git a/src/chainlit/server.py b/backend/chainlit/server.py similarity index 99% rename from src/chainlit/server.py rename to backend/chainlit/server.py index f1c243a55f..de5319a947 100644 --- a/src/chainlit/server.py +++ b/backend/chainlit/server.py @@ -10,13 +10,6 @@ from contextlib import asynccontextmanager from pathlib import Path -from fastapi import FastAPI, HTTPException, Request -from fastapi.responses import FileResponse, HTMLResponse, JSONResponse -from fastapi.staticfiles import StaticFiles -from fastapi_socketio import SocketManager -from starlette.middleware.cors import CORSMiddleware -from watchfiles import awatch - from chainlit.client.utils import ( get_auth_client_from_request, get_db_client_from_request, @@ -32,6 +25,12 @@ GetConversationsRequest, UpdateFeedbackRequest, ) +from fastapi import FastAPI, HTTPException, Request +from fastapi.responses import FileResponse, HTMLResponse, JSONResponse +from fastapi.staticfiles import StaticFiles +from fastapi_socketio import SocketManager +from starlette.middleware.cors import CORSMiddleware +from watchfiles import awatch @asynccontextmanager @@ -113,7 +112,7 @@ async def watch_files_for_changes(): os._exit(0) -root_dir = os.path.dirname(os.path.abspath(__file__)) +root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) build_dir = os.path.join(root_dir, "frontend/dist") app = FastAPI(lifespan=lifespan) diff --git a/src/chainlit/session.py b/backend/chainlit/session.py similarity index 100% rename from src/chainlit/session.py rename to backend/chainlit/session.py diff --git a/src/chainlit/socket.py b/backend/chainlit/socket.py similarity index 100% rename from src/chainlit/socket.py rename to backend/chainlit/socket.py diff --git a/src/chainlit/sync.py b/backend/chainlit/sync.py similarity index 99% rename from src/chainlit/sync.py rename to backend/chainlit/sync.py index d43861000f..f85f0562b2 100644 --- a/src/chainlit/sync.py +++ b/backend/chainlit/sync.py @@ -11,7 +11,6 @@ from asyncer import asyncify from syncer import sync - from chainlit.context import context make_async = asyncify diff --git a/src/chainlit/telemetry.py b/backend/chainlit/telemetry.py similarity index 99% rename from src/chainlit/telemetry.py rename to backend/chainlit/telemetry.py index 4d798de1ce..dde363369f 100644 --- a/src/chainlit/telemetry.py +++ b/backend/chainlit/telemetry.py @@ -10,7 +10,6 @@ from socket import gethostname import uptrace - from chainlit.config import config from chainlit.version import __version__ diff --git a/src/chainlit/types.py b/backend/chainlit/types.py similarity index 99% rename from src/chainlit/types.py rename to backend/chainlit/types.py index 9de99cf235..c220471597 100644 --- a/src/chainlit/types.py +++ b/backend/chainlit/types.py @@ -1,11 +1,10 @@ from typing import Any, Dict, List, Literal, Optional, TypedDict, Union +from chainlit.prompt import Prompt from dataclasses_json import DataClassJsonMixin from pydantic import BaseModel from pydantic.dataclasses import dataclass -from chainlit.prompt import Prompt - InputWidgetType = Literal[ "switch", "slider", "select", "textinput", "tags", "numberinput" ] diff --git a/src/chainlit/user_session.py b/backend/chainlit/user_session.py similarity index 100% rename from src/chainlit/user_session.py rename to backend/chainlit/user_session.py diff --git a/src/chainlit/utils.py b/backend/chainlit/utils.py similarity index 99% rename from src/chainlit/utils.py rename to backend/chainlit/utils.py index c654651f2c..ff92881b30 100644 --- a/src/chainlit/utils.py +++ b/backend/chainlit/utils.py @@ -3,11 +3,10 @@ import inspect from typing import Callable -from packaging import version - from chainlit.context import context from chainlit.logger import logger from chainlit.message import ErrorMessage +from packaging import version def wrap_user_function(user_function: Callable, with_task=False) -> Callable: diff --git a/src/chainlit/version.py b/backend/chainlit/version.py similarity index 100% rename from src/chainlit/version.py rename to backend/chainlit/version.py diff --git a/src/pyproject.toml b/backend/pyproject.toml similarity index 100% rename from src/pyproject.toml rename to backend/pyproject.toml diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index 13a6033258..95efaa17c9 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -1,20 +1,23 @@ -import * as dotenv from "dotenv"; +import * as dotenv from 'dotenv'; + +import { installChainlit, runTests } from './utils'; + dotenv.config(); -import { installChainlit, runTests } from "./utils"; async function main() { - const matchName = process.env.SINGLE_TEST || "*"; + const matchName = process.env.SINGLE_TEST || '*'; const skipBuild = process.env.SKIP_BUILD; if (!skipBuild) { await installChainlit(); } + await runTests(matchName); } main() .then(() => { - console.log("Done!"); + console.log('Done!'); process.exit(0); }) .catch((error) => { diff --git a/cypress/support/run.ts b/cypress/support/run.ts index 11d4d1579a..98b393bd32 100644 --- a/cypress/support/run.ts +++ b/cypress/support/run.ts @@ -3,7 +3,13 @@ import { spawn } from "child_process"; import sh from "shell-exec"; import { existsSync, unlinkSync } from "fs"; import * as kill from "kill-port"; -import { CHAINLIT_DIR, CHAINLIT_PORT, E2E_DIR, ExecutionMode, runCommand } from "./utils"; +import { + BACKEND_DIR, + CHAINLIT_PORT, + E2E_DIR, + ExecutionMode, + runCommand, +} from "./utils"; interface CmdResult { stdout: string; @@ -11,40 +17,41 @@ interface CmdResult { } const killPort = async (port: number): Promise => { - if (process.platform === 'win32') return kill(port) - - return sh(`lsof -nPi :${port}`) - .then(res => { - const { stdout } = res - if (!stdout) return Promise.reject(`No process running on port ${port}`) - return sh( - `lsof -nPi :${port} | grep 'LISTEN' | awk '{print $2}' | xargs kill -9` - ) - }) -} + if (process.platform === "win32") return kill(port); + + return sh(`lsof -nPi :${port}`).then((res) => { + const { stdout } = res; + if (!stdout) return Promise.reject(`No process running on port ${port}`); + return sh( + `lsof -nPi :${port} | grep 'LISTEN' | awk '{print $2}' | xargs kill -9` + ); + }); +}; function cleanLocalData(testDir: string) { if (existsSync(join(testDir, ".chainlit/chat_files"))) { - runCommand("rm -rf .chainlit/chat_files", testDir) + runCommand("rm -rf .chainlit/chat_files", testDir); } if (existsSync(join(testDir, ".chainlit/chat.db"))) { unlinkSync(join(testDir, ".chainlit/chat.db")); } } -export const runChainlitForTest = async (testName: string, mode: ExecutionMode) => { +export const runChainlitForTest = async ( + testName: string, + mode: ExecutionMode +) => { try { - await killPort(CHAINLIT_PORT) - console.log(`Process on port ${CHAINLIT_PORT} killed`) + await killPort(CHAINLIT_PORT); + console.log(`Process on port ${CHAINLIT_PORT} killed`); } catch (error) { - console.log(`Could not kill process on port ${CHAINLIT_PORT}. ${error}.`) + console.log(`Could not kill process on port ${CHAINLIT_PORT}. ${error}.`); } return new Promise((resolve, reject) => { - const dir = join(E2E_DIR, testName); - let file = "main.py" - if (mode === ExecutionMode.Async) file = "main_async.py" - if (mode === ExecutionMode.Sync) file = "main_sync.py" + let file = "main.py"; + if (mode === ExecutionMode.Async) file = "main_async.py"; + if (mode === ExecutionMode.Sync) file = "main_sync.py"; cleanLocalData(dir); @@ -52,7 +59,7 @@ export const runChainlitForTest = async (testName: string, mode: ExecutionMode) const options = [ "run", "-C", - CHAINLIT_DIR, + BACKEND_DIR, "chainlit", "run", file, @@ -83,7 +90,7 @@ export const runChainlitForTest = async (testName: string, mode: ExecutionMode) reject("child process exited with code " + code); }); }); -} +}; runChainlitForTest(process.argv[2], process.argv[3] as ExecutionMode) .then(() => { diff --git a/cypress/support/utils.ts b/cypress/support/utils.ts index 7126c7e198..9154029793 100644 --- a/cypress/support/utils.ts +++ b/cypress/support/utils.ts @@ -3,8 +3,8 @@ import { join } from "path"; const ROOT = process.cwd(); export const E2E_DIR = join(ROOT, "cypress/e2e"); -export const CHAINLIT_DIR = join(ROOT, "src"); -const FRONTEND_DIR = join(CHAINLIT_DIR, "chainlit", "frontend"); +export const BACKEND_DIR = join(ROOT, "backend"); +const FRONTEND_DIR = join(ROOT, "frontend"); export const CHAINLIT_PORT = 8000; export enum ExecutionMode { @@ -35,5 +35,5 @@ export function runCommand(command: string, cwd = ROOT) { export function installChainlit() { runCommand("pnpm run build", FRONTEND_DIR); - runCommand(`poetry install -C ${CHAINLIT_DIR} --with tests`); + runCommand(`poetry install -C ${BACKEND_DIR} --with tests`); } diff --git a/src/chainlit/frontend/.eslintignore b/frontend/.eslintignore similarity index 100% rename from src/chainlit/frontend/.eslintignore rename to frontend/.eslintignore diff --git a/src/chainlit/frontend/.eslintrc b/frontend/.eslintrc similarity index 100% rename from src/chainlit/frontend/.eslintrc rename to frontend/.eslintrc diff --git a/src/chainlit/frontend/.gitignore b/frontend/.gitignore similarity index 100% rename from src/chainlit/frontend/.gitignore rename to frontend/.gitignore diff --git a/src/chainlit/frontend/.prettierrc b/frontend/.prettierrc similarity index 100% rename from src/chainlit/frontend/.prettierrc rename to frontend/.prettierrc diff --git a/src/chainlit/frontend/babel.config.cjs b/frontend/babel.config.cjs similarity index 100% rename from src/chainlit/frontend/babel.config.cjs rename to frontend/babel.config.cjs diff --git a/src/chainlit/frontend/index.html b/frontend/index.html similarity index 100% rename from src/chainlit/frontend/index.html rename to frontend/index.html diff --git a/src/chainlit/frontend/package.json b/frontend/package.json similarity index 100% rename from src/chainlit/frontend/package.json rename to frontend/package.json diff --git a/src/chainlit/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml similarity index 100% rename from src/chainlit/frontend/pnpm-lock.yaml rename to frontend/pnpm-lock.yaml diff --git a/src/chainlit/frontend/public/favicon.svg b/frontend/public/favicon.svg similarity index 100% rename from src/chainlit/frontend/public/favicon.svg rename to frontend/public/favicon.svg diff --git a/src/chainlit/frontend/setup-tests.ts b/frontend/setup-tests.ts similarity index 100% rename from src/chainlit/frontend/setup-tests.ts rename to frontend/setup-tests.ts diff --git a/src/chainlit/frontend/src/App.css b/frontend/src/App.css similarity index 100% rename from src/chainlit/frontend/src/App.css rename to frontend/src/App.css diff --git a/src/chainlit/frontend/src/App.tsx b/frontend/src/App.tsx similarity index 100% rename from src/chainlit/frontend/src/App.tsx rename to frontend/src/App.tsx diff --git a/src/chainlit/frontend/src/AppWrapper.tsx b/frontend/src/AppWrapper.tsx similarity index 100% rename from src/chainlit/frontend/src/AppWrapper.tsx rename to frontend/src/AppWrapper.tsx diff --git a/src/chainlit/frontend/src/api/chainlitApi.ts b/frontend/src/api/chainlitApi.ts similarity index 100% rename from src/chainlit/frontend/src/api/chainlitApi.ts rename to frontend/src/api/chainlitApi.ts diff --git a/src/chainlit/frontend/src/api/index.tsx b/frontend/src/api/index.tsx similarity index 100% rename from src/chainlit/frontend/src/api/index.tsx rename to frontend/src/api/index.tsx diff --git a/src/chainlit/frontend/src/assets/github.tsx b/frontend/src/assets/github.tsx similarity index 100% rename from src/chainlit/frontend/src/assets/github.tsx rename to frontend/src/assets/github.tsx diff --git a/src/chainlit/frontend/src/assets/logo_dark.svg b/frontend/src/assets/logo_dark.svg similarity index 100% rename from src/chainlit/frontend/src/assets/logo_dark.svg rename to frontend/src/assets/logo_dark.svg diff --git a/src/chainlit/frontend/src/assets/logo_light.svg b/frontend/src/assets/logo_light.svg similarity index 100% rename from src/chainlit/frontend/src/assets/logo_light.svg rename to frontend/src/assets/logo_light.svg diff --git a/src/chainlit/frontend/src/components/Hotkeys.tsx b/frontend/src/components/Hotkeys.tsx similarity index 100% rename from src/chainlit/frontend/src/components/Hotkeys.tsx rename to frontend/src/components/Hotkeys.tsx diff --git a/src/chainlit/frontend/src/components/atoms/ClipboardCopy.tsx b/frontend/src/components/atoms/ClipboardCopy.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/ClipboardCopy.tsx rename to frontend/src/components/atoms/ClipboardCopy.tsx diff --git a/src/chainlit/frontend/src/components/atoms/Code.tsx b/frontend/src/components/atoms/Code.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/Code.tsx rename to frontend/src/components/atoms/Code.tsx diff --git a/src/chainlit/frontend/src/components/atoms/Collapse.tsx b/frontend/src/components/atoms/Collapse.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/Collapse.tsx rename to frontend/src/components/atoms/Collapse.tsx diff --git a/src/chainlit/frontend/src/components/atoms/actionsList.tsx b/frontend/src/components/atoms/actionsList.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/actionsList.tsx rename to frontend/src/components/atoms/actionsList.tsx diff --git a/src/chainlit/frontend/src/components/atoms/authProvider.tsx b/frontend/src/components/atoms/authProvider.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/authProvider.tsx rename to frontend/src/components/atoms/authProvider.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/accentButton.tsx b/frontend/src/components/atoms/buttons/accentButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/accentButton.tsx rename to frontend/src/components/atoms/buttons/accentButton.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/button.tsx b/frontend/src/components/atoms/buttons/button.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/button.tsx rename to frontend/src/components/atoms/buttons/button.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/githubButton.tsx b/frontend/src/components/atoms/buttons/githubButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/githubButton.tsx rename to frontend/src/components/atoms/buttons/githubButton.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/greyButton.tsx b/frontend/src/components/atoms/buttons/greyButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/greyButton.tsx rename to frontend/src/components/atoms/buttons/greyButton.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/userButton/avatar.tsx b/frontend/src/components/atoms/buttons/userButton/avatar.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/userButton/avatar.tsx rename to frontend/src/components/atoms/buttons/userButton/avatar.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/userButton/index.tsx b/frontend/src/components/atoms/buttons/userButton/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/userButton/index.tsx rename to frontend/src/components/atoms/buttons/userButton/index.tsx diff --git a/src/chainlit/frontend/src/components/atoms/buttons/userButton/menu.tsx b/frontend/src/components/atoms/buttons/userButton/menu.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/buttons/userButton/menu.tsx rename to frontend/src/components/atoms/buttons/userButton/menu.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/audio.tsx b/frontend/src/components/atoms/element/audio.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/audio.tsx rename to frontend/src/components/atoms/element/audio.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/avatar.tsx b/frontend/src/components/atoms/element/avatar.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/avatar.tsx rename to frontend/src/components/atoms/element/avatar.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/file.tsx b/frontend/src/components/atoms/element/file.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/file.tsx rename to frontend/src/components/atoms/element/file.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/frame.tsx b/frontend/src/components/atoms/element/frame.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/frame.tsx rename to frontend/src/components/atoms/element/frame.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/image.tsx b/frontend/src/components/atoms/element/image.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/image.tsx rename to frontend/src/components/atoms/element/image.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/audios.tsx b/frontend/src/components/atoms/element/inlined/audios.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/audios.tsx rename to frontend/src/components/atoms/element/inlined/audios.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/files.tsx b/frontend/src/components/atoms/element/inlined/files.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/files.tsx rename to frontend/src/components/atoms/element/inlined/files.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/images.tsx b/frontend/src/components/atoms/element/inlined/images.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/images.tsx rename to frontend/src/components/atoms/element/inlined/images.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/pdfs.tsx b/frontend/src/components/atoms/element/inlined/pdfs.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/pdfs.tsx rename to frontend/src/components/atoms/element/inlined/pdfs.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/texts.tsx b/frontend/src/components/atoms/element/inlined/texts.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/texts.tsx rename to frontend/src/components/atoms/element/inlined/texts.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/utils.tsx b/frontend/src/components/atoms/element/inlined/utils.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/utils.tsx rename to frontend/src/components/atoms/element/inlined/utils.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/inlined/videos.tsx b/frontend/src/components/atoms/element/inlined/videos.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/inlined/videos.tsx rename to frontend/src/components/atoms/element/inlined/videos.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/pdf.tsx b/frontend/src/components/atoms/element/pdf.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/pdf.tsx rename to frontend/src/components/atoms/element/pdf.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/ref.tsx b/frontend/src/components/atoms/element/ref.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/ref.tsx rename to frontend/src/components/atoms/element/ref.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/sideView.tsx b/frontend/src/components/atoms/element/sideView.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/sideView.tsx rename to frontend/src/components/atoms/element/sideView.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/text.tsx b/frontend/src/components/atoms/element/text.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/text.tsx rename to frontend/src/components/atoms/element/text.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/video.tsx b/frontend/src/components/atoms/element/video.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/video.tsx rename to frontend/src/components/atoms/element/video.tsx diff --git a/src/chainlit/frontend/src/components/atoms/element/view.tsx b/frontend/src/components/atoms/element/view.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/element/view.tsx rename to frontend/src/components/atoms/element/view.tsx diff --git a/src/chainlit/frontend/src/components/atoms/errorBoundary.tsx b/frontend/src/components/atoms/errorBoundary.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/errorBoundary.tsx rename to frontend/src/components/atoms/errorBoundary.tsx diff --git a/src/chainlit/frontend/src/components/atoms/logo.tsx b/frontend/src/components/atoms/logo.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/logo.tsx rename to frontend/src/components/atoms/logo.tsx diff --git a/src/chainlit/frontend/src/components/atoms/notificationCount.tsx b/frontend/src/components/atoms/notificationCount.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/notificationCount.tsx rename to frontend/src/components/atoms/notificationCount.tsx diff --git a/src/chainlit/frontend/src/components/atoms/switch.tsx b/frontend/src/components/atoms/switch.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/switch.tsx rename to frontend/src/components/atoms/switch.tsx diff --git a/src/chainlit/frontend/src/components/atoms/toggle.tsx b/frontend/src/components/atoms/toggle.tsx similarity index 100% rename from src/chainlit/frontend/src/components/atoms/toggle.tsx rename to frontend/src/components/atoms/toggle.tsx diff --git a/src/chainlit/frontend/src/components/molecules/badge.tsx b/frontend/src/components/molecules/badge.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/badge.tsx rename to frontend/src/components/molecules/badge.tsx diff --git a/src/chainlit/frontend/src/components/molecules/inputLabel.tsx b/frontend/src/components/molecules/inputLabel.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/inputLabel.tsx rename to frontend/src/components/molecules/inputLabel.tsx diff --git a/src/chainlit/frontend/src/components/molecules/newChatButton.tsx b/frontend/src/components/molecules/newChatButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/newChatButton.tsx rename to frontend/src/components/molecules/newChatButton.tsx diff --git a/src/chainlit/frontend/src/components/molecules/settingsModal.tsx b/frontend/src/components/molecules/settingsModal.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/settingsModal.tsx rename to frontend/src/components/molecules/settingsModal.tsx diff --git a/src/chainlit/frontend/src/components/molecules/tasklist/Task.tsx b/frontend/src/components/molecules/tasklist/Task.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/tasklist/Task.tsx rename to frontend/src/components/molecules/tasklist/Task.tsx diff --git a/src/chainlit/frontend/src/components/molecules/tasklist/TaskList.tsx b/frontend/src/components/molecules/tasklist/TaskList.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/tasklist/TaskList.tsx rename to frontend/src/components/molecules/tasklist/TaskList.tsx diff --git a/src/chainlit/frontend/src/components/molecules/tasklist/TaskStatusIcon.tsx b/frontend/src/components/molecules/tasklist/TaskStatusIcon.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/tasklist/TaskStatusIcon.tsx rename to frontend/src/components/molecules/tasklist/TaskStatusIcon.tsx diff --git a/src/chainlit/frontend/src/components/molecules/tasklist/index.tsx b/frontend/src/components/molecules/tasklist/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/molecules/tasklist/index.tsx rename to frontend/src/components/molecules/tasklist/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/FormInput.tsx b/frontend/src/components/organisms/FormInput.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/FormInput.tsx rename to frontend/src/components/organisms/FormInput.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/history/index.tsx b/frontend/src/components/organisms/chat/history/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/history/index.tsx rename to frontend/src/components/organisms/chat/history/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/index.tsx b/frontend/src/components/organisms/chat/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/index.tsx rename to frontend/src/components/organisms/chat/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/inputBox/index.tsx b/frontend/src/components/organisms/chat/inputBox/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/inputBox/index.tsx rename to frontend/src/components/organisms/chat/inputBox/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/inputBox/input.tsx b/frontend/src/components/organisms/chat/inputBox/input.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/inputBox/input.tsx rename to frontend/src/components/organisms/chat/inputBox/input.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/inputBox/waterMark.tsx b/frontend/src/components/organisms/chat/inputBox/waterMark.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/inputBox/waterMark.tsx rename to frontend/src/components/organisms/chat/inputBox/waterMark.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/AskUploadButton.tsx b/frontend/src/components/organisms/chat/message/AskUploadButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/AskUploadButton.tsx rename to frontend/src/components/organisms/chat/message/AskUploadButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/UploadButton.tsx b/frontend/src/components/organisms/chat/message/UploadButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/UploadButton.tsx rename to frontend/src/components/organisms/chat/message/UploadButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/author.tsx b/frontend/src/components/organisms/chat/message/author.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/author.tsx rename to frontend/src/components/organisms/chat/message/author.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/buttons.tsx b/frontend/src/components/organisms/chat/message/buttons.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/buttons.tsx rename to frontend/src/components/organisms/chat/message/buttons.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/container.tsx b/frontend/src/components/organisms/chat/message/container.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/container.tsx rename to frontend/src/components/organisms/chat/message/container.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/content.spec.tsx b/frontend/src/components/organisms/chat/message/content.spec.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/content.spec.tsx rename to frontend/src/components/organisms/chat/message/content.spec.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/content.tsx b/frontend/src/components/organisms/chat/message/content.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/content.tsx rename to frontend/src/components/organisms/chat/message/content.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/detailsButton.tsx b/frontend/src/components/organisms/chat/message/detailsButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/detailsButton.tsx rename to frontend/src/components/organisms/chat/message/detailsButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/feedbackButtons.tsx b/frontend/src/components/organisms/chat/message/feedbackButtons.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/feedbackButtons.tsx rename to frontend/src/components/organisms/chat/message/feedbackButtons.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/inlined.tsx b/frontend/src/components/organisms/chat/message/inlined.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/inlined.tsx rename to frontend/src/components/organisms/chat/message/inlined.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/message.tsx b/frontend/src/components/organisms/chat/message/message.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/message.tsx rename to frontend/src/components/organisms/chat/message/message.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/messages.tsx b/frontend/src/components/organisms/chat/message/messages.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/messages.tsx rename to frontend/src/components/organisms/chat/message/messages.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/message/time.tsx b/frontend/src/components/organisms/chat/message/time.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/message/time.tsx rename to frontend/src/components/organisms/chat/message/time.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/settings.tsx b/frontend/src/components/organisms/chat/settings.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/settings.tsx rename to frontend/src/components/organisms/chat/settings.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/stopButton.tsx b/frontend/src/components/organisms/chat/stopButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/stopButton.tsx rename to frontend/src/components/organisms/chat/stopButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/chat/welcomeScreen.tsx b/frontend/src/components/organisms/chat/welcomeScreen.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/chat/welcomeScreen.tsx rename to frontend/src/components/organisms/chat/welcomeScreen.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/deleteConversationButton.tsx b/frontend/src/components/organisms/dataset/deleteConversationButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/deleteConversationButton.tsx rename to frontend/src/components/organisms/dataset/deleteConversationButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/filters/AuthorSelect.tsx b/frontend/src/components/organisms/dataset/filters/AuthorSelect.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/filters/AuthorSelect.tsx rename to frontend/src/components/organisms/dataset/filters/AuthorSelect.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/filters/FeedbackSelect.tsx b/frontend/src/components/organisms/dataset/filters/FeedbackSelect.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/filters/FeedbackSelect.tsx rename to frontend/src/components/organisms/dataset/filters/FeedbackSelect.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/filters/SearchBar.tsx b/frontend/src/components/organisms/dataset/filters/SearchBar.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/filters/SearchBar.tsx rename to frontend/src/components/organisms/dataset/filters/SearchBar.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/filters/index.tsx b/frontend/src/components/organisms/dataset/filters/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/filters/index.tsx rename to frontend/src/components/organisms/dataset/filters/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/index.tsx b/frontend/src/components/organisms/dataset/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/index.tsx rename to frontend/src/components/organisms/dataset/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/openConversationButton.tsx b/frontend/src/components/organisms/dataset/openConversationButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/openConversationButton.tsx rename to frontend/src/components/organisms/dataset/openConversationButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/dataset/table.tsx b/frontend/src/components/organisms/dataset/table.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/dataset/table.tsx rename to frontend/src/components/organisms/dataset/table.tsx diff --git a/src/chainlit/frontend/src/components/organisms/header.tsx b/frontend/src/components/organisms/header.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/header.tsx rename to frontend/src/components/organisms/header.tsx diff --git a/src/chainlit/frontend/src/components/organisms/inputs/inputStateHandler.tsx b/frontend/src/components/organisms/inputs/inputStateHandler.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/inputs/inputStateHandler.tsx rename to frontend/src/components/organisms/inputs/inputStateHandler.tsx diff --git a/src/chainlit/frontend/src/components/organisms/inputs/selectCategoryInput.tsx b/frontend/src/components/organisms/inputs/selectCategoryInput.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/inputs/selectCategoryInput.tsx rename to frontend/src/components/organisms/inputs/selectCategoryInput.tsx diff --git a/src/chainlit/frontend/src/components/organisms/inputs/selectInput.tsx b/frontend/src/components/organisms/inputs/selectInput.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/inputs/selectInput.tsx rename to frontend/src/components/organisms/inputs/selectInput.tsx diff --git a/src/chainlit/frontend/src/components/organisms/inputs/tagsInput.tsx b/frontend/src/components/organisms/inputs/tagsInput.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/inputs/tagsInput.tsx rename to frontend/src/components/organisms/inputs/tagsInput.tsx diff --git a/src/chainlit/frontend/src/components/organisms/inputs/textInput.tsx b/frontend/src/components/organisms/inputs/textInput.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/inputs/textInput.tsx rename to frontend/src/components/organisms/inputs/textInput.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/actionBar.tsx b/frontend/src/components/organisms/playground/actionBar.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/actionBar.tsx rename to frontend/src/components/organisms/playground/actionBar.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/basic.tsx b/frontend/src/components/organisms/playground/basic.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/basic.tsx rename to frontend/src/components/organisms/playground/basic.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/chat.tsx b/frontend/src/components/organisms/playground/chat.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/chat.tsx rename to frontend/src/components/organisms/playground/chat.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/EditorWrapper.tsx b/frontend/src/components/organisms/playground/editor/EditorWrapper.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/EditorWrapper.tsx rename to frontend/src/components/organisms/playground/editor/EditorWrapper.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/MessageWrapper.tsx b/frontend/src/components/organisms/playground/editor/MessageWrapper.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/MessageWrapper.tsx rename to frontend/src/components/organisms/playground/editor/MessageWrapper.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/completion.tsx b/frontend/src/components/organisms/playground/editor/completion.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/completion.tsx rename to frontend/src/components/organisms/playground/editor/completion.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/formatted.tsx b/frontend/src/components/organisms/playground/editor/formatted.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/formatted.tsx rename to frontend/src/components/organisms/playground/editor/formatted.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/promptMessage.tsx b/frontend/src/components/organisms/playground/editor/promptMessage.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/promptMessage.tsx rename to frontend/src/components/organisms/playground/editor/promptMessage.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/template/index.tsx b/frontend/src/components/organisms/playground/editor/template/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/template/index.tsx rename to frontend/src/components/organisms/playground/editor/template/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/template/variable.tsx b/frontend/src/components/organisms/playground/editor/template/variable.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/template/variable.tsx rename to frontend/src/components/organisms/playground/editor/template/variable.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/editor/variableModal.tsx b/frontend/src/components/organisms/playground/editor/variableModal.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/editor/variableModal.tsx rename to frontend/src/components/organisms/playground/editor/variableModal.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/header.tsx b/frontend/src/components/organisms/playground/header.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/header.tsx rename to frontend/src/components/organisms/playground/header.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/helpers.tsx b/frontend/src/components/organisms/playground/helpers.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/helpers.tsx rename to frontend/src/components/organisms/playground/helpers.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/index.tsx b/frontend/src/components/organisms/playground/index.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/index.tsx rename to frontend/src/components/organisms/playground/index.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/modeToggle.tsx b/frontend/src/components/organisms/playground/modeToggle.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/modeToggle.tsx rename to frontend/src/components/organisms/playground/modeToggle.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/modelSettings.tsx b/frontend/src/components/organisms/playground/modelSettings.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/modelSettings.tsx rename to frontend/src/components/organisms/playground/modelSettings.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/saveButton.tsx b/frontend/src/components/organisms/playground/saveButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/saveButton.tsx rename to frontend/src/components/organisms/playground/saveButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/submitButton.tsx b/frontend/src/components/organisms/playground/submitButton.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/submitButton.tsx rename to frontend/src/components/organisms/playground/submitButton.tsx diff --git a/src/chainlit/frontend/src/components/organisms/playground/variableInput.tsx b/frontend/src/components/organisms/playground/variableInput.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/playground/variableInput.tsx rename to frontend/src/components/organisms/playground/variableInput.tsx diff --git a/src/chainlit/frontend/src/components/organisms/slider.tsx b/frontend/src/components/organisms/slider.tsx similarity index 100% rename from src/chainlit/frontend/src/components/organisms/slider.tsx rename to frontend/src/components/organisms/slider.tsx diff --git a/src/chainlit/frontend/src/components/socket.tsx b/frontend/src/components/socket.tsx similarity index 100% rename from src/chainlit/frontend/src/components/socket.tsx rename to frontend/src/components/socket.tsx diff --git a/src/chainlit/frontend/src/helpers/color.ts b/frontend/src/helpers/color.ts similarity index 100% rename from src/chainlit/frontend/src/helpers/color.ts rename to frontend/src/helpers/color.ts diff --git a/src/chainlit/frontend/src/helpers/export.tsx b/frontend/src/helpers/export.tsx similarity index 100% rename from src/chainlit/frontend/src/helpers/export.tsx rename to frontend/src/helpers/export.tsx diff --git a/src/chainlit/frontend/src/helpers/format.ts b/frontend/src/helpers/format.ts similarity index 100% rename from src/chainlit/frontend/src/helpers/format.ts rename to frontend/src/helpers/format.ts diff --git a/src/chainlit/frontend/src/helpers/object.ts b/frontend/src/helpers/object.ts similarity index 100% rename from src/chainlit/frontend/src/helpers/object.ts rename to frontend/src/helpers/object.ts diff --git a/src/chainlit/frontend/src/hooks/auth.ts b/frontend/src/hooks/auth.ts similarity index 100% rename from src/chainlit/frontend/src/hooks/auth.ts rename to frontend/src/hooks/auth.ts diff --git a/src/chainlit/frontend/src/hooks/clearChat.ts b/frontend/src/hooks/clearChat.ts similarity index 100% rename from src/chainlit/frontend/src/hooks/clearChat.ts rename to frontend/src/hooks/clearChat.ts diff --git a/src/chainlit/frontend/src/hooks/localChatHistory.ts b/frontend/src/hooks/localChatHistory.ts similarity index 100% rename from src/chainlit/frontend/src/hooks/localChatHistory.ts rename to frontend/src/hooks/localChatHistory.ts diff --git a/src/chainlit/frontend/src/hooks/query.ts b/frontend/src/hooks/query.ts similarity index 100% rename from src/chainlit/frontend/src/hooks/query.ts rename to frontend/src/hooks/query.ts diff --git a/src/chainlit/frontend/src/hooks/useApi.tsx b/frontend/src/hooks/useApi.tsx similarity index 100% rename from src/chainlit/frontend/src/hooks/useApi.tsx rename to frontend/src/hooks/useApi.tsx diff --git a/src/chainlit/frontend/src/hooks/useIsDarkMode.tsx b/frontend/src/hooks/useIsDarkMode.tsx similarity index 100% rename from src/chainlit/frontend/src/hooks/useIsDarkMode.tsx rename to frontend/src/hooks/useIsDarkMode.tsx diff --git a/src/chainlit/frontend/src/hooks/useUpload.tsx b/frontend/src/hooks/useUpload.tsx similarity index 100% rename from src/chainlit/frontend/src/hooks/useUpload.tsx rename to frontend/src/hooks/useUpload.tsx diff --git a/src/chainlit/frontend/src/index.css b/frontend/src/index.css similarity index 100% rename from src/chainlit/frontend/src/index.css rename to frontend/src/index.css diff --git a/src/chainlit/frontend/src/index.d.ts b/frontend/src/index.d.ts similarity index 100% rename from src/chainlit/frontend/src/index.d.ts rename to frontend/src/index.d.ts diff --git a/src/chainlit/frontend/src/main.tsx b/frontend/src/main.tsx similarity index 100% rename from src/chainlit/frontend/src/main.tsx rename to frontend/src/main.tsx diff --git a/src/chainlit/frontend/src/pages/AuthCallback.tsx b/frontend/src/pages/AuthCallback.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/AuthCallback.tsx rename to frontend/src/pages/AuthCallback.tsx diff --git a/src/chainlit/frontend/src/pages/Conversation.tsx b/frontend/src/pages/Conversation.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Conversation.tsx rename to frontend/src/pages/Conversation.tsx diff --git a/src/chainlit/frontend/src/pages/Dataset.tsx b/frontend/src/pages/Dataset.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Dataset.tsx rename to frontend/src/pages/Dataset.tsx diff --git a/src/chainlit/frontend/src/pages/Design.tsx b/frontend/src/pages/Design.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Design.tsx rename to frontend/src/pages/Design.tsx diff --git a/src/chainlit/frontend/src/pages/Element.tsx b/frontend/src/pages/Element.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Element.tsx rename to frontend/src/pages/Element.tsx diff --git a/src/chainlit/frontend/src/pages/Env.tsx b/frontend/src/pages/Env.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Env.tsx rename to frontend/src/pages/Env.tsx diff --git a/src/chainlit/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Home.tsx rename to frontend/src/pages/Home.tsx diff --git a/src/chainlit/frontend/src/pages/Login.tsx b/frontend/src/pages/Login.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Login.tsx rename to frontend/src/pages/Login.tsx diff --git a/src/chainlit/frontend/src/pages/Page.tsx b/frontend/src/pages/Page.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Page.tsx rename to frontend/src/pages/Page.tsx diff --git a/src/chainlit/frontend/src/pages/Readme.tsx b/frontend/src/pages/Readme.tsx similarity index 100% rename from src/chainlit/frontend/src/pages/Readme.tsx rename to frontend/src/pages/Readme.tsx diff --git a/src/chainlit/frontend/src/palette.ts b/frontend/src/palette.ts similarity index 100% rename from src/chainlit/frontend/src/palette.ts rename to frontend/src/palette.ts diff --git a/src/chainlit/frontend/src/router.tsx b/frontend/src/router.tsx similarity index 100% rename from src/chainlit/frontend/src/router.tsx rename to frontend/src/router.tsx diff --git a/src/chainlit/frontend/src/state/action.ts b/frontend/src/state/action.ts similarity index 100% rename from src/chainlit/frontend/src/state/action.ts rename to frontend/src/state/action.ts diff --git a/src/chainlit/frontend/src/state/chat.ts b/frontend/src/state/chat.ts similarity index 100% rename from src/chainlit/frontend/src/state/chat.ts rename to frontend/src/state/chat.ts diff --git a/src/chainlit/frontend/src/state/chatHistory.ts b/frontend/src/state/chatHistory.ts similarity index 100% rename from src/chainlit/frontend/src/state/chatHistory.ts rename to frontend/src/state/chatHistory.ts diff --git a/src/chainlit/frontend/src/state/dataset.ts b/frontend/src/state/dataset.ts similarity index 100% rename from src/chainlit/frontend/src/state/dataset.ts rename to frontend/src/state/dataset.ts diff --git a/src/chainlit/frontend/src/state/element.ts b/frontend/src/state/element.ts similarity index 100% rename from src/chainlit/frontend/src/state/element.ts rename to frontend/src/state/element.ts diff --git a/src/chainlit/frontend/src/state/playground.ts b/frontend/src/state/playground.ts similarity index 100% rename from src/chainlit/frontend/src/state/playground.ts rename to frontend/src/state/playground.ts diff --git a/src/chainlit/frontend/src/state/project.ts b/frontend/src/state/project.ts similarity index 100% rename from src/chainlit/frontend/src/state/project.ts rename to frontend/src/state/project.ts diff --git a/src/chainlit/frontend/src/state/settings.ts b/frontend/src/state/settings.ts similarity index 100% rename from src/chainlit/frontend/src/state/settings.ts rename to frontend/src/state/settings.ts diff --git a/src/chainlit/frontend/src/state/user.ts b/frontend/src/state/user.ts similarity index 100% rename from src/chainlit/frontend/src/state/user.ts rename to frontend/src/state/user.ts diff --git a/src/chainlit/frontend/src/theme.ts b/frontend/src/theme.ts similarity index 100% rename from src/chainlit/frontend/src/theme.ts rename to frontend/src/theme.ts diff --git a/src/chainlit/frontend/src/types/Input.ts b/frontend/src/types/Input.ts similarity index 100% rename from src/chainlit/frontend/src/types/Input.ts rename to frontend/src/types/Input.ts diff --git a/src/chainlit/frontend/src/types/action.ts b/frontend/src/types/action.ts similarity index 100% rename from src/chainlit/frontend/src/types/action.ts rename to frontend/src/types/action.ts diff --git a/src/chainlit/frontend/src/types/chat.ts b/frontend/src/types/chat.ts similarity index 100% rename from src/chainlit/frontend/src/types/chat.ts rename to frontend/src/types/chat.ts diff --git a/src/chainlit/frontend/src/types/chatHistory.ts b/frontend/src/types/chatHistory.ts similarity index 100% rename from src/chainlit/frontend/src/types/chatHistory.ts rename to frontend/src/types/chatHistory.ts diff --git a/src/chainlit/frontend/src/types/element.ts b/frontend/src/types/element.ts similarity index 100% rename from src/chainlit/frontend/src/types/element.ts rename to frontend/src/types/element.ts diff --git a/src/chainlit/frontend/src/types/playground.ts b/frontend/src/types/playground.ts similarity index 100% rename from src/chainlit/frontend/src/types/playground.ts rename to frontend/src/types/playground.ts diff --git a/src/chainlit/frontend/src/types/user.ts b/frontend/src/types/user.ts similarity index 100% rename from src/chainlit/frontend/src/types/user.ts rename to frontend/src/types/user.ts diff --git a/src/chainlit/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts similarity index 100% rename from src/chainlit/frontend/src/vite-env.d.ts rename to frontend/src/vite-env.d.ts diff --git a/src/chainlit/frontend/tsconfig.json b/frontend/tsconfig.json similarity index 100% rename from src/chainlit/frontend/tsconfig.json rename to frontend/tsconfig.json diff --git a/src/chainlit/frontend/tsconfig.node.json b/frontend/tsconfig.node.json similarity index 100% rename from src/chainlit/frontend/tsconfig.node.json rename to frontend/tsconfig.node.json diff --git a/src/chainlit/frontend/vite.config.ts b/frontend/vite.config.ts similarity index 100% rename from src/chainlit/frontend/vite.config.ts rename to frontend/vite.config.ts diff --git a/package.json b/package.json index b17c97fcf0..e44861a8fa 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,13 @@ }, "scripts": { "preinstall": "npx only-allow pnpm", - "test": "pnpm exec ts-node ./cypress/support/e2e.ts && (cd src/chainlit/frontend && pnpm run test)", + "test": "pnpm exec ts-node ./cypress/support/e2e.ts && (cd frontend && pnpm run test)", "prepare": "husky install", - "lintUi": "cd src/chainlit/frontend && pnpm run lint", - "formatUi": "cd src/chainlit/frontend && pnpm run format", - "lintPython": "cd src/ && poetry run mypy chainlit/", + "lintUi": "cd frontend && pnpm run lint", + "formatUi": "cd frontend && pnpm run format", + "lintPython": "cd backend && poetry run mypy chainlit/", "formatPython": "black `git ls-files | grep '.py$'` && isort --profile=black .", - "buildUi": "(cd src/chainlit/frontend && pnpm run build)", - "build": "(cd src/chainlit/frontend && pnpm run build) && (cd src && poetry build)" + "buildUi": "(cd frontend && pnpm run build)", + "build": "(cd frontend && pnpm run build) && (cd backend && poetry build)" } } diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c033d2d0d0..33927a4655 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,2 @@ packages: - - "src/chainlit/frontend/" + - "frontend/"