feat(import): restore soft-deleted conversations from the session picker
Deleting a conversation in codeg only stamps `deleted_at` — the row and the agent's own session file both stay on disk — so a deleted session that the import picker rediscovers has a meaningful answer beyond "skip": bring it back. The picker now offers `deleted` rows behind an explicit "include deleted" switch (off by default). Importing one un-deletes the ORIGINAL row rather than inserting a duplicate, so its id, history, bound tabs and delegation children all survive; it lands in the group's folder (the one `add_folder` just made live and open, since the row's own folder may since have been removed) and on `pending_review`, so the sidebar's default "hide completed" filter cannot make a restore look like it failed. Restoring is opt-in per call via `DeletedPolicy`: only the picker — where every item is a session the user checked while it was badged "deleted" — passes `Restore`. The legacy whole-folder sweep and the scan's drive-by refresh stay on `Skip`, so neither can resurrect a conversation the user deliberately deleted. On the client, select-all, the folder tri-state and the sidebar's focus-path preselect all keep ignoring deleted rows until the switch is on, and turning it back off un-stages whatever it staged.
X
xintaofei committed
5f6f2a951a6e477e4c518c85ff02062d2804f907
Parent: 0bad54f