Conversation
Add complete parser and sync support for Snowflake Cortex Code sessions: - Add AgentCortex type and registry entry to internal/parser/types.go - Implement ParseCortexSession parser in internal/parser/cortex.go: - Handle split-file format (.json + .history.jsonl) - Parse messages with tool calls and tool results - Filter internal blocks and system reminders - Support backup file detection and skipping - Extract session metadata and timestamps - Add processCortex function to sync engine (internal/sync/engine.go) - Wire up Cortex agent in sync engine switch statement - Add Cortex to frontend agent definitions with cyan color - Update README with Cortex directory and env var Session discovery path: ~/.snowflake/cortex/conversations/ Environment variable: CORTEX_DIR Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
roborev: Combined Review (
|
Keep ParsedSession.File aligned with the discovered .json file instead of the .history.jsonl companion. The sync engine's shouldSkipByPath checks the discovered file against stored metadata, so they must match for caching to work. This fixes a High-severity issue where split Cortex sessions would bypass sync caching and be reparsed on every sync tick. Fixes roborev feedback on PR wesm#284.
roborev: Combined Review (
|
Strip the "cortex:" prefix before calling IsValidSessionID in FindCortexSourceFile so prefixed IDs are accepted. Propagate non-ENOENT errors from reading .history.jsonl instead of treating all failures as "session missing". Add comprehensive test suite for the Cortex parser. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
classifyOnePath had no Cortex branch, so watcher-driven SyncPaths ignored Cortex files entirely. Add classification for <uuid>.json and remap <uuid>.history.jsonl events back to the metadata .json file. Populate ParsedToolResult.ContentLength for Cortex tool results so analytics and fingerprinting work correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Summary
Adds complete parser and sync support for Snowflake Cortex Code sessions.
Changes
Backend
internal/parser/cortex.go): Complete session parser handling both embedded history and split-file formats.jsonand.history.jsonlfilesinternal/parser/types.go): AddedAgentCortexconstant and registry entryinternal/sync/engine.go): AddedprocessCortexfunction and wired into agent switchFrontend
frontend/src/lib/utils/agents.ts): Added Cortex with cyan color and "Cortex Code" labelDocumentation
Session Discovery
~/.snowflake/cortex/conversations/CORTEX_DIRcortex_dirscortex:File Format Support
Handles both Cortex session formats:
.jsonfiles with history array.json+.history.jsonlcompanion file.back.*.jsonfilesTesting
Tested with real Cortex sessions:
Screenshots
Session list showing Cortex sessions with cyan badge alongside Claude and Codex sessions.