Skip to content

feat(copilot): implement copilot thread persistence - #2299

Merged
hayescode merged 6 commits into
Chainlit:mainfrom
xjose97x:main
Jul 29, 2025
Merged

hayescode merged 6 commits into
Chainlit:mainfrom
xjose97x:main

Conversation

@xjose97x

@xjose97x xjose97x commented Jul 18, 2025 •

Copy link
Copy Markdown
Contributor

This update introduces persistent storage of the threadId in the browser’s localStorage, enabling chat restoration after a page reload.

What’s New

Two JavaScript utility functions are now exposed to provide greater flexibility in managing the threadId for Copilot:

  • getChainlitCopilotThreadId(): string | null
    Retrieves the current threadId from localStorage.

  • clearChainlitCopilotThreadId(newThreadId?: string): void
    Clears the existing threadId from localStorage. Optionally sets a new one.

These additions offer developers more control over thread management and session continuity in the Copilot experience.

@xjose97x
xjose97x marked this pull request as ready for review July 18, 2025 22:10
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. frontend Pertains to the frontend. labels Jul 18, 2025
@xjose97x

xjose97x commented Jul 20, 2025 •

Copy link
Copy Markdown
Contributor Author

are the e2e tests on ubuntu flaky?

they seem to be working fine on Windows and also on MacOs.

Image 19-7-25 at 18 59

@xjose97x

Copy link
Copy Markdown
Contributor Author

@hayescode Please let me know if you have any feedback :)

@hayescode

Copy link
Copy Markdown
Contributor

@asvishnyakov would you mind reviewing the frontend code changes when you get a chance you're stronger in frontend then me 😎

@asvishnyakov
asvishnyakov self-requested a review July 23, 2025 14:34
@xjose97x

Copy link
Copy Markdown
Contributor Author

@hayescode @asvishnyakov any chance we can get this on the next release?
let me know if there are any changes or questions.

thanks a bunch!

@hayescode
hayescode added this pull request to the merge queue Jul 29, 2025
Merged via the queue into Chainlit:main with commit d9d691c Jul 29, 2025
@xjose97x

Copy link
Copy Markdown
Contributor Author

Thanks for the merge @hayescode

I will work on a PR for the docs that will explain this feature.

image

Copilot now supports all the features set :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Pertains to the frontend. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants