Documentation
¶
Overview ¶
Package msgutil provides shared message utilities for subprocess-based providers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExtraArgs ¶ added in v0.9.0
CheckExtraArgs rejects command-line arguments that set a reserved flag.
It is used by subprocess-based providers to validate GenOption.ExtraArgs against the flags the provider owns to drive its protocol. A flag matches with one or two leading dashes and with or without an "=value" suffix.
func ExtractOpaqueID ¶
ExtractOpaqueID extracts a string value from Reply.Opaque by walking messages in reverse order.
It is used by subprocess-based providers to retrieve session or thread IDs stored in previous replies.
func LastUserMsg ¶
LastUserMsg returns the last user message in msgs.
It is used by subprocess-based providers that send only the final user message to a subprocess. Earlier supplied user events are not serialized. Some callers resume CLI-owned sessions for context; others launch a fresh process. A successful call does not establish full-history or burst support.
func RejectModelMarker ¶ added in v0.9.0
func RejectModelMarker(m genai.ProviderOptionModel) error
RejectModelMarker returns an error when m is genai.ModelCheap, genai.ModelGood, or genai.ModelSOTA.
Subprocess-based providers do not resolve these markers: listing the models requires launching the CLI, which makes construction slow.
Types ¶
This section is empty.