feat: renamed --contents arg for fs_write/patch to --content since most models attempt that first and error otherwise
This commit is contained in:
@@ -24,7 +24,7 @@ set -e
|
|||||||
# your changes).
|
# your changes).
|
||||||
|
|
||||||
# @option --path! The path of the file to apply the patch to
|
# @option --path! The path of the file to apply the patch to
|
||||||
# @option --contents! The patch to apply to the file
|
# @option --content! The patch to apply to the file
|
||||||
|
|
||||||
# @env LLM_OUTPUT=/dev/stdout The output path
|
# @env LLM_OUTPUT=/dev/stdout The output path
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ source "$LLM_PROMPT_UTILS_FILE"
|
|||||||
|
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
main() {
|
main() {
|
||||||
argc_contents="$(jq -r '.contents' <<< "$LLM_TOOL_RAW_JSON")"
|
argc_contents="$(jq -r '.content' <<< "$LLM_TOOL_RAW_JSON")"
|
||||||
argc_path="$(jq -r '.path' <<< "$LLM_TOOL_RAW_JSON")"
|
argc_path="$(jq -r '.path' <<< "$LLM_TOOL_RAW_JSON")"
|
||||||
|
|
||||||
if [[ ! -f "$argc_path" ]]; then
|
if [[ ! -f "$argc_path" ]]; then
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ set -e
|
|||||||
# sending less data, and is less prone to accidental data loss.
|
# sending less data, and is less prone to accidental data loss.
|
||||||
|
|
||||||
# @option --path! The path of the file to write to
|
# @option --path! The path of the file to write to
|
||||||
# @option --contents! The full contents to write to the file
|
# @option --content! The full contents to write to the file
|
||||||
|
|
||||||
# @env LLM_OUTPUT=/dev/stdout The output path
|
# @env LLM_OUTPUT=/dev/stdout The output path
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ source "$LLM_PROMPT_UTILS_FILE"
|
|||||||
|
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
main() {
|
main() {
|
||||||
argc_contents="$(jq -r '.contents' <<< "$LLM_TOOL_RAW_JSON")"
|
argc_contents="$(jq -r '.content' <<< "$LLM_TOOL_RAW_JSON")"
|
||||||
argc_path="$(jq -r '.path' <<< "$LLM_TOOL_RAW_JSON")"
|
argc_path="$(jq -r '.path' <<< "$LLM_TOOL_RAW_JSON")"
|
||||||
|
|
||||||
if [[ -f "$argc_path" ]]; then
|
if [[ -f "$argc_path" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user