|
#!/bin/bash |
|
|
|
|
|
if [ ! -f "$HOME/.config/llama/llama-chat-ui.conf" ]; then |
|
mkdir -p "$HOME/.config/llama" |
|
cat <<EOF > "$HOME/.config/llama/llama-chat-ui.conf" |
|
CHAT_UI_LOG=$HOME/.local/var/llama-chat-ui.log |
|
EOF |
|
fi |
|
|
|
source "$HOME/.config/llama/llama-chat-ui.conf" |
|
|
|
|
|
if [[ $# -eq 1 ]] && [[ $1 == "stop" ]]; then |
|
echo "Stopping chat-ui server..." |
|
pkill -f "chat-ui/node_modules/.bin/vite" |
|
echo "ok" |
|
exit |
|
fi |
|
|
|
|
|
cd ~/Work/chat-ui || exit |
|
npm run dev > "$CHAT_UI_LOG" 2>&1 & |
|
|
|
echo "Started chat-ui server. Logging to $CHAT_UI_LOG. UI available from http://localhost:5173/" |
|
|