Files
crm.clientright.ru/ai_drawer_backup_working/restore.sh
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

58 lines
2.9 KiB
Bash
Raw 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
# Скрипт восстановления рабочей версии AI Drawer
# Автор: Claude Sonnet 4 для Фёдора
# Дата: 21 сентября 2025
echo "🚀 Восстановление рабочей версии AI Drawer..."
# Переходим в корень проекта
cd /var/www/fastuser/data/www/crm.clientright.ru
# Создаем резервную копию текущего состояния
echo "📦 Создание резервной копии текущего состояния..."
mkdir -p ai_drawer_backup_current_$(date +%Y%m%d_%H%M%S)
cp layouts/v7/resources/css/ai-drawer.css ai_drawer_backup_current_$(date +%Y%m%d_%H%M%S)/ 2>/dev/null || echo "CSS файл не найден"
cp layouts/v7/resources/js/ai-drawer-simple.js ai_drawer_backup_current_$(date +%Y%m%d_%H%M%S)/ 2>/dev/null || echo "JS файл не найден"
cp ai_drawer_improvements.js ai_drawer_backup_current_$(date +%Y%m%d_%H%M%S)/ 2>/dev/null || echo "Improvements файл не найден"
cp layouts/v7/modules/Vtiger/Header.tpl ai_drawer_backup_current_$(date +%Y%m%d_%H%M%S)/ 2>/dev/null || echo "Header файл не найден"
# Восстанавливаем рабочую версию
echo "✅ Восстановление рабочих файлов..."
echo " - Восстанавливаем CSS..."
cp ai_drawer_backup_working/ai-drawer.css.working layouts/v7/resources/css/ai-drawer.css
echo " - Восстанавливаем JavaScript..."
cp ai_drawer_backup_working/ai-drawer-simple.js.working layouts/v7/resources/js/ai-drawer-simple.js
echo " - Восстанавливаем улучшения..."
cp ai_drawer_backup_working/ai_drawer_improvements.js.working ai_drawer_improvements.js
echo " - Восстанавливаем Header.tpl..."
cp ai_drawer_backup_working/Header.tpl.working layouts/v7/modules/Vtiger/Header.tpl
# Устанавливаем права доступа
echo "🔧 Установка прав доступа..."
chmod 644 layouts/v7/resources/css/ai-drawer.css
chmod 644 layouts/v7/resources/js/ai-drawer-simple.js
chmod 644 ai_drawer_improvements.js
chmod 644 layouts/v7/modules/Vtiger/Header.tpl
echo ""
echo "🎉 Восстановление завершено!"
echo ""
echo "✅ Что восстановлено:"
echo " - Светлая тема AI Drawer"
echo " - Управление размером шрифта и аватарками"
echo " - Стриминг сообщений и индикатор печатания"
echo " - Загрузка истории из n8n вебхука"
echo " - Интеграция с Nextcloud Editor"
echo ""
echo "📝 Следующие шаги:"
echo " 1. Обновите страницу в браузере (Ctrl+F5)"
echo " 2. Очистите кеш браузера"
echo " 3. Проверьте работу AI Drawer"
echo ""
echo "🔗 Документация: ai_drawer_backup_working/RESTORE_INSTRUCTIONS.md"