You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 4. Assemble the prompt, now with the new context
71
104
constpromptParts: string[]=[
72
-
`You are a helpful AI assistant named Tobi. You can use tools to help the user with coding and file system tasks.`,
73
-
];
105
+
`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.`,
74
106
75
-
promptParts.push("### Current Workspace");
76
-
promptParts.push("Here is a list of files and directories in the current working directory:");
77
-
promptParts.push("```");
78
-
promptParts.push(filesAndDirs);
79
-
promptParts.push("```");
107
+
// UPDATED: The Environment section now includes the new dynamic information.
108
+
`### Environment\n`+
109
+
`* **Operating System:** ${osPlatform}\n`+
110
+
`* **User Locale:** ${userLocale}\n`+
111
+
`* **User Timezone:** ${userTimezone}\n`+
112
+
`* **Current Date & Time:** ${currentDate}\n`+
113
+
`* **Working Directory:** ${cwd}\n`+
114
+
"* **Directory Contents:**\n"+
115
+
"```\n"+
116
+
`${filesAndDirs||"(empty)"}\n`+
117
+
"```",
118
+
119
+
"### Rules of Engagement\n"+
120
+
"1. **Think Step-by-Step:** Before acting, briefly state your plan to achieve the user's goal.\n"+
121
+
"2. **Execute Autonomously:** You are autonomous. Use your tools to execute your plan without asking for permission. The user will intervene if your plan is incorrect.\n"+
122
+
"3. **One Tool at a Time:** You can only call one tool per turn. Decompose complex tasks into a sequence of single tool calls.\n"+
123
+
"4. **Stay on Task:** Your responses should consist of your thought process followed by a tool call. Avoid conversational filler or apologies.\n"+
124
+
"5. **Code Concisely:** Do not add comments to code unless explicitly requested by the user.",
"The user has provided the following instructions in a `TOBI.md` or `AGENTS.md` file. Follow them carefully.",
129
+
"### User-Provided Instructions\n"+
130
+
"The user has provided the following project-specific instructions. Adhere to them strictly.\n"+
131
+
"```markdown\n"+
132
+
instructionContent+
133
+
"\n```",
85
134
);
86
-
promptParts.push("```markdown");
87
-
promptParts.push(instructionContent);
88
-
promptParts.push("```");
89
135
}
90
136
91
-
promptParts.push("### Available Tools");
92
-
promptParts.push(
93
-
"You have the following tools available. To use a tool, respond with a JSON object that strictly adheres to the TypeScript type definition of the tool.",
94
-
);
95
137
promptParts.push(
96
-
"The following are TypeScript type definitions for the tools. The `name` property is the tool to call, and you must provide the corresponding `arguments` object.",
138
+
"### Tool Reference\n"+
139
+
"To use a tool, you must respond with a single JSON object containing the `tool_calls` property. This object must conform to the following TypeScript definitions.\n\n"+
140
+
"**Example:** To list files, you would respond with:\n"+
0 commit comments