Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding !help from the TODO project #334

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/agent/commands/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,16 @@ export const actionsList = [
// return 'Set npc goal: ' + agent.npc.data.curr_goal.name;
// }
// },
{
name: '!help',
description: 'Lists all available commands and their descriptions.',
perform: async function (agent) {
const commandList = actionsList.map(action => {
return `${action.name.padEnd(15)} - ${action.description}`; // Ensure consistent spacing
}).join('\n');

console.log(commandList);
return `Available Commands:\n${commandList}`;
}
},
];