request description of cmd to be generated if not provided

This commit is contained in:
Nate Sesti 2024-06-19 14:40:44 -07:00
parent 58a04caa94
commit 8bcfcd439d

View file

@ -14,6 +14,11 @@ const GenerateTerminalCommand: SlashCommand = {
name: "cmd",
description: "Generate a shell command",
run: async function* ({ ide, llm, input }) {
if (input.trim() === "") {
yield "Please provide a description of the shell command you want to generate. For example, '/cmd List all files in the current directory'.";
return;
}
const gen =
llm.streamComplete(`The user has made a request to run a shell command. Their description of what it should do is: