Skip to content

Commit ddcef84

Browse files
authored
Merge pull request #18 from codad5/codad5-dev
Codad5 dev
2 parents 6cc2cff + 58c3b30 commit ddcef84

File tree

4 files changed

+459
-295
lines changed

4 files changed

+459
-295
lines changed

app/actions.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ const getPromptFiles = (app: string): PromptFile[] => {
7777
return { fileName: value || "", rank: (isNaN(rank) ? 0 : rank) + 1 };
7878
})
7979
.filter((file) => file.fileName);
80-
81-
return promptEnvVars.sort((a, b) => b.rank - a.rank);
80+
// return with the highest-ranked prompt first where 1 is highest/best
81+
console.log(promptEnvVars, "before sort");
82+
return promptEnvVars.sort((a, b) => b.rank - a.rank).reverse();
8283
};
8384

8485
const selectPromptFile = (promptFiles: PromptFile[], retry: number): string => {
@@ -118,7 +119,8 @@ export async function generateResume(
118119
"prompts",
119120
selectedPromptFile
120121
);
121-
console.log(promptFilePath, "selected prompt file path");
122+
console.log(promptFiles);
123+
console.log(promptFilePath, "selected prompt file path", `for retry ${retry}`);
122124
const systemPrompt = await fs.readFile(promptFilePath, "utf-8");
123125
const result = await streamText({
124126
model,

0 commit comments

Comments
 (0)