fix review reply trigger: treat replies to Pullfrog threads as implicit triggers, only add eyes reaction when dispatching
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
pullfrog[bot]
parent
edd240f535
commit
52ec35790a
@@ -141651,10 +141651,8 @@ function DelegateTool(ctx) {
|
|||||||
const outcome = settled[i];
|
const outcome = settled[i];
|
||||||
const error49 = outcome.status === "rejected" ? String(outcome.reason) : outcome.value.error;
|
const error49 = outcome.status === "rejected" ? String(outcome.reason) : outcome.value.error;
|
||||||
const result = buildTaskResult(entry.task.label, entry.effort, entry.subagent, error49);
|
const result = buildTaskResult(entry.task.label, entry.effort, entry.subagent, error49);
|
||||||
log.info(
|
const status = result.success ? "succeeded" : "failed";
|
||||||
`\xBB task "${entry.task.label}" ${result.success ? "succeeded" : "failed"}:
|
log.box(result.summary, { title: `task "${entry.task.label}" ${status}` });
|
||||||
${result.summary}`
|
|
||||||
);
|
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
const succeeded = results.filter((r) => r.success).length;
|
const succeeded = results.filter((r) => r.success).length;
|
||||||
@@ -144281,8 +144279,7 @@ function buildCommonTools(ctx) {
|
|||||||
FileWriteTool(ctx),
|
FileWriteTool(ctx),
|
||||||
FileEditTool(ctx),
|
FileEditTool(ctx),
|
||||||
FileDeleteTool(ctx),
|
FileDeleteTool(ctx),
|
||||||
ListDirectoryTool(ctx),
|
ListDirectoryTool(ctx)
|
||||||
ReportProgressTool(ctx)
|
|
||||||
];
|
];
|
||||||
if (ctx.payload.shell === "restricted") {
|
if (ctx.payload.shell === "restricted") {
|
||||||
tools.push(ShellTool(ctx));
|
tools.push(ShellTool(ctx));
|
||||||
@@ -144293,6 +144290,7 @@ function buildCommonTools(ctx) {
|
|||||||
function buildOrchestratorTools(ctx) {
|
function buildOrchestratorTools(ctx) {
|
||||||
return [
|
return [
|
||||||
...buildCommonTools(ctx),
|
...buildCommonTools(ctx),
|
||||||
|
ReportProgressTool(ctx),
|
||||||
SelectModeTool(ctx),
|
SelectModeTool(ctx),
|
||||||
DelegateTool(ctx),
|
DelegateTool(ctx),
|
||||||
AskQuestionTool(ctx),
|
AskQuestionTool(ctx),
|
||||||
|
|||||||
+2
-3
@@ -104,9 +104,8 @@ export function DelegateTool(ctx: ToolContext) {
|
|||||||
const outcome = settled[i];
|
const outcome = settled[i];
|
||||||
const error = outcome.status === "rejected" ? String(outcome.reason) : outcome.value.error;
|
const error = outcome.status === "rejected" ? String(outcome.reason) : outcome.value.error;
|
||||||
const result = buildTaskResult(entry.task.label, entry.effort, entry.subagent, error);
|
const result = buildTaskResult(entry.task.label, entry.effort, entry.subagent, error);
|
||||||
log.info(
|
const status = result.success ? "succeeded" : "failed";
|
||||||
`» task "${entry.task.label}" ${result.success ? "succeeded" : "failed"}:\n${result.summary}`
|
log.box(result.summary, { title: `task "${entry.task.label}" ${status}` });
|
||||||
);
|
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-19
@@ -107,24 +107,6 @@ export interface ToolContext {
|
|||||||
tmpdir: string;
|
tmpdir: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* tool names that are only available to the orchestrator.
|
|
||||||
* subagent MCP servers are started with these tools excluded.
|
|
||||||
*
|
|
||||||
* - delegation tools: only the orchestrator can spawn/manage subagents
|
|
||||||
* - remote-mutating tools: subagents work locally; the orchestrator pushes and creates PRs
|
|
||||||
*/
|
|
||||||
export const ORCHESTRATOR_ONLY_TOOLS = [
|
|
||||||
"select_mode",
|
|
||||||
"delegate",
|
|
||||||
"ask_question",
|
|
||||||
"push_branch",
|
|
||||||
"push_tags",
|
|
||||||
"delete_branch",
|
|
||||||
"create_pull_request",
|
|
||||||
"update_pull_request_body",
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
import { log } from "../utils/cli.ts";
|
import { log } from "../utils/cli.ts";
|
||||||
import type { RunContextData } from "../utils/runContextData.ts";
|
import type { RunContextData } from "../utils/runContextData.ts";
|
||||||
import { AskQuestionTool } from "./askQuestion.ts";
|
import { AskQuestionTool } from "./askQuestion.ts";
|
||||||
@@ -236,7 +218,6 @@ function buildCommonTools(ctx: ToolContext): Tool<any, any>[] {
|
|||||||
FileEditTool(ctx),
|
FileEditTool(ctx),
|
||||||
FileDeleteTool(ctx),
|
FileDeleteTool(ctx),
|
||||||
ListDirectoryTool(ctx),
|
ListDirectoryTool(ctx),
|
||||||
ReportProgressTool(ctx),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// only add ShellTool when shell is "restricted"
|
// only add ShellTool when shell is "restricted"
|
||||||
@@ -255,6 +236,7 @@ function buildCommonTools(ctx: ToolContext): Tool<any, any>[] {
|
|||||||
function buildOrchestratorTools(ctx: ToolContext): Tool<any, any>[] {
|
function buildOrchestratorTools(ctx: ToolContext): Tool<any, any>[] {
|
||||||
return [
|
return [
|
||||||
...buildCommonTools(ctx),
|
...buildCommonTools(ctx),
|
||||||
|
ReportProgressTool(ctx),
|
||||||
SelectModeTool(ctx),
|
SelectModeTool(ctx),
|
||||||
DelegateTool(ctx),
|
DelegateTool(ctx),
|
||||||
AskQuestionTool(ctx),
|
AskQuestionTool(ctx),
|
||||||
|
|||||||
Reference in New Issue
Block a user