From acde8bf624d2c1d8ec96e20fabdfdf56e0863188 Mon Sep 17 00:00:00 2001 From: odilitime Date: Wed, 20 Nov 2024 04:34:08 +0000 Subject: [PATCH] since agent is moved out of packages, adjust default path --- agent/src/index.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index cad8cff488..a520c00496 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 = [];