logging
This commit is contained in:
+1
-4
@@ -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
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user