@ebowwa/coder 0.7.68 → 0.7.69

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.
@@ -7727,6 +7727,7 @@ async function executeStreamAttempt(request, headers, apiEndpoint, signal, model
7727
7727
  }
7728
7728
  }
7729
7729
  if (choice?.finish_reason) {
7730
+ console.log(`[API] OpenAI finish_reason: ${choice.finish_reason}, content blocks: ${currentContent.length}, hasToolUse: ${!!currentToolUseBlock}`);
7730
7731
  if (currentTextBlock) {
7731
7732
  currentContent.push(currentTextBlock);
7732
7733
  currentTextBlock = null;
@@ -7896,10 +7897,15 @@ async function createMessageStream(messages, options) {
7896
7897
  }
7897
7898
  if (tools && tools.length > 0) {
7898
7899
  if (apiFormat === "openai") {
7899
- request.tools = convertToolsToOpenAIFormat(tools);
7900
+ const openaiTools = convertToolsToOpenAIFormat(tools);
7901
+ request.tools = openaiTools;
7902
+ console.log(`[API] Sending ${tools.length} tools to ${apiFormat} API:`, JSON.stringify(openaiTools).substring(0, 500));
7900
7903
  } else {
7901
7904
  request.tools = tools;
7905
+ console.log(`[API] Sending ${tools.length} tools to ${apiFormat} API (Anthropic format)`);
7902
7906
  }
7907
+ } else {
7908
+ console.log(`[API] No tools being sent to API`);
7903
7909
  }
7904
7910
  const shouldUseExtendedThinking = (extendedThinking?.enabled ?? false) || thinking && thinking.type !== "disabled";
7905
7911
  if (shouldUseExtendedThinking && supportsExtendedThinking(model)) {
@@ -11871,19 +11877,19 @@ class InteractiveRunner {
11871
11877
  })) : [];
11872
11878
  return {
11873
11879
  messages: renderMessages,
11874
- input_value: inputValue,
11875
- cursor_pos: cursorPos,
11876
- status_text: statusText,
11877
- is_loading: isLoading,
11878
- streaming_text: streamingText,
11880
+ inputValue,
11881
+ cursorPos,
11882
+ statusText,
11883
+ isLoading,
11884
+ streamingText,
11879
11885
  model: this.props.model,
11880
- show_help: helpMode,
11881
- help_text: helpText,
11882
- search_mode: sessionSelectMode,
11883
- search_query: "",
11884
- search_results: searchResults,
11885
- search_selected: 0,
11886
- scroll_offset: this.state.scrollOffset
11886
+ showHelp: helpMode,
11887
+ helpText,
11888
+ searchMode: sessionSelectMode,
11889
+ searchQuery: "",
11890
+ searchResults,
11891
+ searchSelected: 0,
11892
+ scrollOffset: this.state.scrollOffset
11887
11893
  };
11888
11894
  }
11889
11895
  _getHelpText(section) {
@@ -34503,5 +34509,5 @@ if (checkPtyWrapper2()) {
34503
34509
  });
34504
34510
  }
34505
34511
 
34506
- //# debugId=7897AF5E6C87CE9064756E2164756E21
34512
+ //# debugId=1ADD58DCF208A7BB64756E2164756E21
34507
34513
  //# sourceMappingURL=bootstrap.js.map
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebowwa/coder",
3
- "version": "0.7.68",
3
+ "version": "0.7.69",
4
4
  "description": "AI-powered terminal coding assistant",
5
5
  "author": "ebowwa",
6
6
  "license": "MIT",
@@ -628,6 +628,9 @@ async function executeStreamAttempt(
628
628
 
629
629
  // Handle finish reason
630
630
  if (choice?.finish_reason) {
631
+ // DEBUG: Log finish reason
632
+ console.log(`[API] OpenAI finish_reason: ${choice.finish_reason}, content blocks: ${currentContent.length}, hasToolUse: ${!!currentToolUseBlock}`);
633
+
631
634
  // Finalize any pending text block
632
635
  if (currentTextBlock) {
633
636
  currentContent.push(currentTextBlock);
@@ -847,11 +850,17 @@ export async function createMessageStream(
847
850
  if (apiFormat === "openai") {
848
851
  // Convert Anthropic-style tools to OpenAI format
849
852
  // Cast needed because OpenAI format differs from APITool
850
- (request as unknown as Record<string, unknown>).tools = convertToolsToOpenAIFormat(tools);
853
+ const openaiTools = convertToolsToOpenAIFormat(tools);
854
+ (request as unknown as Record<string, unknown>).tools = openaiTools;
855
+ // DEBUG: Log tools being sent
856
+ console.log(`[API] Sending ${tools.length} tools to ${apiFormat} API:`, JSON.stringify(openaiTools).substring(0, 500));
851
857
  } else {
852
858
  // Keep Anthropic format as-is
853
859
  request.tools = tools;
860
+ console.log(`[API] Sending ${tools.length} tools to ${apiFormat} API (Anthropic format)`);
854
861
  }
862
+ } else {
863
+ console.log(`[API] No tools being sent to API`);
855
864
  }
856
865
 
857
866
  const shouldUseExtendedThinking =
@@ -710,22 +710,22 @@ export class InteractiveRunner {
710
710
  content: `${s.messageCount} messages`,
711
711
  })) : [];
712
712
 
713
- // NativeRenderer expects snake_case field names (NAPI-RS keeps Rust naming)
713
+ // NativeRenderer expects camelCase field names (NAPI-RS auto-converts snake_case)
714
714
  return {
715
715
  messages: renderMessages,
716
- input_value: inputValue,
717
- cursor_pos: cursorPos,
718
- status_text: statusText,
719
- is_loading: isLoading,
720
- streaming_text: streamingText,
716
+ inputValue: inputValue,
717
+ cursorPos: cursorPos,
718
+ statusText: statusText,
719
+ isLoading: isLoading,
720
+ streamingText: streamingText,
721
721
  model: this.props.model,
722
- show_help: helpMode,
723
- help_text: helpText,
724
- search_mode: sessionSelectMode,
725
- search_query: "",
726
- search_results: searchResults,
727
- search_selected: 0,
728
- scroll_offset: this.state.scrollOffset,
722
+ showHelp: helpMode,
723
+ helpText: helpText,
724
+ searchMode: sessionSelectMode,
725
+ searchQuery: "",
726
+ searchResults: searchResults,
727
+ searchSelected: 0,
728
+ scrollOffset: this.state.scrollOffset,
729
729
  };
730
730
  }
731
731