This commit is contained in:
Shawn Morreau
2025-11-18 19:02:47 -05:00
parent fc1b035f5d
commit c72d44382f
3 changed files with 2 additions and 24 deletions
+1 -4
View File
@@ -11,10 +11,7 @@ import { IssueTool } from "./issue.ts";
import { PullRequestTool } from "./pr.ts";
import { PullRequestInfoTool } from "./prInfo.ts";
import { ReviewTool } from "./review.ts";
import { addTools, initLogFile } from "./shared.ts";
// Initialize log file when server starts
initLogFile();
import { addTools } from "./shared.ts";
const server = new FastMCP({
name: "gh-pullfrog",
+1 -15
View File
@@ -1,6 +1,6 @@
import { cached } from "@ark/util";
import { appendFileSync } from "node:fs";
import { join } from "node:path";
import { cached } from "@ark/util";
import { Octokit } from "@octokit/rest";
import type { StandardSchemaV1 } from "@standard-schema/spec";
import type { FastMCP, Tool } from "fastmcp";
@@ -39,20 +39,6 @@ function getLogPath(): string {
return join(process.cwd(), "log.txt");
}
/**
* Initialize the log file with server startup information
*/
export function initLogFile(): void {
try {
const logPath = getLogPath();
const timestamp = new Date().toISOString();
const logEntry = `[${timestamp}] MCP Server Started: gh-pullfrog\n`;
appendFileSync(logPath, logEntry, "utf-8");
} catch {
// Silently fail if logging fails to avoid breaking the tool
}
}
/**
* Log MCP tool call information to log.txt
*/
-5
View File
@@ -29,11 +29,6 @@ export async function run(
agent.inputKeys.map((inputKey) => [inputKey, process.env[inputKey.toUpperCase()]])
),
};
// agent: "cursor",
// ...flatMorph(agents, (_, agent) => [
// agent.inputKey,
// process.env[agent.inputKey.toUpperCase()],
// ]),
const result = await main(inputs);