Files
microdao-daarion/sofia
Apple 744c149300
Some checks failed
Build and Deploy Docs / build-and-deploy (push) Has been cancelled
Add automated session logging system
- Created logs/ structure (sessions, operations, incidents)
- Added session-start/log/end scripts
- Installed Git hooks for auto-logging commits/pushes
- Added shell integration for zsh
- Created CHANGELOG.md
- Documented today's session (2026-01-10)
2026-01-10 04:53:17 -08:00

42 lines
1.6 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Sofia CLI - Enhanced wrapper using llm CLI
# Colors
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Sofia banner
echo -e "${PURPLE}╔═══════════════════════════════════════════════════╗${NC}"
echo -e "${PURPLE}${NC} 🤖 ${CYAN}Sofia - Chief AI Engineer${NC} ${PURPLE}${NC}"
echo -e "${PURPLE}${NC} ${GREEN}R&D Orchestrator @ DAARION.city${NC} ${PURPLE}${NC}"
echo -e "${PURPLE}${NC} Model: qwen2.5-coder:32b ${PURPLE}${NC}"
echo -e "${PURPLE}╚═══════════════════════════════════════════════════╝${NC}"
echo ""
# Sofia system prompt
SOFIA_PROMPT=$(cat ~/.config/llm/templates/sofia.txt)
# Check if Ollama is running
if ! pgrep -x "ollama" > /dev/null; then
echo -e "${CYAN}⚠️ Ollama не запущено. Запускаємо...${NC}"
ollama serve > /dev/null 2>&1 &
sleep 2
fi
# If arguments provided, run one-shot query
if [ $# -gt 0 ]; then
echo -e "${CYAN}💬 Query:${NC} $@"
echo ""
llm -m ollama/qwen2.5-coder:32b -s "$SOFIA_PROMPT" "$@"
else
# Interactive chat mode
echo -e "${GREEN}📝 Interactive mode${NC}"
echo -e " Пишіть питання і натискайте Enter"
echo -e " Ctrl+D або 'exit' для виходу"
echo ""
llm chat -m ollama/qwen2.5-coder:32b -s "$SOFIA_PROMPT"
fi