@cnwenf/occ 2.1.293 → 2.1.295

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- globalThis.MACRO={"VERSION":"2.1.293","BINARY_NAME":"occ","BUILD_TIME":"2026-08-04T22:30:21.732Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
2
+ globalThis.MACRO={"VERSION":"2.1.295","BINARY_NAME":"occ","BUILD_TIME":"2026-08-06T19:26:49.035Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
3
3
  // @bun
4
4
  var __create = Object.create;
5
5
  var __getProtoOf = Object.getPrototypeOf;
@@ -59437,6 +59437,7 @@ var init_types2 = __esm(() => {
59437
59437
  }).optional().describe("Custom file suggestion configuration for @ mentions"),
59438
59438
  respectGitignore: exports_external.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). " + "Note: .ignore files are always respected."),
59439
59439
  cleanupPeriodDays: exports_external.number().int().positive().optional().describe("Number of days to retain chat transcripts before automatic cleanup (default: 30). Minimum 1. Use a large value for long retention; use --no-session-persistence to disable transcript writes entirely."),
59440
+ autoCompactWindow: exports_external.number().int().min(1e5).max(1e6).optional().catch(undefined).describe("Auto-compact window size"),
59440
59441
  env: EnvironmentVariablesSchema().optional().describe("Environment variables to set for Claude Code sessions"),
59441
59442
  attribution: exports_external.object({
59442
59443
  commit: exports_external.string().optional().describe("Attribution text for git commits, including any trailers. " + "Empty string hides attribution."),
@@ -241517,6 +241518,56 @@ var init_microCompact = __esm(() => {
241517
241518
  ]);
241518
241519
  });
241519
241520
 
241521
+ // src/utils/autoCompactWindow.ts
241522
+ function parseBareNumber(raw) {
241523
+ if (EXPONENT_NOTATION_RE.test(raw)) {
241524
+ const value = Number(raw);
241525
+ return Number.isInteger(value) ? value : NaN;
241526
+ }
241527
+ if (COMMA_SEPARATED_RE.test(raw)) {
241528
+ return parseInt(raw.replace(/,/g, ""), 10);
241529
+ }
241530
+ return parseInt(raw, 10);
241531
+ }
241532
+ function parseAutoCompactWindowInput(raw) {
241533
+ const normalized = raw.trim().toLowerCase();
241534
+ if (normalized === "auto") {
241535
+ return "auto";
241536
+ }
241537
+ let tokens;
241538
+ if (normalized.endsWith("m")) {
241539
+ tokens = parseFloat(normalized) * 1e6;
241540
+ } else if (normalized.endsWith("k")) {
241541
+ tokens = parseFloat(normalized) * 1000;
241542
+ } else {
241543
+ const parsed = parseBareNumber(normalized);
241544
+ tokens = parsed >= 100 && parsed <= 1000 ? parsed * 1000 : parsed;
241545
+ }
241546
+ if (!Number.isFinite(tokens) || tokens < AUTO_COMPACT_WINDOW_MIN || tokens > AUTO_COMPACT_WINDOW_MAX) {
241547
+ return;
241548
+ }
241549
+ return Math.round(tokens);
241550
+ }
241551
+ function resolveAutoCompactWindowOverride(cliValue) {
241552
+ if (cliValue === undefined) {
241553
+ const fromSettings = getInitialSettings().autoCompactWindow;
241554
+ return typeof fromSettings === "number" ? fromSettings : undefined;
241555
+ }
241556
+ return cliValue === "auto" ? undefined : cliValue;
241557
+ }
241558
+ function setSessionAutoCompactWindow(window2) {
241559
+ sessionAutoCompactWindow = window2;
241560
+ }
241561
+ function getSessionAutoCompactWindow() {
241562
+ return sessionAutoCompactWindow;
241563
+ }
241564
+ var AUTO_COMPACT_WINDOW_MIN = 1e5, AUTO_COMPACT_WINDOW_MAX = 1e6, EXPONENT_NOTATION_RE, COMMA_SEPARATED_RE, sessionAutoCompactWindow;
241565
+ var init_autoCompactWindow = __esm(() => {
241566
+ init_settings2();
241567
+ EXPONENT_NOTATION_RE = /^[+-]?(\d+(\.\d*)?|\.\d+)[eE][+-]?\d+$/;
241568
+ COMMA_SEPARATED_RE = /^[+-]?\d{1,3}(,\d{3})+$/;
241569
+ });
241570
+
241520
241571
  // src/utils/tokens.ts
241521
241572
  function getTokenUsage(message) {
241522
241573
  if (message?.type === "assistant" && message.message && "usage" in message.message && !(Array.isArray(message.message.content) && message.message.content[0]?.type === "text" && SYNTHETIC_MESSAGES.has(message.message.content[0].text)) && message.message.model !== SYNTHETIC_MODEL) {
@@ -360098,15 +360149,24 @@ function collectCommands(node, commands7, varScope) {
360098
360149
  return null;
360099
360150
  }
360100
360151
  if (node.type === "test_command") {
360152
+ const inBracketBracket = node.children.some((c9) => c9?.type === "[[");
360153
+ const gapErr = checkTestCommandUnparsedBytes(node, inBracketBracket);
360154
+ if (gapErr)
360155
+ return gapErr;
360101
360156
  const argv = ["[["];
360102
360157
  for (const child of node.children) {
360103
360158
  if (!child)
360104
360159
  continue;
360105
- if (child.type === "[[" || child.type === "]]")
360106
- continue;
360107
- if (child.type === "[" || child.type === "]")
360160
+ if (child.type === "[[" || child.type === "]]" || child.type === "[" || child.type === "]") {
360161
+ if (child.text === "") {
360162
+ return {
360163
+ kind: "too-complex",
360164
+ reason: "test_command early-close (quote in operator position)"
360165
+ };
360166
+ }
360108
360167
  continue;
360109
- const err2 = walkTestExpr(child, argv, commands7, varScope);
360168
+ }
360169
+ const err2 = walkTestExpr(child, argv, commands7, varScope, inBracketBracket);
360110
360170
  if (err2)
360111
360171
  return err2;
360112
360172
  }
@@ -360142,16 +360202,104 @@ function collectCommands(node, commands7, varScope) {
360142
360202
  }
360143
360203
  return tooComplex(node);
360144
360204
  }
360145
- function walkTestExpr(node, argv, innerCommands, varScope) {
360205
+ function isWhitespaceOrCommentGap(text2, inBracketBracket) {
360206
+ let i6 = 0;
360207
+ while (i6 < text2.length) {
360208
+ const ch2 = text2[i6];
360209
+ if (ch2 === " " || ch2 === "\t") {
360210
+ i6++;
360211
+ continue;
360212
+ }
360213
+ if (ch2 === "\\" && text2[i6 + 1] === `
360214
+ `) {
360215
+ i6 += 2;
360216
+ continue;
360217
+ }
360218
+ if (inBracketBracket && ch2 === `
360219
+ `) {
360220
+ i6++;
360221
+ continue;
360222
+ }
360223
+ if (inBracketBracket && ch2 === "#") {
360224
+ i6++;
360225
+ while (i6 < text2.length && text2[i6] !== `
360226
+ `)
360227
+ i6++;
360228
+ continue;
360229
+ }
360230
+ return false;
360231
+ }
360232
+ return true;
360233
+ }
360234
+ function checkTestCommandUnparsedBytes(node, inBracketBracket) {
360235
+ const bytes = Buffer.from(node.text, "utf8");
360236
+ let cursor = node.startIndex;
360237
+ for (const child of node.children) {
360238
+ if (!child)
360239
+ continue;
360240
+ if (child.endIndex > node.endIndex || child.startIndex < node.startIndex) {
360241
+ return {
360242
+ kind: "too-complex",
360243
+ reason: "Test command child extends past the node span \u2014 gap byte accounting is untrustworthy"
360244
+ };
360245
+ }
360246
+ if (child.startIndex > cursor) {
360247
+ const gap = bytes.subarray(cursor - node.startIndex, child.startIndex - node.startIndex).toString("utf8");
360248
+ if (!isWhitespaceOrCommentGap(gap, inBracketBracket)) {
360249
+ return {
360250
+ kind: "too-complex",
360251
+ reason: "Test command has unparsed bytes between children \u2014 parser dropped content that shell will see"
360252
+ };
360253
+ }
360254
+ }
360255
+ cursor = Math.max(cursor, child.endIndex);
360256
+ if (TEST_EXPR_TYPES.has(child.type)) {
360257
+ const err2 = checkTestCommandUnparsedBytes(child, inBracketBracket);
360258
+ if (err2)
360259
+ return err2;
360260
+ }
360261
+ }
360262
+ if (cursor < node.endIndex) {
360263
+ const tail = bytes.subarray(cursor - node.startIndex).toString("utf8");
360264
+ if (!isWhitespaceOrCommentGap(tail, inBracketBracket)) {
360265
+ return {
360266
+ kind: "too-complex",
360267
+ reason: "Test command has unparsed bytes after its last child \u2014 parser dropped content that shell will see"
360268
+ };
360269
+ }
360270
+ }
360271
+ return null;
360272
+ }
360273
+ function containsStandaloneBracketCloser(text2) {
360274
+ const masked = text2.replace(/\[(?::[a-zA-Z]+:|=[A-Za-z0-9-]*=|\.[A-Za-z0-9-]*\.|[!^]?)\]\](?!\])/g, "\x00");
360275
+ const wordChar = /[A-Za-z0-9_]/;
360276
+ let idx = masked.indexOf("]]");
360277
+ while (idx !== -1) {
360278
+ const before = idx > 0 ? masked[idx - 1] : "";
360279
+ const after = idx + 2 < masked.length ? masked[idx + 2] : "";
360280
+ if (!(wordChar.test(before) && wordChar.test(after)))
360281
+ return true;
360282
+ idx = masked.indexOf("]]", idx + 1);
360283
+ }
360284
+ return false;
360285
+ }
360286
+ function walkTestExpr(node, argv, innerCommands, varScope, inBracketBracket) {
360146
360287
  switch (node.type) {
360147
360288
  case "unary_expression":
360148
360289
  case "binary_expression":
360149
360290
  case "negated_expression":
360150
360291
  case "parenthesized_expression": {
360151
- for (const c9 of node.children) {
360292
+ for (let i6 = 0;i6 < node.children.length; i6++) {
360293
+ const c9 = node.children[i6];
360152
360294
  if (!c9)
360153
360295
  continue;
360154
- const err2 = walkTestExpr(c9, argv, innerCommands, varScope);
360296
+ if ((c9.type === "simple_expansion" || c9.type === "expansion") && (node.children[i6 + 1]?.text.startsWith("[") || /^:[a-zA-Z&]/.test(node.children[i6 + 1]?.text ?? "") || c9.children.some((cc) => cc?.type === "special_variable_name") && /^\w*(\[|:[a-zA-Z&])/.test(node.children[i6 + 1]?.text ?? ""))) {
360297
+ return {
360298
+ kind: "too-complex",
360299
+ reason: "zsh $name[expr] / $name:mod in [[ ]] operand \u2014 recursive eval"
360300
+ };
360301
+ }
360302
+ const err2 = walkTestExpr(c9, argv, innerCommands, varScope, inBracketBracket);
360155
360303
  if (err2)
360156
360304
  return err2;
360157
360305
  }
@@ -360169,6 +360317,12 @@ function walkTestExpr(node, argv, innerCommands, varScope) {
360169
360317
  case "<":
360170
360318
  case ">":
360171
360319
  case "=~":
360320
+ if (node.text === "") {
360321
+ return {
360322
+ kind: "too-complex",
360323
+ reason: "Test command has a synthesized zero-width token \u2014 parser diverged from shell"
360324
+ };
360325
+ }
360172
360326
  argv.push(node.text);
360173
360327
  return null;
360174
360328
  case "regex":
@@ -360256,13 +360410,39 @@ function walkTestExpr(node, argv, innerCommands, varScope) {
360256
360410
  };
360257
360411
  }
360258
360412
  }
360413
+ if (node.text.includes("&&")) {
360414
+ return {
360415
+ kind: "too-complex",
360416
+ reason: "[[ ]] pattern leaf contains `&&` \u2014 shell cond-lexer divergence (zsh splits the word there)",
360417
+ nodeType: node.type
360418
+ };
360419
+ }
360420
+ if (containsStandaloneBracketCloser(node.text)) {
360421
+ return {
360422
+ kind: "too-complex",
360423
+ reason: "[[ ]] pattern leaf contains a potential standalone `]]` closer \u2014 shell cond-lexer divergence (zsh may close the conditional early)",
360424
+ nodeType: node.type
360425
+ };
360426
+ }
360259
360427
  argv.push(node.text);
360260
360428
  return null;
360261
360429
  }
360430
+ case "test_rhs_missing":
360431
+ return {
360432
+ kind: "too-complex",
360433
+ reason: "Test command comparison is missing its right-hand side \u2014 parser dropped consumed bytes"
360434
+ };
360262
360435
  default: {
360263
360436
  const arg = walkArgument(node, innerCommands, varScope);
360264
360437
  if (typeof arg !== "string")
360265
360438
  return arg;
360439
+ if (inBracketBracket && (containsStandaloneBracketCloser(arg) || containsStandaloneBracketCloser(node.text)) || /]].*[;\n&|<>]/s.test(arg)) {
360440
+ return {
360441
+ kind: "too-complex",
360442
+ reason: inBracketBracket ? "[[ ]] quoted operand contains `]]` closer or `]]`+separator bytes \u2014 possible parser quote-state desync" : "test command quoted operand contains `]]`+separator bytes \u2014 possible parser quote-state desync",
360443
+ nodeType: node.type
360444
+ };
360445
+ }
360266
360446
  argv.push(arg);
360267
360447
  return null;
360268
360448
  }
@@ -361112,7 +361292,7 @@ function checkSemantics(commands7) {
361112
361292
  }
361113
361293
  return { ok: true };
361114
361294
  }
361115
- var STRUCTURAL_TYPES, SEPARATOR_TYPES, CMDSUB_PLACEHOLDER = "__CMDSUB_OUTPUT__", VAR_PLACEHOLDER = "__TRACKED_VAR__", BARE_VAR_UNSAFE_RE, STDBUF_SHORT_SEP_RE, STDBUF_SHORT_FUSED_RE, STDBUF_LONG_RE, SAFE_ENV_VARS, SPECIAL_VAR_NAMES, DANGEROUS_TYPES, DANGEROUS_TYPE_IDS, REDIRECT_OPS, BRACE_EXPANSION_RE, CONTROL_CHAR_RE, UNICODE_WHITESPACE_RE, BACKSLASH_WHITESPACE_RE, ZSH_TILDE_BRACKET_RE, ZSH_EQUALS_EXPANSION_RE, BRACE_WITH_QUOTE_RE, DOLLAR, ARITH_LEAF_RE, ZSH_DANGEROUS_BUILTINS, EVAL_LIKE_BUILTINS, SUBSCRIPT_EVAL_FLAGS, TEST_ARITH_CMP_OPS, BARE_SUBSCRIPT_NAME_BUILTINS, READ_DATA_FLAGS, PROC_ENVIRON_RE, NEWLINE_HASH_RE;
361295
+ var STRUCTURAL_TYPES, SEPARATOR_TYPES, CMDSUB_PLACEHOLDER = "__CMDSUB_OUTPUT__", VAR_PLACEHOLDER = "__TRACKED_VAR__", BARE_VAR_UNSAFE_RE, STDBUF_SHORT_SEP_RE, STDBUF_SHORT_FUSED_RE, STDBUF_LONG_RE, SAFE_ENV_VARS, SPECIAL_VAR_NAMES, DANGEROUS_TYPES, DANGEROUS_TYPE_IDS, REDIRECT_OPS, BRACE_EXPANSION_RE, CONTROL_CHAR_RE, UNICODE_WHITESPACE_RE, BACKSLASH_WHITESPACE_RE, ZSH_TILDE_BRACKET_RE, ZSH_EQUALS_EXPANSION_RE, BRACE_WITH_QUOTE_RE, DOLLAR, TEST_EXPR_TYPES, ARITH_LEAF_RE, ZSH_DANGEROUS_BUILTINS, EVAL_LIKE_BUILTINS, SUBSCRIPT_EVAL_FLAGS, TEST_ARITH_CMP_OPS, BARE_SUBSCRIPT_NAME_BUILTINS, READ_DATA_FLAGS, PROC_ENVIRON_RE, NEWLINE_HASH_RE;
361116
361296
  var init_ast = __esm(() => {
361117
361297
  init_bashParser();
361118
361298
  init_parser5();
@@ -361198,6 +361378,12 @@ var init_ast = __esm(() => {
361198
361378
  ZSH_EQUALS_EXPANSION_RE = /(?:^|[\s;&|])=[a-zA-Z_]/;
361199
361379
  BRACE_WITH_QUOTE_RE = /\{[^}]*['"]/;
361200
361380
  DOLLAR = String.fromCharCode(36);
361381
+ TEST_EXPR_TYPES = new Set([
361382
+ "unary_expression",
361383
+ "binary_expression",
361384
+ "negated_expression",
361385
+ "parenthesized_expression"
361386
+ ]);
361201
361387
  ARITH_LEAF_RE = /^(?:[0-9]+|0[xX][0-9a-fA-F]+|[0-9]+#[0-9a-zA-Z]+|[-+*/%^&|~!<>=?:(),]+|<<|>>|\*\*|&&|\|\||[<>=!]=|\$\(\(|\)\))$/;
361202
361388
  ZSH_DANGEROUS_BUILTINS = new Set([
361203
361389
  "zmodload",
@@ -384375,6 +384561,42 @@ function hasUnsafeHelpManForm(command4) {
384375
384561
  }
384376
384562
  return false;
384377
384563
  }
384564
+ function hasQuotedBracketCloserInConditional(command4) {
384565
+ if (!command4.includes("[["))
384566
+ return false;
384567
+ if (!command4.includes("]]"))
384568
+ return false;
384569
+ const isWordChar2 = (c9) => c9 !== undefined && /[A-Za-z0-9_]/.test(c9);
384570
+ let inSingle = false;
384571
+ let inDouble = false;
384572
+ for (let i6 = 0;i6 < command4.length; i6++) {
384573
+ const ch2 = command4[i6];
384574
+ if (ch2 === "\\" && !inSingle) {
384575
+ const next = command4[i6 + 1];
384576
+ const isEscape = !inDouble || next === "$" || next === "`" || next === '"' || next === "\\" || next === `
384577
+ `;
384578
+ if (isEscape && next !== undefined)
384579
+ i6++;
384580
+ continue;
384581
+ }
384582
+ if (ch2 === "'" && !inDouble) {
384583
+ inSingle = !inSingle;
384584
+ continue;
384585
+ }
384586
+ if (ch2 === '"' && !inSingle) {
384587
+ inDouble = !inDouble;
384588
+ continue;
384589
+ }
384590
+ if ((inSingle || inDouble) && ch2 === "]" && command4[i6 + 1] === "]") {
384591
+ const before = command4[i6 - 1];
384592
+ const after = command4[i6 + 2];
384593
+ if (!(isWordChar2(before) && isWordChar2(after)))
384594
+ return true;
384595
+ i6++;
384596
+ }
384597
+ }
384598
+ return false;
384599
+ }
384378
384600
  async function bashToolHasPermission(input, context4, getCommandSubcommandPrefixFn = getCommandSubcommandPrefix) {
384379
384601
  let appState = context4.getAppState();
384380
384602
  {
@@ -384465,6 +384687,15 @@ async function bashToolHasPermission(input, context4, getCommandSubcommandPrefix
384465
384687
  };
384466
384688
  }
384467
384689
  }
384690
+ {
384691
+ const mode = appState.toolPermissionContext.mode;
384692
+ if (mode !== "bypassPermissions" && hasQuotedBracketCloserInConditional(input.command)) {
384693
+ return {
384694
+ behavior: "ask",
384695
+ message: "Potential `]]` closer hidden in a quoted [[ ]] operand requires confirmation."
384696
+ };
384697
+ }
384698
+ }
384468
384699
  const injectionCheckDisabled = isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK);
384469
384700
  const shadowEnabled = feature("TREE_SITTER_BASH_SHADOW") ? getFeatureValue_CACHED_MAY_BE_STALE("tengu_birch_trellis", true) : false;
384470
384701
  let astRoot = injectionCheckDisabled ? null : feature("TREE_SITTER_BASH_SHADOW") && !shadowEnabled ? null : await parseCommandRaw(input.command);
@@ -471176,9 +471407,14 @@ async function* runAgent({
471176
471407
  const state3 = toolUseContext.getAppState();
471177
471408
  let toolPermissionContext = state3.toolPermissionContext;
471178
471409
  if (agentPermissionMode && state3.toolPermissionContext.mode !== "bypassPermissions" && state3.toolPermissionContext.mode !== "acceptEdits" && !(feature("TRANSCRIPT_CLASSIFIER") && state3.toolPermissionContext.mode === "auto")) {
471410
+ let effectiveMode = agentPermissionMode;
471411
+ if (agentPermissionMode === "bypassPermissions" && isBypassPermissionsModeDisabled()) {
471412
+ logForDebugging(`Subagent declared permissionMode: bypassPermissions but this session is not running in a contained no-internet environment (or bypass is policy-disabled); keeping parent mode '${state3.toolPermissionContext.mode}'.`, { level: "warn" });
471413
+ effectiveMode = state3.toolPermissionContext.mode;
471414
+ }
471179
471415
  toolPermissionContext = {
471180
471416
  ...toolPermissionContext,
471181
- mode: agentPermissionMode
471417
+ mode: effectiveMode
471182
471418
  };
471183
471419
  }
471184
471420
  const shouldAvoidPrompts = canShowPermissionPrompts !== undefined ? !canShowPermissionPrompts : agentPermissionMode === "bubble" ? false : isAsync2;
@@ -471503,6 +471739,7 @@ var init_runAgent = __esm(() => {
471503
471739
  init_sessionHooks();
471504
471740
  init_hooks5();
471505
471741
  init_messages3();
471742
+ init_permissionSetup();
471506
471743
  init_cost_tracker();
471507
471744
  init_agent();
471508
471745
  init_sessionStorage();
@@ -604362,6 +604599,11 @@ function getEffectiveContextWindowSize(model) {
604362
604599
  if (!isNaN(parsed) && parsed > 0) {
604363
604600
  contextWindow = Math.min(contextWindow, parsed);
604364
604601
  }
604602
+ } else {
604603
+ const sessionWindow = getSessionAutoCompactWindow();
604604
+ if (sessionWindow !== undefined) {
604605
+ contextWindow = Math.min(contextWindow, sessionWindow);
604606
+ }
604365
604607
  }
604366
604608
  return contextWindow - reservedTokensForSummary;
604367
604609
  }
@@ -604506,6 +604748,7 @@ var init_autoCompact = __esm(() => {
604506
604748
  init_featureFlags();
604507
604749
  init_state();
604508
604750
  init_state();
604751
+ init_autoCompactWindow();
604509
604752
  init_config4();
604510
604753
  init_context();
604511
604754
  init_debug();
@@ -684360,70 +684603,178 @@ var init_logoV2Utils = __esm(() => {
684360
684603
  cachedActivity = [];
684361
684604
  });
684362
684605
 
684363
- // src/components/LogoV2/Clawd.tsx
684364
- function normalizeLines(lines2) {
684365
- const max2 = lines2.reduce((m5, l4) => Math.max(m5, l4.length), 0);
684366
- return lines2.map((l4) => l4.padEnd(max2));
684606
+ // src/components/LogoV2/OccMark.tsx
684607
+ function normalizeMark(lines2) {
684608
+ const width = Math.max(...lines2.map(stringWidth));
684609
+ return lines2.map((line) => line + " ".repeat(width - stringWidth(line)));
684367
684610
  }
684368
- function renderLine(line, lineKey) {
684369
- const segments = [];
684370
- let buffer = "";
684371
- let accent = false;
684372
- const flush = (until) => {
684373
- if (buffer.length === 0)
684374
- return;
684375
- segments.push(accent ? /* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684376
- color: "claudeShimmer",
684377
- children: buffer
684378
- }, `${lineKey}-${until}-a`) : /* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684379
- color: "clawd_body",
684380
- children: buffer
684381
- }, `${lineKey}-${until}-b`));
684382
- buffer = "";
684383
- };
684384
- for (let i6 = 0;i6 < line.length; i6++) {
684385
- const ch2 = line[i6];
684386
- if (ch2 === " " || ch2 === "\t") {
684387
- flush(i6);
684388
- segments.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684389
- children: " "
684390
- }, `${lineKey}-sp-${i6}`));
684611
+ function getOccMark(mode) {
684612
+ return OCC_MARKS[mode];
684613
+ }
684614
+ function getOccMarkWidth(art) {
684615
+ return Math.max(...art.map(stringWidth));
684616
+ }
684617
+ function gradientThemeFamily(themeName) {
684618
+ return themeName.startsWith("light") ? "light" : "dark";
684619
+ }
684620
+ function sampleGradient(stops, t4) {
684621
+ if (stops.length === 0)
684622
+ return [0, 0, 0];
684623
+ if (stops.length === 1)
684624
+ return stops[0];
684625
+ const clamped = Math.min(Math.max(t4, 0), 1);
684626
+ const scaled = clamped * (stops.length - 1);
684627
+ const index2 = Math.min(Math.floor(scaled), stops.length - 2);
684628
+ const local = scaled - index2;
684629
+ const from2 = stops[index2];
684630
+ const to = stops[index2 + 1];
684631
+ return [
684632
+ Math.round(from2[0] + (to[0] - from2[0]) * local),
684633
+ Math.round(from2[1] + (to[1] - from2[1]) * local),
684634
+ Math.round(from2[2] + (to[2] - from2[2]) * local)
684635
+ ];
684636
+ }
684637
+ function markCellT(art, row, column) {
684638
+ const width = getOccMarkWidth(art);
684639
+ const horizontal = width > 1 ? column / (width - 1) : 0;
684640
+ const vertical = art.length > 1 ? row / (art.length - 1) : 0;
684641
+ return horizontal * 0.72 + vertical * 0.28;
684642
+ }
684643
+ function rgbColor(rgb3) {
684644
+ return `rgb(${rgb3[0]},${rgb3[1]},${rgb3[2]})`;
684645
+ }
684646
+ function highlightColor(rgb3, amount = 0.62) {
684647
+ return [
684648
+ Math.round(rgb3[0] + (255 - rgb3[0]) * amount),
684649
+ Math.round(rgb3[1] + (255 - rgb3[1]) * amount),
684650
+ Math.round(rgb3[2] + (255 - rgb3[2]) * amount)
684651
+ ];
684652
+ }
684653
+ function isShimmerCell(art, row, column, progress) {
684654
+ if (progress === null)
684655
+ return false;
684656
+ const width = getOccMarkWidth(art);
684657
+ const diagonal = (column + (art.length - 1 - row) * 1.6) / (width + (art.length - 1) * 1.6);
684658
+ const bandPosition = -SHIMMER_BAND_WIDTH + progress * 1.45;
684659
+ return Math.abs(diagonal - bandPosition) < SHIMMER_BAND_WIDTH;
684660
+ }
684661
+ function MarkRow({
684662
+ art,
684663
+ row,
684664
+ stops,
684665
+ progress
684666
+ }) {
684667
+ const line = art[row];
684668
+ const cells = [...line];
684669
+ const nodes = [];
684670
+ let spaceRun = "";
684671
+ const flushSpaces = (key4) => {
684672
+ if (spaceRun.length > 0) {
684673
+ nodes.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684674
+ children: spaceRun
684675
+ }, key4));
684676
+ spaceRun = "";
684677
+ }
684678
+ };
684679
+ for (let column = 0;column < cells.length; column++) {
684680
+ const char = cells[column];
684681
+ if (char === " " || char === "\t") {
684682
+ spaceRun += " ";
684391
684683
  continue;
684392
684684
  }
684393
- const isAccent = ACCENT_CHARS.has(ch2);
684394
- if (buffer.length === 0 || isAccent === accent) {
684395
- buffer += ch2;
684396
- accent = isAccent;
684397
- } else {
684398
- flush(i6);
684399
- buffer = ch2;
684400
- accent = isAccent;
684401
- }
684685
+ flushSpaces(`${row}-sp-${column}`);
684686
+ const base2 = sampleGradient(stops, markCellT(art, row, column));
684687
+ const shimmering = isShimmerCell(art, row, column, progress);
684688
+ nodes.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684689
+ color: rgbColor(shimmering ? highlightColor(base2) : base2),
684690
+ bold: true,
684691
+ children: char
684692
+ }, `${row}-${column}`));
684402
684693
  }
684403
- flush(line.length);
684694
+ flushSpaces(`${row}-end`);
684404
684695
  return /* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684405
- children: segments
684406
- }, lineKey);
684696
+ children: nodes
684697
+ });
684407
684698
  }
684408
- function Clawd(_props) {
684699
+ function OccMark(props) {
684700
+ const mode = props.mode ?? "compact";
684701
+ const art = getOccMark(mode);
684702
+ const [themeName] = useTheme();
684703
+ const stops = GRADIENT_STOPS[gradientThemeFamily(themeName)];
684704
+ const animate = props.animate ?? !(getInitialSettings().prefersReducedMotion ?? false);
684705
+ const [done, setDone] = import_react146.useState(!animate);
684706
+ const startTimeRef = import_react146.useRef(null);
684707
+ const [ref, time3] = useAnimationFrame(done ? null : SHIMMER_FRAME_MS);
684708
+ import_react146.useEffect(() => {
684709
+ if (done)
684710
+ return;
684711
+ const timer2 = setTimeout(setDone, SHIMMER_DURATION_MS, true);
684712
+ return () => clearTimeout(timer2);
684713
+ }, [done]);
684714
+ if (startTimeRef.current === null) {
684715
+ startTimeRef.current = time3;
684716
+ }
684717
+ const elapsed = Math.max(0, time3 - startTimeRef.current);
684718
+ const progress = done ? null : Math.min(elapsed / SHIMMER_DURATION_MS, 1);
684409
684719
  return /* @__PURE__ */ jsx_runtime258.jsx(ThemedBox_default, {
684720
+ ref,
684410
684721
  flexDirection: "column",
684411
- children: DOGE_LINES.map((line, i6) => renderLine(line, i6))
684722
+ flexShrink: 0,
684723
+ children: art.map((_4, row) => /* @__PURE__ */ jsx_runtime258.jsx(MarkRow, {
684724
+ art,
684725
+ row,
684726
+ stops,
684727
+ progress
684728
+ }, row))
684412
684729
  });
684413
684730
  }
684414
- var jsx_runtime258, BODY_LINES, ACCENT_CHARS, DOGE_LINES;
684415
- var init_Clawd = __esm(() => {
684731
+ var import_react146, jsx_runtime258, OCC_MARKS, GRADIENT_STOPS, SHIMMER_FRAME_MS = 84, SHIMMER_DURATION_MS = 1850, SHIMMER_BAND_WIDTH = 0.24;
684732
+ var init_OccMark = __esm(() => {
684416
684733
  init_ink2();
684734
+ init_stringWidth();
684735
+ init_settings2();
684736
+ init_ThemeProvider();
684737
+ import_react146 = __toESM(require_react(), 1);
684417
684738
  jsx_runtime258 = __toESM(require_jsx_runtime(), 1);
684418
- BODY_LINES = [
684419
- " /\\___/\\ ",
684420
- " ( o w o )~~",
684421
- " ( =w= ) ",
684422
- " \\_____/ ",
684423
- " | | | "
684424
- ];
684425
- ACCENT_CHARS = new Set(["o", "w", "=", "~"]);
684426
- DOGE_LINES = normalizeLines(BODY_LINES);
684739
+ OCC_MARKS = {
684740
+ wide: normalizeMark([
684741
+ " \u2584\u2584",
684742
+ " \u259F\u2588\u2588\u2599",
684743
+ " \u259F\u2588\u2588\u2588\u2588\u259B",
684744
+ " \u259F\u2588\u2588\u2588\u2588\u259B",
684745
+ " \u259F\u2588\u2588\u2588\u2588\u259B",
684746
+ " \u259F\u2588\u2588\u2588\u2588\u259B",
684747
+ "\u259F\u2588\u2588\u2588\u2588\u259B"
684748
+ ]),
684749
+ compact: normalizeMark([
684750
+ " \u2584\u2584",
684751
+ " \u259F\u2588\u2588\u2599",
684752
+ " \u259F\u2588\u2588\u2588\u2599",
684753
+ " \u259F\u2588\u2588\u2588\u259B",
684754
+ " \u259F\u2588\u2588\u2588\u259B",
684755
+ " \u259F\u2588\u2588\u2588\u259B",
684756
+ "\u259F\u2588\u2588\u2588\u259B"
684757
+ ]),
684758
+ plain: normalizeMark([
684759
+ " \u2584\u2584",
684760
+ " \u259F\u2588\u2588\u2599",
684761
+ " \u259F\u2588\u2588\u259B",
684762
+ " \u259F\u2588\u2588\u259B",
684763
+ "\u259F\u2588\u2588\u259B"
684764
+ ])
684765
+ };
684766
+ GRADIENT_STOPS = {
684767
+ dark: [
684768
+ [252, 211, 77],
684769
+ [251, 146, 60],
684770
+ [244, 63, 94]
684771
+ ],
684772
+ light: [
684773
+ [180, 83, 9],
684774
+ [194, 65, 12],
684775
+ [159, 18, 57]
684776
+ ]
684777
+ };
684427
684778
  });
684428
684779
 
684429
684780
  // src/components/LogoV2/Feed.tsx
@@ -684947,7 +685298,7 @@ function shouldShowGuestPassesUpsell() {
684947
685298
  return true;
684948
685299
  }
684949
685300
  function useShowGuestPassesUpsell() {
684950
- const [show] = import_react146.useState(_temp120);
685301
+ const [show] = import_react147.useState(_temp120);
684951
685302
  return show;
684952
685303
  }
684953
685304
  function _temp120() {
@@ -684999,28 +685350,18 @@ function GuestPassesUpsell() {
684999
685350
  }
685000
685351
  return t0;
685001
685352
  }
685002
- var import_compiler_runtime196, import_react146, jsx_runtime262;
685353
+ var import_compiler_runtime196, import_react147, jsx_runtime262;
685003
685354
  var init_GuestPassesUpsell = __esm(() => {
685004
685355
  init_ink2();
685005
685356
  init_analytics();
685006
685357
  init_referral();
685007
685358
  init_config4();
685008
685359
  import_compiler_runtime196 = __toESM(require_compiler_runtime(), 1);
685009
- import_react146 = __toESM(require_react(), 1);
685360
+ import_react147 = __toESM(require_react(), 1);
685010
685361
  jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
685011
685362
  });
685012
685363
 
685013
685364
  // src/components/LogoV2/OccWelcome.tsx
685014
- function normalizeLogo(lines2) {
685015
- const width = Math.max(...lines2.map(stringWidth));
685016
- return lines2.map((line) => line + " ".repeat(width - stringWidth(line)));
685017
- }
685018
- function getOccLogo(mode) {
685019
- return OCC_LOGOS[mode];
685020
- }
685021
- function getOccLogoWidth(art) {
685022
- return Math.max(...art.map(stringWidth));
685023
- }
685024
685365
  function getOccWelcomeMode(columns, plain = false) {
685025
685366
  if (plain || columns < COMPACT_MIN_COLUMNS)
685026
685367
  return "plain";
@@ -685047,92 +685388,33 @@ function welcomeTip(mode, sessionTip) {
685047
685388
  }
685048
685389
  return "Type /help for commands";
685049
685390
  }
685050
- function getShimmerRuns(line, row, progress, art = OCC_LOGOS.wide) {
685051
- const chars = [...line];
685052
- if (chars.length === 0)
685053
- return [];
685054
- const runs = [];
685055
- const artWidth = getOccLogoWidth(art);
685056
- let displayColumn = 0;
685057
- for (let column = 0;column < chars.length; column++) {
685058
- const char = chars[column];
685059
- const diagonal = (displayColumn + (art.length - 1 - row) * 1.6) / (artWidth + art.length * 1.6);
685060
- const bandPosition = progress === null ? -1 : -SHIMMER_BAND_WIDTH + progress * 1.45;
685061
- const highlighted = progress !== null && char !== " " && Math.abs(diagonal - bandPosition) < SHIMMER_BAND_WIDTH;
685062
- const previous = runs[runs.length - 1];
685063
- if (previous?.highlighted === highlighted) {
685064
- previous.text += char;
685065
- } else {
685066
- runs.push({ text: char, highlighted });
685067
- }
685068
- displayColumn += stringWidth(char);
685069
- }
685070
- return runs;
685071
- }
685072
- function OccLogo({
685073
- art,
685074
- animate
685075
- }) {
685076
- const [done, setDone] = import_react147.useState(!animate);
685077
- const startTimeRef = import_react147.useRef(null);
685078
- const [ref, time3] = useAnimationFrame(done ? null : SHIMMER_FRAME_MS);
685079
- import_react147.useEffect(() => {
685080
- if (done)
685081
- return;
685082
- const timer2 = setTimeout(setDone, SHIMMER_DURATION_MS, true);
685083
- return () => clearTimeout(timer2);
685084
- }, [done]);
685085
- if (startTimeRef.current === null) {
685086
- startTimeRef.current = time3;
685087
- }
685088
- const elapsed = Math.max(0, time3 - startTimeRef.current);
685089
- const progress = done ? null : Math.min(elapsed / SHIMMER_DURATION_MS, 1);
685090
- return /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685091
- ref,
685092
- flexDirection: "column",
685093
- flexShrink: 0,
685094
- children: art.map((line, row) => /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685095
- children: getShimmerRuns(line, row, progress, art).map((run, index2) => /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685096
- color: run.highlighted ? "claudeShimmer" : "claude",
685097
- bold: run.highlighted,
685098
- children: run.text
685099
- }, `${row}-${index2}`))
685100
- }, row))
685101
- });
685102
- }
685103
- function Header({
685104
- version: version5,
685105
- showTagline,
685391
+ function DataRow({
685392
+ label,
685393
+ value,
685106
685394
  width
685107
685395
  }) {
685108
- return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685109
- width,
685110
- justifyContent: "space-between",
685396
+ const labelCell = `${label} `.slice(0, LABEL_COLUMN_WIDTH).padEnd(LABEL_COLUMN_WIDTH);
685397
+ return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
685398
+ wrap: "truncate",
685111
685399
  children: [
685112
- /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
685113
- children: [
685114
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685115
- color: "claude",
685116
- bold: true,
685117
- children: "OCC"
685118
- }),
685119
- /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
685120
- dimColor: true,
685121
- children: [
685122
- " v",
685123
- version5
685124
- ]
685125
- })
685126
- ]
685400
+ /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685401
+ color: "inactive",
685402
+ children: labelCell
685127
685403
  }),
685128
- showTagline && /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685129
- dimColor: true,
685130
- wrap: "truncate",
685131
- children: "Open C Code"
685404
+ /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685405
+ children: truncate(value, Math.max(width - LABEL_COLUMN_WIDTH, 1))
685132
685406
  })
685133
685407
  ]
685134
685408
  });
685135
685409
  }
685410
+ function DashedRule({ width }) {
685411
+ return /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685412
+ color: "inactive",
685413
+ dimColor: true,
685414
+ wrap: "truncate",
685415
+ children: "\u254C".repeat(Math.max(width, 1))
685416
+ });
685417
+ }
685136
685418
  function Metadata({
685137
685419
  width,
685138
685420
  model,
@@ -685142,37 +685424,25 @@ function Metadata({
685142
685424
  }) {
685143
685425
  const modelLine = truncate(`${model} \xB7 ${billing}`, Math.max(width, 1));
685144
685426
  const agentPrefix = agentName ? `@${agentName} \xB7 ` : "";
685145
- const locationWidth = Math.max(width - stringWidth(agentPrefix), 1);
685427
+ const locationValue = `${agentPrefix}${location}`;
685146
685428
  return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685147
685429
  flexDirection: "column",
685148
685430
  minWidth: 0,
685149
685431
  children: [
685150
685432
  /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685151
685433
  bold: true,
685152
- children: "Ready when you are."
685153
- }),
685154
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685155
- dimColor: true,
685156
685434
  wrap: "truncate",
685157
- children: modelLine
685435
+ children: "Ready when you are."
685158
685436
  }),
685159
- /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
685160
- wrap: "truncate",
685161
- children: [
685162
- agentPrefix && /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685163
- color: "claude",
685164
- children: agentPrefix
685165
- }),
685166
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685167
- dimColor: true,
685168
- children: truncate(location, locationWidth)
685169
- })
685170
- ]
685437
+ /* @__PURE__ */ jsx_runtime263.jsx(DataRow, {
685438
+ label: "MODEL",
685439
+ value: modelLine,
685440
+ width
685171
685441
  }),
