- UserId-Feld zu SessionRecord und AgentRecord hinzugefügt - DB-Migration: user_id Spalte + bestehende Daten dem Admin zuweisen - Alle Endpoints filtern/prüfen nach UserId des eingeloggten Users - HttpContextExtensions.GetUserId() Helper für konsistenten Zugriff - Betrifft: Agent, Session, Chat, History, Workspace, Skill Endpoints - Sessions/Agents anderer User sind nicht sichtbar/zugreifbar
23 lines
888 B
C#
23 lines
888 B
C#
namespace Gott.Models;
|
|
|
|
public class AgentRecord
|
|
{
|
|
public long Id { get; set; }
|
|
public string AgentId { get; set; }
|
|
public string Name { get; set; }
|
|
public string Avatar { get; set; } // base64 data url
|
|
public string Description { get; set; }
|
|
public string Model { get; set; } // sonnet, opus
|
|
public string ToolChoice { get; set; } // "any" oder "auto"
|
|
public string CustomCommands { get; set; }
|
|
public string AutoCommit { get; set; } = ""; // "", "mention", "forbid"
|
|
public bool UseSoul { get; set; } = true;
|
|
public bool UseIdentity { get; set; } = true;
|
|
public bool UseUserInfo { get; set; } = true;
|
|
public bool UseMemory { get; set; } = true;
|
|
public string UserId { get; set; }
|
|
public bool IsDeleted { get; set; }
|
|
public string CreatedAt { get; set; }
|
|
public string UpdatedAt { get; set; }
|
|
}
|