Skip to content

Conversation

@JeanMertz
Copy link
Collaborator

Introduce the jp conversation fork command, allowing users to create a new conversation based on the contents of an existing one. This is useful for exploring different paths or isolating specific parts of a discussion.

The command supports time-based filtering of events using the --from and --until flags, which accept both relative (e.g., "5mins") and absolute timestamps. Users can also immediately switch to the new fork using the --activate flag.

# Fork the active conversation
jp conversation fork --activate

# Fork a specific conversation with events from 10 minutes ago
jp conversation fork <id> --from 10mins

Internally, changes are made to make it easier to test code that relies on the current timestamp, such as
Workspace::set_active_conversation_id, and
Workspace::create_conversation. Additionally, the persistence logic was moved from Ctx to Workspace to ensure state is saved even when the workspace is dropped outside of the CLI context.

Introduce the `jp conversation fork` command, allowing users to create a
new conversation based on the contents of an existing one. This is
useful for exploring different paths or isolating specific parts of a
discussion.

The command supports time-based filtering of events using the `--from`
and `--until` flags, which accept both relative (e.g., "5mins") and
absolute timestamps. Users can also immediately switch to the new fork
using the `--activate` flag.

```shell
# Fork the active conversation
jp conversation fork --activate

# Fork a specific conversation with events from 10 minutes ago
jp conversation fork <id> --from 10mins
```

Internally, changes are made to make it easier to test code that relies
on the current timestamp, such as
`Workspace::set_active_conversation_id`, and
`Workspace::create_conversation`. Additionally, the persistence logic
was moved from `Ctx` to `Workspace` to ensure state is saved even when
the workspace is dropped outside of the CLI context.

Signed-off-by: Jean Mertz <[email protected]>
@JeanMertz JeanMertz merged commit 3b14ab2 into main Jan 7, 2026
12 checks passed
@JeanMertz JeanMertz deleted the improve-tool-inquery38 branch January 7, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants