Skip to content

Commit

Permalink
app: markdown support and other polishments
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie-XIAO committed Dec 7, 2024
1 parent 3dadeb9 commit 7b8f680
Show file tree
Hide file tree
Showing 17 changed files with 1,877 additions and 616 deletions.
8 changes: 4 additions & 4 deletions app/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
GCP_PROJECT_ID = "veritastrial"
GCP_PROJECT_LOCATION = "us-central1"

GH_URL = "https://raw.githubusercontent.com/VeritasTrial/ac215_VeritasTrial/main"
LOGO_URL = f"{GH_URL}/app/frontend/public/veritastrial-wide.png"

# Global states for the FastAPI app
EMBEDDING_MODEL: FlagModel | None = None
CHROMADB_CLIENT: chromadb.api.ClientAPI | None = None
Expand Down Expand Up @@ -90,10 +93,7 @@ def custom_openapi(): # pragma: no cover
description="OpenAPI specification for the VeritasTrial APIs.",
routes=app.routes,
)
openapi_schema["info"]["x-logo"] = {
# TODO: Change to the VeritasTrial logo
"url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png"
}
openapi_schema["info"]["x-logo"] = {"url": LOGO_URL}
app.openapi_schema = openapi_schema
return app.openapi_schema

Expand Down
13 changes: 13 additions & 0 deletions app/frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ export default tseslint.config(
ignoreDeclarationSort: true,
},
],
// Exemptions for unused variables
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "all",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
},
},

Expand Down
12 changes: 8 additions & 4 deletions app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/themes": "^3.1.6",
"query-string": "^9.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.4.0",
"react-markdown": "^9.0.1",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"remark-gfm": "^4.0.0",
"sonner": "^1.7.0"
},
"devDependencies": {
"@emotion/babel-plugin": "^11.13.5",
"@eslint/js": "^9.16.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react": "^18.3.13",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.16.0",
"globals": "^15.13.0",
Expand Down
Loading

0 comments on commit 7b8f680

Please sign in to comment.