fix: api ergonomics follow-up (#720)

* fix: builder with_* methods take T instead of Option<T>

* fix: emit conditional builder calls for optional fields in macros

* fix: convert with_task, with_stop_reason, with_logger, with_content to proper builders

* fix: update test callers for new builder signatures

* fix: simplify make_task helper and remove unused import

* fix: update sampling_stdio example for new with_stop_reason signature

* fix: make annotations and execution Option<Expr> consistent with other fields

* fix: remove unused none_expr import
This commit is contained in:
Dale Seo 2026-03-03 12:05:32 -05:00 • committed by GitHub
commit 2d90b76501
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ impl ClientHandler for SamplingDemoClient {
SamplingMessage::assistant_text(response_text),
"mock_llm".to_string(),
)
.with_stop_reason(Some(CreateMessageResult::STOP_REASON_END_TURN.to_string())))
.with_stop_reason(CreateMessageResult::STOP_REASON_END_TURN))
}
}