@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.
- package/dist/index.js +20 -14
- package/dist/index.js.map +4 -4
- package/dist/interfaces/ui/terminal/cli/bootstrap.js.map +4 -4
- package/dist/interfaces/ui/terminal/cli/index.js +20 -14
- package/dist/interfaces/ui/terminal/native/index.darwin-arm64.node +0 -0
- package/dist/native/index.darwin-arm64.node +0 -0
- package/native/index.darwin-arm64.node +0 -0
- package/package.json +1 -1
- package/packages/src/core/api-client-impl.ts +10 -1
- package/packages/src/interfaces/ui/terminal/cli/interactive/interactive-runner.ts +13 -13
|
@@ -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
|
-
|
|
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
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11880
|
+
inputValue,
|
|
11881
|
+
cursorPos,
|
|
11882
|
+
statusText,
|
|
11883
|
+
isLoading,
|
|
11884
|
+
streamingText,
|
|
11879
11885
|
model: this.props.model,
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
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=
|
|
34512
|
+
//# debugId=1ADD58DCF208A7BB64756E2164756E21
|
|
34507
34513
|
//# sourceMappingURL=bootstrap.js.map
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
|
713
|
+
// NativeRenderer expects camelCase field names (NAPI-RS auto-converts snake_case)
|
|
714
714
|
return {
|
|
715
715
|
messages: renderMessages,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
716
|
+
inputValue: inputValue,
|
|
717
|
+
cursorPos: cursorPos,
|
|
718
|
+
statusText: statusText,
|
|
719
|
+
isLoading: isLoading,
|
|
720
|
+
streamingText: streamingText,
|
|
721
721
|
model: this.props.model,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
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
|
|