mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-25 15:25:15 +02:00
Remove unrelated indentation changes
Keep only the core glob pattern functionality for search_files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -287,7 +287,7 @@ function createUnifiedDiff(originalContent: string, newContent: string, filepath
|
|||||||
|
|
||||||
async function applyFileEdits(
|
async function applyFileEdits(
|
||||||
filePath: string,
|
filePath: string,
|
||||||
edits: Array<{ oldText: string, newText: string }>,
|
edits: Array<{oldText: string, newText: string}>,
|
||||||
dryRun = false
|
dryRun = false
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
// Read file content and normalize line endings
|
// Read file content and normalize line endings
|
||||||
@@ -876,7 +876,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
|
|
||||||
async function buildTree(currentPath: string): Promise<TreeEntry[]> {
|
async function buildTree(currentPath: string): Promise<TreeEntry[]> {
|
||||||
const validPath = await validatePath(currentPath);
|
const validPath = await validatePath(currentPath);
|
||||||
const entries = await fs.readdir(validPath, { withFileTypes: true });
|
const entries = await fs.readdir(validPath, {withFileTypes: true});
|
||||||
const result: TreeEntry[] = [];
|
const result: TreeEntry[] = [];
|
||||||
|
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
@@ -938,11 +938,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
const validPath = await validatePath(parsed.data.path);
|
const validPath = await validatePath(parsed.data.path);
|
||||||
const info = await getFileStats(validPath);
|
const info = await getFileStats(validPath);
|
||||||
return {
|
return {
|
||||||
content: [{
|
content: [{ type: "text", text: Object.entries(info)
|
||||||
type: "text", text: Object.entries(info)
|
|
||||||
.map(([key, value]) => `${key}: ${value}`)
|
.map(([key, value]) => `${key}: ${value}`)
|
||||||
.join("\n")
|
.join("\n") }],
|
||||||
}],
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user