mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-28 01:22:56 +00:00
Fixed the distance between profile and the justified text. Furthermore, I fixed a bug where the predefined user input didnt show up.
This commit is contained in:
parent
faa5b3703d
commit
ce0ab7a380
@ -80,6 +80,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
|
|
||||||
// Get the preselected chat template:
|
// Get the preselected chat template:
|
||||||
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(Tools.Components.CHAT);
|
this.currentChatTemplate = this.SettingsManager.GetPreselectedChatTemplate(Tools.Components.CHAT);
|
||||||
|
this.userInput = this.currentChatTemplate.PredefinedUserPrompt;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check for deferred messages of the kind 'SEND_TO_CHAT',
|
// Check for deferred messages of the kind 'SEND_TO_CHAT',
|
||||||
@ -272,7 +273,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CanThreadBeSaved => this.ChatThread is not null && this.ChatThread.Blocks.Count > 0;
|
private bool CanThreadBeSaved => this.ChatThread is not null && this.ChatThread.Blocks.Any(b => !b.HideFromUser);
|
||||||
|
|
||||||
private string TooltipAddChatToWorkspace => string.Format(T("Start new chat in workspace '{0}'"), this.currentWorkspaceName);
|
private string TooltipAddChatToWorkspace => string.Format(T("Start new chat in workspace '{0}'"), this.currentWorkspaceName);
|
||||||
|
|
||||||
@ -326,6 +327,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
private async Task ChatTemplateWasChanged(ChatTemplate chatTemplate)
|
private async Task ChatTemplateWasChanged(ChatTemplate chatTemplate)
|
||||||
{
|
{
|
||||||
this.currentChatTemplate = chatTemplate;
|
this.currentChatTemplate = chatTemplate;
|
||||||
|
this.userInput = this.currentChatTemplate.PredefinedUserPrompt;
|
||||||
if(this.ChatThread is null)
|
if(this.ChatThread is null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -673,9 +675,8 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
Seed = this.RNG.Next(),
|
Seed = this.RNG.Next(),
|
||||||
Blocks = this.currentChatTemplate == default ? [] : this.currentChatTemplate.ExampleConversation.Select(x => x.DeepClone()).ToList(),
|
Blocks = this.currentChatTemplate == default ? [] : this.currentChatTemplate.ExampleConversation.Select(x => x.DeepClone()).ToList(),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.userInput = this.currentChatTemplate.PredefinedUserPrompt;
|
|
||||||
}
|
}
|
||||||
|
this.userInput = this.currentChatTemplate.PredefinedUserPrompt;
|
||||||
|
|
||||||
// Now, we have to reset the data source options as well:
|
// Now, we have to reset the data source options as well:
|
||||||
this.ApplyStandardDataSourceOptions();
|
this.ApplyStandardDataSourceOptions();
|
||||||
|
@ -59,11 +59,9 @@
|
|||||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||||
@T("Predefined User Input")
|
@T("Predefined User Input")
|
||||||
</MudText>
|
</MudText>
|
||||||
|
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
|
||||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
|
||||||
@T("You might want to predefine a first message that will be copied into the user prompt, when you use this chat template. This message could for example be a blueprint for a structured message that this chat template is defined to work with.")
|
@T("You might want to predefine a first message that will be copied into the user prompt, when you use this chat template. This message could for example be a blueprint for a structured message that this chat template is defined to work with.")
|
||||||
</MudJustifiedText>
|
</MudJustifiedText>
|
||||||
|
|
||||||
<MudTextField
|
<MudTextField
|
||||||
T="string"
|
T="string"
|
||||||
@bind-Text="@this.PredefinedUserPrompt"
|
@bind-Text="@this.PredefinedUserPrompt"
|
||||||
@ -83,8 +81,7 @@
|
|||||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||||
@T("Profile Usage")
|
@T("Profile Usage")
|
||||||
</MudText>
|
</MudText>
|
||||||
|
<MudJustifiedText Class="mb-3" Typo="Typo.body1">
|
||||||
<MudJustifiedText Class="mt-6" Typo="Typo.body1">
|
|
||||||
@T("Using some chat templates in tandem with profiles might cause issues. Therefore, you might prohibit the usage of profiles here.")
|
@T("Using some chat templates in tandem with profiles might cause issues. Therefore, you might prohibit the usage of profiles here.")
|
||||||
</MudJustifiedText>
|
</MudJustifiedText>
|
||||||
<MudTextSwitch @bind-Value="@this.AllowProfileUsage" Color="Color.Primary" Label="@T("Allow the use of profiles together with this chat template?")" LabelOn="@T("Yes, allow profiles when using this template")" LabelOff="@T("No, prohibit profile use for this template")" />
|
<MudTextSwitch @bind-Value="@this.AllowProfileUsage" Color="Color.Primary" Label="@T("Allow the use of profiles together with this chat template?")" LabelOn="@T("Yes, allow profiles when using this template")" LabelOff="@T("No, prohibit profile use for this template")" />
|
||||||
@ -92,12 +89,9 @@
|
|||||||
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
<MudText Typo="Typo.h6" Class="mb-3 mt-6">
|
||||||
@T("Example Conversation")
|
@T("Example Conversation")
|
||||||
</MudText>
|
</MudText>
|
||||||
|
|
||||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||||
@T("Add messages of an example conversation (user prompt followed by assistant prompt) to demonstrate the desired interaction pattern. These examples help the AI understand your expectations by showing it the correct format, style, and content of responses before it receives actual user inputs.")
|
@T("Add messages of an example conversation (user prompt followed by assistant prompt) to demonstrate the desired interaction pattern. These examples help the AI understand your expectations by showing it the correct format, style, and content of responses before it receives actual user inputs.")
|
||||||
</MudJustifiedText>
|
</MudJustifiedText>
|
||||||
|
|
||||||
|
|
||||||
<MudTable Items="@this.dataExampleConversation" FixedHeader="true" Hover="true" Class="mt-3 mb-3" CanCancelEdit="true" CancelEditTooltip="@T("Cancel")" CommitEditTooltip="@T("Commit Changes")" Outlined="true" RowEditCancel="@this.ResetItem" RowEditPreview="@this.BackupItem" EditTrigger="TableEditTrigger.RowClick" IsEditRowSwitchingBlocked="false" RowEditCommit="@this.CommitInlineEdit">
|
<MudTable Items="@this.dataExampleConversation" FixedHeader="true" Hover="true" Class="mt-3 mb-3" CanCancelEdit="true" CancelEditTooltip="@T("Cancel")" CommitEditTooltip="@T("Commit Changes")" Outlined="true" RowEditCancel="@this.ResetItem" RowEditPreview="@this.BackupItem" EditTrigger="TableEditTrigger.RowClick" IsEditRowSwitchingBlocked="false" RowEditCommit="@this.CommitInlineEdit">
|
||||||
<ColGroup>
|
<ColGroup>
|
||||||
<col style="width: 10em;" />
|
<col style="width: 10em;" />
|
||||||
|
Loading…
Reference in New Issue
Block a user