prior-cli 1.3.0 → 1.3.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.
package/bin/prior.js CHANGED
@@ -1056,6 +1056,7 @@ Keep it under 350 words. Write prior.md now.`;
1056
1056
 
1057
1057
  case 'text': {
1058
1058
  spinStop();
1059
+ if (!ev.content) break;
1059
1060
  const rendered = renderMarkdown(ev.content);
1060
1061
  const thinkTime = elapsed(Date.now() - _thinkStart);
1061
1062
  console.log(c.brand(' Prior ') + c.muted(`· ${timeNow()} · ${thinkTime}`));
package/lib/agent.js CHANGED
@@ -198,8 +198,15 @@ async function runAgent({ messages, model, uncensored, cwd, projectContext, send
198
198
 
199
199
  // ── No tool calls → final answer ──────────────────────────
200
200
  if (calls.length === 0) {
201
+ const finalText = stripToolTags(cleaned);
202
+ if (!finalText && iter < MAX_ITER - 1) {
203
+ // Model returned blank (all think tags, no actual output) — nudge once
204
+ history.push({ role: 'assistant', content: raw });
205
+ history.push({ role: 'user', content: '(Your response was empty. Please write your reply.)' });
206
+ continue;
207
+ }
201
208
  await trackTokenUsage(token, totalPromptTokens, totalCompletionTokens);
202
- send({ type: 'text', content: stripToolTags(cleaned) });
209
+ send({ type: 'text', content: finalText });
203
210
  send({ type: 'done' });
204
211
  return;
205
212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prior-cli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Prior Network AI — command-line interface",
5
5
  "bin": {
6
6
  "prior": "bin/prior.js"