diff options
| author | sigoden <sigoden@gmail.com> | 2024-07-09 09:31:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-09 09:31:44 +0800 |
| commit | 0dbdc9e7109b77895743a6d8d11b83caf906e726 (patch) | |
| tree | 3c925aedf13f5f4e1f399067fd054ccf14d0bdde /Argcfile.sh | |
| parent | a2c9ade6deb8f6832db194ebf0b6508900c4d9bd (diff) | |
| download | llm-functions-docker-0dbdc9e7109b77895743a6d8d11b83caf906e726.tar.gz | |
refactor: optimize Argcfile.sh (#66)
Diffstat (limited to 'Argcfile.sh')
| -rw-r--r-- | Argcfile.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Argcfile.sh b/Argcfile.sh index 40f5166..72b9894 100644 --- a/Argcfile.sh +++ b/Argcfile.sh @@ -114,7 +114,7 @@ build-bin@tool() { bin_file="$BIN_DIR/$basename" ln -s -f "$PWD/scripts/run-tool.$lang" "$bin_file" fi - echo "Build tool $name" + echo "Build bin/$basename" else not_found_tools+=("$name") fi @@ -227,7 +227,7 @@ build-bin@agent() { bin_file="$BIN_DIR/$name" ln -s -f "$PWD/scripts/run-agent.$lang" "$bin_file" fi - echo "Build agent $name" + echo "Build bin/$name" tool_names_file="$agent_dir/tools.txt" if [[ -f "$tool_names_file" ]]; then argc build-bin@tool --names-file "${tool_names_file}" @@ -324,7 +324,7 @@ generate-declarations@agent() { fi lang="${tools_path##*.}" cmd="$(_lang_to_cmd "$lang")" - json="$("$cmd" "scripts/build-declarations.$lang" "$tools_path" | jq --arg agent "$1" 'map(. + {agent: $agent})')" + json="$("$cmd" "scripts/build-declarations.$lang" "$tools_path" | jq 'map(. + {agent: true})')" if [[ -n "$argc_oneline" ]]; then echo "$json" | jq -r '.[] | .name + ": " + (.description | split("\n"))[0]' else |
