validateMaxTurnsSupport validates that max-turns is only used with engines that support this feature
(frontmatter map[string]any, engine CodingAgentEngine)
| 127 | |
| 128 | // validateMaxTurnsSupport validates that max-turns is only used with engines that support this feature |
| 129 | func (c *Compiler) validateMaxTurnsSupport(frontmatter map[string]any, engine CodingAgentEngine) error { |
| 130 | // Check if max-turns is specified in the engine config |
| 131 | _, engineConfig := c.ExtractEngineConfig(frontmatter) |
| 132 | |
| 133 | hasMaxTurns := engineConfig != nil && engineConfig.MaxTurns != "" |
| 134 | |
| 135 | if hasMaxTurns { |
| 136 | agentValidationLog.Printf("Validating max-turns support: engine=%s", engine.GetID()) |
| 137 | } |
| 138 | return validateCapabilitySupport("max-turns", hasMaxTurns, engine.GetCapabilities().MaxTurns, engine.GetID()) |
| 139 | } |
| 140 | |
| 141 | // validateMaxContinuationsSupport validates that max-continuations is only used with engines that support this feature |
| 142 | func (c *Compiler) validateMaxContinuationsSupport(frontmatter map[string]any, engine CodingAgentEngine) error { |
no test coverage detected