diff --git a/agent/src/index.ts b/agent/src/index.ts index c4d058b0a5..72a666500c 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -58,16 +58,9 @@ export async function loadCharacters( ?.split(",") .map((path) => path.trim()) .map((path) => { - if (path.startsWith("../characters")) { - return `../${path}`; - } - if (path.startsWith("characters")) { - return `../../${path}`; - } - if (path.startsWith("./characters")) { - return `../.${path}`; - } - return path; + if (path[0] === '/') return path; // handle absolute paths + // assume relative to the project root where pnpm is ran + return `../${path}`; }); const loadedCharacters = [];