Make prompt construction more disciplined (#173)

* Make prompt construction more disciplined

* Clean up

* Tweaks
This commit is contained in:
Colin McDonnell
2026-01-24 18:49:47 +00:00
committed by pullfrog[bot]
parent 54279e313b
commit 210084a3b6
7 changed files with 170 additions and 87 deletions
+3 -1
View File
@@ -15,9 +15,10 @@ const BashPermissionInput = type.enumerated("disabled", "restricted", "enabled")
// permissions are derived from event.authorPermission instead
export const JsonPayload = type({
"~pullfrog": "true",
"version": "string",
version: "string",
"agent?": AgentName.or("undefined"),
"prompt?": "string",
"eventInstructions?": "string",
"repoInstructions?": "string",
"event?": "object",
"effort?": Effort.or("undefined"),
@@ -140,6 +141,7 @@ export function resolvePayload(repoSettings: RepoSettings) {
// inverted: jsonPayload.prompt extracts the text from the JSON payload,
// whereas inputs.prompt IS the raw JSON string when internally dispatched
prompt: jsonPayload?.prompt ?? inputs.prompt,
eventInstructions: jsonPayload?.eventInstructions,
repoInstructions: jsonPayload?.repoInstructions,
event,
effort: inputs.effort ?? jsonPayload?.effort ?? "auto",