bingocode 1.1.125 → 1.1.126

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": "bingocode",
3
- "version": "1.1.125",
3
+ "version": "1.1.126",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "claude": "bin/claude-win.cjs",
@@ -173,8 +173,14 @@ export function supportsExtendedKeys(): boolean {
173
173
  * SetConsoleCursorPosition follows the cursor into scrollback
174
174
  * (microsoft/terminal#14774), yanking users to the top of their buffer
175
175
  * mid-stream. WT_SESSION catches WSL-in-Windows-Terminal where platform
176
- * is linux but output still routes through conhost. */
176
+ * is linux but output still routes through conhost.
177
+ *
178
+ * xterm.js (VS Code, Cursor, Windsurf integrated terminals) does NOT have
179
+ * this bug — cursor-up (CSI A) clamps at viewport top without yanking into
180
+ * scrollback. Even when WT_SESSION is set (e.g. VS Code running inside
181
+ * Windows Terminal), the actual pty renderer is xterm.js, so we exempt it. */
177
182
  export function hasCursorUpViewportYankBug(): boolean {
183
+ if (isXtermJs()) return false
178
184
  return process.platform === 'win32' || !!process.env.WT_SESSION
179
185
  }
180
186
 
@@ -478,7 +478,7 @@ function handleFinishReason(
478
478
  const stopReason = mapFinishReason(finishReason)
479
479
 
480
480
  // Capture input_tokens if available in this chunk
481
- if (chunk.usage?.prompt_tokens) state.inputTokens = chunk.usage.prompt_tokens
481
+ if (chunk.usage?.prompt_tokens != null) state.inputTokens = chunk.usage.prompt_tokens
482
482
 
483
483
  const usage = chunk.usage
484
484
  ? { input_tokens: chunk.usage.prompt_tokens || 0, output_tokens: chunk.usage.completion_tokens || 0 }
@@ -509,7 +509,7 @@ function mergeUsageIntoHeldDelta(
509
509
  ): void {
510
510
  if (!state.heldMessageDelta) return
511
511
 
512
- if (usage.prompt_tokens) state.inputTokens = usage.prompt_tokens
512
+ if (usage.prompt_tokens != null) state.inputTokens = usage.prompt_tokens
513
513
  const data = state.heldMessageDelta.data as Record<string, unknown>
514
514
  data.usage = { input_tokens: state.inputTokens, output_tokens: usage.completion_tokens || 0 }
515
515
  state.messageDeltaSent = true
@@ -88,7 +88,7 @@ export function anthropicToOpenaiChat(body: AnthropicRequest): OpenAIChatRequest
88
88
  }
89
89
 
90
90
  // thinking → reasoning_effort
91
- if (body.thinking && !body.model.toLowerCase().includes('deepseek')) {
91
+ if (body.thinking) {
92
92
  const budget = body.thinking.budget_tokens
93
93
  if (budget !== undefined) {
94
94
  if (budget <= 1024) result.reasoning_effort = 'low'