feat(ai-coder): open in typora or terminal based on -t flag

This commit is contained in:
Ayo Ayco 2025-08-25 16:40:01 +02:00
parent e7e16ac3e4
commit fe2d9514ce

View file

@ -37,16 +37,21 @@ if [[ -n "$other_args" ]]; then
fi
fi
if ! [ "$other_args" = "" ]; then
if [ "$other_args" = "sleep" ]; then
ollama stop $model
elif [ "$other_args" = "init" ]; then
ollama create "$model" -f "$modelfile"
else
tempfile="$(mktemp)"
ollama run $model "$other_args" --hidethinking > $tempfile
typora $tempfile
# If -t flag is set, use typora to display output
if [ "$typora_flag" = true ]; then
tempfile="$(mktemp)"
ollama run $model "$other_args" --hidethinking > $tempfile
typora $tempfile
else
# If no -t flag, just run the command normally
ollama run $model "$other_args" --hidethinking
fi
fi
else
ollama run $model --hidethinking