Skip to content

Show recent chat sessions in the AI Chat Welcome screen#16894

Draft
cdamus wants to merge 6 commits intoeclipse-theia:masterfrom
cdamus:feature/16562-show-chat-sessions
Draft

Show recent chat sessions in the AI Chat Welcome screen#16894
cdamus wants to merge 6 commits intoeclipse-theia:masterfrom
cdamus:feature/16562-show-chat-sessions

Conversation

@cdamus
Copy link
Contributor

@cdamus cdamus commented Jan 28, 2026

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 Card component 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.

  • Launch Theia and pick a chat from the cards in the Welcome screen.
  • Launch Theia and pick hit the "Browse all chats..." link in the Welcome screen.
  • With the Welcome screen open, play with the chat session storage preferences. See what the effects are of
    • toggling global/workspace scope
    • changing the storage path in either scope
  • switch workspaces
  • close the workspace (to see global chat storage)
  • etc.

Follow-ups

None identified for now.

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

None.

Review checklist

Reminder for reviewers

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>
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Jan 28, 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
@ndoschek ndoschek self-requested a review February 3, 2026 10:54
@cdamus cdamus marked this pull request as draft February 3, 2026 13:11
@cdamus
Copy link
Contributor Author

cdamus commented Feb 3, 2026

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 😀

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

Labels

None yet

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

1 participant