✨ Add automated session logging system
Some checks failed
Build and Deploy Docs / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy Docs / build-and-deploy (push) Has been cancelled
- 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)
This commit is contained in:
41
sofia
Executable file
41
sofia
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user