diff --git a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua index 2bc538a2..663b7f84 100644 --- a/app/MindWork AI Studio/Assistants/I18N/allTexts.lua +++ b/app/MindWork AI Studio/Assistants/I18N/allTexts.lua @@ -2470,17 +2470,20 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T101 -- Create a SWOT analysis of my content UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T1113304215"] = "Create a SWOT analysis of my content" --- Source material -UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T1697755825"] = "Source material" - -- SWOT Analysis UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T1864542518"] = "SWOT Analysis" +-- Please describe the goal the SWOT analysis should support. +UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T2136978542"] = "Please describe the goal the SWOT analysis should support." + -- Target language UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T237828418"] = "Target language" --- Describe the decision or question the SWOT analysis should support. -UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T2901719160"] = "Describe the decision or question the SWOT analysis should support." +-- Input +UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T2677268763"] = "Input" + +-- Analysis goal +UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T2718020690"] = "Analysis goal" -- Create SWOT analysis UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T3549988380"] = "Create SWOT analysis" @@ -2494,8 +2497,8 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T384 -- Specify topics the SWOT analysis should pay particular attention to. UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T3857591121"] = "Specify topics the SWOT analysis should pay particular attention to." --- (Optional) Analysis goal -UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T4150922727"] = "(Optional) Analysis goal" +-- Analysis Goal +UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T573440114"] = "Analysis Goal" -- (Optional) Analysis focus UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T578386116"] = "(Optional) Analysis focus" @@ -2503,6 +2506,12 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T578 -- Please provide a custom language. UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T656744944"] = "Please provide a custom language." +-- Subject of analysis +UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T871926658"] = "Subject of analysis" + +-- Background Knowledge +UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SWOTANALYSIS::ASSISTANTSWOTANALYSIS::T986091845"] = "Background Knowledge" + -- Find synonyms for the following word or phrase: UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::SYNONYM::ASSISTANTSYNONYMS::T1793532807"] = "Find synonyms for the following word or phrase:" diff --git a/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor b/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor index 243d9009..781dcf43 100644 --- a/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor +++ b/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor @@ -5,10 +5,25 @@ { } - + + @T("Input") + + - - + + + @T("Analysis Goal") + + + - - + + + @T("Background Knowledge") + + + +
+ + +
\ No newline at end of file diff --git a/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor.cs b/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor.cs index 3a2f4f4c..a2cd3011 100644 --- a/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor.cs +++ b/app/MindWork AI Studio/Assistants/SWOTAnalysis/AssistantSWOTAnalysis.razor.cs @@ -1,4 +1,5 @@ -using AIStudio.Dialogs.Settings; +using AIStudio.Chat; +using AIStudio.Dialogs.Settings; using AIStudio.Tools.AssistantSessions; namespace AIStudio.Assistants.SWOTAnalysis; @@ -50,6 +51,7 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore contextMaterials = []; private bool isAgentRunning; private CommonLanguages selectedTargetLanguage = CommonLanguages.AS_IS; private string customTargetLanguage = string.Empty; @@ -88,6 +91,7 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore INPUT_TEXT_STATE_KEY = new(nameof(inputText)); private static readonly AssistantSessionStateKey ANALYSIS_GOAL_STATE_KEY = new(nameof(analysisGoal)); private static readonly AssistantSessionStateKey IMPORTANT_ASPECTS_STATE_KEY = new(nameof(importantAspects)); + private static readonly AssistantSessionStateKey> CONTEXT_MATERIALS_STATE_KEY = new(nameof(contextMaterials)); private static readonly AssistantSessionStateKey IS_AGENT_RUNNING_STATE_KEY = new(nameof(isAgentRunning)); private static readonly AssistantSessionStateKey SELECTED_TARGET_LANGUAGE_STATE_KEY = new(nameof(selectedTargetLanguage)); private static readonly AssistantSessionStateKey CUSTOM_TARGET_LANGUAGE_STATE_KEY = new(nameof(customTargetLanguage)); @@ -100,6 +104,7 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore this.inputText = value); state.Restore(ANALYSIS_GOAL_STATE_KEY, value => this.analysisGoal = value); state.Restore(IMPORTANT_ASPECTS_STATE_KEY, value => this.importantAspects = value); + state.RestoreHashSet(CONTEXT_MATERIALS_STATE_KEY, this.contextMaterials); state.Restore(IS_AGENT_RUNNING_STATE_KEY, value => this.isAgentRunning = value); state.Restore(SELECTED_TARGET_LANGUAGE_STATE_KEY, value => this.selectedTargetLanguage = value); state.Restore(CUSTOM_TARGET_LANGUAGE_STATE_KEY, value => this.customTargetLanguage = value); @@ -139,6 +145,14 @@ public partial class AssistantSWOTAnalysis : AssistantBaseCore