Skip to content

Conversation

@continue
Copy link
Contributor

@continue continue bot commented Oct 14, 2025

Description

This PR adds a preview panel to the session selector that displays chat history when navigating through sessions using cn ls or the /resume slash command.

Screen.Recording.2025-10-14.at.12.16.04.PM.mov

Changes

  • Created new SessionPreview component to display chat history
  • Updated SessionSelector to show a two-column layout with preview on the right
  • Preview shows the first 10 messages with truncation for long content
  • Preview only displays when terminal width > 100 columns
  • Session history is automatically loaded and displayed as the cursor moves through the list

Inspiration

This feature was inspired by fzf's preview functionality, making it easier to find the right chat session without manually entering each one.

Screenshots

The preview panel shows on the right side of the terminal when using cn ls:

  • Left side: List of sessions
  • Right side: Preview of the selected session's chat history

Fixes CON-3892


This agent session was co-authored by nate and Continue.


Summary by cubic

Adds a chat history preview to the session selector (cn ls and /resume). Fixes CON-3892 by making sessions easier to scan without opening them.

  • New Features
    • New SessionPreview renders the first 10 non‑system messages and truncates long content.
    • SessionSelector uses a two‑column layout; preview shows when terminal width > 100 columns.
    • Automatically loads local session history as you move the cursor; remote sessions show “preview not available.”
    • Formats text and array/multimodal content; labels messages as You/Assistant.

- Created SessionPreview component to display chat history
- Updated SessionSelector to show two-column layout with preview on right
- Preview shows first 10 messages with truncation for long content
- Preview only displays when terminal width > 100 columns
- Automatically loads and displays session history as cursor moves

Fixes CON-3892

Generated with Continue(https://continue.dev)

Co-Authored-By: Continue <[email protected]>
Co-authored-by: Username <[email protected]>
sestinj and others added 2 commits October 14, 2025 06:23
- Changed list width from 45% to 30% of terminal width
- Preview panel now takes up 70% of the right side
- Provides more space for chat history preview

Co-Authored-By: Continue <[email protected]>
Co-authored-by: Username <[email protected]>
@tingwai tingwai force-pushed the continuebot/con-3892 branch from e90365b to 1a7d07b Compare October 14, 2025 18:41
@tingwai tingwai marked this pull request as ready for review October 14, 2025 19:23
@tingwai tingwai requested a review from a team as a code owner October 14, 2025 19:23
@tingwai tingwai requested review from Patrick-Erichsen and removed request for a team October 14, 2025 19:23
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 14, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@Patrick-Erichsen
Copy link
Collaborator

Patrick-Erichsen commented Oct 15, 2025

Handful of visual nitpicks:

  • Feels like we could increase the width of the "Recent sessions" panel to make it more readable. This would make the preview pane smaller but that seems okay
  • The blue borders feel a bit unnecessary, I'd probably prefer the same muted color we use for the input box
  • The "Preview" title text in the preview pane seems unnecessary, it feels pretty clear that it's a preview
  • The help subtext below the "Recent session" feels unnecessary as well. Maybe just the esc to close at the bottom
  • Can we make the rows the same width as the title?
  • 1 or 2 rows of gap between the "89 more sessions" and the rows
  • Is this bit of jank fixable?
Screenshot 2025-10-15 at 3 05 51 PM

And a few wishlist items

  • I think I would rather have the local vs remote session broken up into two different sections to be able to navigate them separately
  • Adding message count and branch name like Claude Code has here
Screenshot 2025-10-15 at 3 11 07 PM

@tingwai
Copy link
Collaborator

tingwai commented Oct 15, 2025

Thanks for the feedback!

* Is this bit of jank fixable?
Screenshot 2025-10-15 at 3 05 51 PM

This is an issue with ink, its unfortunately an existing issue with some places in cn where we use emojis. ink incorrectly calculates the length of the unicode so the box border character position is off by 1 sometimes 2 places

@Patrick-Erichsen
Copy link
Collaborator

Instead of an emoji can we just do ASCII symbol, eg ?

@sestinj sestinj merged commit 1c06790 into main Oct 17, 2025
73 of 76 checks passed
@sestinj sestinj deleted the continuebot/con-3892 branch October 17, 2025 21:24
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Oct 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
@sestinj
Copy link
Contributor

sestinj commented Oct 18, 2025

🎉 This PR is included in version 1.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 21, 2025

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 22, 2025

🎉 This PR is included in version 1.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor

sestinj commented Oct 29, 2025

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

released size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants