Update to set up arguments
This commit is contained in:
parent
d25d80d6fc
commit
81f10c7e44
10
agent.mjs
10
agent.mjs
@ -102,7 +102,15 @@ function parseCommandsFromAIResponse(aiResponse) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const goal = 'install apache2 (apache2) on the container and run it with service';
|
// Retrieve the goal from command-line arguments
|
||||||
|
const args = process.argv.slice(2);
|
||||||
|
const goal = args.join(' ').trim();
|
||||||
|
|
||||||
|
if (!goal) {
|
||||||
|
console.error("Usage: node script.js \"Your goal here\"");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
let context = "Initial attempt. No commands have been run yet.\n" +
|
let context = "Initial attempt. No commands have been run yet.\n" +
|
||||||
"We are working with a Debian/Ubuntu container.\n" +
|
"We are working with a Debian/Ubuntu container.\n" +
|
||||||
"Goal: " + goal;
|
"Goal: " + goal;
|
||||||
|
Loading…
Reference in New Issue
Block a user