Routine in Oberfläche

+ Commands reaktiviert
+ Speichern erkennen
This commit is contained in:
2025-12-10 12:35:14 +01:00
parent 2e981e2168
commit 14097204e6
11 changed files with 161 additions and 50 deletions

View File

@@ -0,0 +1,36 @@
using BS.Shared.Interface;
using DevExpress.DataAccess.DataFederation;
using DevExpress.Xpf.Bars.Native;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BS.Shared.Extensions.CustomInterfaces
{
public static class IAiPromptbausteinTreeExtension
{
public static bool IsExecutable(this IAiPromptbaustein aiPromptbaustein)
=> aiPromptbaustein.IsPrompt() || aiPromptbaustein.IsKette();
public static bool IsOrdner(this IAiPromptbaustein aiPromptbaustein)
=> aiPromptbaustein.hasPrompttype(AiPromptbausteinType.Ordner);
public static bool IsKette(this IAiPromptbaustein aiPromptbaustein)
=> aiPromptbaustein.hasPrompttype(AiPromptbausteinType.Kette);
public static bool IsPrompt(this IAiPromptbaustein aiPromptbaustein)
=> aiPromptbaustein.hasPrompttype(AiPromptbausteinType.Prompt);
private static bool hasPrompttype(this IAiPromptbaustein aiPromptbaustein, AiPromptbausteinType aiPromptbausteinType)
=> aiPromptbaustein.isObject() && aiPromptbaustein.PromptbausteinType == aiPromptbausteinType;
private static bool isObject(this IAiPromptbaustein aiPromptbaustein)
=> aiPromptbaustein != null;
}
}