The file /Users/neog/Services/servers/log-server.py has been updated. Here's the result of running `cat -n` on a snippet of the edited file: 2574→ 'duration_seconds': 0, 2575→ 'updates': [] 2576→ } 2577→ 2578→ return jsonify({ 2579→ 'status': 'ok', 2580→ 'session_id': session_id, 2581→ 'final_cost': final_cost, 2582→ 'final_tokens': final_tokens 2583→ }) 2584→ 2585→ 2586→@app.route('/api/cc/session/test', methods=['POST']) 2587→def cc_session_test(): 2588→ """Start a test live session for UI testing""" 2589→ global CURRENT_LIVE_SESSION 2590→ import random 2591→ 2592→ session_id = f"test-{int(time.time())}" 2593→ 2594→ CURRENT_LIVE_SESSION = { 2595→ 'session_id': session_id, 2596→ 'started_at': datetime.now().isoformat(), 2597→ 'last_update': datetime.now().isoformat(), 2598→ 'cumulative_cost': round(random.uniform(0.1, 2.0), 4), 2599→ 'cumulative_tokens': { 2600→ 'input': random.randint(10000, 100000), 2601→ 'output': random.randint(5000, 50000), 2602→ 'cacheRead': random.randint(100000, 1000000), 2603→ 'cacheCreation': random.randint(1000, 10000) 2604→ }, 2605→ 'duration_seconds': random.randint(60, 3600), 2606→ 'updates': [] 2607→ } 2608→ 2609→ # Broadcast to connected clients 2610→ socketio.emit('cc_session_update', { 2611→ 'session_id': session_id, 2612→ 'cumulative_cost': CURRENT_LIVE_SESSION['cumulative_cost'], 2613→ 'cumulative_tokens': CURRENT_LIVE_SESSION['cumulative_tokens'], 2614→ 'duration_seconds': CURRENT_LIVE_SESSION['duration_seconds'], 2615→ 'timestamp': datetime.now().isoformat() 2616→ }) 2617→ 2618→ print(f"[SESSION] Test session started: {session_id}") 2619→ 2620→ return jsonify({ 2621→ 'status': 'ok', 2622→ 'session_id': session_id, 2623→ 'message': 'Test session started' 2624→ }) 2625→ 2626→ 2627→# Analytics endpoints 2628→@app.route('/api/analytics', methods=['POST']) 2629→def receive_analytics(): 2630→ """Receive analytics data from clients""" 2631→ try: