[project]
name = "canvas-chat"
version = "0.1.17"
description = "A visual, non-linear chat interface where conversations are nodes on an infinite canvas"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
    "fastapi>=0.115.0",
    "uvicorn>=0.32.0",
    "litellm>=1.50.0",
    "llamabot>=0.17.0",
    "pydantic>=2.0.0",
    "sse-starlette>=2.0.0", "exa-py>=2.0.2,<3", "modal>=1.3.0.post1,<2", "httpx>=0.28.1,<0.29", "pytest>=9.0.2,<10", "build>=1.3.0,<2", "html2text>=2025.4.15,<2026",
    "pymupdf>=1.24.0",
    "python-multipart>=0.0.9",
    "typer",
]

[project.optional-dependencies]
dev = [
    "pytest>=8.0.0",
    "httpx>=0.27.0",
]

[project.scripts]
canvas-chat = "canvas_chat.__main__:app"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/canvas_chat"]

[tool.ruff]
line-length = 88
target-version = "py311"

[tool.ruff.lint]
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # pyflakes
    "I",   # isort
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "UP",  # pyupgrade
]
ignore = []

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64", "osx-64"]

[tool.pixi.pypi-dependencies]
canvas-chat = { path = ".", editable = true }

[tool.pixi.tasks]
dev = "uvicorn canvas_chat.app:app --reload --port 7865"
modal-serve = "modal serve modal_app.py"
modal-deploy = "modal deploy modal_app.py"
test = "pytest tests/ -v"
test-js = "node tests/test_utils.js && node tests/test_search.js && node tests/test_ui.js"
