Skip to main content

rebind_session_bundle

Function rebind_session_bundle 

Source
pub fn rebind_session_bundle(
    session_id: &str,
    bundle_id: &str,
) -> Result<String>
Expand description

Re-associate a session with another project bundle.

A session’s bundle is otherwise fixed, because prompt history is grouped by it. Resume calls this when it converts a session between its raw and bundle representations: the project is the same, so its history follows it, and only the name Hel files it under changes. Files the session under bundle_id’s project and returns the bundle id the session context now holds: the canonical project when the catalog knows bundle_id as an alias of another bundle. A caller keeping the session record must adopt the returned id, because resume publication checks the record’s bundle against the context.