opencode-knowledge 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52,7 +52,6 @@ function updateSessionState(sessionId, updates) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// src/index.ts
|
|
55
|
-
var __dirname = "/home/runner/work/opencode-knowledge/opencode-knowledge/src";
|
|
56
55
|
var logToFile = async (message) => {
|
|
57
56
|
try {
|
|
58
57
|
const logEntry = `${new Date().toISOString()}: ${message}
|
|
@@ -137,7 +136,8 @@ async function loadPersonality() {
|
|
|
137
136
|
await logToFile(errorMsg);
|
|
138
137
|
throw new Error(errorMsg);
|
|
139
138
|
}
|
|
140
|
-
const
|
|
139
|
+
const __dirname2 = path.dirname(fileURLToPath(import.meta.url));
|
|
140
|
+
const personalityPath = path.join(__dirname2, "..", "templates", "personalities", `${role}.txt`);
|
|
141
141
|
if (!existsSync2(personalityPath)) {
|
|
142
142
|
const errorMsg = `\u274C CONFIGURATION ERROR: Personality file not found at ${personalityPath}. Available roles should have a corresponding .txt file in templates/personalities/`;
|
|
143
143
|
await logToFile(errorMsg);
|