- luxe starts on the model you last chose in this project, then the last one anywhere. Signing in opens the model picker instead of choosing for you. - Every list in a modal takes the mouse wheel and a draggable scrollbar. - The phone app shows reasoning in full, stays put while you read back through a long session, and shows a question's answer on its card. - On Windows, luxe update replaces the running luxe, and a signed-in install no longer sees setup again. - The file tree no longer shows "engine busy" in a large project, loop output is easier to follow, and the name is written lowercase. The CHANGELOG has the full list.
40 lines
1.4 KiB
Bash
Executable File
40 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Measure each tool against the shell command it replaces, for the site's Tools page.
|
|
#
|
|
# scripts/tool-bench.sh NAME=REPO:CASES ...
|
|
#
|
|
# Each argument is a checkout to measure in and the cases to run there (scripts/tool-bench/);
|
|
# luxe's own checkout is always measured last, with the cases built into the example. The first
|
|
# repository is the one the page draws its bars from.
|
|
#
|
|
# A recording, not a generated asset: the numbers depend on the trees they run in, build output
|
|
# and virtualenvs included, so nothing checks them. Run it after a build, and commit the JSON,
|
|
# which names each repository's commit. Needs network for the web_fetch row.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
root=$PWD
|
|
cargo build -q --release -p luxe-cli --example tool_bench
|
|
bench="$root/target/release/examples/tool_bench"
|
|
out=$(mktemp -d)
|
|
names=()
|
|
for spec in "$@"; do
|
|
name=${spec%%=*}
|
|
rest=${spec#*=}
|
|
repo=${rest%%:*}
|
|
cases=${rest#*:}
|
|
(cd "$repo" && TOOL_BENCH_CASES="$root/$cases" "$bench" "$out/$name.json")
|
|
names+=("$name")
|
|
done
|
|
"$bench" "$out/luxe.json"
|
|
names+=("luxe")
|
|
python3 - "$out" "${names[@]}" <<'PY' > web/src/data/tool-bench.json
|
|
import json, sys
|
|
out, names = sys.argv[1], sys.argv[2:]
|
|
repos = []
|
|
for name in names:
|
|
data = json.load(open(f"{out}/{name}.json"))
|
|
repos.append({"name": name, "commit": data["commit"], "rows": data["rows"]})
|
|
print(json.dumps({"repositories": repos}, indent=2))
|
|
PY
|
|
rm -rf "$out"
|