MCPcopy Create free account
hub / github.com/contextform/freecad-mcp / start_session

Method start_session

AICopilot/memory_system.py:86–100  ·  view source on GitHub ↗

Start a new design session

(self, description: str = "")

Source from the content-addressed store, hash-verified

84 self.conn.commit()
85
86 def start_session(self, description: str = "") -> str:
87 """Start a new design session"""
88 session_id = hashlib.md5(
89 f"{datetime.now().isoformat()}{description}".encode()
90 ).hexdigest()[:12]
91
92 cursor = self.conn.cursor()
93 cursor.execute("""
94 INSERT INTO design_sessions (session_id, description, created_at, last_accessed)
95 VALUES (?, ?, ?, ?)
96 """, (session_id, description, datetime.now(), datetime.now()))
97
98 self.conn.commit()
99 self.current_session = session_id
100 return session_id
101
102 def store_operation(self, op_type: str, parameters: Dict, context: Dict):
103 """Store an operation with full context"""

Callers 1

store_operationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected