@@ 59,11 59,12 @@ spinner() {
mkprompt() {
# make a preprompt to send to the openai chat api
- prompt="Provide only $(shell) commands for OS $(os) without any description."
- prompt="$prompt The user is currently in the directory \`$(cwd)\` on a machine called $(hostname)."
- prompt="$prompt If there is a lack of details, provide most logical solution."
- prompt="$prompt Ensure the output is a valid shell command."
- prompt="$prompt If multiple steps are required, try to combine them together."
+ prompt="Provide only commands or scripts for the shell $(shell) without any description."
+ prompt="$prompt The user is using the operating system $(os)."
+ prompt="$prompt The user is currently in the directory \`$(cwd)\` on a host named \`$(hostname)\`."
+ prompt="$prompt Ensure the output is a valid for the user's shell."
+ prompt="$prompt Provide the most logical solution if the prompt is unclear."
+ prompt="$prompt Try to make a one-line solution, but it is not required."
prompt="$prompt The request is: $1"
printf '%s\n' "$prompt"
}