Agent-Flags: useSoul, useIdentity, useUserInfo, useMemory

- 4 neue bool-Properties auf AgentRecord (Default: true)
- DB-Migration: use_soul, use_identity, use_user_info, use_memory
- SystemPromptBuilder: IDENTITY.md, SOUL.md, USER.md, Memory-Block bedingt
- AnthropicService: Memory-Tools nur wenn useMemory aktiv
- Agent-Formular: 4 Checkboxen (Seele, Identität, Gegenüber, Erinnerungen)
- API: Create + Update lesen/speichern die neuen Flags
This commit is contained in:
Meleki committed 2026-03-01 14:33:11 +01:00
1 parent da34739cba
commit 6df3591d8b
8 files changed
+57 -10

No files matched your search

+9 -3
View File
@@ -130,6 +130,10 @@ public class DatabaseService
TryAddColumn(conn, "agents", "custom_commands", "TEXT");
TryAddColumn(conn, "messages", "is_marked", "INTEGER NOT NULL DEFAULT 0");
TryAddColumn(conn, "agents", "auto_commit", "INTEGER NOT NULL DEFAULT 0");
TryAddColumn(conn, "agents", "use_soul", "INTEGER NOT NULL DEFAULT 1");
TryAddColumn(conn, "agents", "use_identity", "INTEGER NOT NULL DEFAULT 1");
TryAddColumn(conn, "agents", "use_user_info", "INTEGER NOT NULL DEFAULT 1");
TryAddColumn(conn, "agents", "use_memory", "INTEGER NOT NULL DEFAULT 1");
}
private void TryAddColumn(SqliteConnection conn, string table, string column, string type)
@@ -148,8 +152,8 @@ public class DatabaseService
agent.CreatedAt = now;
agent.UpdatedAt = now;
await conn.ExecuteAsync(@"
INSERT INTO agents (agent_id, name, avatar, description, model, tool_choice, custom_commands, auto_commit, is_deleted, created_at, updated_at)
VALUES (@AgentId, @Name, @Avatar, @Description, @Model, @ToolChoice, @CustomCommands, @AutoCommit, 0, @CreatedAt, @UpdatedAt)
INSERT INTO agents (agent_id, name, avatar, description, model, tool_choice, custom_commands, auto_commit, use_soul, use_identity, use_user_info, use_memory, is_deleted, created_at, updated_at)
VALUES (@AgentId, @Name, @Avatar, @Description, @Model, @ToolChoice, @CustomCommands, @AutoCommit, @UseSoul, @UseIdentity, @UseUserInfo, @UseMemory, 0, @CreatedAt, @UpdatedAt)
", agent);
return agent;
}
@@ -175,7 +179,9 @@ public class DatabaseService
await conn.ExecuteAsync(@"
UPDATE agents SET name = @Name, avatar = @Avatar, description = @Description,
model = @Model, tool_choice = @ToolChoice,
custom_commands = @CustomCommands, auto_commit = @AutoCommit, updated_at = @UpdatedAt
custom_commands = @CustomCommands, auto_commit = @AutoCommit,
use_soul = @UseSoul, use_identity = @UseIdentity, use_user_info = @UseUserInfo, use_memory = @UseMemory,
updated_at = @UpdatedAt
WHERE agent_id = @AgentId
", agent);
}