personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

formatting

+20 -16
+19 -13
apps/home/routes.py
··· 165 165 ) 166 166 167 167 # Extract daily goal (first pending todo) 168 - facet_data["goal"] = next((t["text"] for t in facet_data["todos"] if not t["completed"]), None) 168 + facet_data["goal"] = next( 169 + (t["text"] for t in facet_data["todos"] if not t["completed"]), None 170 + ) 169 171 170 172 # Add facet metadata 171 173 result["facet_meta"][facet_name] = { ··· 186 188 next_day = (ref_date + timedelta(days=i)).strftime("%Y%m%d") 187 189 day_events = get_events(next_day) 188 190 for e in day_events: 189 - upcoming_data.append({ 190 - "type": "event", 191 - "day": next_day, 192 - "title": e.get("title") or e.get("summary", "Untitled Event"), 193 - "facet": e.get("facet") 194 - }) 191 + upcoming_data.append( 192 + { 193 + "type": "event", 194 + "day": next_day, 195 + "title": e.get("title") or e.get("summary", "Untitled Event"), 196 + "facet": e.get("facet"), 197 + } 198 + ) 195 199 for f_name in facet_names: 196 200 f_todos = get_todos(next_day, f_name) 197 201 if f_todos: 198 202 for t in f_todos: 199 203 if not t.get("completed") and not t.get("cancelled"): 200 - upcoming_data.append({ 201 - "type": "todo", 202 - "day": next_day, 203 - "title": t.get("text"), 204 - "facet": f_name 205 - }) 204 + upcoming_data.append( 205 + { 206 + "type": "todo", 207 + "day": next_day, 208 + "title": t.get("text"), 209 + "facet": f_name, 210 + } 211 + ) 206 212 except Exception: 207 213 pass 208 214 result["upcoming"] = upcoming_data[:5] # Limit to 5 items
+1 -3
apps/tokens/routes.py
··· 247 247 segment_list.sort(key=lambda x: x["cost"], reverse=True) 248 248 249 249 # Count attributed segments (excluding [unattributed]) 250 - segment_count = sum( 251 - 1 for s in segment_list if s["segment"] != "[unattributed]" 252 - ) 250 + segment_count = sum(1 for s in segment_list if s["segment"] != "[unattributed]") 253 251 254 252 # Calculate cached/reasoning percentages for display annotations 255 253 # - cached_tokens are a subset of input_tokens (reduce cost)