Spaces:
Sleeping
Sleeping
Update app.js
Browse files
app.js
CHANGED
|
@@ -145,9 +145,12 @@ function extractWorkerPrompt(text) {
|
|
| 145 |
|
| 146 |
function formatContext({ hierarchyContext, scriptContext, logContext }) {
|
| 147 |
let out = "";
|
| 148 |
-
|
|
|
|
| 149 |
if (logContext) out += `\n[LAST LOGS]: ${logContext.logs}`;
|
| 150 |
-
|
|
|
|
|
|
|
| 151 |
}
|
| 152 |
|
| 153 |
function extractPMQuestion(text) {
|
|
|
|
| 145 |
|
| 146 |
function formatContext({ hierarchyContext, scriptContext, logContext }) {
|
| 147 |
let out = "";
|
| 148 |
+
if (scriptContext) out += `\n[TARGET SCRIPT]: ${scriptContext.targetName}\n[SOURCE PREVIEW]: ${scriptContext.scriptSource}`;
|
| 149 |
+
// if (scriptContext) out += `\n[TARGET SCRIPT]: ${scriptContext.targetName}\n[SOURCE PREVIEW]: ${scriptContext.scriptSource?.substring(0, 1000)}...`;
|
| 150 |
if (logContext) out += `\n[LAST LOGS]: ${logContext.logs}`;
|
| 151 |
+
// my own line
|
| 152 |
+
if (hierarchyContext) out += `\n[Hierarchy Context]: ${hierarchyContext}`;
|
| 153 |
+
return out;
|
| 154 |
}
|
| 155 |
|
| 156 |
function extractPMQuestion(text) {
|