This commit is contained in:
Dax Raad
2025-05-20 22:00:00 -04:00
parent 9b564f0b73
commit 2860a2bb1a
11 changed files with 505 additions and 173 deletions

View File

@@ -2,6 +2,8 @@ import { z } from "zod";
import * as fs from "fs";
import * as path from "path";
import { Tool } from "./tool";
import { LSP } from "../lsp";
import { FileTimes } from "./util/file-times";
const MAX_READ_SIZE = 250 * 1024;
const DEFAULT_READ_LIMIT = 2000;
@@ -117,8 +119,11 @@ export const ViewTool = Tool.define({
}
output += "\n</file>";
await LSP.run((client) => client.notify.open({ path: filePath }));
FileTimes.read(filePath);
return {
output: output,
output,
};
},
});
@@ -143,4 +148,3 @@ function isImageFile(filePath: string): string | false {
return false;
}
}