2024-08-21 08:30:01 +02:00
|
|
|
namespace AIStudio.Components;
|
2024-07-13 10:37:57 +02:00
|
|
|
|
|
|
|
|
public class TreeItemData : ITreeItem
|
|
|
|
|
{
|
|
|
|
|
public WorkspaceBranch Branch { get; init; } = WorkspaceBranch.NONE;
|
|
|
|
|
|
|
|
|
|
public int Depth { get; init; }
|
|
|
|
|
|
|
|
|
|
public string Text { get; init; } = string.Empty;
|
|
|
|
|
|
2024-08-21 08:30:01 +02:00
|
|
|
public string ShortenedText => this.Text.Length > 30 ? this.Text[..30] + "..." : this.Text;
|
2024-07-13 10:37:57 +02:00
|
|
|
|
|
|
|
|
public string Icon { get; init; } = string.Empty;
|
|
|
|
|
|
2026-05-24 13:50:42 +02:00
|
|
|
public string DefaultIcon { get; init; } = string.Empty;
|
|
|
|
|
|
2024-07-13 10:37:57 +02:00
|
|
|
public TreeItemType Type { get; init; }
|
|
|
|
|
|
|
|
|
|
public string Path { get; init; } = string.Empty;
|
|
|
|
|
|
2026-05-24 13:50:42 +02:00
|
|
|
public Guid ChatId { get; init; }
|
|
|
|
|
|
|
|
|
|
public Guid WorkspaceId { get; init; }
|
|
|
|
|
|
2024-07-13 10:37:57 +02:00
|
|
|
public bool Expandable { get; init; } = true;
|
|
|
|
|
|
2024-08-19 20:19:55 +02:00
|
|
|
public DateTimeOffset LastEditTime { get; init; }
|
|
|
|
|
|
2024-07-24 15:17:45 +02:00
|
|
|
public IReadOnlyCollection<TreeItemData<ITreeItem>> Children { get; init; } = [];
|
2024-07-13 10:37:57 +02:00
|
|
|
}
|