ucode-agent 1.19.0 → 1.19.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/ucode.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucode-agent",
3
- "version": "1.19.0",
3
+ "version": "1.19.1",
4
4
  "description": "ucode - a terminal coding agent that reads, edits and runs your code, on NVIDIA and Cohere models.",
5
5
  "type": "module",
6
6
  "main": "ucode.js",
package/ucode.js CHANGED
@@ -88,7 +88,13 @@ async function main() {
88
88
  // have no way to know. So if there is something newer, it goes on now and
89
89
  // this process hands over to it. The wait is a few seconds, once per
90
90
  // release; every other launch pays one quick question to the registry.
91
- if (!args.version && process.argv[2] !== 'login' && process.argv[2] !== 'doctor') {
91
+ //
92
+ // Only when a person is sitting there. Handing over means re-running this
93
+ // process, and a run whose input is a pipe has that input consumed by the
94
+ // handover — `cat prompt.txt | ucode` printed "updating…" and then did
95
+ // nothing at all. Piped runs take the background update and carry on.
96
+ if (!args.version && process.stdin.isTTY &&
97
+ process.argv[2] !== 'login' && process.argv[2] !== 'doctor') {
92
98
  const { pendingUpdate, installNow } = await import('./src/core/updater.js');
93
99
  const waiting = await pendingUpdate();
94
100
  if (waiting) {