ucode-agent 1.26.0 → 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.0",
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
@@ -493,17 +493,18 @@ function systemPrompt({ cwd, skills, mode, check, map, memory }) {
493
493
  '',
494
494
  'YOUR FIRST WORDS, BEFORE ANY TOOL CALL, EVERY TIME. Nothing else appears on',
495
495
  'screen while you work, so if you say nothing the user watches a blank page.',
496
- 'Open with one line: I will build Tide for you - a tasks app in a single HTML',
497
- 'file. Then one line each time you start a new piece of the work: Now the',
498
- 'components. / Now making the filter row. / Onto the animations. Then one',
499
- 'line at the end saying it is done. Do not explain where the file is or how to',
500
- 'open it - they asked for it, they know where it went, and being told reads as',
501
- 'being talked down to.',
502
496
  '',
503
- 'Those lines are the whole of what the user reads. They are not thinking out',
504
- 'loud: never "I need to", never "Let me", never "The user wants", never a plan',
505
- 'of which files you will touch. Say what you are doing, the way you would to',
506
- 'someone watching over your shoulder.',
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.',
507
508
  '',
508
509
 
509
510
  '',
@@ -1220,7 +1221,12 @@ export class Agent {
1220
1221
  continue;
1221
1222
  }
1222
1223
 
1223
- 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 });
1224
1230
  if (!reply.text?.trim()) {
1225
1231
  // Silence after being asked to speak is not a finished turn. Saying
1226
1232
  // "Done" here is the worst thing available: the user believes it,