// because the view measures the real sizes. A call that fails before any line
// fails the build, and the core tries it again at the next message.
type Compactor struct {
// because the view measures the real sizes. A call that fails before any line
// fails the build, and the core tries it again at the next message.
type Compactor struct {
}
// newCompactor returns the compactor of an agent, which sends its calls through
// client with model. instructions gives the system prompt of the agent at each
// build, so a build sends the same prompt as the turns of that time.
}
// newCompactor returns the compactor of an agent, which sends its calls through
// client with model. instructions gives the system prompt of the agent at each
// build, so a build sends the same prompt as the turns of that time.
-func newCompactor(client *Client, instructions func() (string, error), model ModelConfig) *Compactor {
+func newCompactor(client *ModelClient, instructions func() (string, error), model ModelConfig) *Compactor {
- var response Response
- response, err = c.client.Create(ctx, Request{
+ var response ModelResponse
+ response, err = c.client.Create(ctx, ModelRequest{