685172
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685173
- dimColor: true,
685174
- wrap: "truncate",
685175
- children: "Safe, open, and auditable."
685442
+ /* @__PURE__ */ jsx_runtime263.jsx(DataRow, {
685443
+ label: "PROJ",
685444
+ value: locationValue,
685445
+ width
685176
685446
  })
685177
685447
  ]
685178
685448
  });
@@ -685181,16 +685451,17 @@ function PlainWelcome(props) {
685181
685451
  const width = Math.max(props.columns, 1);
685182
685452
  const location = formatWelcomeLocation(props.branch, props.cwd, width);
685183
685453
  const modelLine = truncate(`${props.model} \xB7 ${props.billing}`, width);
685184
- const logo = getOccLogo("plain");
685185
- const showLogo = !props.plain && width >= getOccLogoWidth(logo);
685454
+ const logo = getOccMark("plain");
685455
+ const showLogo = !props.plain && width >= getOccMarkWidth(logo);
685456
+ const animate = !props.reducedMotion && !props.plain;
685186
685457
  return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685187
685458
  flexDirection: "column",
685188
685459
  children: [
685189
685460
  showLogo && /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685190
685461
  marginBottom: 1,
685191
- children: /* @__PURE__ */ jsx_runtime263.jsx(OccLogo, {
685192
- art: logo,
685193
- animate: !props.reducedMotion
685462
+ children: /* @__PURE__ */ jsx_runtime263.jsx(OccMark, {
685463
+ mode: "plain",
685464
+ animate
685194
685465
  })
685195
685466
  }),
685196
685467
  /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
@@ -685234,37 +685505,36 @@ function OccWelcome(props) {
685234
685505
  ...props
685235
685506
  });
685236
685507
  }
