netheriteai-code 0.2.3 → 0.2.5

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": "netheriteai-code",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "NetheriteAI:Code by hurdacu. High-performance coding assistant.",
5
5
  "author": "hurdacu",
6
6
  "type": "module",
package/src/agent.js CHANGED
@@ -151,11 +151,14 @@ export async function runAgentTurn({ workspaceRoot, model, history, userPrompt,
151
151
  });
152
152
 
153
153
  const toolCalls = normalizeToolCalls(assistant);
154
- messages.push({
154
+ const assistantMessage = {
155
155
  role: "assistant",
156
156
  content: assistant.content || "",
157
- tool_calls: toolCalls,
158
- });
157
+ };
158
+ if (toolCalls && toolCalls.length) {
159
+ assistantMessage.tool_calls = toolCalls;
160
+ }
161
+ messages.push(assistantMessage);
159
162
 
160
163
  if (singleFileTurn) {
161
164
  const generated = extractGeneratedCode(assistant.content || "");
package/src/tui.js CHANGED
@@ -1083,7 +1083,7 @@ export function runTui({
1083
1083
  frame.paintText(inputTop + 1 + index, 4, pad(line, contentWidth - 5), `${COLORS.panel}${COLORS.fg}`);
1084
1084
  });
1085
1085
  if (cursorVisible) {
1086
- const cursorLine = promptLines.length - 1;
1086
+ const cursorLine = inputLines.length - 1;
1087
1087
  const cursorCol = 4 + inputLines[cursorLine].length;
1088
1088
  paintInputCursor(frame, inputTop + 1 + cursorLine, cursorCol);
1089
1089
  }