Files
TrulyMEM-TrueHumanMEM-local/graph_memory_tui/models/log_entry.py
JianFeeeee 6689f08456 feat: Add embedded SQLite database and web interface
- Implement EmbeddedGraphDB with full Neo4j compatibility
- Add web interface for browser access
- Fix input box display issue
- Add comprehensive database tests (15/15 passed)
- Simplify startup script (3 steps, no Docker needed)
- Add multi-language support
- Add .gitignore for clean repository
- Update documentation

All tests passed. Ready for production.
2026-04-10 15:43:22 +08:00

31 lines
731 B
Python
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.

"""日志条目数据模型"""
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Dict
@dataclass
class LogEntry:
"""日志条目"""
timestamp: datetime
tool_name: str
arguments: Dict[str, Any]
result: str
duration: float
@property
def args_summary(self) -> str:
"""参数摘要截断到50字符"""
args_str = str(self.arguments)
if len(args_str) > 50:
return args_str[:50] + "..."
return args_str
@property
def result_summary(self) -> str:
"""结果摘要截断到100字符"""
if len(self.result) > 100:
return self.result[:100] + "..."
return self.result