685508
+ const [themeName] = useTheme();
685237
685509
  const cardWidth = Math.min(Math.max(props.columns, 1), WELCOME_MAX_WIDTH);
685238
685510
  const contentWidth = Math.max(cardWidth - 4, 1);
685239
- const logo = getOccLogo(mode);
685240
- const logoWidth = getOccLogoWidth(logo);
685241
- const location = formatWelcomeLocation(props.branch, props.cwd, mode === "wide" ? Math.max(contentWidth - logoWidth - 3, 1) : contentWidth);
685511
+ const markMode = mode === "wide" ? "wide" : "compact";
685512
+ const logo = getOccMark(markMode);
685513
+ const logoWidth = getOccMarkWidth(logo);
685514
+ const metaWidth = mode === "wide" ? Math.max(contentWidth - logoWidth - 3, 1) : contentWidth;
685515
+ const location = formatWelcomeLocation(props.branch, props.cwd, metaWidth);
685242
685516
  const animate = !props.reducedMotion;
685517
+ const borderTitle = `${color("claude", themeName)("OCC")}${color("inactive", themeName)(` v${props.version} \xB7 Open C Code`)}`;
685243
685518
  return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685244
685519
  width: cardWidth,
685245
685520
  flexDirection: "column",
685246
685521
  borderStyle: "round",
