You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -23,32 +40,42 @@ if command_exists cursor-agent; then
23
40
elif [ -x"$HOME/.local/bin/cursor-agent" ];then
24
41
CURSOR_CMD="$HOME/.local/bin/cursor-agent"
25
42
else
26
-
echo"Error: cursor-agent not found. Install it or set install_cursor_cli=true."| tee -a "$HOME/$MODULE_DIR_NAME/start.log"
43
+
echo"Error: cursor-agent not found. Install it or set install_cursor_cli=true."| tee -a "$HOME/$ARG_MODULE_DIR_NAME/start.log"
27
44
exit 1
28
45
fi
29
46
30
47
# Ensure working directory exists
31
-
if [ -d"$FOLDER" ];then
32
-
cd"$FOLDER"
48
+
if [ -d"$ARG_FOLDER" ];then
49
+
cd"$ARG_FOLDER"
33
50
else
34
-
mkdir -p "$FOLDER"
35
-
cd"$FOLDER"
51
+
mkdir -p "$ARG_FOLDER"
52
+
cd"$ARG_FOLDER"
36
53
fi
37
54
38
55
ARGS=()
39
56
40
57
# global flags
41
-
if [ -n"$MODEL" ];then
42
-
ARGS+=("-m""$MODEL")
58
+
if [ -n"$ARG_MODEL" ];then
59
+
ARGS+=("-m""$ARG_MODEL")
43
60
fi
44
-
if [ "$FORCE"="true" ];then
61
+
if [ "$ARG_FORCE"="true" ];then
45
62
ARGS+=("-f")
46
63
fi
47
64
48
-
if [ -n"$AI_PROMPT" ];then
49
-
ARGS+=("$AI_PROMPT")
65
+
if [ -n"$ARG_AI_PROMPT" ];then
66
+
printf"AI prompt provided\n"
67
+
if [ "$ARG_AGENTAPI_MODE"="true" ];then
68
+
ARGS+=("Complete the task at hand and at every step of the way, report tasks to Coder with proper summary and statuses. Your task at hand: $ARG_AI_PROMPT")
69
+
elif [ "$ARG_AI_PROMPT" ];then
70
+
ARGS+=("$ARG_AI_PROMPT")
71
+
fi
50
72
fi
51
73
52
74
# Log and run in background, redirecting all output to the log file
53
-
printf"Running: %q %s\n""$CURSOR_CMD""$(printf '%q '"${ARGS[@]}")"| tee -a "$HOME/$MODULE_DIR_NAME/start.log"
0 commit comments