diff options
| author | t <t@tjp.lol> | 2026-06-10 10:06:07 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-10 12:17:27 -0600 |
| commit | bb85e867bc938138f29fb45230169af1ba60761c (patch) | |
| tree | 5ad1cf50274c61ccfffab7048b4a4e28003d82b5 /libpanto/src/public.zig | |
| parent | d26890bbc52e9f0050db40f208763a7f2b714ddd (diff) | |
Add addUserText helper; update all call sites
Conversation.addUserMessage now takes a []ContentBlock (symmetric with
addAssistantMessage). Introduce a thin addUserText wrapper in agent.zig
for the plain-text case and update every call site in agent.zig and
anthropic_messages_json.zig accordingly.
Diffstat (limited to 'libpanto/src/public.zig')
| -rw-r--r-- | libpanto/src/public.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpanto/src/public.zig b/libpanto/src/public.zig index f9c2830..277b4ea 100644 --- a/libpanto/src/public.zig +++ b/libpanto/src/public.zig @@ -78,6 +78,11 @@ pub const ContentBlock = conversation_mod.ContentBlock; pub const Message = conversation_mod.Message; pub const MessageRole = conversation_mod.MessageRole; pub const TextualBlock = conversation_mod.TextualBlock; +/// Build a `TextualBlock` (the streaming text buffer used inside content +/// blocks) from a slice, copying the bytes with `alloc`. The canonical way +/// for binding code to construct `.Text`/`.Thinking`/tool-result text when +/// assembling `ContentBlock`s by hand (e.g. for conversation resumption). +pub const textualBlockFromSlice = conversation_mod.textualBlockFromSlice; pub const ThinkingBlock = conversation_mod.ThinkingBlock; pub const ToolUseBlock = conversation_mod.ToolUseBlock; pub const ToolResultBlock = conversation_mod.ToolResultBlock; |