685247
- borderColor: "inactive",
685248
- borderDimColor: true,
685522
+ borderColor: "claude",
685523
+ borderText: { content: borderTitle, position: "top", align: "start", offset: 2 },
685249
685524
  paddingX: 1,
685250
685525
  children: [
685251
- /* @__PURE__ */ jsx_runtime263.jsx(Header, {
685252
- version: props.version,
685253
- showTagline: true,
685254
- width: contentWidth
685255
- }),
685256
685526
  mode === "wide" ? /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685257
685527
  marginTop: 1,
685258
685528
  flexDirection: "row",
685259
685529
  gap: 3,
685260
685530
  alignItems: "center",
685261
685531
  children: [
685262
- /* @__PURE__ */ jsx_runtime263.jsx(OccLogo, {
685263
- art: logo,
685532
+ /* @__PURE__ */ jsx_runtime263.jsx(OccMark, {
685533
+ mode: "wide",
685264
685534
  animate
685265
685535
  }),
685266
685536
  /* @__PURE__ */ jsx_runtime263.jsx(Metadata, {
685267
- width: Math.max(contentWidth - logoWidth - 3, 1),
685537
+ width: metaWidth,
685268
685538
  model: props.model,
685269
685539
  billing: props.billing,
685270
685540
  location,
@@ -685276,8 +685546,8 @@ function OccWelcome(props) {
685276
685546
  flexDirection: "column",
685277
685547
  alignItems: "center",
685278
685548
  children: [
685279
- /* @__PURE__ */ jsx_runtime263.jsx(OccLogo, {
685280
- art: logo,
685549
+ /* @__PURE__ */ jsx_runtime263.jsx(OccMark, {
685550
+ mode: "compact",
685281
685551
  animate
685282
685552
  }),
685283
685553
  /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
@@ -685293,19 +685563,22 @@ function OccWelcome(props) {
685293
685563
  })
685294
685564
  ]
685295
685565
  }),
685296
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685566
+ /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685297
685567
  marginTop: 1,
685298
- borderStyle: "single",
685299
- borderColor: "inactive",
685300
- borderDimColor: true,
685301
- borderBottom: false,
685302
- borderLeft: false,
685303
- borderRight: false,
685304
- children: /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685305
- dimColor: true,
685306
- wrap: "truncate",
685307
- children: welcomeTip(mode, props.tip)
685308
- })
685568
+ flexDirection: "column",
685569
+ children: [
685570
+ /* @__PURE__ */ jsx_runtime263.jsx(DashedRule, {
685571
+ width: contentWidth
685572
+ }),
685573
+ /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685574
+ marginTop: 0,
685575
+ children: /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685576
+ dimColor: true,
685577
+ wrap: "truncate",
685578
+ children: `\u25B8 ${welcomeTip(mode, props.tip)}`
685579
+ })
685580
+ })
685581
+ ]
685309
685582
  }),
685310
685583
  props.children && /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685311
685584
  marginTop: 1,
@@ -685314,32 +685587,13 @@ function OccWelcome(props) {
685314
685587
  ]
685315
685588
  });
685316
685589
  }
685317
- var import_react147, jsx_runtime263, WELCOME_MAX_WIDTH = 84, WIDE_MIN_COLUMNS = 76, COMPACT_MIN_COLUMNS = 44, SHIMMER_FRAME_MS = 84, SHIMMER_DURATION_MS = 1850, SHIMMER_BAND_WIDTH = 0.24, OCC_LOGOS;
685590
+ var jsx_runtime263, WELCOME_MAX_WIDTH = 84, WIDE_MIN_COLUMNS = 76, COMPACT_MIN_COLUMNS = 44, LABEL_COLUMN_WIDTH = 7;
685318
685591
  var init_OccWelcome = __esm(() => {
685319
685592
  init_ink2();
685320
- init_stringWidth();
685321
685593
  init_format();
685322
- import_react147 = __toESM(require_react(), 1);
685594
+ init_ThemeProvider();
685595
+ init_OccMark();
685323
685596
  jsx_runtime263 = __toESM(require_jsx_runtime(), 1);
685324
- OCC_LOGOS = {
685325
- wide: normalizeLogo([
685326
- "\u259F\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2599",
685327
- "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B",
685328
- "\u2588\u2588 ",
685329
- "\u2588\u2588 ",
685330
- "\u2588\u2588 ",
685331
- "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259C",
685332
- "\u259C\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B"
685333
- ]),
685334
- compact: normalizeLogo([
685335
- "\u259F\u2588\u2588\u2588\u2588\u2588\u2588\u2599",
685336
- "\u2588\u2588 ",
685337
- "\u2588\u2588 ",
685338
- "\u2588\u2588 ",
685339
- "\u259C\u2588\u2588\u2588\u2588\u2588\u2588\u259B"
685340
- ]),
685341
- plain: normalizeLogo(["\u259F\u2588\u2588\u2588\u2588\u2599", "\u2588\u2588 ", "\u259C\u2588\u2588\u2588\u2588\u259B"])
685342
- };
685343
685597
  });
685344
685598
 
685345
685599
  // src/components/LogoV2/welcomeTips.ts
