Require Face acknowledgement of human corrections
This commit is contained in:
parent
58624a6bb6
commit
f3144789df
4 changed files with 19 additions and 1 deletions
|
|
@ -610,7 +610,7 @@ async function interpretRepoFaceTurnOutput(
|
|||
): Promise<RepoFaceParentInterpretation> {
|
||||
const interpreterPrompt = loadPromptTemplate("repo-face-turn-interpreter.prompt.md", {
|
||||
attempt: input.attempt,
|
||||
facePrompt: job.contextBundle.prompt.slice(0, 8000),
|
||||
facePrompt: renderRepoFaceInterpreterPromptContext(job.contextBundle.prompt),
|
||||
faceOutput: outputText.slice(0, 8000),
|
||||
});
|
||||
const interpreterContext = {
|
||||
|
|
@ -629,6 +629,18 @@ function normalizeModelText(content: string): string {
|
|||
return content.trim();
|
||||
}
|
||||
|
||||
function renderRepoFaceInterpreterPromptContext(prompt: string): string {
|
||||
if (prompt.length <= 28000) {
|
||||
return prompt;
|
||||
}
|
||||
|
||||
return [
|
||||
prompt.slice(0, 6000),
|
||||
"\n\n[... middle of Face prompt omitted for Interpreter context budget ...]\n\n",
|
||||
prompt.slice(-22000),
|
||||
].join("");
|
||||
}
|
||||
|
||||
function parseRepoFaceParentInterpretation(
|
||||
interpretationText: string,
|
||||
attempt: 1 | 2,
|
||||
|
|
|
|||
Loading…
Reference in a new issue