update todos, cleanup
This commit is contained in:
@@ -2,8 +2,6 @@ import { ghPullfrogMcpName } from "../mcp/index.ts";
|
|||||||
import { modes } from "../modes.ts";
|
import { modes } from "../modes.ts";
|
||||||
import type { Payload } from "../payload.ts";
|
import type { Payload } from "../payload.ts";
|
||||||
|
|
||||||
// const userPromptHeader = `************* USER PROMPT *************\n`;
|
|
||||||
|
|
||||||
export const addInstructions = (payload: Payload) =>
|
export const addInstructions = (payload: Payload) =>
|
||||||
`************* GENERAL INSTRUCTIONS *************
|
`************* GENERAL INSTRUCTIONS *************
|
||||||
# General instructions
|
# General instructions
|
||||||
|
|||||||
@@ -131,7 +131,8 @@ export async function main(inputs: Inputs): Promise<MainResult> {
|
|||||||
// attempt JSON parsing
|
// attempt JSON parsing
|
||||||
const parsedPrompt = JSON.parse(inputs.prompt);
|
const parsedPrompt = JSON.parse(inputs.prompt);
|
||||||
if (!("~pullfrog" in parsedPrompt)) {
|
if (!("~pullfrog" in parsedPrompt)) {
|
||||||
throw new Error("Invalid prompt: not a pullfrog webhook payload");
|
// is non-pullfrog JSON (probably from a GitHub event), treat it as a plain text prompt
|
||||||
|
throw new Error();
|
||||||
}
|
}
|
||||||
payload = parsedPrompt as Payload;
|
payload = parsedPrompt as Payload;
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
/** May be a `github.event` payload that has been stringified. This case needs to be detected and handled appropriately. */
|
/** May be a `github.event` payload that has been stringified. This case needs to be detected and handled appropriately. */
|
||||||
|
|
||||||
|
import type { AgentName } from "./main.ts";
|
||||||
import type { Mode } from "./modes.ts";
|
import type { Mode } from "./modes.ts";
|
||||||
|
|
||||||
// type Payload = GithubEventPayload | WorkflowDispatchPayload;
|
// type Payload = GithubEventPayload | WorkflowDispatchPayload;
|
||||||
@@ -11,7 +12,7 @@ export type Payload = {
|
|||||||
/**
|
/**
|
||||||
* Agent slug identifier (e.g., "claude", "codex", "gemini")
|
* Agent slug identifier (e.g., "claude", "codex", "gemini")
|
||||||
*/
|
*/
|
||||||
readonly agent: string | null;
|
readonly agent: AgentName | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The prompt/instructions for the agent to execute
|
* The prompt/instructions for the agent to execute
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
[] gemini installation speed
|
[] gemini installation speed
|
||||||
[] entry.js
|
[] entry.js
|
||||||
|
[] handle defaulting agent name value
|
||||||
|
[] test agent/mode combinations
|
||||||
|
[] test if home directory mcp.json works if mcp.json is specified in repo
|
||||||
|
[] add footer to the working comment ("executed by {agent}", link to pullfrog (homepage) w/ small logo?, feedback (create github issue), link to workflow run)
|
||||||
|
|
||||||
|
|
||||||
## MAYBE
|
## MAYBE
|
||||||
|
|||||||
Reference in New Issue
Block a user