@@ -686356,7 +686610,9 @@ function LogoV2() {
686356
686610
  if ($4[34] === Symbol.for("react.memo_cache_sentinel")) {
686357
686611
  t122 = /* @__PURE__ */ jsx_runtime270.jsx(ThemedBox_default, {
686358
686612
  marginY: 1,
686359
- children: /* @__PURE__ */ jsx_runtime270.jsx(Clawd, {})
686613
+ children: /* @__PURE__ */ jsx_runtime270.jsx(OccMark, {
686614
+ mode: "compact"
686615
+ })
686360
686616
  });
686361
686617
  $4[34] = t122;
686362
686618
  } else {
@@ -686501,7 +686757,9 @@ function LogoV2() {
686501
686757
  }
686502
686758
  let t19;
686503
686759
  if ($4[48] === Symbol.for("react.memo_cache_sentinel")) {
686504
- t19 = /* @__PURE__ */ jsx_runtime270.jsx(Clawd, {});
686760
+ t19 = /* @__PURE__ */ jsx_runtime270.jsx(OccMark, {
686761
+ mode: "compact"
686762
+ });
686505
686763
  $4[48] = t19;
686506
686764
  } else {
686507
686765
  t19 = $4[48];
@@ -686802,7 +687060,7 @@ var init_LogoV2 = __esm(() => {
686802
687060
  init_logoV2Utils();
686803
687061
  init_format();
686804
687062
  init_file();
686805
- init_Clawd();
687063
+ init_OccMark();
686806
687064
  init_FeedColumn();
686807
687065
  init_feedConfigs();
686808
687066
  init_config4();
@@ -690688,8 +690946,8 @@ function formatSnippet({
690688
690946
  before,
690689
690947
  match,
690690
690948
  after
690691
- }, highlightColor) {
690692
- return source_default.dim(before) + highlightColor(match) + source_default.dim(after);
690949
+ }, highlightColor2) {
690950
+ return source_default.dim(before) + highlightColor2(match) + source_default.dim(after);
690693
690951
  }
690694
690952
  function extractSnippet(text2, query2, contextChars) {
690695
690953
  const matchIndex = text2.toLowerCase().indexOf(query2.toLowerCase());
@@ -690778,7 +691036,7 @@ function LogSelector(t0) {
690778
691036
  } else {
690779
691037
  t5 = $4[4];
690780
691038
  }
690781
- const highlightColor = t5;
691039
+ const highlightColor2 = t5;
690782
691040
  const isAgenticSearchEnabled = false;
690783
691041
  const [currentBranch, setCurrentBranch] = import_react163.default.useState(null);
690784
691042
  const [branchFilterEnabled, setBranchFilterEnabled] = import_react163.default.useState(false);
@@ -691143,14 +691401,14 @@ function LogSelector(t0) {
691143
691401
  break bb2;
691144
691402
  }
691145
691403
  let t302;
691146
- if ($4[66] !== displayedLogs || $4[67] !== highlightColor || $4[68] !== maxLabelWidth || $4[69] !== showAllProjects || $4[70] !== snippets) {
691404
+ if ($4[66] !== displayedLogs || $4[67] !== highlightColor2 || $4[68] !== maxLabelWidth || $4[69] !== showAllProjects || $4[70] !== snippets) {
691147
691405
  const sessionGroups = groupLogsBySessionId(displayedLogs);
691148
691406
  t302 = Array.from(sessionGroups.entries()).map((t312) => {
691149
691407
  const [sessionId, groupLogs] = t312;
691150
691408
  const latestLog = groupLogs[0];
691151
691409
  const indexInFiltered = displayedLogs.indexOf(latestLog);
691152
691410
  const snippet_0 = snippets.get(latestLog);
691153
- const snippetStr = snippet_0 ? formatSnippet(snippet_0, highlightColor) : null;
691411
+ const snippetStr = snippet_0 ? formatSnippet(snippet_0, highlightColor2) : null;
691154
691412
  if (groupLogs.length === 1) {
691155
691413
  const metadata = buildLogMetadata(latestLog, {
691156
691414
  showProjectPath: showAllProjects
@@ -691171,7 +691429,7 @@ function LogSelector(t0) {
691171
691429
  const children3 = groupLogs.slice(1).map((log_8, index2) => {
691172
691430
  const childIndexInFiltered = displayedLogs.indexOf(log_8);
691173
691431
  const childSnippet = snippets.get(log_8);
691174
- const childSnippetStr = childSnippet ? formatSnippet(childSnippet, highlightColor) : null;
691432
+ const childSnippetStr = childSnippet ? formatSnippet(childSnippet, highlightColor2) : null;
691175
691433
  const childMetadata = buildLogMetadata(log_8, {
691176
691434
  isChild: true,
691177
691435
  showProjectPath: showAllProjects
@@ -691210,7 +691468,7 @@ function LogSelector(t0) {
691210
691468
  };
691211
691469
  });
691212
691470
  $4[66] = displayedLogs;
691213
- $4[67] = highlightColor;
691471
+ $4[67] = highlightColor2;
691214
691472
  $4[68] = maxLabelWidth;
691215
691473
  $4[69] = showAllProjects;
691216
691474
  $4[70] = snippets;
@@ -691235,9 +691493,9 @@ function LogSelector(t0) {
691235
691493
  break bb3;
691236
691494
  }
691237
691495
  let t312;
691238
- if ($4[73] !== displayedLogs || $4[74] !== highlightColor || $4[75] !== maxLabelWidth || $4[76] !== showAllProjects || $4[77] !== snippets) {
691496
+ if ($4[73] !== displayedLogs || $4[74] !== highlightColor2 || $4[75] !== maxLabelWidth || $4[76] !== showAllProjects || $4[77] !== snippets) {
691239
691497
  let t323;
691240
- if ($4[79] !== highlightColor || $4[80] !== maxLabelWidth || $4[81] !== showAllProjects || $4[82] !== snippets) {
691498
+ if ($4[79] !== highlightColor2 || $4[80] !== maxLabelWidth || $4[81] !== showAllProjects || $4[82] !== snippets) {
691241
691499
  t323 = (log_9, index_0) => {
691242
691500
  const rawSummary = getLogDisplayTitle(log_9);
691243
691501
  const summaryWithSidechain = rawSummary + (log_9.isSidechain ? " (sidechain)" : "");
@@ -691245,7 +691503,7 @@ function LogSelector(t0) {
691245
691503
  const baseDescription = formatLogMetadata(log_9);
691246
691504
  const projectSuffix = showAllProjects && log_9.projectPath ? ` \xB7 ${log_9.projectPath}` : "";
691247
691505
  const snippet_1 = snippets.get(log_9);
691248
- const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1, highlightColor) : null;
691506
+ const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1, highlightColor2) : null;
691249
691507
  return {
691250
691508
  label: summary,
691251
691509
  description: snippetStr_0 ? `${baseDescription}${projectSuffix}
@@ -691254,7 +691512,7 @@ function LogSelector(t0) {
691254
691512
  value: index_0.toString()
691255
691513
  };
691256
691514
  };
691257
- $4[79] = highlightColor;
691515
+ $4[79] = highlightColor2;
691258
691516
  $4[80] = maxLabelWidth;
691259
691517
  $4[81] = showAllProjects;
691260
691518
  $4[82] = snippets;
@@ -691264,7 +691522,7 @@ function LogSelector(t0) {
691264
691522
  }
691265
691523
  t312 = displayedLogs.map(t323);
691266
691524
  $4[73] = displayedLogs;
691267
- $4[74] = highlightColor;
691525
+ $4[74] = highlightColor2;
691268
691526
  $4[75] = maxLabelWidth;
691269
691527
  $4[76] = showAllProjects;
691270
691528
  $4[77] = snippets;
@@ -700093,6 +700351,114 @@ var init_autocompact2 = __esm(() => {
700093
700351
  autocompact_default = autocompact;
700094
700352
  });
700095
700353
 
700354
+ // src/commands/autocompact/autocompact-noninteractive.ts
700355
+ var exports_autocompact_noninteractive = {};
700356
+ __export(exports_autocompact_noninteractive, {
700357
+ call: () => call44,
700358
+ autocompactNonInteractive: () => autocompactNonInteractive
700359
+ });
700360
+ function resolveWindow(model) {
700361
+ const modelWindow = getContextWindowForModel(model, getSdkBetas());
700362
+ const envRaw = process.env[ENV_WINDOW_KEY];
700363
+ if (envRaw) {
700364
+ const parsed = parseInt(envRaw, 10);
700365
+ if (!isNaN(parsed) && parsed > 0) {
700366
+ return {
700367
+ window: Math.min(modelWindow, parsed),
700368
+ configured: parsed,
700369
+ source: "env"
700370
+ };
700371
+ }
700372
+ }
700373
+ const fromSettings = getInitialSettings().autoCompactWindow;
700374
+ if (typeof fromSettings === "number") {
700375
+ return {
700376
+ window: Math.min(modelWindow, fromSettings),
700377
+ configured: fromSettings,
700378
+ source: "settings"
700379
+ };
700380
+ }
700381
+ return { window: modelWindow, configured: undefined, source: "auto" };
700382
+ }
700383
+ function describeCurrentWindow(model) {
700384
+ const { window: window2, configured, source: source2 } = resolveWindow(model);
700385
+ const cappedSuffix = configured !== undefined && configured > window2 ? ` \xB7 capped to ${formatTokens(window2)} by model` : "";
700386
+ const sourceLine = source2 === "auto" ? "auto" : source2 === "env" ? `${formatTokens(configured)} tokens (from ${ENV_WINDOW_KEY})${cappedSuffix}` : `${formatTokens(configured)} tokens (from settings)${cappedSuffix}`;
700387
+ const lines2 = [`Auto-compact window: ${sourceLine}`];
700388
+ if (!getGlobalConfig().autoCompactEnabled) {
700389
+ lines2.push("Auto-compact is currently disabled (see /config)");
700390
+ }
700391
+ lines2.push("Auto-compact summarizes the conversation when context usage approaches this limit. The actual threshold is the minimum of this setting and your model's maximum context window.");
700392
+ return lines2.join(`
700393
+ `);
700394
+ }
700395
+ async function setWindow(raw, model) {
700396
+ if (process.env[ENV_WINDOW_KEY]) {
700397
+ return `${ENV_WINDOW_KEY} is set and takes precedence. Unset it to change this setting.`;
700398
+ }
700399
+ const normalized = raw.trim().toLowerCase();
700400
+ const parsed = normalized === "reset" || normalized === "unset" || normalized === "default" ? "auto" : parseAutoCompactWindowInput(normalized);
700401
+ if (parsed === undefined) {
700402
+ return `Couldn't parse '${raw}'. Expected 'auto' or 100k\u20131M tokens (e.g. 500k, 200000, or 200 as shorthand)`;
700403
+ }
700404
+ const valueToSave = parsed === "auto" ? undefined : parsed;
700405
+ const { error: error52 } = updateSettingsForSource("userSettings", {
700406
+ autoCompactWindow: valueToSave
700407
+ });
700408
+ if (error52) {
700409
+ return `Couldn't save setting: ${error52.message}`;
700410
+ }
700411
+ const reloaded = getInitialSettings().autoCompactWindow;
700412
+ const { window: window2, source: source2 } = resolveWindow(model);
700413
+ const overrideActive = source2 === "env" || reloaded !== valueToSave;
700414
+ logEvent2("tengu_autocompact_command", {
700415
+ action: parsed === "auto" ? "auto" : "set",
700416
+ ...valueToSave !== undefined && { tokens: valueToSave }
700417
+ });
700418
+ if (parsed === "auto") {
700419
+ return overrideActive ? `Auto-compact window set to auto in settings, but a higher-priority override is active (${formatTokens(window2)} tokens)` : "Auto-compact window set to auto";
700420
+ }
700421
+ let suffix2 = "";
700422
+ if (overrideActive) {
700423
+ suffix2 = `, but a higher-priority override is active (${formatTokens(window2)} tokens)`;
700424
+ } else if (window2 < parsed) {
700425
+ suffix2 = ` (capped to model limit of ${formatTokens(window2)})`;
700426
+ }
700427
+ return `Auto-compact window set to ${formatTokens(parsed)} tokens${suffix2}`;
700428
+ }
700429
+ async function call44(args, context8) {
700430
+ const raw = (args ?? "").trim();
700431
+ const model = context8.options.mainLoopModel;
700432
+ if (!raw) {
700433
+ return { type: "text", value: describeCurrentWindow(model) };
700434
+ }
700435
+ return { type: "text", value: await setWindow(raw, model) };
700436
+ }
700437
+ var ENV_WINDOW_KEY = "CLAUDE_CODE_AUTO_COMPACT_WINDOW", autocompactNonInteractive;
700438
+ var init_autocompact_noninteractive = __esm(() => {
700439
+ init_state();
700440
+ init_analytics();
700441
+ init_autoCompactWindow();
700442
+ init_config4();
700443
+ init_context();
700444
+ init_format();
700445
+ init_settings2();
700446
+ autocompactNonInteractive = {
700447
+ type: "local",
700448
+ name: "autocompact",
700449
+ supportsNonInteractive: true,
700450
+ description: "Configure the auto-compact window size",
700451
+ get isHidden() {
700452
+ return !getIsNonInteractiveSession();
700453
+ },
700454
+ isEnabled() {
700455
+ return getIsNonInteractiveSession();
700456
+ },
700457
+ argumentHint: "[auto|<tokens>]",
700458
+ load: () => Promise.resolve().then(() => (init_autocompact_noninteractive(), exports_autocompact_noninteractive))
700459
+ };
700460
+ });
700461
+
700096
700462
  // src/commands/cd/cdLogic.ts
700097
700463
  import { realpathSync as realpathSync8, statSync as statSync19 } from "fs";
700098
700464
  import { resolve as resolve57 } from "path";
@@ -700293,9 +700659,9 @@ var init_CdDirectoryPicker = __esm(() => {
700293
700659
  // src/commands/cd/cd.tsx
700294
700660
  var exports_cd = {};
700295
700661
  __export(exports_cd, {
700296
- call: () => call44
700662
+ call: () => call45
700297
700663
  });
700298
- var jsx_runtime306, call44 = async (onDone, _context, args) => {
700664
+ var jsx_runtime306, call45 = async (onDone, _context, args) => {
700299
700665
  const trimmed = (args ?? "").trim();
700300
700666
  if (!trimmed) {
700301
700667
  return /* @__PURE__ */ jsx_runtime306.jsx(CdDirectoryPicker, {
@@ -700334,7 +700700,7 @@ var exports_focus = {};
700334
700700
  __export(exports_focus, {
700335
700701
  setFocusViewEnabled: () => setFocusViewEnabled,
700336
700702
  isFocusViewEnabled: () => isFocusViewEnabled,
700337
- call: () => call45
700703
+ call: () => call46
700338
700704
  });
700339
700705
  function isFocusViewEnabled() {
700340
700706
  return focusViewEnabled;
@@ -700350,7 +700716,7 @@ function isFullscreenActive2() {
700350
700716
  return false;
700351
700717
  return isFullscreenEnvEnabled();
700352
700718
  }
700353
- var focusViewEnabled = false, NEEDS_FULLSCREEN, call45 = async (onDone, _context, _args) => {
700719
+ var focusViewEnabled = false, NEEDS_FULLSCREEN, call46 = async (onDone, _context, _args) => {
700354
700720
  if (!isFullscreenActive2()) {
700355
700721
  onDone(NEEDS_FULLSCREEN, { display: "system" });
700356
700722
  return null;
@@ -700386,9 +700752,9 @@ var init_focus3 = __esm(() => {
700386
700752
  // src/commands/powerup/powerup.ts
700387
700753
  var exports_powerup = {};
700388
700754
  __export(exports_powerup, {
700389
- call: () => call46
700755
+ call: () => call47
700390
700756
  });
700391
- var LESSONS, call46 = async (onDone, _context, _args) => {
700757
+ var LESSONS, call47 = async (onDone, _context, _args) => {
700392
700758
  logEvent2("powerup_discovery_shown");
700393
700759
  const unlocked = new Set;
700394
700760
  let lines2 = `Powerup \u2014 discover Claude Code in 5 minutes
@@ -700511,9 +700877,9 @@ var init_awaySummary = __esm(() => {
700511
700877
  // src/commands/recap/recap.ts
700512
700878
  var exports_recap = {};
700513
700879
  __export(exports_recap, {
700514
- call: () => call47
700880
+ call: () => call48
700515
700881
  });
700516
- var NOTHING_TO_RECAP = "Nothing to recap yet \u2014 send a message first.", call47 = async (_args, context8) => {
700882
+ var NOTHING_TO_RECAP = "Nothing to recap yet \u2014 send a message first.", call48 = async (_args, context8) => {
700517
700883
  const messages = context8.messages ?? [];
700518
700884
  if (messages.length === 0) {
700519
700885
  return { type: "text", value: NOTHING_TO_RECAP };
@@ -700545,9 +700911,9 @@ var init_recap2 = __esm(() => {
700545
700911
  // src/commands/reload-skills/reload-skills.ts
700546
700912
  var exports_reload_skills = {};
700547
700913
  __export(exports_reload_skills, {
700548
- call: () => call48
700914
+ call: () => call49
700549
700915
  });
700550
- var call48 = async () => {
700916
+ var call49 = async () => {
700551
700917
  const cwd2 = getProjectRoot();
700552
700918
  clearCommandsCache();
700553
700919
  const commands7 = await getCommands(cwd2);
@@ -700576,9 +700942,9 @@ var init_reload_skills2 = __esm(() => {
700576
700942
  // src/commands/scroll-speed/scroll-speed.tsx
700577
700943
  var exports_scroll_speed = {};
700578
700944
  __export(exports_scroll_speed, {
700579
- call: () => call49
700945
+ call: () => call50
700580
700946
  });
700581
- var jsx_runtime307, call49 = async (onDone, context8) => {
700947
+ var jsx_runtime307, call50 = async (onDone, context8) => {
700582
700948
  return /* @__PURE__ */ jsx_runtime307.jsx(Settings, {
700583
700949
  onClose: onDone,
700584
700950
  context: context8,
@@ -700607,7 +700973,7 @@ var init_scroll_speed2 = __esm(() => {
700607
700973
  // src/commands/tui/tui.ts
700608
700974
  var exports_tui = {};
700609
700975
  __export(exports_tui, {
700610
- call: () => call50
700976
+ call: () => call51
700611
700977
  });
700612
700978
  function getCurrentRenderer() {
700613
700979
  const setting = getSettings_DEPRECATED().tui;
@@ -700617,7 +700983,7 @@ function getCurrentRenderer() {
700617
700983
  return "default";
700618
700984
  return isFullscreenEnvEnabled() ? "fullscreen" : "default";
700619
700985
  }
700620
- var RENDERERS, call50 = async (onDone, _context, args) => {
700986
+ var RENDERERS, call51 = async (onDone, _context, args) => {
700621
700987
  if (isScreenReaderEnabled()) {
700622
700988
  onDone("Screen-reader mode always uses the classic renderer, so the tui setting has no effect while it is active.", { display: "system" });
700623
700989
  return null;
@@ -700932,9 +701298,9 @@ var init_terminalSetup2 = __esm(() => {
700932
701298
  // src/commands/usage/usage.tsx
700933
701299
  var exports_usage = {};
700934
701300
  __export(exports_usage, {
700935
- call: () => call51
701301
+ call: () => call52
700936
701302
  });
700937
- var jsx_runtime308, call51 = async (onDone, context8) => {
701303
+ var jsx_runtime308, call52 = async (onDone, context8) => {
700938
701304
  return /* @__PURE__ */ jsx_runtime308.jsx(Settings, {
700939
701305
  onClose: onDone,
700940
701306
  context: context8,
@@ -700949,9 +701315,9 @@ var init_usage3 = __esm(() => {
700949
701315
  // src/commands/usage/usage-noninteractive.ts
700950
701316
  var exports_usage_noninteractive = {};
700951
701317
  __export(exports_usage_noninteractive, {
700952
- call: () => call52
701318
+ call: () => call53
700953
701319
  });
700954
- var call52 = async () => {
701320
+ var call53 = async () => {
700955
701321
  const parts = [];
700956
701322
  parts.push(formatTotalCost());
700957
701323
  if (isClaudeAISubscriber()) {
@@ -701003,7 +701369,7 @@ var init_usage4 = __esm(() => {
701003
701369
  // src/commands/theme/theme.tsx
701004
701370
  var exports_theme = {};
701005
701371
  __export(exports_theme, {
701006
- call: () => call53
701372
+ call: () => call54
701007
701373
  });
701008
701374
  function ThemePickerCommand(t0) {
701009
701375
  const $4 = import_compiler_runtime224.c(8);
@@ -701054,7 +701420,7 @@ function ThemePickerCommand(t0) {
701054
701420
  }
701055
701421
  return t32;
701056
701422
  }
701057
- var import_compiler_runtime224, jsx_runtime309, call53 = async (onDone, _context) => {
701423
+ var import_compiler_runtime224, jsx_runtime309, call54 = async (onDone, _context) => {
701058
701424
  return /* @__PURE__ */ jsx_runtime309.jsx(ThemePickerCommand, {
701059
701425
  onDone
701060
701426
  });
@@ -701084,7 +701450,7 @@ var init_theme4 = __esm(() => {
701084
701450
  var exports_thinkback = {};
701085
701451
  __export(exports_thinkback, {
701086
701452
  playAnimation: () => playAnimation,
701087
- call: () => call54
701453
+ call: () => call55
701088
701454
  });
701089
701455
  import { readFile as readFile56 } from "fs/promises";
701090
701456
  import { join as join153 } from "path";
@@ -701621,7 +701987,7 @@ function ThinkbackFlow(t0) {
701621
701987
  }
701622
701988
  return t8;
701623
701989
  }
701624
- async function call54(onDone) {
701990
+ async function call55(onDone) {
701625
701991
  return /* @__PURE__ */ jsx_runtime310.jsx(ThinkbackFlow, {
701626
701992
  onDone
701627
701993
  });
@@ -701669,14 +702035,14 @@ var init_thinkback2 = __esm(() => {
701669
702035
  // src/commands/thinkback-play/thinkback-play.ts
701670
702036
  var exports_thinkback_play = {};
701671
702037
  __export(exports_thinkback_play, {
701672
- call: () => call55
702038
+ call: () => call56
701673
702039
  });
701674
702040
  import { join as join154 } from "path";
701675
702041
  function getPluginId2() {
701676
702042
  const marketplaceName = process.env.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
701677
702043
  return `thinkback@${marketplaceName}`;
701678
702044
  }
701679
- async function call55() {
702045
+ async function call56() {
701680
702046
  const v2Data = loadInstalledPluginsV2();
701681
702047
  const pluginId = getPluginId2();
701682
702048
  const installations = v2Data.plugins[pluginId];
@@ -704163,9 +704529,9 @@ var init_PermissionRuleList = __esm(() => {
704163
704529
  // src/commands/permissions/permissions.tsx
704164
704530
  var exports_permissions2 = {};
704165
704531
  __export(exports_permissions2, {
704166
- call: () => call56
704532
+ call: () => call57
704167
704533
  });
704168
- var jsx_runtime318, call56 = async (onDone, context8) => {
704534
+ var jsx_runtime318, call57 = async (onDone, context8) => {
704169
704535
  return /* @__PURE__ */ jsx_runtime318.jsx(PermissionRuleList, {
704170
704536
  onExit: onDone,
704171
704537
  onRetryDenials: (commands7) => {
@@ -704195,7 +704561,7 @@ var init_permissions4 = __esm(() => {
704195
704561
  // src/commands/plan/plan.tsx
704196
704562
  var exports_plan = {};
704197
704563
  __export(exports_plan, {
704198
- call: () => call57
704564
+ call: () => call58
704199
704565
  });
704200
704566
  function PlanDisplay(t0) {
704201
704567
  const $4 = import_compiler_runtime233.c(11);
@@ -704283,7 +704649,7 @@ function PlanDisplay(t0) {
704283
704649
  }
704284
704650
  return t5;
704285
704651
  }
704286
- async function call57(onDone, context8, args) {
704652
+ async function call58(onDone, context8, args) {
704287
704653
  const {
704288
704654
  getAppState,
704289
704655
  setAppState
@@ -704429,7 +704795,7 @@ var init_FastIcon = __esm(() => {
704429
704795
  // src/commands/fast/fast.tsx
704430
704796
  var exports_fast = {};
704431
704797
  __export(exports_fast, {
704432
- call: () => call58,
704798
+ call: () => call59,
704433
704799
  FastModePicker: () => FastModePicker
704434
704800
  });
704435
704801
  function applyFastMode(enable2, setAppState) {
@@ -704750,7 +705116,7 @@ async function handleFastModeShortcut(enable2, getAppState, setAppState) {
704750
705116
  return `Fast mode OFF`;
704751
705117
  }
704752
705118
  }
704753
- async function call58(onDone, context8, args) {
705119
+ async function call59(onDone, context8, args) {
704754
705120
  if (!isFastModeEnabled()) {
704755
705121
  return null;
704756
705122
  }
@@ -705069,9 +705435,9 @@ var init_Passes = __esm(() => {
705069
705435
  // src/commands/passes/passes.tsx
705070
705436
  var exports_passes = {};
705071
705437
  __export(exports_passes, {
705072
- call: () => call59
705438
+ call: () => call60
705073
705439
  });
705074
- async function call59(onDone) {
705440
+ async function call60(onDone) {
705075
705441
  const config8 = getGlobalConfig();
705076
705442
  const isFirstVisit = !config8.hasVisitedPasses;
705077
705443
  if (isFirstVisit) {
@@ -705843,9 +706209,9 @@ var init_Grove = __esm(() => {
705843
706209
  // src/commands/privacy-settings/privacy-settings.tsx
705844
706210
  var exports_privacy_settings = {};
705845
706211
  __export(exports_privacy_settings, {
705846
- call: () => call60
706212
+ call: () => call61
705847
706213
  });
705848
- async function call60(onDone) {
706214
+ async function call61(onDone) {
705849
706215
  const qualified = await isQualifiedForGrove();
705850
706216
  if (!qualified) {
705851
706217
  onDone(FALLBACK_MESSAGE);
@@ -707731,9 +708097,9 @@ var init_HooksConfigMenu = __esm(() => {
707731
708097
  // src/commands/hooks/hooks.tsx
707732
708098
  var exports_hooks = {};
707733
708099
  __export(exports_hooks, {
707734
- call: () => call61
708100
+ call: () => call62
707735
708101
  });
707736
- var jsx_runtime331, call61 = async (onDone, context8) => {
708102
+ var jsx_runtime331, call62 = async (onDone, context8) => {
707737
708103
  logEvent2("tengu_hooks_command", {});
707738
708104
  const appState = context8.getAppState();
707739
708105
  const permissionContext = appState.toolPermissionContext;
@@ -707766,10 +708132,10 @@ var init_hooks3 = __esm(() => {
707766
708132
  // src/commands/files/files.ts
707767
708133
  var exports_files2 = {};
707768
708134
  __export(exports_files2, {
707769
- call: () => call62
708135
+ call: () => call63
707770
708136
  });
707771
708137
  import { relative as relative30 } from "path";
707772
- async function call62(_args, context8) {
708138
+ async function call63(_args, context8) {
707773
708139
  const files2 = context8.readFileState ? cacheKeys(context8.readFileState) : [];
707774
708140
  if (files2.length === 0) {
707775
708141
  return { type: "text", value: "No files in context" };
@@ -707802,7 +708168,7 @@ var init_files5 = __esm(() => {
707802
708168
  var exports_branch = {};
707803
708169
  __export(exports_branch, {
707804
708170
  deriveFirstPrompt: () => deriveFirstPrompt,
707805
- call: () => call63
708171
+ call: () => call64
707806
708172
  });
707807
708173
  import { randomUUID as randomUUID37 } from "crypto";
707808
708174
  import { mkdir as mkdir46, readFile as readFile57, writeFile as writeFile50 } from "fs/promises";
@@ -707922,7 +708288,7 @@ async function getUniqueForkName(baseName) {
707922
708288
  }
707923
708289
  return `${baseName} (Branch ${nextNumber})`;
707924
708290
  }
707925
- async function call63(onDone, context8, args) {
708291
+ async function call64(onDone, context8, args) {
707926
708292
  const customTitle = args?.trim() || undefined;
707927
708293
  const originalSessionId = getSessionId();
707928
708294
  try {
@@ -708001,9 +708367,9 @@ var init_branch2 = __esm(() => {
708001
708367
  // src/commands/agents/agents.ts
708002
708368
  var exports_agents = {};
708003
708369
  __export(exports_agents, {
708004
- call: () => call64
708370
+ call: () => call65
708005
708371
  });
708006
- var call64 = async () => ({
708372
+ var call65 = async () => ({
708007
708373
  type: "text",
708008
708374
  value: `The /agents wizard has been removed.
708009
708375
  Ask Claude to create or update subagents for you (e.g. "create a code-reviewer subagent that ..."),
@@ -708029,9 +708395,9 @@ var init_agents = __esm(() => {
708029
708395
  // src/commands/plugin/plugin.tsx
708030
708396
  var exports_plugin = {};
708031
708397
  __export(exports_plugin, {
708032
- call: () => call65
708398
+ call: () => call66
708033
708399
  });
708034
- async function call65(onDone, _context, args) {
708400
+ async function call66(onDone, _context, args) {
708035
708401
  return /* @__PURE__ */ jsx_runtime332.jsx(PluginSettings, {
708036
708402
  onComplete: onDone,
708037
708403
  args
@@ -708578,12 +708944,12 @@ var init_refresh = __esm(() => {
708578
708944
  // src/commands/reload-plugins/reload-plugins.ts
708579
708945
  var exports_reload_plugins = {};
708580
708946
  __export(exports_reload_plugins, {
708581
- call: () => call66
708947
+ call: () => call67
708582
708948
  });
708583
708949
  function n5(count4, noun) {
708584
708950
  return `${count4} ${plural(count4, noun)}`;
708585
708951
  }
708586
- var call66 = async (_args, context8) => {
708952
+ var call67 = async (_args, context8) => {
708587
708953
  if (feature("DOWNLOAD_USER_SETTINGS") && (isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) || getIsRemoteMode())) {
708588
708954
  const applied = await redownloadUserSettings();
708589
708955
  if (applied) {
@@ -708641,9 +709007,9 @@ var init_resumeBeforeClear = __esm(() => {
708641
709007
  // src/commands/rewind/rewind.ts
708642
709008
  var exports_rewind = {};
708643
709009
  __export(exports_rewind, {
708644
- call: () => call67
709010
+ call: () => call68
708645
709011
  });
708646
- async function call67(_args, context8) {
709012
+ async function call68(_args, context8) {
708647
709013
  if (context8.openMessageSelector) {
708648
709014
  context8.openMessageSelector();
708649
709015
  }
@@ -708831,9 +709197,9 @@ var init_heapDumpService = __esm(() => {
708831
709197
  // src/commands/heapdump/heapdump.ts
708832
709198
  var exports_heapdump = {};
708833
709199
  __export(exports_heapdump, {
708834
- call: () => call68
709200
+ call: () => call69
708835
709201
  });
708836
- async function call68() {
709202
+ async function call69() {
708837
709203
  const result = await performHeapDump();
708838
709204
  if (!result.success) {
708839
709205
  return {
@@ -709204,7 +709570,7 @@ var USAGE = `/bridge-kick <subcommand>
709204
709570
  reconnect-session fail next POST /bridge/reconnect fails
709205
709571
  heartbeat <status> next heartbeat throws BridgeFatalError(status)
709206
709572
  reconnect call reconnectEnvironmentWithSession directly
709207
- status print bridge state`, call69 = async (args) => {
709573
+ status print bridge state`, call70 = async (args) => {
709208
709574
  const h5 = getBridgeDebugHandle();
709209
709575
  if (!h5) {
709210
709576
  return {
@@ -709337,13 +709703,13 @@ var init_bridge_kick = __esm(() => {
709337
709703
  description: "Inject bridge failure states for manual recovery testing",
709338
709704
  isEnabled: () => process.env.USER_TYPE === "ant",
709339
709705
  supportsNonInteractive: false,
709340
- load: () => Promise.resolve({ call: call69 })
709706
+ load: () => Promise.resolve({ call: call70 })
709341
709707
  };
709342
709708
  bridge_kick_default = bridgeKick;
709343
709709
  });
709344
709710
 
709345
709711
  // src/commands/version.ts
709346
- var call70 = async () => {
709712
+ var call71 = async () => {
709347
709713
  return {
709348
709714
  type: "text",
709349
709715
  value: MACRO.BUILD_TIME ? `${MACRO.VERSION} (built ${MACRO.BUILD_TIME})` : MACRO.VERSION
@@ -709356,7 +709722,7 @@ var init_version = __esm(() => {
709356
709722
  description: "Print the version this session is running (not what autoupdate downloaded)",
709357
709723
  isEnabled: () => process.env.USER_TYPE === "ant",
709358
709724
  supportsNonInteractive: true,
709359
- load: () => Promise.resolve({ call: call70 })
709725
+ load: () => Promise.resolve({ call: call71 })
709360
709726
  };
709361
709727
  version_default = version5;
709362
709728
  });
@@ -710516,10 +710882,10 @@ var init_SandboxSettings = __esm(() => {
710516
710882
  // src/commands/sandbox-toggle/sandbox-toggle.tsx
710517
710883
  var exports_sandbox_toggle = {};
710518
710884
  __export(exports_sandbox_toggle, {
710519
- call: () => call71
710885
+ call: () => call72
710520
710886
  });
710521
710887
  import { relative as relative31 } from "path";
710522
- async function call71(onDone, _context, args) {
710888
+ async function call72(onDone, _context, args) {
710523
710889
  const settings = getSettings_DEPRECATED();
710524
710890
  const themeName = settings.theme || "light";
710525
710891
  const platform6 = getPlatform();
@@ -710901,7 +711267,7 @@ var init_setup2 = __esm(() => {
710901
711267
  // src/commands/chrome/chrome.tsx
710902
711268
  var exports_chrome2 = {};
710903
711269
  __export(exports_chrome2, {
710904
- call: () => call72
711270
+ call: () => call73
710905
711271
  });
710906
711272
  function ClaudeInChromeMenu(t0) {
710907
711273
  const $4 = import_compiler_runtime246.c(41);
@@ -711268,7 +711634,7 @@ function _temp266(c9) {
711268
711634
  function _temp158(s4) {
711269
711635
  return s4.mcp.clients;
711270
711636
  }
711271
- var import_compiler_runtime246, import_react181, jsx_runtime338, CHROME_EXTENSION_URL = "https://claude.ai/chrome", CHROME_PERMISSIONS_URL = "https://clau.de/chrome/permissions", CHROME_RECONNECT_URL = "https://clau.de/chrome/reconnect", call72 = async function(onDone) {
711637
+ var import_compiler_runtime246, import_react181, jsx_runtime338, CHROME_EXTENSION_URL = "https://claude.ai/chrome", CHROME_PERMISSIONS_URL = "https://clau.de/chrome/permissions", CHROME_RECONNECT_URL = "https://clau.de/chrome/reconnect", call73 = async function(onDone) {
711272
711638
  const isExtensionInstalled = await isChromeExtensionInstalled();
711273
711639
  const config8 = getGlobalConfig();
711274
711640
  const isSubscriber2 = isClaudeAISubscriber();
@@ -711316,9 +711682,9 @@ var init_chrome3 = __esm(() => {
711316
711682
  // src/commands/stickers/stickers.ts
711317
711683
  var exports_stickers = {};
711318
711684
  __export(exports_stickers, {
711319
- call: () => call73
711685
+ call: () => call74
711320
711686
  });
711321
- async function call73() {
711687
+ async function call74() {
711322
711688
  const url3 = "https://www.stickermule.com/claudecode";
711323
711689
  const success2 = await openBrowser(url3);
711324
711690
  if (success2) {
@@ -711348,7 +711714,7 @@ var init_stickers2 = __esm(() => {
711348
711714
  });
711349
711715
 
711350
711716
  // src/commands/advisor.ts
711351
- var call74 = async (args, context8) => {
711717
+ var call75 = async (args, context8) => {
711352
711718
  const arg = args.trim().toLowerCase();
711353
711719
  const baseModel = parseUserSpecifiedModel(context8.getAppState().mainLoopModel ?? getDefaultMainLoopModelSetting());
711354
711720
  if (!arg) {
@@ -711441,7 +711807,7 @@ var init_advisor2 = __esm(() => {
711441
711807
  return !canUserConfigureAdvisor();
711442
711808
  },
711443
711809
  supportsNonInteractive: true,
711444
- load: () => Promise.resolve({ call: call74 })
711810
+ load: () => Promise.resolve({ call: call75 })
711445
711811
  };
711446
711812
  advisor_default = advisor;
711447
711813
  });
@@ -711857,13 +712223,13 @@ var init_ExitFlow = __esm(() => {
711857
712223
  // src/commands/exit/exit.tsx
711858
712224
  var exports_exit = {};
711859
712225
  __export(exports_exit, {
711860
- call: () => call75
712226
+ call: () => call76
711861
712227
  });
711862
712228
  import { spawnSync as spawnSync11 } from "child_process";
711863
712229
  function getRandomGoodbyeMessage2() {
711864
712230
  return sample_default(GOODBYE_MESSAGES2) ?? "Goodbye!";
711865
712231
  }
711866
- async function call75(onDone) {
712232
+ async function call76(onDone) {
711867
712233
  if (feature("BG_SESSIONS") && isBgSession()) {
711868
712234
  onDone();
711869
712235
  spawnSync11("tmux", ["detach-client"], {
@@ -712166,7 +712532,7 @@ __export(exports_export, {
712166
712532
  sanitizeFilename: () => sanitizeFilename,
712167
712533
  resolveExportFilepath: () => resolveExportFilepath,
712168
712534
  extractFirstPrompt: () => extractFirstPrompt,
712169
- call: () => call76
712535
+ call: () => call77
712170
712536
  });
712171
712537
  import { dirname as dirname70 } from "path";
712172
712538
  import { mkdirSync as mkdirSync12 } from "fs";
@@ -712213,7 +712579,7 @@ async function exportWithReactRenderer(context8) {
712213
712579
  const tools = context8.options.tools || [];
712214
712580
  return renderMessagesToPlainText(context8.messages, tools);
712215
712581
  }
712216
- async function call76(onDone, context8, args) {
712582
+ async function call77(onDone, context8, args) {
712217
712583
  const content = await exportWithReactRenderer(context8);
712218
712584
  const filename = args.trim();
712219
712585
  if (filename) {
@@ -712273,7 +712639,7 @@ var init_export2 = __esm(() => {
712273
712639
  // src/commands/model/model.tsx
712274
712640
  var exports_model2 = {};
712275
712641
  __export(exports_model2, {
712276
- call: () => call77
712642
+ call: () => call78
712277
712643
  });
712278
712644
  function ModelPickerWrapper({ onDone }) {
712279
712645
  const mainLoopModel = useAppState((s4) => s4.mainLoopModel);
@@ -712507,7 +712873,7 @@ function renderModelLabel(model) {
712507
712873
  const rendered = renderDefaultModelSetting(model ?? getDefaultMainLoopModelSetting());
712508
712874
  return model === null ? `${rendered} (default)` : rendered;
712509
712875
  }
712510
- var React106, jsx_runtime345, MODEL_PICKER_PIN_HEADER = "Switch between Claude models. Your pick becomes the default for new sessions. For other/previous model names, specify with --model.", call77 = async (onDone, _context, args) => {
712876
+ var React106, jsx_runtime345, MODEL_PICKER_PIN_HEADER = "Switch between Claude models. Your pick becomes the default for new sessions. For other/previous model names, specify with --model.", call78 = async (onDone, _context, args) => {
712511
712877
  args = args?.trim() || "";
712512
712878
  if (COMMON_INFO_ARGS.includes(args)) {
712513
712879
  logEvent2("tengu_model_command_inline_help", {
@@ -713073,9 +713439,9 @@ var init_RemoteEnvironmentDialog = __esm(() => {
713073
713439
  // src/commands/remote-env/remote-env.tsx
713074
713440
  var exports_remote_env = {};
713075
713441
  __export(exports_remote_env, {
713076
- call: () => call78
713442
+ call: () => call79
713077
713443
  });
713078
- async function call78(onDone) {
713444
+ async function call79(onDone) {
713079
713445
  return /* @__PURE__ */ jsx_runtime347.jsx(RemoteEnvironmentDialog, {
713080
713446
  onDone
713081
713447
  });
@@ -713106,9 +713472,9 @@ var init_remote_env2 = __esm(() => {
713106
713472
  // src/commands/upgrade/upgrade.tsx
713107
713473
  var exports_upgrade = {};
713108
713474
  __export(exports_upgrade, {
713109
- call: () => call79
713475
+ call: () => call80
713110
713476
  });
713111
- async function call79(onDone, context8) {
713477
+ async function call80(onDone, context8) {
713112
713478
  try {
713113
713479
  if (isClaudeAISubscriber()) {
713114
713480
  const tokens = getClaudeAIOAuthTokens();
@@ -713201,7 +713567,7 @@ var init_usage_credits2 = __esm(() => {
713201
713567
  // src/commands/rate-limit-options/rate-limit-options.tsx
713202
713568
  var exports_rate_limit_options = {};
713203
713569
  __export(exports_rate_limit_options, {
713204
- call: () => call80
713570
+ call: () => call81
713205
713571
  });
713206
713572
  function RateLimitOptionsMenu(t0) {
713207
713573
  const $4 = import_compiler_runtime249.c(25);
@@ -713335,7 +713701,7 @@ function RateLimitOptionsMenu(t0) {
713335
713701
  t5 = function handleSelect2(value) {
713336
713702
  if (value === "upgrade") {
713337
713703
  logEvent2("tengu_rate_limit_options_menu_select_upgrade", {});
713338
- call79(onDone, context8).then((jsx346) => {
713704
+ call80(onDone, context8).then((jsx346) => {
713339
713705
  if (jsx346) {
713340
713706
  setSubCommandJSX(jsx346);
713341
713707
  }
@@ -713395,7 +713761,7 @@ function RateLimitOptionsMenu(t0) {
713395
713761
  }
713396
713762
  return t7;
713397
713763
  }
713398
- async function call80(onDone, context8) {
713764
+ async function call81(onDone, context8) {
713399
713765
  return /* @__PURE__ */ jsx_runtime349.jsx(RateLimitOptionsMenu, {
713400
713766
  onDone,
713401
713767
  context: context8
@@ -713469,7 +713835,7 @@ var exports_effort = {};
713469
713835
  __export(exports_effort, {
713470
713836
  showCurrentEffort: () => showCurrentEffort,
713471
713837
  executeEffort: () => executeEffort,
713472
- call: () => call81
713838
+ call: () => call82
713473
713839
  });
713474
713840
  function setEffortValue(effortValue) {
713475
713841
  const persistable = toPersistableEffort(effortValue);
@@ -713641,7 +714007,7 @@ function ApplyEffortAndClose(t0) {
713641
714007
  React108.useEffect(t1, t22);
713642
714008
  return null;
713643
714009
  }
713644
- async function call81(onDone, _context, args) {
714010
+ async function call82(onDone, _context, args) {
713645
714011
  args = args?.trim() || "";
713646
714012
  if (COMMON_HELP_ARGS2.includes(args)) {
713647
714013
  onDone(`Usage: /effort [low|medium|high|max|ultracode|auto]
@@ -713754,7 +714120,7 @@ var init_team_onboarding = __esm(() => {
713754
714120
  });
713755
714121
 
713756
714122
  // src/commands/setup-bedrock.ts
713757
- var DEFAULT_REGION = "us-east-1", call82 = async (args) => {
714123
+ var DEFAULT_REGION = "us-east-1", call83 = async (args) => {
713758
714124
  const parts = args.trim().split(/\s+/).filter(Boolean);
713759
714125
  const region = parts[0] || DEFAULT_REGION;
713760
714126
  const model = parts[1];
@@ -713793,13 +714159,13 @@ var init_setup_bedrock = __esm(() => {
713793
714159
  description: "Configure AWS Bedrock as the API provider",
713794
714160
  argumentHint: "[aws-region] [model]",
713795
714161
  supportsNonInteractive: true,
713796
- load: () => Promise.resolve({ call: call82 })
714162
+ load: () => Promise.resolve({ call: call83 })
713797
714163
  };
713798
714164
  setup_bedrock_default = setupBedrock;
713799
714165
  });
713800
714166
 
713801
714167
  // src/commands/setup-vertex.ts
713802
- var DEFAULT_REGION2 = "us-east5", call83 = async (args) => {
714168
+ var DEFAULT_REGION2 = "us-east5", call84 = async (args) => {
713803
714169
  const parts = args.trim().split(/\s+/).filter(Boolean);
713804
714170
  const projectId = parts[0];
713805
714171
  const region = parts[1] || DEFAULT_REGION2;
@@ -713847,7 +714213,7 @@ var init_setup_vertex = __esm(() => {
713847
714213
  description: "Configure Google Vertex AI as the API provider",
713848
714214
  argumentHint: "[gcp-project-id] [region] [model]",
713849
714215
  supportsNonInteractive: true,
713850
- load: () => Promise.resolve({ call: call83 })
714216
+ load: () => Promise.resolve({ call: call84 })
713851
714217
  };
713852
714218
  setup_vertex_default = setupVertex;
713853
714219
  });
@@ -714441,7 +714807,7 @@ var init_assistant2 = () => {};
714441
714807
  // src/commands/bridge/bridge.tsx
714442
714808
  var exports_bridge = {};
714443
714809
  __export(exports_bridge, {
714444
- call: () => call84
714810
+ call: () => call85
714445
714811
  });
714446
714812
  function BridgeToggle(t0) {
714447
714813
  const $4 = import_compiler_runtime253.c(10);
@@ -714945,7 +715311,7 @@ async function checkBridgePrerequisites() {
714945
715311
  logForDebugging("[bridge] Prerequisites passed, enabling bridge");
714946
715312
  return null;
714947
715313
  }
714948
- async function call84(onDone, _context, args) {
715314
+ async function call85(onDone, _context, args) {
714949
715315
  const name3 = args.trim() || undefined;
714950
715316
  return /* @__PURE__ */ jsx_runtime354.jsx(BridgeToggle, {
714951
715317
  onDone,
@@ -715753,9 +716119,9 @@ var init_useVoice = __esm(() => {
715753
716119
  // src/commands/voice/voice.ts
715754
716120
  var exports_voice3 = {};
715755
716121
  __export(exports_voice3, {
715756
- call: () => call85
716122
+ call: () => call86
715757
716123
  });
715758
- var LANG_HINT_MAX_SHOWS = 2, call85 = async () => {
716124
+ var LANG_HINT_MAX_SHOWS = 2, call86 = async () => {
715759
716125
  if (!isVoiceModeEnabled()) {
715760
716126
  if (!isAnthropicAuthEnabled()) {
715761
716127
  return {
@@ -716480,9 +716846,9 @@ var init_WorkflowDetailDialog2 = __esm(() => {
716480
716846
  // src/commands/workflows/workflows.tsx
716481
716847
  var exports_workflows = {};
716482
716848
  __export(exports_workflows, {
716483
- call: () => call86
716849
+ call: () => call87
716484
716850
  });
716485
- var jsx_runtime356, call86 = (onDone, _context, _args) => {
716851
+ var jsx_runtime356, call87 = (onDone, _context, _args) => {
716486
716852
  logEvent2("workflow_history_dialog", {});
716487
716853
  return Promise.resolve(/* @__PURE__ */ jsx_runtime356.jsx(WorkflowDetailDialog3, {
716488
716854
  onDone
@@ -716661,7 +717027,7 @@ var init_api5 = __esm(() => {
716661
717027
  // src/commands/remote-setup/remote-setup.tsx
716662
717028
  var exports_remote_setup = {};
716663
717029
  __export(exports_remote_setup, {
716664
- call: () => call87
717030
+ call: () => call88
716665
717031
  });
716666
717032
  async function checkLoginState() {
716667
717033
  if (!await isSignedIn()) {
@@ -716821,7 +717187,7 @@ function Web({
716821
717187
  ]
716822
717188
  });
716823
717189
  }
716824
- async function call87(onDone) {
717190
+ async function call88(onDone) {
716825
717191
  return /* @__PURE__ */ jsx_runtime357.jsx(Web, {
716826
717192
  onDone
716827
717193
  });
@@ -716999,10 +717365,10 @@ var init_confirmation = __esm(() => {
716999
717365
  // src/commands/fork/fork.ts
717000
717366
  var exports_fork = {};
717001
717367
  __export(exports_fork, {
717002
- call: () => call88
717368
+ call: () => call89
717003
717369
  });
717004
717370
  import { randomUUID as randomUUID38 } from "crypto";
717005
- var call88 = async (onDone, context8, args) => {
717371
+ var call89 = async (onDone, context8, args) => {
717006
717372
  const directive = (args ?? "").trim();
717007
717373
  if (!directive) {
717008
717374
  onDone("Usage: /fork <directive>", { display: "system" });
@@ -719496,6 +719862,7 @@ var init_commands5 = __esm(() => {
719496
719862
  init_tasks4();
719497
719863
  init_teleport2();
719498
719864
  init_autocompact2();
719865
+ init_autocompact_noninteractive();
719499
719866
  init_cd2();
719500
719867
  init_focus3();
719501
719868
  init_powerup2();
@@ -719629,6 +719996,7 @@ var init_commands5 = __esm(() => {
719629
719996
  advisor_default,
719630
719997
  agents_default,
719631
719998
  autocompact_default,
719999
+ autocompactNonInteractive,
719632
720000
  autofix_pr_default,
719633
720001
  background_default,
719634
720002
  branch_default,
@@ -725334,7 +725702,7 @@ Your response must be a JSON object matching one of the following schemas:
725334
725702
  blockingError: `Prompt hook condition was not met: ${parsed.data.reason}`,
725335
725703
  command: hook.prompt
725336
725704
  },
725337
- preventContinuation: hook.continueOnBlock !== true,
725705
+ preventContinuation: hookEvent !== "Stop" && hookEvent !== "SubagentStop" && hook.continueOnBlock !== true,
725338
725706
  stopReason: parsed.data.reason
725339
725707
  };
725340
725708
  }
@@ -823655,6 +824023,7 @@ async function run() {
823655
824023
  return !["false", "0", "no", "off"].includes(raw);
823656
824024
  })).addOption(new Option("--exclude-dynamic-system-prompt-sections", "Move per-machine sections (cwd, env info, memory paths, git status) from the system prompt into the first user message. Improves cross-user prompt-cache reuse. Only applies with the default system prompt (ignored with --system-prompt).").default(false)).option("--plugin-url <url>", "Fetch a plugin .zip from a URL for this session only (repeatable: --plugin-url A --plugin-url B)", (val, prev) => [...prev, val], []).option("--bg, --background", "Start the session as a background agent. OCC note: background sessions are managed via the `daemon` and `agents` subcommands (e.g. `occ daemon start`, `occ agents`, `occ attach <id>`) \u2014 see `occ daemon --help`. This flag is accepted for CLI compatibility but does not start a foreground REPL.").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable Claude in Chrome integration").option("--no-chrome", "Disable Claude in Chrome integration").option("--file <specs...>", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)").action(async (prompt, options) => {
823657
824025
  profileCheckpoint("action_handler_start");
824026
+ setSessionAutoCompactWindow(resolveAutoCompactWindowOverride(options.autocompact));
823658
824027
  const bgFlag = options.bg || options.background;
823659
824028
  if (bgFlag) {
823660
824029
  console.error("Error: OCC manages background sessions via the `daemon` and `agents` subcommands, not the `--bg` flag.\n Start a background daemon: `occ daemon start`\n View background sessions: `occ agents`\n Resume a background session: `occ attach <id>`\n See `occ daemon --help` and `occ agents --help`.");
@@ -825730,6 +826099,13 @@ Usage: occ --remote "your task description"`, () => gracefulShutdown(1));
825730
826099
  if (canUserConfigureAdvisor()) {
825731
826100
  program3.addOption(new Option("--advisor <model>", "Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());
825732
826101
  }
826102
+ program3.addOption(new Option("--autocompact <auto|tokens>", "Auto-compact window size (auto, or 100k\u20131M tokens)").argParser((value) => {
826103
+ const parsed = parseAutoCompactWindowInput(value);
826104
+ if (parsed === undefined) {
826105
+ throw new InvalidArgumentError("It must be 'auto', or between 100k and 1M (e.g. 500k, 200000, or 200 as shorthand)");
826106
+ }
826107
+ return parsed;
826108
+ }));
825733
826109
  if (false) {}
825734
826110
  if (feature("TRANSCRIPT_CLASSIFIER")) {
825735
826111
  program3.addOption(new Option("--enable-auto-mode", "Opt in to auto mode").hideHelp());
@@ -826399,6 +826775,7 @@ var init_main7 = __esm(() => {
826399
826775
  init_asciicast();
826400
826776
  init_auth6();
826401
826777
  init_config4();
826778
+ init_autoCompactWindow();
826402
826779
  init_earlyInput();
826403
826780
  init_effort();
826404
826781
  init_fastMode();