support agentic message in chatwitheino#222
Conversation
PR #222 Review SummaryOverall Assessment: 可以合并,无 Blocker。 这是一个高质量的 PR,设计原则清晰(泛型 Design Review Scorecard
Top 3 Suggestions
Attack Review: 16/16 PASS ✅核心
Additional Suggestions
|
shentongmartin
left a comment
There was a problem hiding this comment.
Inline suggestions — see individual file comments below.
This reverts commit 17ecc4b.
Review Suggestions🟡 Suggestion 1: Reduce cross-chapter code duplication
Suggested fix: Extract to type PrintOptions struct {
ShowToolCalls bool
ShowToolResults bool
CaptureInterrupt bool
}
func PrintAndCollect[M adk.MessageType](
events *adk.AsyncIterator[*adk.TypedAgentEvent[M]],
opts PrintOptions,
) (string, *adk.InterruptInfo, error) { ... }Each chapter can then call 🟢 Suggestion 3: Split
|
| File | Contents |
|---|---|
kind.go |
Kind, KindOf, KindFromEnv, ValidateKind, DefaultSessionDir |
construct.go |
NewUser, NewSystem, NewAssistant, NewToolResult |
extract.go |
Text, AssistantText, AssistantDeltaText, UserText, ToolCalls, ToolResults, RoleLabel, HasContent |
normalize.go |
NormalizeForSession, NormalizeMessagesForModelInput, normalizeAgenticMessage, normalizeAgenticContentBlock, etc. |
variant.go |
VariantRoleLabel, VariantIsToolResult, DrainToolResult, ConcatChunks, UnmarshalMessage, IsNil |
Not a blocker — purely a readability/navigability improvement.
* support agentic message in chatwitheino * docs: remove message kind appendix * docs: add message kind notes to ch04 ch05 * fix agentic session history replay * preserve agentic reasoning history * update * update * update * refactor chatwitheino middleware helpers * feat(chatwitheino): add middleware test stack * Revert "feat(chatwitheino): add middleware test stack" This reverts commit 17ecc4b. * fix(chatwitheino): handle retries and checkpoint resume * fix(chatwitheino): preserve agentic item ids * docs(chatwitheino): describe AgenticMessage blocks * docs(chatwitheino): default to AgenticMessage * docs(chatwitheino): simplify AgenticMessage intro * refactor chatwitheino event helpers * docs: add TurnLoop chapter to quickstart navigation
* support agentic message in chatwitheino * docs: remove message kind appendix * docs: add message kind notes to ch04 ch05 * fix agentic session history replay * preserve agentic reasoning history * update * update * update * refactor chatwitheino middleware helpers * feat(chatwitheino): add middleware test stack * Revert "feat(chatwitheino): add middleware test stack" This reverts commit 17ecc4b. * fix(chatwitheino): handle retries and checkpoint resume * fix(chatwitheino): preserve agentic item ids * docs(chatwitheino): describe AgenticMessage blocks * docs(chatwitheino): default to AgenticMessage * docs(chatwitheino): simplify AgenticMessage intro * refactor chatwitheino event helpers * docs: add TurnLoop chapter to quickstart navigation
Summary
Validation