feat(cli): export and import sessions#11075
Merged
RomneyDa merged 3 commits intocontinuedev:mainfrom Mar 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
3 issues found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="extensions/cli/src/slashCommands.ts">
<violation number="1" location="extensions/cli/src/slashCommands.ts:199">
P2: `/import` only uses `args[0]`, so file paths containing spaces are truncated and reported as missing.</violation>
<violation number="2" location="extensions/cli/src/slashCommands.ts:218">
P2: Import command lacks runtime validation of exported session format/version before persistence, allowing incompatible or malformed session data to be saved.</violation>
<violation number="3" location="extensions/cli/src/slashCommands.ts:222">
P1: Import collision detection only checks 1000 sessions, so duplicate IDs outside that window can be missed and existing sessions overwritten.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
026a449 to
50817d0
Compare
50817d0 to
0d9b6d8
Compare
RomneyDa
previously approved these changes
Mar 24, 2026
Collaborator
RomneyDa
left a comment
There was a problem hiding this comment.
@uinstinct nice addition!
The import of historyManager in slashCommands.ts triggers core/util/paths.ts which calls path.isAbsolute — not provided by the existing path mock. Add the missing path exports and mock core/util/history.js to avoid filesystem operations in tests.
RomneyDa
approved these changes
Mar 24, 2026
Collaborator
RomneyDa
left a comment
There was a problem hiding this comment.
@uinstinct nice addition!
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Add the ability to export a selected session and import it by path of the file.
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Continue Tasks: 🔄 7 running — View all
Summary by cubic
Add CLI support to export a session to JSON and import a session from a file. Adds new slash commands and a TUI export selector to make moving sessions easy.
New Features
/exportto open an Export selector in the TUI; savescontinue-session-<id>.jsonin the current directory withversion: 1andexportedAt./import <file-path>with clear errors for missing path, missing file, invalid JSON, or unsupported export (expectsversion: 1).sessionIdexists, a new UUID is generated and the session is saved without overwriting; output shows original and new IDs.exportandimportin system slash commands; wired TUI navigation and system messages for success/failure.Bug Fixes
slashCommandstests by mockingpath.isAbsolute,path.resolve, andcore/util/history.jsto avoid filesystem calls.Written for commit ab8760e. Summary will update on new commits.