mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-13 15:34:59 -05:00
feat: add image file validation and format detection for image generation
## CHANGES • Add image file path validation with extension checking • Implement dynamic output format detection from file extensions • Update BuildChatOptions method to return error for validation • Add comprehensive test coverage for image file validation • Upgrade YAML library from v2 to v3 • Update shell completions to reflect supported image formats • Add error handling for existing file conflicts • Support PNG, JPEG, JPG, and WEBP image formats
This commit is contained in:
@@ -270,7 +270,11 @@ func Cli(version string) (err error) {
|
||||
if chatReq.Language == "" {
|
||||
chatReq.Language = registry.Language.DefaultLanguage.Value
|
||||
}
|
||||
if session, err = chatter.Send(chatReq, currentFlags.BuildChatOptions()); err != nil {
|
||||
var chatOptions *common.ChatOptions
|
||||
if chatOptions, err = currentFlags.BuildChatOptions(); err != nil {
|
||||
return
|
||||
}
|
||||
if session, err = chatter.Send(chatReq, chatOptions); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user