perf(hub-ai): reduce CPU load during trading coach chat
Cache chat context, parallelize exchange fetches, skip fund history writes, defer rolling summary to a background thread, and cache markdown rendering on the client. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,6 +33,7 @@ FUND_HISTORY_DAYS = 180
|
||||
CHAT_MAX_ATTACHMENTS = 3
|
||||
CHAT_MAX_IMAGE_BYTES = 4 * 1024 * 1024
|
||||
CHAT_MAX_TEXT_FILE_BYTES = 200 * 1024
|
||||
CHAT_CONTEXT_CACHE_TTL_SEC = _int_env("CHAT_CONTEXT_CACHE_TTL_SEC", 45)
|
||||
|
||||
|
||||
def trading_day_reset_hour() -> int:
|
||||
|
||||
Reference in New Issue
Block a user