@zerotimedev/thinker 0.1.37 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.sh +11 -13
- package/package.json +1 -1
package/install.sh
CHANGED
|
@@ -378,33 +378,31 @@ EOF
|
|
|
378
378
|
THINKER_INSTALLER=1 "$thinker" setup $args --repo "$repo"
|
|
379
379
|
fi
|
|
380
380
|
|
|
381
|
-
# --- the warm-up
|
|
382
|
-
#
|
|
383
|
-
#
|
|
384
|
-
|
|
385
|
-
if [ -z "${CI:-}" ] && [ -t 1 ] && [ "$build" != 1 ]; then
|
|
386
|
-
( "$thinker" ui --from-setup --tab warmup >/dev/null 2>&1 & ) && opened=1
|
|
387
|
-
fi
|
|
381
|
+
# --- the warm-up ------------------------------------------------------------------
|
|
382
|
+
# Every git repository has a cache from here on. Warming one reads its merged pull requests, and
|
|
383
|
+
# `thinker warmup` asks where to choose them: the page in the browser, or right here (a machine with
|
|
384
|
+
# no display, as over ssh, is offered the terminal alone). Not from CI or a pipe with no terminal.
|
|
388
385
|
local version; version="$(node -p "require('$home/app/package.json').version" 2>/dev/null || echo '?')"
|
|
389
386
|
path_hint
|
|
390
387
|
say ""
|
|
391
|
-
local how="Pick the repositories to warm up on the page that just opened"
|
|
392
|
-
[ "$opened" = 1 ] || how="Pick the repositories to warm up: ${cyan}thinker ui${reset}"
|
|
393
388
|
if [ "$fancy" = 1 ]; then
|
|
394
389
|
box "$green" "${green}✓${reset} ${bold}Install complete${reset} ${dim}· Thinker v$version${reset}" "" \
|
|
395
390
|
"Installed into ${home/#$HOME/~} and wired into your agents." \
|
|
396
391
|
"Thinker now runs in every git repository on this machine." \
|
|
397
|
-
"$
|
|
398
|
-
"${dim}(open it again any time with thinker ui).${reset}" \
|
|
392
|
+
"Warm up caches any time: ${cyan}thinker warmup${reset} here, or ${cyan}thinker ui${reset} in the browser." \
|
|
399
393
|
"${dim}Notes stay on this machine; Thinker uploads none.${reset}" "" \
|
|
400
394
|
"${yellow}*${reset} ${magenta}~${reset} ${yellow}*${reset} ${bold}all done · happy shipping${reset} ${yellow}*${reset} ${magenta}~${reset} ${yellow}*${reset}"
|
|
401
395
|
else
|
|
402
396
|
say "Install complete: Thinker v$version, installed into $home and wired into your agents."
|
|
403
397
|
say "Thinker now runs in every git repository on this machine."
|
|
404
|
-
|
|
405
|
-
else say "Pick the repositories to warm up: thinker ui"; fi
|
|
398
|
+
say "Warm up caches any time: thinker warmup here, or thinker ui in the browser."
|
|
406
399
|
say "Notes stay on this machine; Thinker uploads none."
|
|
407
400
|
fi
|
|
401
|
+
if [ -z "${CI:-}" ] && [ "$build" != 1 ]; then
|
|
402
|
+
if [ -t 0 ]; then "$thinker" warmup
|
|
403
|
+
elif [ -r /dev/tty ] && (exec < /dev/tty) 2>/dev/null; then "$thinker" warmup < /dev/tty
|
|
404
|
+
fi
|
|
405
|
+
fi
|
|
408
406
|
}
|
|
409
407
|
|
|
410
408
|
main "$@"
|