export class MessageIde {
    request;
    constructor(request) {
        this.request = request;
    }
    getGitHubAuthToken() {
        return this.request("getGitHubAuthToken", undefined);
    }
    getLastModified(files) {
        return this.request("getLastModified", { files });
    }
    getGitRootPath(dir) {
        return this.request("getGitRootPath", { dir });
    }
    listDir(dir) {
        return this.request("listDir", { dir });
    }
    infoPopup(message) {
        return this.request("errorPopup", { message });
    }
    errorPopup(message) {
        return this.request("errorPopup", { message });
    }
    getRepoName(dir) {
        return this.request("getRepoName", { dir });
    }
    getDebugLocals(threadIndex) {
        return this.request("getDebugLocals", { threadIndex });
    }
    getTopLevelCallStackSources(threadIndex, stackDepth) {
        return this.request("getTopLevelCallStackSources", {
            threadIndex,
            stackDepth,
        });
    }
    getAvailableThreads() {
        return this.request("getAvailableThreads", undefined);
    }
    getTags(artifactId) {
        return this.request("getTags", artifactId);
    }
    getIdeInfo() {
        return this.request("getIdeInfo", undefined);
    }
    readRangeInFile(filepath, range) {
        return this.request("readRangeInFile", { filepath, range });
    }
    isTelemetryEnabled() {
        return this.request("isTelemetryEnabled", undefined);
    }
    getUniqueId() {
        return this.request("getUniqueId", undefined);
    }
    getWorkspaceConfigs() {
        return this.request("getWorkspaceConfigs", undefined);
    }
    async getDiff() {
        return await this.request("getDiff", undefined);
    }
    async getTerminalContents() {
        return await this.request("getTerminalContents", undefined);
    }
    async listWorkspaceContents(directory) {
        return await this.request("listWorkspaceContents", undefined);
    }
    async getWorkspaceDirs() {
        return await this.request("getWorkspaceDirs", undefined);
    }
    async showLines(filepath, startLine, endLine) {
        return await this.request("showLines", { filepath, startLine, endLine });
    }
    async listFolders() {
        return await this.request("listFolders", undefined);
    }
    _continueDir = null;
    async getContinueDir() {
        if (this._continueDir) {
            return this._continueDir;
        }
        const dir = await this.request("getContinueDir", undefined);
        this._continueDir = dir;
        return dir;
    }
    async writeFile(path, contents) {
        await this.request("writeFile", { path, contents });
    }
    async showVirtualFile(title, contents) {
        await this.request("showVirtualFile", { name: title, content: contents });
    }
    async openFile(path) {
        await this.request("openFile", { path });
    }
    async runCommand(command) {
        await this.request("runCommand", { command });
    }
    async saveFile(filepath) {
        await this.request("saveFile", { filepath });
    }
    async readFile(filepath) {
        return await this.request("readFile", { filepath });
    }
    async showDiff(filepath, newContents, stepIndex) {
        await this.request("showDiff", { filepath, newContents, stepIndex });
    }
    getOpenFiles() {
        return this.request("getOpenFiles", undefined);
    }
    getCurrentFile() {
        return this.request("getCurrentFile", undefined);
    }
    getPinnedFiles() {
        return this.request("getPinnedFiles", undefined);
    }
    getSearchResults(query) {
        return this.request("getSearchResults", { query });
    }
    getProblems(filepath) {
        return this.request("getProblems", { filepath });
    }
    subprocess(command) {
        return this.request("subprocess", { command });
    }
    async getBranch(dir) {
        return this.request("getBranch", { dir });
    }
}
