Skip to content

feat(history): let callers construct HistorySessionId - #1157

Open
kronberger-droid wants to merge 1 commit into
nushell:mainfrom
kronberger-droid:fix/history-session-id-pub
Open

feat(history): let callers construct HistorySessionId#1157
kronberger-droid wants to merge 1 commit into
nushell:mainfrom
kronberger-droid:fix/history-session-id-pub

Conversation

@kronberger-droid

Copy link
Copy Markdown
Collaborator

Summary

HistorySessionId::new was pub(crate), so downstream code that needs to mint a session id (nushell's history import, which carries a "reedline doesn't let you create session IDs" comment for exactly this) had no way to.
new is now pub. The raw i64 field goes private rather than pub, since the id already reads back through Display and serde and nothing outside the crate touches it.

Public API: adds HistorySessionId::new. The field visibility change is not observable outside the crate (it was pub(crate)).

nushell's history import has to invent session ids and could not,
since `new` was `pub(crate)`. The field is `pub` like `HistoryItemId`.
@kronberger-droid
kronberger-droid force-pushed the fix/history-session-id-pub branch from 585493f to d97ab82 Compare August 17, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant