fix: go to file in big non-git folders; linear reply handling
- find/git producers piped into head tolerate SIGPIPE, so hitting a cap no longer fails the command (and lets ttyd truncate its reply). - fs-find outside git skips build/cache folders and caps at 10000. - runCommand checks completion on the stream's tail instead of re-decoding the whole reply on every frame. Refs #37 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -611,6 +611,12 @@ blob_body() {
|
||||
rm -rf "$p/.git"
|
||||
run devdesk attach --fs-find alpha
|
||||
[ "$(jq -r '.files | sort | join(",")' <<<"$output")" = ".gitignore,debug.log,src/a.js" ]
|
||||
# Hitting the cap must not fail the command (SIGPIPE in the producer).
|
||||
for i in $(seq 1 3000); do : >"$p/src/f$i.txt"; done
|
||||
run env DEVDESK_FS_FIND_MAX=1 "$REPO/bin/devdesk" attach --fs-find alpha
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$(jq -r '[(.files | length), .truncated] | @tsv' <<<"$output")" = "$(printf '1\ttrue')" ]
|
||||
run env DEVDESK_FS_LIST_MAX=5 "$REPO/bin/devdesk" attach --fs-list alpha src
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$(jq -r '[(.entries | length), .truncated] | @tsv' <<<"$output")" = "$(printf '5\ttrue')" ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user