Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
796d514
Rename *Content to *Message and add ToolOutput/ToolUseMessage types
cboos Dec 20, 2025
6c88116
Complete ToolUseMessage wrapper flow in renderer
cboos Dec 20, 2025
462de25
Eliminate format_tool_use_content duplication
cboos Dec 20, 2025
d4c9472
Simplify ToolUseMessage to use ToolUseContent as fallback
cboos Dec 20, 2025
2ca3d31
Add MessageMeta dataclass and system message parsing module
cboos Dec 20, 2025
059bfae
Move formatted_timestamp computation to render time
cboos Dec 20, 2025
c41b24c
Fix pyright error: parse_tool_input returns Optional[ToolInput]
cboos Dec 20, 2025
780a062
Simplify tool input parsing by removing cached property
cboos Dec 20, 2025
fd6ba29
Refactor message parsing into dedicated parser modules
cboos Dec 21, 2025
cf58954
Add message_title/type to content models, consolidate parsing
cboos Dec 21, 2025
c7373fa
Move timing tracking from _render_messages to HtmlRenderer
cboos Dec 21, 2025
940c2e6
Extract tool parsing into dedicated tool_parser.py module
cboos Dec 21, 2025
6b62bfb
Extract transcript parsing into dedicated transcript_parser.py module
cboos Dec 21, 2025
4c668bd
Remove parser.py re-exports, update imports throughout
cboos Dec 21, 2025
846a000
Refactor transcript_parser.py to factories/transcript_factory.py
cboos Dec 21, 2025
09521b7
Move system_parser.py to factories/system_factory.py
cboos Dec 21, 2025
9278df2
Extend MessageMeta and rename parse_meta to create_meta
cboos Dec 21, 2025
1fd5348
Move user_parser.py to factories/user_factory.py
cboos Dec 21, 2025
46c51ea
Move assistant_parser.py and tool_parser.py to factories/
cboos Dec 21, 2025
e2bea7d
Make meta required (first positional) in MessageContent
cboos Dec 21, 2025
3482d9c
Simplify TemplateMessage with content-derived properties
cboos Dec 21, 2025
3515659
Simplify TemplateMessage: require content/meta, remove redundant fields
cboos Dec 22, 2025
6cf9427
Remove unused TemplateMessage.session_summary field
cboos Dec 22, 2025
632dd2f
Clean up outdated comments about moved code and Anthropic types
cboos Dec 22, 2025
68c4c0a
Remove duck-typing fallbacks in favor of strict type checks
cboos Dec 22, 2025
8f18264
Inline _process_system_message function
cboos Dec 22, 2025
3d0e8e7
Make has_children a property derived from children list
cboos Dec 22, 2025
2f65852
Remove unused chunk_uuid generation
cboos Dec 22, 2025
8e574ad
Remove dead code (flatten methods) and reorganize _format_type_counts
cboos Dec 23, 2025
bc8eee0
Add is_meta to MessageMeta and refactor _render_messages
cboos Dec 23, 2025
ec0d803
Consolidate sidechain deduplication into tree-based cleanup
cboos Dec 24, 2025
aa138da
Move raw_text_content from TemplateMessage to MessageContent subclasses
cboos Dec 24, 2025
8b7c10f
Fix sidechain cleanup to adopt orphaned children and add Explore agen…
cboos Dec 24, 2025
20132b7
Cleanup: remove Anthropic API references and obsolete planning docs
cboos Dec 25, 2025
3f5f614
Reorganize models.py: move tool message/input/output sections
cboos Dec 25, 2025
604f11c
Move JSONL Content Models to top of models.py
cboos Dec 25, 2025
42ce951
Refactor tool result parsing: move to factory with registry pattern
cboos Dec 25, 2025
58836e5
Unify tool content formatting: make format_tool_result_content a disp…
cboos Dec 25, 2025
9ceeb6c
Add registry pattern for tool formatters
cboos Dec 25, 2025
11c7420
Add symmetric output models and formatters for remaining tools
cboos Dec 25, 2025
4138dda
Refactor Renderer to use method-based dispatcher pattern
cboos Dec 25, 2025
23610c5
Extend method-based dispatcher pattern to tool inputs/outputs
cboos Dec 25, 2025
737f516
Extract _dispatch_format helper for MRO-based method dispatch
cboos Dec 25, 2025
d5e503b
Move token_usage formatting from renderer to content models
cboos Dec 25, 2025
f7d5c36
Refactor message_title to property with smart delegation
cboos Dec 25, 2025
85340e3
Move title generation to renderer with title_* dispatch methods
cboos Dec 25, 2025
9355dcf
Move message titles from models to Renderer title_* methods
cboos Dec 25, 2025
3149dd4
Remove meta parameter from TemplateMessage constructor
cboos Dec 25, 2025
66a4fb6
Update MESSAGE_REFACTORING2.md with completed goals
cboos Dec 25, 2025
aa0b555
Eliminate TemplateMessage.uuid and refactor pairing indices
cboos Dec 26, 2025
e541fce
Establish TemplateMessage as primary render-time object
cboos Dec 27, 2025
b189b11
Simplify rendering: return ctx, unify message_id, store int ancestry
cboos Dec 27, 2025
09692bb
Fix type checker issues: ancestry type and RenderingContext fields
cboos Dec 27, 2025
f101d83
Fix sidechain deduplication: TaskOutput handling and meta preservation
cboos Dec 27, 2025
c0b4ac9
Fix TaskOutput markdown rendering for structured tool results
cboos Dec 27, 2025
a9117a1
Refactor tool output parsers to receive full ToolResultContent
cboos Dec 27, 2025
49405eb
Fix code review nit-picks: naming, defaults, and test isolation
cboos Dec 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
345 changes: 0 additions & 345 deletions PLAN_PHASE12.md

This file was deleted.

8 changes: 4 additions & 4 deletions claude_code_log/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ def load_cached_entries(self, jsonl_path: Path) -> Optional[list[TranscriptEntry
entries_data.extend(cast(list[dict[str, Any]], timestamp_entries))

# Deserialize back to TranscriptEntry objects
from .parser import parse_transcript_entry
from .factories import create_transcript_entry

entries = [
parse_transcript_entry(entry_dict) for entry_dict in entries_data
create_transcript_entry(entry_dict) for entry_dict in entries_data
]
return entries
except Exception as e:
Expand Down Expand Up @@ -257,10 +257,10 @@ def load_cached_entries_filtered(
)

# Deserialize filtered entries
from .parser import parse_transcript_entry
from .factories import create_transcript_entry

entries = [
parse_transcript_entry(entry_dict)
create_transcript_entry(entry_dict)
for entry_dict in filtered_entries_data
]
return entries
Expand Down
5 changes: 3 additions & 2 deletions claude_code_log/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
get_warmup_session_ids,
)
from .cache import CacheManager, SessionCacheData, get_library_version
from .parser import parse_timestamp, parse_transcript_entry
from .parser import parse_timestamp
from .factories import create_transcript_entry
from .models import (
TranscriptEntry,
AssistantTranscriptEntry,
Expand Down Expand Up @@ -183,7 +184,7 @@ def load_transcript(
"queue-operation",
]:
# Parse using Pydantic models
entry = parse_transcript_entry(entry_dict)
entry = create_transcript_entry(entry_dict)
messages.append(entry)
elif (
entry_type
Expand Down
Loading
Loading