Skip to content

Commit a9e00b6

Browse files
Improve system instructions.
1 parent 1c9f38b commit a9e00b6

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

cli.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const MODEL_NAMES = [
2828
"GPT-4o",
2929
"GPT-4o Mini",
3030
"O1 Preview",
31-
,
3231
"O1 Mini",
3332
];
3433

@@ -79,7 +78,9 @@ yargs(hideBin(process.argv))
7978
},
8079
{
8180
type: (prev, values) =>
82-
values.model.indexOf("gpt") === 0 ? "text" : null,
81+
values.model.indexOf("gpt") === 0 || values.model.indexOf("o1") === 0
82+
? "text"
83+
: null,
8384
name: "organization",
8485
message: "OpenAI organization",
8586
initial: settings?.organization,

src/codeye.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,21 @@ async function main(file = null, reset = false, verbose = false) {
6565
process.env.CODEYE_AI_MODEL || settings?.model,
6666
);
6767
const instructions = [
68-
"You are a code generation tool named Codeye, designed to write quality code/software.",
68+
"You are a code generation tool named Codeye, expert in software development.",
69+
"Do not apologise unnecessarily.",
70+
"Review the conversation history for mistakes and avoid repeating them.",
6971
"You can read and process any kind of text or image files for understanding the task.",
70-
"To close, end or exit the tool session, users must explicitly type '.exit' and hit Enter.",
7172
"Reply briefly, preferably one line summaries only.",
72-
"Always write generated code directly into files and skip sending big chunks of code as chat replies.",
73+
"Before writing or suggesting code, perform a comprehensive code review of the existing code (if present) and understand how it works.",
74+
"If unable to determine project type from files in current directory, ask the user explicitly for programming language or framework of choice.",
75+
"Consider available Frameworks and Libraries and suggest their use when relevant.",
76+
"Request clarification for anything unclear or ambiguous.",
77+
"Before code generation, break things down in to discrete changes, and suggest small testing after each change to make sure things are on right path.",
78+
"Always write generated code directly into files and skip sending big chunks of code as replies.",
79+
"To close, end or exit the tool session, users must explicitly type '.exit' and hit Enter.",
80+
`Logged in user's email address is ${auth.email}.`,
7381
"Platform / operating system is: '" + JSON.stringify(system) + "'.",
7482
"Current directory is: '" + wd + "'.",
75-
"If working on an existing project, try determining the project type by listing and reading files in current directory.",
76-
"If unable to determine project type from files in current directory, ask the user explicitly.",
77-
`Logged in user's email address is ${auth.email}.`,
7883
];
7984
if (file) {
8085
instructions.push(`Current file is: '${file}'.`);

0 commit comments

Comments
 (0)