13.08.2026 20:25 перед внедрением коррекции поведения ИИ при использовании инструментов (создание флагов мусорных сообщений для очистки)

This commit is contained in:
2026-08-13 20:25:27 +03:00
parent fc1a608a5f
commit f481fffdb7
18 changed files with 1562 additions and 1254 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env python3
"""
Скрипт полной очистки истории диалогов и сессионных состояний SQLite.
"""
import os
import sqlite3
DB_PATH = "/home/puh/scud_orion_ai_v2/data/scud_orion_ai.db"
def clear_chat_history():
if not os.path.exists(DB_PATH):
print(f"❌ База данных не найдена по адресу: {DB_PATH}")
return
conn = sqlite3.connect(DB_PATH)
cursor = conn.cursor()
cursor.execute("DELETE FROM chat_messages;")
cursor.execute("DELETE FROM session_states;")
cursor.execute("DELETE FROM chat_sessions;")
conn.commit()
conn.close()
print("✓ [SUCCESS] История сообщений чата и сессионные состояния успешно очищены!")
if __name__ == "__main__":
clear_chat_history()
+21
View File
@@ -0,0 +1,21 @@
import os
EXCLUDE_DIRS = {'.git', '__pycache__', 'venv', '.venv', 'output', 'logs', 'extracted_project'}
def print_tree(startpath):
print("=" * 60)
print("📂 ДЕРЕВО АРХИТЕКТУРЫ ПРОЕКТА")
print("=" * 60)
for root, dirs, files in os.walk(startpath):
dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS]
level = root.replace(startpath, '').count(os.sep)
indent = ' ' * 4 * (level)
print(f'{indent}📁 {os.path.basename(root)}/')
subindent = ' ' * 4 * (level + 1)
for f in sorted(files):
if not f.endswith('.pyc'):
print(f'{subindent}📄 {f}')
print("=" * 60)
if __name__ == "__main__":
print_tree('.')