Add a bunch of shell tool commands

This commit is contained in:
Alex Gleason committed 2025-09-09 19:30:06 -05:00
1 parent a8c021411b
commit 7cbcd03c10
19 files changed
+1710 -45

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import type { ShellCommand, ShellCommandResult } from "./ShellCommand";
import { createSuccessResult } from "./ShellCommand";
/**
* Implementation of the 'echo' command
* Display text
*/
export class EchoCommand implements ShellCommand {
name = 'echo';
description = 'Display text';
usage = 'echo [text...]';
async execute(args: string[], _cwd: string): Promise<ShellCommandResult> {
// Join all arguments with spaces, like real echo
const output = args.join(' ');
// echo always succeeds and adds a newline
return createSuccessResult(output + '\n');
}
}