Skip to content

Commit

Permalink
Merge pull request #432 from odilitime/fix-character-path
Browse files Browse the repository at this point in the history
fix: since agent is moved out of packages, adjust default path
  • Loading branch information
ponderingdemocritus authored Nov 20, 2024
2 parents b013276 + acde8bf commit 7843a37
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand Down

0 comments on commit 7843a37

Please sign in to comment.