Skip to content

Commit 78b9ebd

Browse files
committed
Fix Code style issues
1 parent 478b4b6 commit 78b9ebd

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

registry/coder/modules/aider/scripts/install.sh

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33

44
# Function to check if a command exists
55
command_exists() {
6-
command -v "$1" >/dev/null 2>&1
6+
command -v "$1" > /dev/null 2>&1
77
}
88

99
echo "--------------------------------"
@@ -12,20 +12,20 @@ echo "Workspace: $AIDER_START_DIRECTORY"
1212
echo "--------------------------------"
1313

1414
function install_aider() {
15-
echo "pipx installing..."
16-
sudo apt-get install -y pipx
17-
echo "pipx installed!"
18-
pipx ensurepath
19-
echo $PATH
20-
mkdir -p "$AIDER_START_DIRECTORY/.local/bin"
21-
export PATH="$HOME/.local/bin:$AIDER_START_DIRECTORY/.local/bin:$PATH" # ensure in current shell too
22-
23-
if ! command_exists aider; then
24-
echo "Installing Aider via pipx..."
25-
pipx install --force aider-install
26-
aider-install
27-
fi
28-
echo "Aider installed: $(aider --version || echo 'check failed the Aider module insatllation failed')"
15+
echo "pipx installing..."
16+
sudo apt-get install -y pipx
17+
echo "pipx installed!"
18+
pipx ensurepath
19+
echo $PATH
20+
mkdir -p "$AIDER_START_DIRECTORY/.local/bin"
21+
export PATH="$HOME/.local/bin:$AIDER_START_DIRECTORY/.local/bin:$PATH" # ensure in current shell too
22+
23+
if ! command_exists aider; then
24+
echo "Installing Aider via pipx..."
25+
pipx install --force aider-install
26+
aider-install
27+
fi
28+
echo "Aider installed: $(aider --version || echo 'check failed the Aider module insatllation failed')"
2929
}
3030

3131
function setup_system_prompt() {
@@ -39,21 +39,19 @@ function setup_system_prompt() {
3939
fi
4040
}
4141

42-
function configure_aider_settings(){
42+
function configure_aider_settings() {
4343
if [ "${ARG_IMPLEMENT_MCP}" = "true" ]; then
4444
echo "Configuring Aider to report tasks via Coder MCP..."
4545

4646
mkdir -p "$HOME/.config/aider"
4747

48-
echo "$ARG_AIDER_CONFIG" > "$HOME/.config/aider/.aider.conf.yml"
48+
echo "$ARG_AIDER_CONFIG" > "$HOME/.config/aider/.aider.conf.yml"
4949
echo "Added Coder MCP extension to Aider config.yml"
50-
else
50+
else
5151
printf "MCP Server not Implemented"
5252
fi
5353
}
5454

55-
56-
5755
install_aider
5856
setup_system_prompt
59-
configure_aider_settings
57+
configure_aider_settings

registry/coder/modules/aider/scripts/start.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@ else
1818
printf "API key not provided\n"
1919
fi
2020

21-
2221
if [[ "${AIDER_PROMPT}" == "true" && -n "${ARG_TASK_PROMPT:-}" ]]; then
2322
printf "Aider start only with this prompt : $ARG_TASK_PROMPT"
2423
mkdir -p $HOME/.aider-module/
2524
echo aider --model $ARG_AI_MODULE --yes-always --message "$ARG_TASK_PROMPT" > $HOME/.aider-module/aider_output.txt
2625

27-
elif [ -n "${ARG_TASK_PROMPT:-}" ]; then
26+
elif [ -n "${ARG_TASK_PROMPT:-}" ]; then
2827
printf "Aider task prompt provided : $ARG_TASK_PROMPT"
2928
PROMPT="Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $ARG_TASK_PROMPT"
3029

3130
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_AI_MODULE --yes-always --message "$ARG_TASK_PROMPT"
3231
else
3332
printf "No task prompt given.\n"
3433
agentapi server --term-width=67 --term-height=1190 -- aider --model $ARG_AI_MODULE --yes-always
35-
fi
34+
fi

registry/coder/modules/aider/testdata/aider-mock.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ fi
99
set -e
1010

1111
while true; do
12-
echo "$(date) - aider-agent-mock"
13-
sleep 15
14-
done
12+
echo "$(date) - aider-agent-mock"
13+
sleep 15
14+
done

0 commit comments

Comments
 (0)