add getIssue utility and use actual issue metadata in trigger page, fix getPullRequest caching and user prompt quoting
This commit is contained in:
committed by
pullfrog[bot]
parent
983ef8aba8
commit
26ced25a8f
@@ -138028,7 +138028,8 @@ function resolveInstructions(ctx) {
|
|||||||
event: ctx.payload.event
|
event: ctx.payload.event
|
||||||
});
|
});
|
||||||
const runtime = buildRuntimeContext(ctx);
|
const runtime = buildRuntimeContext(ctx);
|
||||||
const user = ctx.payload.prompt.split("\n").map((line) => `> ${line}`).join("\n");
|
const user = ctx.payload.prompt;
|
||||||
|
const userQuoted = user.split("\n").map((line) => `> ${line}`).join("\n");
|
||||||
const system = `***********************************************
|
const system = `***********************************************
|
||||||
************* SYSTEM INSTRUCTIONS *************
|
************* SYSTEM INSTRUCTIONS *************
|
||||||
***********************************************
|
***********************************************
|
||||||
@@ -138107,7 +138108,7 @@ ${system}
|
|||||||
|
|
||||||
************* USER PROMPT *************
|
************* USER PROMPT *************
|
||||||
|
|
||||||
${user}
|
${userQuoted}
|
||||||
|
|
||||||
************* EVENT DATA *************
|
************* EVENT DATA *************
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,9 @@ export function resolveInstructions(ctx: InstructionsContext): ResolvedInstructi
|
|||||||
|
|
||||||
const runtime = buildRuntimeContext(ctx);
|
const runtime = buildRuntimeContext(ctx);
|
||||||
|
|
||||||
const user = ctx.payload.prompt
|
const user = ctx.payload.prompt;
|
||||||
|
|
||||||
|
const userQuoted = user
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.map((line) => `> ${line}`)
|
.map((line) => `> ${line}`)
|
||||||
.join("\n");
|
.join("\n");
|
||||||
@@ -166,7 +168,7 @@ ${system}
|
|||||||
|
|
||||||
************* USER PROMPT *************
|
************* USER PROMPT *************
|
||||||
|
|
||||||
${user}
|
${userQuoted}
|
||||||
|
|
||||||
************* EVENT DATA *************
|
************* EVENT DATA *************
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user