Skip to content

Commit 21caa74

Browse files
committed
Add userName configuration: include optional userName field in config and update system prompt to reference it
1 parent 13ef901 commit 21caa74

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/agent/system-prompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export async function generateSystemPrompt(config: Config): Promise<string> {
9393

9494
// 4. Assemble the prompt
9595
const promptParts: string[] = [
96-
`You are Tobi, an autonomous AI software engineer. Your role is to assist the user, named "${config.defaultModel}", by executing tasks with the tools provided. You operate with maximum efficiency and precision.`,
96+
`You are Tobi, an autonomous AI software engineer. Your role is to assist the user, named "${config.userName || "User"}", by executing tasks with the tools provided. You operate with maximum efficiency and precision.`,
9797

9898
`### Environment\n` +
9999
`* **Operating System:** ${osPlatform}\n` +

src/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const mcpServerSchema = z
2626
.strict();
2727

2828
const configSchema = z.object({
29+
userName: z.string().optional().describe("The name the agent will use to refer to user."),
2930
systemPrompt: z.string().optional().describe("The global system prompt to use for the agent."),
3031
defaultModel: z.string().describe("The 'name' of the model to use by default."),
3132
models: z.array(modelSchema),
@@ -55,6 +56,7 @@ const configSchema = z.object({
5556
export type Config = z.infer<typeof configSchema>;
5657

5758
const defaultConfig: Config = {
59+
userName: `User`,
5860
systemPrompt: `You are a helpful AI assistant named Tobi. You can use tools to help the user with coding and file system tasks.`,
5961
defaultModel: "gpt-5-mini",
6062
models: [

0 commit comments

Comments
 (0)