@bubblebrain-ai/bubble 0.0.26 → 0.0.28

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.
@@ -6,6 +6,11 @@ const ANTHROPIC_VERSION = "2023-06-01";
6
6
  const DEFAULT_MAX_TOKENS = 8192;
7
7
  const ANTHROPIC_OPUS_LONG_OUTPUT_MAX_TOKENS = 128000;
8
8
  const ANTHROPIC_LONG_OUTPUT_MAX_TOKENS = 64000;
9
+ // MiniMax thinking is always-on (M2.x) or default-on (M3), so the 8192 default
10
+ // gets consumed by thinking and the turn truncates before any visible text.
11
+ // MiniMax's docs recommend M3 128K, M2.x 64K output.
12
+ const MINIMAX_M3_MAX_TOKENS = 128000;
13
+ const MINIMAX_M2_MAX_TOKENS = 64000;
9
14
  const ANTHROPIC_PROMPT_CACHE_CONTROL = { type: "ephemeral" };
10
15
  const MINIMAX_PROMPT_CACHE_MODELS = new Set([
11
16
  "minimax-m2.7",
@@ -122,6 +127,10 @@ export function buildAnthropicRequest(options, messages, chatOptions) {
122
127
  return body;
123
128
  }
124
129
  export function resolveAnthropicMaxTokens(options, model) {
130
+ // MiniMax needs a large output budget so thinking doesn't starve the answer.
131
+ if (isMiniMaxProvider(options)) {
132
+ return /m3/i.test(model) ? MINIMAX_M3_MAX_TOKENS : MINIMAX_M2_MAX_TOKENS;
133
+ }
125
134
  if (!isOfficialAnthropicBaseUrl(options.baseURL)) {
126
135
  return DEFAULT_MAX_TOKENS;
127
136
  }
@@ -724,3 +733,7 @@ function isOfficialAnthropicBaseUrl(baseURL) {
724
733
  return false;
725
734
  }
726
735
  }
736
+ function isMiniMaxProvider(options) {
737
+ return (options.providerId || "").toLowerCase().startsWith("minimax")
738
+ || options.baseURL.toLowerCase().includes("minimaxi");
739
+ }
@@ -6,7 +6,7 @@ import { isHiddenToolMetadata } from "../agent/discovery-barrier.js";
6
6
  import { SessionManager } from "../session.js";
7
7
  import { registry as slashRegistry } from "../slash-commands/index.js";
8
8
  import { UserConfig, maskKey } from "../config.js";
9
- import { createPastedContentMarker, InputBox, isCtrlCInput, shouldCollapsePastedContent, } from "./input-box.js";
9
+ import { InputBox, isCtrlCInput, } from "./input-box.js";
10
10
  import { MessageList } from "./message-list.js";
11
11
  import { appendTextPart, appendToolPart, compactDisplayMessages, contentFromParts, latestCompactionSummary, moveStatusMessageToEnd, nextDisplayMessageKey, setUserInputStatus, snapshotDisplayParts, stripInterruptedAssistantMarker, toolCallsFromParts, } from "./display-history.js";
12
12
  import { AgentRunInputQueue } from "../agent/input-controller.js";
@@ -84,9 +84,7 @@ function reconstructDisplayMessages(agentMessages) {
84
84
  result.push({
85
85
  key: nextDisplayMessageKey("user"),
86
86
  role: "user",
87
- content: typeof m.content === "string"
88
- ? (shouldCollapsePastedContent(m.content) ? createPastedContentMarker(m.content) : m.content)
89
- : "(multimedia)",
87
+ content: typeof m.content === "string" ? m.content : "(multimedia)",
90
88
  });
91
89
  }
92
90
  else if (m.role === "assistant") {
@@ -585,8 +585,10 @@ export function InputBox({ onSubmit, onQueue, onPasteNotice, disabled, cursorRes
585
585
  return;
586
586
  const deliver = target === "queue" && onQueue ? onQueue : onSubmit;
587
587
  const payload = {
588
+ // The pasted-content marker is a composer-only affordance. Submit the
589
+ // fully-expanded text so the transcript shows what was actually sent —
590
+ // the agent already receives the expanded text — rather than the marker.
588
591
  text: expandedText,
589
- displayText: expandedText === submittedText ? undefined : submittedText,
590
592
  images: attachments,
591
593
  imageDisplayStart: attachments.length > 0 ? (imageLabelStartOverride ?? nextImageLabelStart) : undefined,
592
594
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblebrain-ai/bubble",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "A terminal coding agent",
5
5
  "type": "module",
6
6
  "engines": {