Enhance person card functionality: add custom prompt textarea persistence during input, streamline portrait prompt API by removing unused parameters, and ensure proper button state management based on input. Update tests to verify new behavior.
This commit is contained in:
@@ -193,7 +193,7 @@ internal static class SwarmUiClientRegistration
|
||||
.Validate(options => options.TimeoutSeconds is > 0 and <= 3600, "SwarmUi:TimeoutSeconds must be between 1 and 3600.")
|
||||
.ValidateOnStart();
|
||||
|
||||
services.AddHttpClient<SwarmUiClient>((sp, client) =>
|
||||
var http = services.AddHttpClient<SwarmUiClient>((sp, client) =>
|
||||
{
|
||||
var options = sp.GetRequiredService<IOptions<SwarmUiOptions>>().Value;
|
||||
if (!string.IsNullOrWhiteSpace(options.BaseUrl))
|
||||
@@ -208,6 +208,13 @@ internal static class SwarmUiClientRegistration
|
||||
}
|
||||
});
|
||||
|
||||
// AddServiceDefaults puts a 10s AttemptTimeout on every HttpClient. Image generation
|
||||
// is a long POST and not safe to retry; HttpClient.Timeout (SwarmUi:TimeoutSeconds) is
|
||||
// the only deadline that should apply.
|
||||
#pragma warning disable EXTEXP0001
|
||||
http.RemoveAllResilienceHandlers();
|
||||
#pragma warning restore EXTEXP0001
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user