mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 09:27:21 +00:00
Added a SWOT analysis assistant (#1122)
Co-authored-by: hart_s3 <sabrina.hartmann@dlr.de>
This commit is contained in:
1 parent
6cb20fd75a
commit
060a2a5734
87 files changed
+4601
-45
No files matched your search
@@ -0,0 +1,35 @@
|
||||
using AIStudio.Components;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Assistants.SWOTAnalysis;
|
||||
|
||||
/// <summary>
|
||||
/// Shows how far the analysis of each SWOT category is, and its findings as soon as they are there.
|
||||
/// </summary>
|
||||
public partial class SwotAnalysisProgressView : MSGComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The progress per category; a category without one counts as running.
|
||||
/// </summary>
|
||||
[Parameter, EditorRequired]
|
||||
public IReadOnlyDictionary<SwotAnalysisCategory, SwotCategoryAnalysisProgress> Progress { get; set; } = null!;
|
||||
|
||||
private static readonly SwotCategoryAnalysisProgress RUNNING = new(SwotCategoryAnalysisStatus.RUNNING);
|
||||
|
||||
private SwotCategoryAnalysisProgress ProgressOf(SwotAnalysisCategory category) => this.Progress.GetValueOrDefault(category, RUNNING);
|
||||
|
||||
private string RunningTextOf(SwotCategoryAnalysisStatus status) => status is SwotCategoryAnalysisStatus.REPAIRING
|
||||
? T("The answer did not have the expected form. Asking the model once more...")
|
||||
: T("Analyzing this category...");
|
||||
|
||||
private SwotQuadrantLabels Labels => new(
|
||||
T("Strengths"),
|
||||
T("Weaknesses"),
|
||||
T("Opportunities"),
|
||||
T("Threats"),
|
||||
T("Internal"),
|
||||
T("External"),
|
||||
T("Positive"),
|
||||
T("Negative"));
|
||||
}
|
||||
Reference in new issue
Block a user