[AdvancedPaste]Check "Paste with AI" enabled state for enabling custom actions (#35026)

* [AdvancedPaste] Check OpenAI enabled state for custom actions

* Add some more explanations to the expected exception

* Add description saying that it requires Paste with AI to be enabled

* Check openAI enabled only if we have custom actions

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Ani
2024-09-24 19:16:20 +02:00
committed by GitHub
parent 734b0f8a54
commit 499dc9bb7a
5 changed files with 54 additions and 11 deletions

View File

@@ -102,7 +102,10 @@
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="AdvancedPaste_Direct_Access_Hotkeys_GroupSettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="AdvancedPasteUI_Actions" HeaderIcon="{ui:FontIcon Glyph=&#xE792;}">
<tkcontrols:SettingsCard
x:Uid="AdvancedPasteUI_Actions"
HeaderIcon="{ui:FontIcon Glyph=&#xE792;}"
IsEnabled="{x:Bind ViewModel.IsOpenAIEnabled, Mode=OneWay}">
<Button
x:Uid="AdvancedPasteUI_AddCustomActionButton"
Click="AddCustomActionButton_Click"
@@ -130,6 +133,7 @@
x:Name="CustomActions"
x:Uid="CustomActions"
HorizontalAlignment="Stretch"
IsEnabled="{x:Bind ViewModel.IsOpenAIEnabled, Mode=OneWay}"
IsTabStop="False"
ItemsSource="{x:Bind ViewModel.CustomActions, Mode=OneWay}">
<ItemsControl.ItemTemplate>