aboutsummaryrefslogtreecommitdiffstats
path: root/Argcfile.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-11-30 17:14:21 +0800
committerGitHub <noreply@github.com>2024-11-30 17:14:21 +0800
commitd2a537c3743963bfb6add44731dd3f3f6c785a2e (patch)
treee499f1217135741622995ba253ad34ea9164f358 /Argcfile.sh
parentc4ba6ff379bdce768f6053671309e2e2f4a6fc79 (diff)
downloadllm-functions-docker-d2a537c3743963bfb6add44731dd3f3f6c785a2e.tar.gz
refactor: several improvements (#132)
- js export expression - check args regarding run-agent/run-tool
Diffstat (limited to 'Argcfile.sh')
-rw-r--r--Argcfile.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/Argcfile.sh b/Argcfile.sh
index 386a725..4c0747d 100644
--- a/Argcfile.sh
+++ b/Argcfile.sh
@@ -30,14 +30,14 @@ run@tool() {
cmd="$(_lang_to_cmd "$lang")"
run_tool_script="$PWD/scripts/run-tool.$lang"
[[ -n "$argc_cwd" ]] && cd "$argc_cwd"
- "$cmd" "$run_tool_script" "$argc_tool" "$argc_json"
+ exec "$cmd" "$run_tool_script" "$argc_tool" "$argc_json"
}
# @cmd Run the agent
# @alias agent:run
# @option -C --cwd <dir> Change the current working directory
# @arg agent![`_choice_agent`] The agent name
-# @arg action![`_choice_agent_action`] The agent action
+# @arg action![?`_choice_agent_action`] The agent action
# @arg json The json data
run@agent() {
if [[ -z "$argc_json" ]]; then
@@ -54,7 +54,7 @@ run@agent() {
cmd="$(_lang_to_cmd "$lang")"
run_agent_script="$PWD/scripts/run-agent.$lang"
[[ -n "$argc_cwd" ]] && cd "$argc_cwd"
- "$cmd" "$run_agent_script" "$argc_agent" "$argc_action" "$argc_json"
+ exec "$cmd" "$run_agent_script" "$argc_agent" "$argc_action" "$argc_json"
}
# @cmd Build the project
@@ -668,7 +668,7 @@ _choice_agent_action() {
else
expr="s/:.*//"
fi
- argc generate-declarations@agent "$1" --oneline | sed "$expr"
+ argc generate-declarations@agent "$1" --oneline | sed "$expr"
}
_die() {