diff --git a/index.ts b/index.ts index 6785b24..8ea9925 100644 --- a/index.ts +++ b/index.ts @@ -5,7 +5,10 @@ import { SessionManager } from "./session-manager.js" import { loadConfig } from "./config-loader.js" import { log } from "./logger.js" -const PLUGIN_DATA_DIR = fs.mkdtempSync(`${os.homedir()}/.opencode-matrix-plugin-`) +const PLUGIN_DATA_DIR = `${os.homedir()}/.opencode-matrix-plugin` +if (!fs.existsSync(PLUGIN_DATA_DIR)) { + fs.mkdirSync(PLUGIN_DATA_DIR, { recursive: true }) +} const LOG_FILE = `${PLUGIN_DATA_DIR}/plugin.log` const SETUP_STARTED_LOG = `${PLUGIN_DATA_DIR}/setup-started.log` const SETUP_ERROR_LOG = `${PLUGIN_DATA_DIR}/setup-error.log`