ucode-agent 1.26.1 → 1.26.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucode-agent",
3
- "version": "1.26.1",
3
+ "version": "1.26.2",
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/src/core/loop.js CHANGED
@@ -491,20 +491,20 @@ function systemPrompt({ cwd, skills, mode, check, map, memory }) {
491
491
  'steps already show on screen, and repeating them in words buries the few',
492
492
  'sentences worth reading.',
493
493
  '',
494
- 'YOUR FIRST WORDS, BEFORE ANY TOOL CALL, EVERY TIME. Nothing else appears on',
495
- 'screen while you work, so if you say nothing the user watches a blank page.',
496
- '',
497
- 'Open with one plain sentence naming the thing and the shape of it:',
498
- ' I will build Tide for you - a tasks app in a single HTML file, dark with a',
499
- ' teal accent.',
500
- 'Then one line whenever you start a new piece of the work: Now the filter row.',
501
- 'Then one line at the end saying it is done.',
502
- '',
503
- 'Plain words only. No methodology, no "component-based approach", no',
504
- '"structured design", no listing the qualities the work will have. Never',
505
- '"I need to", never "Let me", never a plan of which files you will touch, never',
506
- 'the request repeated back. Say it the way you would to someone watching over',
507
- 'your shoulder, who can already see the screen.',
494
+ 'YOUR FIRST WORDS, BEFORE ANY TOOL CALL, EVERY TIME. Nothing else appears on',
495
+ 'screen while you work, so if you say nothing the user watches a blank page.',
496
+ '',
497
+ 'Open with one plain sentence naming the thing and the shape of it:',
498
+ ' I will build Tide for you - a tasks app in a single HTML file, dark with a',
499
+ ' teal accent.',
500
+ 'Then one line whenever you start a new piece of the work: Now the filter row.',
501
+ 'Then one line at the end saying it is done.',
502
+ '',
503
+ 'Plain words only. No methodology, no "component-based approach", no',
504
+ '"structured design", no listing the qualities the work will have. Never',
505
+ '"I need to", never "Let me", never a plan of which files you will touch, never',
506
+ 'the request repeated back. Say it the way you would to someone watching over',
507
+ 'your shoulder, who can already see the screen.',
508
508
  '',
509
509
 
510
510
  '',
@@ -1221,7 +1221,12 @@ export class Agent {
1221
1221
  continue;
1222
1222
  }
1223
1223
 
1224
- this.push({ role: 'assistant', content: reply.text });
1224
+ // An assistant message with no content and no tool calls is not a turn,
1225
+ // it is a hole. Providers reject the whole conversation as malformed
1226
+ // once one is in it — which showed up as HTTP 400 on every request
1227
+ // after the model went quiet, with the conversation at 0% full and
1228
+ // "usually an oversized conversation" printed underneath it.
1229
+ if (reply.text?.trim()) this.push({ role: 'assistant', content: reply.text });
1225
1230
  if (!reply.text?.trim()) {
1226
1231
  // Silence after being asked to speak is not a finished turn. Saying
1227
1232
  // "Done" here is the worst thing available: the user believes it,