* Move out checking out PRs from `etupGit` (#377 intent) * Keep subagent-related changes from #377
This commit is contained in:
committed by
pullfrog[bot]
parent
b472aa1ba9
commit
da72d0d6ee
@@ -144201,7 +144201,7 @@ function initToolState(params) {
|
||||
return {
|
||||
progressCommentId: resolvedId,
|
||||
subagents: /* @__PURE__ */ new Map(),
|
||||
activeSubagentId: void 0,
|
||||
selfSubagentId: void 0,
|
||||
backgroundProcesses: /* @__PURE__ */ new Map(),
|
||||
usageEntries: []
|
||||
};
|
||||
@@ -144379,12 +144379,13 @@ async function startMcpHttpServer(ctx) {
|
||||
}
|
||||
};
|
||||
}
|
||||
async function startSubagentMcpServer(ctx) {
|
||||
async function startSubagentMcpServer(params) {
|
||||
const subagentToolState = {
|
||||
...ctx.toolState,
|
||||
...params.ctx.toolState,
|
||||
selfSubagentId: params.subagentId,
|
||||
backgroundProcesses: /* @__PURE__ */ new Map()
|
||||
};
|
||||
const subagentCtx = { ...ctx, toolState: subagentToolState };
|
||||
const subagentCtx = { ...params.ctx, toolState: subagentToolState };
|
||||
const tools = buildSubagentTools(subagentCtx);
|
||||
const startResult = await selectMcpPort(subagentCtx, tools);
|
||||
return { url: startResult.url, stop: () => startResult.server.stop() };
|
||||
@@ -147464,12 +147465,7 @@ async function setupGit(params) {
|
||||
$("git", ["remote", "set-url", "origin", originUrl], { cwd: repoDir });
|
||||
params.toolState.pushUrl = originUrl;
|
||||
$("git", ["config", "--local", "credential.helper", ""], { cwd: repoDir });
|
||||
if (params.event.is_pr !== true || !params.event.issue_number) {
|
||||
log.info("\xBB git authentication configured");
|
||||
return;
|
||||
}
|
||||
const prNumber = params.event.issue_number;
|
||||
await checkoutPrBranch(prNumber, params);
|
||||
log.info("\xBB git authentication configured");
|
||||
}
|
||||
|
||||
// utils/time.ts
|
||||
|
||||
Reference in New Issue
Block a user