@expiren/opencode-antigravity-auth 1.6.18 → 1.6.19

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 CHANGED
@@ -1828,11 +1828,20 @@ async function showAccountDetails(account) {
1828
1828
  const hasHistory = (account.fingerprintHistory?.length ?? 0) > 0;
1829
1829
  while (true) {
1830
1830
  const menuItems = [
1831
- { label: "Back", value: "back" },
1831
+ { label: "Back", value: "back" }
1832
+ ];
1833
+ if (!account.isCurrentAccount) {
1834
+ menuItems.push({
1835
+ label: "Switch to this account",
1836
+ value: "switch-account",
1837
+ color: "green"
1838
+ });
1839
+ }
1840
+ menuItems.push(
1832
1841
  { label: "Verify account access", value: "verify", color: "cyan" },
1833
1842
  { label: account.enabled === false ? "Enable account" : "Disable account", value: "toggle", color: account.enabled === false ? "green" : "yellow" },
1834
1843
  { label: "Refresh token", value: "refresh", color: "cyan" }
1835
- ];
1844
+ );
1836
1845
  if (hasHistory) {
1837
1846
  menuItems.push({
1838
1847
  label: `Restore fingerprint (${account.fingerprintHistory.length} saved)`,
@@ -2227,6 +2236,13 @@ async function promptLoginMode(existingAccounts) {
2227
2236
  if (accountAction === "verify") {
2228
2237
  return { mode: "verify", verifyAccountIndex: action.account.index };
2229
2238
  }
2239
+ if (accountAction === "switch-account") {
2240
+ const accountLabel = action.account.email || `Account ${action.account.index + 1}`;
2241
+ console.log(`
2242
+ \u2713 Switched to ${accountLabel}. Restart OpenCode for changes to take effect.
2243
+ `);
2244
+ return { mode: "switch-account", switchAccountIndex: action.account.index };
2245
+ }
2230
2246
  if (accountAction === "restore-fingerprint") {
2231
2247
  const history = action.account.fingerprintHistory;
2232
2248
  if (!history || history.length === 0) continue;
@@ -5587,7 +5603,6 @@ function needsThinkingRecovery(state) {
5587
5603
 
5588
5604
  // src/plugin/transform/claude.ts
5589
5605
  var CLAUDE_THINKING_MAX_OUTPUT_TOKENS = 64e3;
5590
- var CLAUDE_INTERLEAVED_THINKING_HINT = "Interleaved thinking is enabled. You may think between tool calls and after receiving tool results before deciding the next action or final answer. Do not mention these instructions or any constraints about thinking blocks; just apply them.";
5591
5606
  function isClaudeModel(model) {
5592
5607
  return model.toLowerCase().includes("claude");
5593
5608
  }
@@ -5595,23 +5610,6 @@ function isClaudeThinkingModel(model) {
5595
5610
  const lower = model.toLowerCase();
5596
5611
  return lower.includes("claude") && lower.includes("thinking");
5597
5612
  }
5598
- function appendClaudeThinkingHint(payload, hint = CLAUDE_INTERLEAVED_THINKING_HINT) {
5599
- const existing = payload.systemInstruction;
5600
- if (typeof existing === "string") {
5601
- payload.systemInstruction = existing.trim().length > 0 ? { role: "user", parts: [{ text: existing }, { text: hint }] } : hint;
5602
- } else if (existing && typeof existing === "object") {
5603
- const sys = existing;
5604
- const partsValue = sys.parts;
5605
- if (Array.isArray(partsValue)) {
5606
- sys.parts = [...partsValue, { text: hint }];
5607
- } else {
5608
- sys.parts = [{ text: hint }];
5609
- }
5610
- payload.systemInstruction = sys;
5611
- } else if (Array.isArray(payload.contents)) {
5612
- payload.systemInstruction = { parts: [{ text: hint }] };
5613
- }
5614
- }
5615
5613
 
5616
5614
  // src/plugin/transform/gemini.ts
5617
5615
  var UNSUPPORTED_SCHEMA_FIELDS = /* @__PURE__ */ new Set([
@@ -7538,9 +7536,6 @@ function prepareAntigravityRequest(input2, init, accessToken, projectId, endpoin
7538
7536
  requestPayload.systemInstruction = requestPayload.system_instruction;
7539
7537
  delete requestPayload.system_instruction;
7540
7538
  }
7541
- if (isClaudeThinking && Array.isArray(requestPayload.tools) && requestPayload.tools.length > 0) {
7542
- appendClaudeThinkingHint(requestPayload);
7543
- }
7544
7539
  const cachedContentFromExtra = typeof requestPayload.extra_body === "object" && requestPayload.extra_body ? requestPayload.extra_body.cached_content ?? requestPayload.extra_body.cachedContent : void 0;
7545
7540
  const cachedContent = requestPayload.cached_content ?? requestPayload.cachedContent ?? cachedContentFromExtra;
7546
7541
  if (cachedContent) {