- Finish editing of Specialists with overview, agent - task - tool editor

- Split differrent caching mechanisms (types, version tree, config) into different cachers
- Improve resource usage on starting components, and correct gevent usage
- Refine repopack usage for eveai_app (too large)
- Change nginx dockerfile to allow for specialist overviews being served statically
This commit is contained in:
Josako
2025-01-23 09:43:48 +01:00
parent 7bddeb0ebd
commit d106520d22
39 changed files with 1312 additions and 281 deletions

View File

@@ -158,6 +158,9 @@ docker buildx use eveai_builder
# Loop through services
for SERVICE in "${SERVICES[@]}"; do
if [[ "$SERVICE" == "nginx" ]]; then
./copy_specialist_svgs.sh ../config ../nginx/static/assets
fi
if [[ "$SERVICE" == "nginx" || "$SERVICE" == eveai_* || "$SERVICE" == "flower" ]]; then
if process_service "$SERVICE"; then
echo "Successfully processed $SERVICE"

60
docker/copy_specialist_svgs.sh Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/bash
# Script to copy specialist overview SVGs to nginx static directory
# Function to show usage
show_usage() {
echo "Usage: $0 <config_dir> <static_dir>"
echo " config_dir: Path to the config directory containing specialists"
echo " static_dir: Path to the nginx static directory"
exit 1
}
# Check arguments
if [ $# -ne 2 ]; then
show_usage
fi
CONFIG_DIR="$1"
STATIC_DIR="$2"
SPECIALISTS_DIR="${CONFIG_DIR}/specialists"
OUTPUT_DIR="${STATIC_DIR}/specialists"
# Check if source directory exists
if [ ! -d "$SPECIALISTS_DIR" ]; then
echo "Error: Specialists directory not found at $SPECIALISTS_DIR"
exit 1
fi
# Create output directory
mkdir -p "$OUTPUT_DIR"
# Counter for processed files
processed=0
# Process each specialist type directory
for TYPE_DIR in "$SPECIALISTS_DIR"/*/ ; do
if [ -d "$TYPE_DIR" ]; then
# Get specialist type from directory name
SPECIALIST_TYPE=$(basename "$TYPE_DIR")
# Find and process overview SVG files
for SVG_FILE in "$TYPE_DIR"*_overview.svg; do
if [ -f "$SVG_FILE" ]; then
# Extract version (remove _overview.svg from filename)
VERSION=$(basename "$SVG_FILE" "_overview.svg")
# Create new filename
NEW_FILENAME="${SPECIALIST_TYPE}_${VERSION}_overview.svg"
# Copy file
cp -f "$SVG_FILE" "${OUTPUT_DIR}/${NEW_FILENAME}"
echo "Copied $(basename "$SVG_FILE") -> $NEW_FILENAME"
((processed++))
fi
done
fi
done
echo -e "\nProcessed $processed overview SVG files"

View File

@@ -9,11 +9,14 @@ COPY ../../nginx/mime.types /etc/nginx/mime.types
# Copy static & public files
RUN mkdir -p /etc/nginx/static /etc/nginx/public
COPY ../../nginx/static /etc/nginx/static
COPY ../../integrations/Wordpress/eveai-chat/assets/css/eveai-chat-style.css /etc/nginx/static/css/
COPY ../../integrations/Wordpress/eveai-chat/assets/js/eveai-chat-widget.js /etc/nginx/static/js/
COPY ../../integrations/Wordpress/eveai-chat/assets/js/eveai-token-manager.js /etc/nginx/static/js/
COPY ../../integrations/Wordpress/eveai-chat/assets/js/eveai-sdk.js /etc/nginx/static/js
# Copy public files
COPY ../../nginx/public /etc/nginx/public
# Copy site-specific configurations