char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
6ea215d17
char/aliceai-t5-moe
1#!/bin/bash 2 3# Development script for llama-ui 4# 5# This script starts the llama-ui development servers (Storybook and Vite). 6# Note: You need to start llama-server separately. 7# 8# Usage: 9# bash scripts/dev.sh 10# npm run dev 11 12cd ../../ 13 14# Ensure node_modules are installed 15if [ ! -d"tools/ui/node_modules" ];then 16echo "๐ฆ Installing npm dependencies..." 17cd tools/ui&& npm ci&& cd ../../ 18fi 19 20# Check and install git hooks if missing 21check_and_install_hooks () { 22 localhooks_missing =false 23 24# Check for required hooks 25if [ ! -f".git/hooks/pre-commit" ] || [ ! -f".git/hooks/pre-push" ];then 26hooks_missing =true 27fi 28 29if [" $ hooks_missing " = true ];then 30echo "๐ง Git hooks missing, installing them..." 31if bash " $( dirname " $ 0" ) /git-hooks/install.sh" ;then 32echo "โ Git hooks installed successfully" 33else 34echo "โ ๏ธ Failed to install git hooks, continuing anyway..." 35fi 36else 37echo "โ Git hooks already installed" 38fi 39} 40 41# Install git hooks if needed 42check_and_install_hooks 43 44# Cleanup function 45cleanup () { 46echo "๐งน Cleaning up..." 47exit 48} 49 50# Set up signal handlers 51trap cleanup SIGINT SIGTERM 52 53echo "๐ Starting development servers..." 54echo "๐ Note: Make sure to start llama-server separately if needed" 55cd tools/ui 56# Use --insecure-http-parser to handle malformed HTTP responses from llama-server 57# (some responses have both Content-Length and Transfer-Encoding headers) 58storybook dev-p 6006--ci &NODE_OPTIONS ="--insecure-http-parser" vite dev--host 0.0.0.0 & 59 60# Wait for all background processes 61wait