Tweaks
This commit is contained in:
@@ -95115,7 +95115,7 @@ function buildPullfrogFooter(params) {
|
||||
if (params.workflowRun) {
|
||||
const baseUrl = `https://github.com/${params.workflowRun.owner}/${params.workflowRun.repo}/actions/runs/${params.workflowRun.runId}`;
|
||||
const url2 = params.workflowRun.jobId ? `${baseUrl}/job/${params.workflowRun.jobId}` : baseUrl;
|
||||
parts.push(`[workflow run](${url2})`);
|
||||
parts.push(`[View workflow run](${url2})`);
|
||||
}
|
||||
const allParts = [
|
||||
...parts,
|
||||
@@ -126020,11 +126020,7 @@ async function validateApiKey(ctx) {
|
||||
}
|
||||
async function runAgent(ctx) {
|
||||
log.info(`\xBB running ${ctx.agentName}...`);
|
||||
const { context: _context, ...eventWithoutContext } = ctx.payload.event;
|
||||
const promptContent = `${ctx.payload.prompt}
|
||||
|
||||
${encode(eventWithoutContext)}`;
|
||||
log.box(promptContent, { title: "Prompt" });
|
||||
log.box(ctx.payload.prompt.trim(), { title: "Prompt" });
|
||||
return ctx.agent.run({
|
||||
payload: ctx.payload,
|
||||
mcpServers: ctx.mcpServers,
|
||||
|
||||
@@ -3,7 +3,6 @@ import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { flatMorph } from "@ark/util";
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import { encode as toonEncode } from "@toon-format/toon";
|
||||
import { type } from "arktype";
|
||||
import { agents } from "./agents/index.ts";
|
||||
import type { AgentResult } from "./agents/shared.ts";
|
||||
@@ -506,11 +505,7 @@ async function validateApiKey(ctx: Context): Promise<void> {
|
||||
|
||||
async function runAgent(ctx: Context): Promise<AgentResult> {
|
||||
log.info(`» running ${ctx.agentName}...`);
|
||||
// strip context from event
|
||||
const { context: _context, ...eventWithoutContext } = ctx.payload.event;
|
||||
// format: prompt + two newlines + TOON encoded event
|
||||
const promptContent = `${ctx.payload.prompt}\n\n${toonEncode(eventWithoutContext)}`;
|
||||
log.box(promptContent, { title: "Prompt" });
|
||||
log.box(ctx.payload.prompt.trim(), { title: "Prompt" });
|
||||
|
||||
return ctx.agent.run({
|
||||
payload: ctx.payload,
|
||||
|
||||
@@ -48,7 +48,7 @@ export function buildPullfrogFooter(params: BuildPullfrogFooterParams): string {
|
||||
if (params.workflowRun) {
|
||||
const baseUrl = `https://github.com/${params.workflowRun.owner}/${params.workflowRun.repo}/actions/runs/${params.workflowRun.runId}`;
|
||||
const url = params.workflowRun.jobId ? `${baseUrl}/job/${params.workflowRun.jobId}` : baseUrl;
|
||||
parts.push(`[workflow run](${url})`);
|
||||
parts.push(`[View workflow run](${url})`);
|
||||
}
|
||||
|
||||
const allParts = [
|
||||
|
||||
Reference in New Issue
Block a user