Skip to content

Commit 0cb293a

Browse files
committed
fix: cleanup
1 parent e74b4a1 commit 0cb293a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

extensions/cli/src/services/AgentFileService.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,9 @@ export class AgentFileService
6262
// slug COULD be path, fall back to relative path
6363
}
6464
}
65-
if (agentPath.startsWith("file:/")) {
66-
const path = fileURLToPath(agentPath);
67-
const content = fs.readFileSync(path, "utf-8");
68-
return parseAgentFile(content);
69-
}
70-
const resolvedPath = path.resolve(agentPath);
65+
const resolvedPath = agentPath.startsWith("file:/")
66+
? fileURLToPath(agentPath)
67+
: path.resolve(agentPath);
7168
const content = fs.readFileSync(resolvedPath, "utf-8");
7269
return parseAgentFile(content);
7370
} catch (e) {

0 commit comments

Comments
 (0)