Show recent chat sessions in the AI Chat Welcome screen#16894
Draft
cdamus wants to merge 6 commits intoeclipse-theia:masterfrom
Draft
Show recent chat sessions in the AI Chat Welcome screen#16894cdamus wants to merge 6 commits intoeclipse-theia:masterfrom
cdamus wants to merge 6 commits intoeclipse-theia:masterfrom
Conversation
Refactor the welcome provider as a ContributionProvider extension point with the main welcome content as the prime contribution. Part of eclipse-theia#16562 Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
Show up to five cards for the most recent chats in the persistent store, if the store is enabled and has chats to show, along with a "Browse all chats..." link. Fixes eclipse-theia#16562 Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
To avoid the welcome screen's keeping up with changing session storage path preference changes causing partial paths to continually be seeded with new stores from the global store, enhance the session store to support a read-only view of the workspace session store as a view on the global sessions until such time as changes need to be written to it, at which point the workspace's local store will be seeded from the global store. Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
cdamus
commented
Jan 29, 2026
It seemed that the cards presented for chats are of such generic shape and feel that they should be based on a reusable Card component that Theia did not yet provide. Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
…chat-sessions Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com> # Conflicts: # packages/ai-ide/src/browser/style/index.css
Contributor
Author
|
Converting to a draft because this will undergo significant churn with the removal of the "seeding" of workspace chats from the global store under discussion for the 1.68 release. It will at least be greatly simplified 😀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Shows recent chat sessions from persistent storage as cards in the Welcome screen of the AI Chat view to get the user started by resuming a previous chat, if applicable. Clicking a card resumes that chat. A "Browse all chats..." link is provided to open the quick picker to see the full history of persisted chats.
A new preference in the Settings lets the user choose the number of cards to show. The default is 5. A value of 0 suppress the showing of chats in the welcome screen. A maximum of 10 seems typical of recents lists in most document-based applications but is strictly unnecessary; I can remove the limit if reviewers would prefer not to have one.
The session storage mechanism is updated to avoid an edge case that does not occur with the "Show Chats" command and its quick picker. There is an edge case when the user is editing the session storage path, especially for workspace-scoped storage which is the default: while typing out a path, if the user pauses, then a partial path (not what she intends) is broadcast as the new storage path and the Welcome screen updates to show the sessions available there. But as she has not finished typing, there will be no sessions, and so we must show the sessions from the global store from which a new workspace-local store would be seeded but without actually seeding a new store. Otherwise, a bunch of clones of the global store will be created at useless partial paths in the filesystem until the user finishes typing the path in the preference field.
So, the session storage service is updated to always provide a read-only view of whatever the store would provide, whether actually present on disk or backed up by the current content of the global store, when queried for the sessions in the store. Only the APIs that would actually write changes to the store now seed a new workspace-scope store from the global store content.
🆕 The recent session cards seemed likely to be a UI pattern that might be repeated in other "welcome" or overview type content in Theia and Theia-based applications so a simple
Cardcomponent is introduced in Core on which the session cards are based.How to test
For best test coverage, make sure that you have some sessions in the global store (via the global storage scope preference for chat sessions) that are different to what you might have in any workspace.
Follow-ups
None identified for now.
Breaking changes
Attribution
None.
Review checklist
nlsservice (for details, please see the Internationalization/Localization section in the Coding Guidelines)Reminder for reviewers