feat: per-user assistant name and system prompt customization
Each user can rename the AI assistant and edit their own system prompt in Settings.
This commit is contained in:
@@ -71,4 +71,16 @@ describe("runAgentChat", () => {
|
||||
assert.equal(result.toolCalls[0]?.name, "add_list_item");
|
||||
assert.equal(result.toolCalls[0]?.status, 201);
|
||||
});
|
||||
|
||||
it("accepts a custom system prompt override", async () => {
|
||||
const result = await runAgentChat({
|
||||
messages: [{ role: "user", content: "hello" }],
|
||||
request: new Request("http://localhost:3000/api/agent/chat"),
|
||||
systemPrompt: "You are a pirate.",
|
||||
llm: createMockLlmClient(),
|
||||
});
|
||||
|
||||
assert.equal(result.message.role, "assistant");
|
||||
assert.ok(result.message.content.length > 0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user