Skip to content

Context Tree Sidebar

The Contox extension adds a sidebar panel to VS Code's Activity Bar. This panel displays your project brain as a hierarchical tree, giving you a visual overview of all memory categories and their contents.

Accessing the tree

Click the Contox icon in the Activity Bar (left sidebar) to open the context tree panel. The panel is labeled "Contexts" and shows your brain's hierarchical structure.

Tree structure

The tree mirrors your project brain's schema hierarchy. Each node represents a brain category with its child items. For example:

Architecture (3 items)
Conventions (5 items)
Journal (12 items)
  ├─ Feature: Auth system
  ├─ Feature: Dashboard
  └─ ...
Decisions (4 items)
Bugs (2 items)
Todo (6 items)

Each node displays:

  • Name -- The brain category or item name
  • Item count -- The number of memory items in this category (shown as a description)
  • Icon -- A themed icon based on the schema key

Schema icons

The tree uses VS Code's built-in theme icons mapped to brain categories:

Schema KeyIconDescription
root/decisionsLightbulbKey decisions
root/conventionsOrdered listCoding conventions
root/architectureServerArchitecture and stack
root/journalNotebookImplementation journal
root/bugsBugBugs and fixes
root/todoChecklistPending tasks
root/codemapFile codeCode structure
root/stackLayersTech stack
root/frontendBrowserFrontend components
root/backendServer processBackend services

Categories with children use a namespace icon. Leaf items use a field icon.

Syncing the tree

The tree syncs with your project brain in these scenarios:

  • On workspace load -- If .contox.json exists and you are authenticated, the tree syncs automatically
  • After deep link setup -- The tree syncs immediately after the URI handler configures the workspace
  • Manual sync -- Run Contox: Sync Contexts from the Command Palette

The sync command calls the V2 brain API to fetch the full tree structure. During sync, the status bar shows a syncing indicator.

Node tooltips

Hovering over a tree node shows a tooltip with:

  • The full schema key path (for example, root/journal)
  • The number of memory items

Interaction

Currently, the tree is read-only and provides a visual overview of your brain structure. Clicking on nodes expands or collapses their children. The tree does not support inline editing -- to modify contexts, use the MCP tools, CLI, or the Contox dashboard.

Creating contexts from VS Code

While the tree itself is read-only, you can create new contexts using the Contox: Create Context command (contox.create). This opens a quick pick dialog where you can enter a name and optional description. The new context is created via the API and appears in the tree after the next sync.

Next steps

  • Commands -- All 11 extension commands including sync and create
  • Settings -- Configure auto-sync behavior