Files
chenhg5-cc-connect/agent/cursor
Ref/西顾 8dcadfad8e fix(cursor): discover CLI chat storage and show readable session titles (#1232)
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>
2026-06-09 23:18:35 +08:00
..