mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Rename GetData method to GetText across components.
This commit is contained in:
parent
ffd02af5d0
commit
a1eb975021
@ -168,7 +168,7 @@ public abstract partial class AssistantBase : ComponentBase
|
|||||||
{
|
{
|
||||||
var contentToSend = sendToButton.UseResultingContentBlockData switch
|
var contentToSend = sendToButton.UseResultingContentBlockData switch
|
||||||
{
|
{
|
||||||
false => sendToButton.GetData(),
|
false => sendToButton.GetText(),
|
||||||
true => this.resultingContentBlock?.Content switch
|
true => this.resultingContentBlock?.Content switch
|
||||||
{
|
{
|
||||||
ContentText textBlock => textBlock.Text,
|
ContentText textBlock => textBlock.Text,
|
||||||
|
@ -32,7 +32,7 @@ public partial class AssistantGrammarSpelling : AssistantBaseCore
|
|||||||
{
|
{
|
||||||
Self = SendTo.GRAMMAR_SPELLING_ASSISTANT,
|
Self = SendTo.GRAMMAR_SPELLING_ASSISTANT,
|
||||||
UseResultingContentBlockData = false,
|
UseResultingContentBlockData = false,
|
||||||
GetData = () => string.IsNullOrWhiteSpace(this.correctedText) ? this.inputText : this.correctedText
|
GetText = () => string.IsNullOrWhiteSpace(this.correctedText) ? this.inputText : this.correctedText
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ public partial class AssistantRewriteImprove : AssistantBaseCore
|
|||||||
{
|
{
|
||||||
Self = SendTo.REWRITE_ASSISTANT,
|
Self = SendTo.REWRITE_ASSISTANT,
|
||||||
UseResultingContentBlockData = false,
|
UseResultingContentBlockData = false,
|
||||||
GetData = () => string.IsNullOrWhiteSpace(this.rewrittenText) ? this.inputText : this.rewrittenText,
|
GetText = () => string.IsNullOrWhiteSpace(this.rewrittenText) ? this.inputText : this.rewrittenText,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ public readonly record struct SendToButton() : IButtonData
|
|||||||
{
|
{
|
||||||
public ButtonTypes Type => ButtonTypes.SEND_TO;
|
public ButtonTypes Type => ButtonTypes.SEND_TO;
|
||||||
|
|
||||||
public Func<string> GetData { get; init; } = () => string.Empty;
|
public Func<string> GetText { get; init; } = () => string.Empty;
|
||||||
|
|
||||||
public bool UseResultingContentBlockData { get; init; } = true;
|
public bool UseResultingContentBlockData { get; init; } = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user