Skip to content

Add session tree navigation commands#387

Open
piercebrookins wants to merge 1 commit into
mpfaffenberger:mainfrom
piercebrookins:feature/session-tree-fork
Open

Add session tree navigation commands#387
piercebrookins wants to merge 1 commit into
mpfaffenberger:mainfrom
piercebrookins:feature/session-tree-fork

Conversation

@piercebrookins

@piercebrookins piercebrookins commented Jun 7, 2026

Copy link
Copy Markdown

Summary

Adds plugin-provided /tree, /fork, and /clone commands for navigating and branching conversation history.

Why

Long sessions can drift, and users need a lightweight way to inspect prior turns, restore a previous point, branch from an earlier prompt, or compress history into a fresh conversation without changing the existing session storage format.

What changed

  • Added a session tree plugin with /tree, /fork, and /clone custom-command registration.
  • /tree opens an interactive conversation tree with search/filter, labels, timestamp toggles, and selection-based restore.
  • /tree summary <point> and the TUI S key summarize history through the selected point and replace the active history with that compacted fresh conversation.
  • /fork <point> creates a new autosave branch from a prior user message and returns that prompt for editing.
  • /clone duplicates the current branch into a new autosave session.
  • Added targeted tests for tree modeling, restore/fork/summary behavior, invalid cases, help registration, and session compatibility.

Validation

  • uv run pytest tests/plugins/test_session_tree.py -q
  • uv run pytest tests/plugins/test_session_tree.py tests/test_session_storage.py tests/test_command_handler.py tests/test_summarization_agent.py -q
  • uv run ruff check code_puppy/plugins/session_tree tests/plugins/test_session_tree.py
  • uv run ruff format --check code_puppy/plugins/session_tree tests/plugins/test_session_tree.py

@piercebrookins piercebrookins force-pushed the feature/session-tree-fork branch from 83d7efb to 2dcfa1b Compare June 7, 2026 17:47
@piercebrookins piercebrookins force-pushed the feature/session-tree-fork branch from 2dcfa1b to c83efbb Compare June 7, 2026 17:55
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.

1 participant