Add `ensureOllamaAvailable` function to lib/ollama.ts for checking and waiting for Ollama server health with configurable timeout. Integrate the check in GET /api/ollama/models route with 3s timeout to prevent UI blocking, and in POST /api/ollama/pull route with 20s timeout to ensure availability before pulling models. Update ChatContainer to always render ModelDropdown for better UX when no model is selected.
48 lines
1.3 KiB
JSON
48 lines
1.3 KiB
JSON
{
|
|
"name": "ollahub",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"predev": "powershell -ExecutionPolicy Bypass -File scripts/ensure-ollama.ps1 && tsx scripts/init-db.ts",
|
|
"prebuild": "tsx scripts/init-db.ts",
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "biome check",
|
|
"format": "biome format --write"
|
|
},
|
|
"dependencies": {
|
|
"better-sqlite3": "^12.4.1",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"lucide-react": "^0.548.0",
|
|
"next": "16.0.0",
|
|
"next-themes": "^0.3.0",
|
|
"ollama": "^0.5.11",
|
|
"react": "19.2.0",
|
|
"react-dom": "19.2.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-syntax-highlighter": "^16.0.0",
|
|
"react-virtualized-auto-sizer": "^1.0.26",
|
|
"react-window": "^2.2.2",
|
|
"react-window-infinite-loader": "^2.0.0",
|
|
"refractor": "^3.6.0",
|
|
"rehype-highlight": "^7.0.2",
|
|
"rehype-raw": "^7.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"tailwind-merge": "^3.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "2.2.0",
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@types/react-window": "^2.0.0",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4.20.6",
|
|
"typescript": "^5"
|
|
}
|
|
}
|