June 11th 2026 - Things I Worked On

Navigate into directory of file passed to MDViewer

When the user opens a file in MDViewer I want the terminal to open up in the directory of the file so I can do git commits after my changes.

let terminalCwd = process.env.HOME || process.env.USERPROFILE;

if (activeFilePath) {
    try {
        terminalCwd = path.dirname(activeFilePath);
    } catch (err) {
        console.error("Failed to parse file directory for terminal, falling back to HOME:", err);
    }
}