mirror of
https://github.com/chenhg5/cc-connect.git
synced 2026-07-07 23:33:38 +08:00
Cursor Agent CLI does not always write sessions to ~/.cursor/chats. When XDG_CONFIG_HOME is set (common on macOS dev setups), chats live under $XDG_CONFIG_HOME/Cursor/chats instead, so /list returned empty even though sessions existed on disk. Most CLI sessions also keep the default name "New Agent" and wrap the real user prompt in <user_query> tags. The old summary extractor skipped any content starting with "<", so Feishu /list fell back to opaque session IDs. Scan all known CLI storage roots and derive titles from <user_query> content so /list and /switch are usable from messaging platforms. Co-authored-by: Cursor <cursoragent@cursor.com>