replicas-engine 0.1.3 → 0.1.4
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.
|
@@ -7,7 +7,20 @@ export class CodexManager {
|
|
|
7
7
|
workingDirectory;
|
|
8
8
|
constructor(workingDirectory) {
|
|
9
9
|
this.codex = new Codex();
|
|
10
|
-
|
|
10
|
+
if (workingDirectory) {
|
|
11
|
+
this.workingDirectory = workingDirectory;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const repoName = process.env.REPLICAS_REPO_NAME;
|
|
15
|
+
const workspaceHome = process.env.WORKSPACE_HOME || process.env.HOME || '/home/ubuntu';
|
|
16
|
+
if (repoName) {
|
|
17
|
+
this.workingDirectory = `${workspaceHome}/workspaces/${repoName}`;
|
|
18
|
+
console.log(`Using repository working directory: ${this.workingDirectory}`);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.workingDirectory = workspaceHome;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
11
24
|
}
|
|
12
25
|
async *sendMessage(message) {
|
|
13
26
|
if (!this.currentThread) {
|