Commit 5895d80

mo khan <mo@mokhan.ca>
2026-01-29 23:19:38
feat: render description of each command in /help
1 parent 95c5d03
Changed files (2)
lib
lib/elelem/plugins/builtins.rb
@@ -9,6 +9,6 @@ Elelem::Plugins.register(:builtins) do |agent|
   end
 
   agent.commands.register("help", description: "Show available commands") do
-    agent.terminal.say agent.commands.names.join(" ")
+    agent.terminal.say agent.commands.map { |name, description| "#{name.ljust(12)} #{description}" }.join("\n")
   end
 end
lib/elelem/commands.rb
@@ -2,6 +2,8 @@
 
 module Elelem
   class Commands
+    include Enumerable
+
     def initialize
       @registry = {}
     end