Skip to content

feat: Record and replay external classes that extend Turn or Content - #689

Merged
gadenbuie merged 9 commits into
mainfrom
feat/content-replay-extended-classes
Aug 19, 2025
Merged

gadenbuie merged 9 commits into
mainfrom
feat/content-replay-extended-classes

Conversation

@gadenbuie

Copy link
Copy Markdown
Collaborator

Allows contents_record() and contents_replay() to record and replay content with external types that extend Turn or Content.

See discussion in #503 (comment)

The added tests show the two expected uses:

  1. A locally-defined class that extends an ellmer class (this requires content_replay() to take .envir to find the local object).
  2. A class from a package, similar to btw:::BtwToolResult.

@gadenbuie
gadenbuie requested a review from hadley July 31, 2025 15:44
Comment thread R/content-replay.R Resolved
Comment thread R/content-replay.R Resolved
Comment thread R/content-replay.R Resolved
@gadenbuie
gadenbuie requested a review from hadley August 1, 2025 15:38
@gadenbuie
gadenbuie merged commit da2a333 into main Aug 19, 2025
@gadenbuie
gadenbuie deleted the feat/content-replay-extended-classes branch August 19, 2025 19:53
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