AutoCommit: Bool → Dropdown (mention/enforce/forbid), leerer System-Prompt fix
This commit is contained in:
1 parent
7410a18755
commit
40bab457d9
10 files changed
+52
-27
No files matched your search
@@ -54,7 +54,7 @@ public static class AgentEndpoint
|
||||
Model = body.TryGetProperty("model", out var m) ? m.GetString() ?? "sonnet" : "sonnet",
|
||||
ToolChoice = body.TryGetProperty("toolChoice", out var tc) ? tc.GetString() ?? "any" : "any",
|
||||
CustomCommands = customCommands,
|
||||
AutoCommit = body.TryGetProperty("autoCommit", out var ac) && ac.GetBoolean(),
|
||||
AutoCommit = body.TryGetProperty("autoCommit", out var ac) ? ac.GetString() ?? "" : "",
|
||||
UseSoul = !body.TryGetProperty("useSoul", out var us) || us.GetBoolean(),
|
||||
UseIdentity = !body.TryGetProperty("useIdentity", out var ui) || ui.GetBoolean(),
|
||||
UseUserInfo = !body.TryGetProperty("useUserInfo", out var uu) || uu.GetBoolean(),
|
||||
@@ -83,7 +83,7 @@ public static class AgentEndpoint
|
||||
if (body.TryGetProperty("toolChoice", out var tc)) agent.ToolChoice = tc.GetString();
|
||||
if (body.TryGetProperty("customCommands", out var cc))
|
||||
agent.CustomCommands = cc.ValueKind == JsonValueKind.Null ? null : cc.GetRawText();
|
||||
if (body.TryGetProperty("autoCommit", out var ac)) agent.AutoCommit = ac.GetBoolean();
|
||||
if (body.TryGetProperty("autoCommit", out var ac)) agent.AutoCommit = ac.GetString() ?? "";
|
||||
if (body.TryGetProperty("useSoul", out var us)) agent.UseSoul = us.GetBoolean();
|
||||
if (body.TryGetProperty("useIdentity", out var ui)) agent.UseIdentity = ui.GetBoolean();
|
||||
if (body.TryGetProperty("useUserInfo", out var uu)) agent.UseUserInfo = uu.GetBoolean();
|
||||
|
||||
@@ -146,10 +146,9 @@ public static class ChatEndpoint
|
||||
}, attachmentRecords);
|
||||
}
|
||||
|
||||
var systemPrompt = new List<object>
|
||||
{
|
||||
new { type = "text", text = systemPromptText }
|
||||
};
|
||||
var systemPrompt = string.IsNullOrWhiteSpace(systemPromptText)
|
||||
? new List<object>()
|
||||
: new List<object> { new { type = "text", text = systemPromptText } };
|
||||
|
||||
var workspace = session.Workspace;
|
||||
if (!string.IsNullOrEmpty(workspace))
|
||||
|
||||
Reference in new issue
Block a user