June 6th 2026 - Things I Worked On
Fixed dragging and dropping a directory into Tektite
I've been working on some fixes and features for Tektite. Dragging and dropping images into the file tree works nicely but directories don't.
I submitted an issue for it here and created a fix.
I had to combine, both, importing a file and a directory, otherwise it assumes the user is trying to import a file and would fail.
The relevant code:
First we check if the thing dragged is a file or a directory. If its not, like a broken symlink or a device file, we throw an Error.
const sourceStat = await fs.stat(sourcePath); const isDirectory = sourceStat.isDirectory(); const isFile = sourceStat.isFile(); ... if (!isFile && !isDirectory) { throw new Error("Dropped item is neither a file nor a directory."); }
Then we check if somethng already exists with that name, if it does, we append a number to the end.
if (isFile) { ... } else { const sourceName = sanitizeEntryName(path.basename(sourcePath), "folder"); candidate = path.posix.join(baseFolder, sourceName); let index = 2; while (await exists(path.join(rootPath, candidate))) { candidate = path.posix.join(baseFolder, `${sourceName} ${index}`); index += 1; } }
Then we copy the asset.
const destinationPath = resolveVaultPath(rootPath, candidate); await fs.mkdir(path.dirname(destinationPath), { recursive: true }); await fs.cp(sourcePath, destinationPath, { recursive: true });
Added starting a new terminal session in Tektite
A new feature was added where we can use a terminal inside of Tektite. The issue is if you kill the session with the exit command or control-d it kills the terminal and there's no way to get a new one except disabling and re-enabling the terminal feature.
If we look at apps like Intellij when you close and open the terminal it saves your current terminal state. If you give an EOF signal (with control-d for example) it closes the terminal and when you open it again there is a fresh terminal session available for the user.
Opened an issue for this here and a PR adding this functionality here.
The relevant code:
When the kill command is given it destroys the current terminal session and closes the content pane.
globalThis.tektite.onTerminalKill(() => { destroyTerminal(); toggleTerminalContent(); });
When making the terminal pane visible again we initiate a terminal instance:
if (!state.terminalContentCollapsed) { if (termInstance === null) { initTerminal(); } }
Updated getting budget expenses
Added helpful messages when getting budget expenses so that I know what's happening instead of just waiting.
(defun budget-get-expenses () "Get expenses from server" (interactive) (message "Getting expenses...") (async-start (lambda () (shell-command-to-string "ssh user@example.com cat /path/to/expenses")) (lambda (result) (switch-to-buffer (get-buffer-create "*expenses*")) (erase-buffer) (insert result) (message "Done getting expenses"))))