@cnwenf/occ 2.1.293 → 2.1.294

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm version](https://img.shields.io/npm/v/@cnwenf/occ.svg)](https://www.npmjs.com/package/@cnwenf/occ)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
7
7
  [![Runtime: Bun](https://img.shields.io/badge/Runtime-Bun-%23000000.svg)](https://bun.sh/)
8
- [![Tracks: Claude Code 2.1.221](https://img.shields.io/badge/Tracks-Claude%20Code%202.1.221-blueviolet.svg)](https://docs.anthropic.com/en/docs/claude-code)
8
+ [![Tracks: Claude Code 2.1.223](https://img.shields.io/badge/Tracks-Claude%20Code%202.1.223-blueviolet.svg)](https://docs.anthropic.com/en/docs/claude-code)
9
9
 
10
10
  [简体中文](./README.zh-CN.md) · **English**
11
11
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## What is OCC
15
15
 
16
- **Open C Code (OCC)** is an open-source coding agent. Its capabilities are aligned with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (currently tracking `2.1.221` — 2.1.218 fully aligned, 2.1.219 + 2.1.221 partial per OCC-44 gap report). The code is fully open, auditable, backdoor-free, and your data stays under your control.
16
+ **Open C Code (OCC)** is an open-source coding agent. Its capabilities are aligned with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (currently tracking `2.1.223` — 2.1.218 fully aligned, 2.1.219 + 2.1.221 + 2.1.223 partial, 2.1.222 staged, per OCC-46 gap report). The code is fully open, auditable, backdoor-free, and your data stays under your control.
17
17
 
18
18
  If you worry that a closed-source CLI might hide backdoors, or that your code and credentials are uploaded to unauditable services, OCC is for you: all source is open and unobfuscated, the build is reproducible from source, and API credentials are sent only to endpoints you configure.
19
19
 
@@ -62,7 +62,7 @@ Requires a valid Anthropic API Key (or AWS Bedrock / Google Vertex / Azure Found
62
62
  | **Auditability** | Line-by-line reviewable | No |
63
63
  | **Telemetry** | Minimal (analytics stubbed) | Standard |
64
64
  | **Data sovereignty** | Credentials stay on your machine; requests only to endpoints you configure | Anthropic endpoints |
65
- | **Capability parity** | Tracks CC `2.1.221` (partial) | Reference implementation |
65
+ | **Capability parity** | Tracks CC `2.1.223` (partial) | Reference implementation |
66
66
  | **Providers** | Anthropic Direct, Bedrock, Vertex, Azure | Anthropic, Bedrock, Vertex |
67
67
  | **Cost** | Free & open-source (MIT) | Subscription |
68
68
  | **Build** | Reproducible from source | N/A |
@@ -157,7 +157,7 @@ For architecture, entry/bootstrap, tool system, UI layer, and module-status deta
157
157
 
158
158
  ## Status
159
159
 
160
- - Tracks Claude Code **`2.1.221` (partial)** (2.1.218 fully aligned; 2.1.219 + 2.1.221 partial — see `docs/upstream-version-gap-occ44.md`).
160
+ - Tracks Claude Code **`2.1.223` (partial)** (2.1.218 fully aligned; 2.1.219 + 2.1.221 + 2.1.223 partial, 2.1.222 staged — see `docs/upstream-version-gap-occ46.md`).
161
161
  - Published to npm as [`@cnwenf/occ`](https://www.npmjs.com/package/@cnwenf/occ).
162
162
  - Many modules are intentionally stubbed or feature-flagged off — see "Disabled / stubbed" above.
163
163
 
package/README.zh-CN.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## 这是什么
10
10
 
11
- **Open C Code(OCC)** 是一个开源的编码智能体。能力与 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 对齐(当前跟踪 `2.1.221`:2.1.218 已完全对齐、2.1.219 2.1.221 部分对齐)。代码全开放、可审计、无暗门,数据由你掌控。
11
+ **Open C Code(OCC)** 是一个开源的编码智能体。能力与 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 对齐(当前跟踪 `2.1.223`:2.1.218 已完全对齐、2.1.219 / 2.1.221 / 2.1.223 部分对齐、2.1.222 待补齐)。代码全开放、可审计、无暗门,数据由你掌控。
12
12
 
13
13
  如果你担心闭源 CLI 可能植入后门、担心代码与凭据被上传到不可审计的服务,OCC 就是为你准备的:全部源码开放、无混淆,构建产物可由源码复现,API 凭据只发往你自己配置的端点。
14
14
 
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## 现状
23
23
 
24
- - 跟踪 Claude Code **`2.1.221`**(2.1.218 完全对齐、2.1.219 2.1.221 部分对齐)。
24
+ - 跟踪 Claude Code **`2.1.223`**(2.1.218 完全对齐、2.1.219 / 2.1.221 / 2.1.223 部分对齐、2.1.222 待补齐)。
25
25
  - 代码库有约 1300 个不阻塞的 `tsc` 类型错误(大量松散的 `unknown`/`never`/`{}` 类型),**不影响 Bun 运行时执行**。门槛是 Biome lint,不是 `tsc`。
26
26
  - 所有内部 feature flag(`feature(...)`)已被 polyfill 为 `false` —— 内部功能(COORDINATOR_MODE、KAIROS、PROACTIVE 等)全部关闭。
27
27
  - 已发布到 npm:[`@cnwenf/occ`](https://www.npmjs.com/package/@cnwenf/occ)。
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.294","BINARY_NAME":"occ","BUILD_TIME":"2026-08-06T04:37:11.915Z","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;
@@ -360098,15 +360098,24 @@ function collectCommands(node, commands7, varScope) {
360098
360098
  return null;
360099
360099
  }
360100
360100
  if (node.type === "test_command") {
360101
+ const inBracketBracket = node.children.some((c9) => c9?.type === "[[");
360102
+ const gapErr = checkTestCommandUnparsedBytes(node, inBracketBracket);
360103
+ if (gapErr)
360104
+ return gapErr;
360101
360105
  const argv = ["[["];
360102
360106
  for (const child of node.children) {
360103
360107
  if (!child)
360104
360108
  continue;
360105
- if (child.type === "[[" || child.type === "]]")
360106
- continue;
360107
- if (child.type === "[" || child.type === "]")
360109
+ if (child.type === "[[" || child.type === "]]" || child.type === "[" || child.type === "]") {
360110
+ if (child.text === "") {
360111
+ return {
360112
+ kind: "too-complex",
360113
+ reason: "test_command early-close (quote in operator position)"
360114
+ };
360115
+ }
360108
360116
  continue;
360109
- const err2 = walkTestExpr(child, argv, commands7, varScope);
360117
+ }
360118
+ const err2 = walkTestExpr(child, argv, commands7, varScope, inBracketBracket);
360110
360119
  if (err2)
360111
360120
  return err2;
360112
360121
  }
@@ -360142,16 +360151,104 @@ function collectCommands(node, commands7, varScope) {
360142
360151
  }
360143
360152
  return tooComplex(node);
360144
360153
  }
360145
- function walkTestExpr(node, argv, innerCommands, varScope) {
360154
+ function isWhitespaceOrCommentGap(text2, inBracketBracket) {
360155
+ let i6 = 0;
360156
+ while (i6 < text2.length) {
360157
+ const ch2 = text2[i6];
360158
+ if (ch2 === " " || ch2 === "\t") {
360159
+ i6++;
360160
+ continue;
360161
+ }
360162
+ if (ch2 === "\\" && text2[i6 + 1] === `
360163
+ `) {
360164
+ i6 += 2;
360165
+ continue;
360166
+ }
360167
+ if (inBracketBracket && ch2 === `
360168
+ `) {
360169
+ i6++;
360170
+ continue;
360171
+ }
360172
+ if (inBracketBracket && ch2 === "#") {
360173
+ i6++;
360174
+ while (i6 < text2.length && text2[i6] !== `
360175
+ `)
360176
+ i6++;
360177
+ continue;
360178
+ }
360179
+ return false;
360180
+ }
360181
+ return true;
360182
+ }
360183
+ function checkTestCommandUnparsedBytes(node, inBracketBracket) {
360184
+ const bytes = Buffer.from(node.text, "utf8");
360185
+ let cursor = node.startIndex;
360186
+ for (const child of node.children) {
360187
+ if (!child)
360188
+ continue;
360189
+ if (child.endIndex > node.endIndex || child.startIndex < node.startIndex) {
360190
+ return {
360191
+ kind: "too-complex",
360192
+ reason: "Test command child extends past the node span \u2014 gap byte accounting is untrustworthy"
360193
+ };
360194
+ }
360195
+ if (child.startIndex > cursor) {
360196
+ const gap = bytes.subarray(cursor - node.startIndex, child.startIndex - node.startIndex).toString("utf8");
360197
+ if (!isWhitespaceOrCommentGap(gap, inBracketBracket)) {
360198
+ return {
360199
+ kind: "too-complex",
360200
+ reason: "Test command has unparsed bytes between children \u2014 parser dropped content that shell will see"
360201
+ };
360202
+ }
360203
+ }
360204
+ cursor = Math.max(cursor, child.endIndex);
360205
+ if (TEST_EXPR_TYPES.has(child.type)) {
360206
+ const err2 = checkTestCommandUnparsedBytes(child, inBracketBracket);
360207
+ if (err2)
360208
+ return err2;
360209
+ }
360210
+ }
360211
+ if (cursor < node.endIndex) {
360212
+ const tail = bytes.subarray(cursor - node.startIndex).toString("utf8");
360213
+ if (!isWhitespaceOrCommentGap(tail, inBracketBracket)) {
360214
+ return {
360215
+ kind: "too-complex",
360216
+ reason: "Test command has unparsed bytes after its last child \u2014 parser dropped content that shell will see"
360217
+ };
360218
+ }
360219
+ }
360220
+ return null;
360221
+ }
360222
+ function containsStandaloneBracketCloser(text2) {
360223
+ const masked = text2.replace(/\[(?::[a-zA-Z]+:|=[A-Za-z0-9-]*=|\.[A-Za-z0-9-]*\.|[!^]?)\]\](?!\])/g, "\x00");
360224
+ const wordChar = /[A-Za-z0-9_]/;
360225
+ let idx = masked.indexOf("]]");
360226
+ while (idx !== -1) {
360227
+ const before = idx > 0 ? masked[idx - 1] : "";
360228
+ const after = idx + 2 < masked.length ? masked[idx + 2] : "";
360229
+ if (!(wordChar.test(before) && wordChar.test(after)))
360230
+ return true;
360231
+ idx = masked.indexOf("]]", idx + 1);
360232
+ }
360233
+ return false;
360234
+ }
360235
+ function walkTestExpr(node, argv, innerCommands, varScope, inBracketBracket) {
360146
360236
  switch (node.type) {
360147
360237
  case "unary_expression":
360148
360238
  case "binary_expression":
360149
360239
  case "negated_expression":
360150
360240
  case "parenthesized_expression": {
360151
- for (const c9 of node.children) {
360241
+ for (let i6 = 0;i6 < node.children.length; i6++) {
360242
+ const c9 = node.children[i6];
360152
360243
  if (!c9)
360153
360244
  continue;
360154
- const err2 = walkTestExpr(c9, argv, innerCommands, varScope);
360245
+ 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 ?? ""))) {
360246
+ return {
360247
+ kind: "too-complex",
360248
+ reason: "zsh $name[expr] / $name:mod in [[ ]] operand \u2014 recursive eval"
360249
+ };
360250
+ }
360251
+ const err2 = walkTestExpr(c9, argv, innerCommands, varScope, inBracketBracket);
360155
360252
  if (err2)
360156
360253
  return err2;
360157
360254
  }
@@ -360169,6 +360266,12 @@ function walkTestExpr(node, argv, innerCommands, varScope) {
360169
360266
  case "<":
360170
360267
  case ">":
360171
360268
  case "=~":
360269
+ if (node.text === "") {
360270
+ return {
360271
+ kind: "too-complex",
360272
+ reason: "Test command has a synthesized zero-width token \u2014 parser diverged from shell"
360273
+ };
360274
+ }
360172
360275
  argv.push(node.text);
360173
360276
  return null;
360174
360277
  case "regex":
@@ -360256,13 +360359,39 @@ function walkTestExpr(node, argv, innerCommands, varScope) {
360256
360359
  };
360257
360360
  }
360258
360361
  }
360362
+ if (node.text.includes("&&")) {
360363
+ return {
360364
+ kind: "too-complex",
360365
+ reason: "[[ ]] pattern leaf contains `&&` \u2014 shell cond-lexer divergence (zsh splits the word there)",
360366
+ nodeType: node.type
360367
+ };
360368
+ }
360369
+ if (containsStandaloneBracketCloser(node.text)) {
360370
+ return {
360371
+ kind: "too-complex",
360372
+ reason: "[[ ]] pattern leaf contains a potential standalone `]]` closer \u2014 shell cond-lexer divergence (zsh may close the conditional early)",
360373
+ nodeType: node.type
360374
+ };
360375
+ }
360259
360376
  argv.push(node.text);
360260
360377
  return null;
360261
360378
  }
360379
+ case "test_rhs_missing":
360380
+ return {
360381
+ kind: "too-complex",
360382
+ reason: "Test command comparison is missing its right-hand side \u2014 parser dropped consumed bytes"
360383
+ };
360262
360384
  default: {
360263
360385
  const arg = walkArgument(node, innerCommands, varScope);
360264
360386
  if (typeof arg !== "string")
360265
360387
  return arg;
360388
+ if (inBracketBracket && (containsStandaloneBracketCloser(arg) || containsStandaloneBracketCloser(node.text)) || /]].*[;\n&|<>]/s.test(arg)) {
360389
+ return {
360390
+ kind: "too-complex",
360391
+ 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",
360392
+ nodeType: node.type
360393
+ };
360394
+ }
360266
360395
  argv.push(arg);
360267
360396
  return null;
360268
360397
  }
@@ -361112,7 +361241,7 @@ function checkSemantics(commands7) {
361112
361241
  }
361113
361242
  return { ok: true };
361114
361243
  }
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;
361244
+ 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
361245
  var init_ast = __esm(() => {
361117
361246
  init_bashParser();
361118
361247
  init_parser5();
@@ -361198,6 +361327,12 @@ var init_ast = __esm(() => {
361198
361327
  ZSH_EQUALS_EXPANSION_RE = /(?:^|[\s;&|])=[a-zA-Z_]/;
361199
361328
  BRACE_WITH_QUOTE_RE = /\{[^}]*['"]/;
361200
361329
  DOLLAR = String.fromCharCode(36);
361330
+ TEST_EXPR_TYPES = new Set([
361331
+ "unary_expression",
361332
+ "binary_expression",
361333
+ "negated_expression",
361334
+ "parenthesized_expression"
361335
+ ]);
361201
361336
  ARITH_LEAF_RE = /^(?:[0-9]+|0[xX][0-9a-fA-F]+|[0-9]+#[0-9a-zA-Z]+|[-+*/%^&|~!<>=?:(),]+|<<|>>|\*\*|&&|\|\||[<>=!]=|\$\(\(|\)\))$/;
361202
361337
  ZSH_DANGEROUS_BUILTINS = new Set([
361203
361338
  "zmodload",
@@ -384375,6 +384510,42 @@ function hasUnsafeHelpManForm(command4) {
384375
384510
  }
384376
384511
  return false;
384377
384512
  }
384513
+ function hasQuotedBracketCloserInConditional(command4) {
384514
+ if (!command4.includes("[["))
384515
+ return false;
384516
+ if (!command4.includes("]]"))
384517
+ return false;
384518
+ const isWordChar2 = (c9) => c9 !== undefined && /[A-Za-z0-9_]/.test(c9);
384519
+ let inSingle = false;
384520
+ let inDouble = false;
384521
+ for (let i6 = 0;i6 < command4.length; i6++) {
384522
+ const ch2 = command4[i6];
384523
+ if (ch2 === "\\" && !inSingle) {
384524
+ const next = command4[i6 + 1];
384525
+ const isEscape = !inDouble || next === "$" || next === "`" || next === '"' || next === "\\" || next === `
384526
+ `;
384527
+ if (isEscape && next !== undefined)
384528
+ i6++;
384529
+ continue;
384530
+ }
384531
+ if (ch2 === "'" && !inDouble) {
384532
+ inSingle = !inSingle;
384533
+ continue;
384534
+ }
384535
+ if (ch2 === '"' && !inSingle) {
384536
+ inDouble = !inDouble;
384537
+ continue;
384538
+ }
384539
+ if ((inSingle || inDouble) && ch2 === "]" && command4[i6 + 1] === "]") {
384540
+ const before = command4[i6 - 1];
384541
+ const after = command4[i6 + 2];
384542
+ if (!(isWordChar2(before) && isWordChar2(after)))
384543
+ return true;
384544
+ i6++;
384545
+ }
384546
+ }
384547
+ return false;
384548
+ }
384378
384549
  async function bashToolHasPermission(input, context4, getCommandSubcommandPrefixFn = getCommandSubcommandPrefix) {
384379
384550
  let appState = context4.getAppState();
384380
384551
  {
@@ -384465,6 +384636,15 @@ async function bashToolHasPermission(input, context4, getCommandSubcommandPrefix
384465
384636
  };
384466
384637
  }
384467
384638
  }
384639
+ {
384640
+ const mode = appState.toolPermissionContext.mode;
384641
+ if (mode !== "bypassPermissions" && hasQuotedBracketCloserInConditional(input.command)) {
384642
+ return {
384643
+ behavior: "ask",
384644
+ message: "Potential `]]` closer hidden in a quoted [[ ]] operand requires confirmation."
384645
+ };
384646
+ }
384647
+ }
384468
384648
  const injectionCheckDisabled = isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECK);
384469
384649
  const shadowEnabled = feature("TREE_SITTER_BASH_SHADOW") ? getFeatureValue_CACHED_MAY_BE_STALE("tengu_birch_trellis", true) : false;
384470
384650
  let astRoot = injectionCheckDisabled ? null : feature("TREE_SITTER_BASH_SHADOW") && !shadowEnabled ? null : await parseCommandRaw(input.command);
@@ -471176,9 +471356,14 @@ async function* runAgent({
471176
471356
  const state3 = toolUseContext.getAppState();
471177
471357
  let toolPermissionContext = state3.toolPermissionContext;
471178
471358
  if (agentPermissionMode && state3.toolPermissionContext.mode !== "bypassPermissions" && state3.toolPermissionContext.mode !== "acceptEdits" && !(feature("TRANSCRIPT_CLASSIFIER") && state3.toolPermissionContext.mode === "auto")) {
471359
+ let effectiveMode = agentPermissionMode;
471360
+ if (agentPermissionMode === "bypassPermissions" && isBypassPermissionsModeDisabled()) {
471361
+ 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" });
471362
+ effectiveMode = state3.toolPermissionContext.mode;
471363
+ }
471179
471364
  toolPermissionContext = {
471180
471365
  ...toolPermissionContext,
471181
- mode: agentPermissionMode
471366
+ mode: effectiveMode
471182
471367
  };
471183
471368
  }
471184
471369
  const shouldAvoidPrompts = canShowPermissionPrompts !== undefined ? !canShowPermissionPrompts : agentPermissionMode === "bubble" ? false : isAsync2;
@@ -471503,6 +471688,7 @@ var init_runAgent = __esm(() => {
471503
471688
  init_sessionHooks();
471504
471689
  init_hooks5();
471505
471690
  init_messages3();
471691
+ init_permissionSetup();
471506
471692
  init_cost_tracker();
471507
471693
  init_agent();
471508
471694
  init_sessionStorage();
@@ -684360,70 +684546,172 @@ var init_logoV2Utils = __esm(() => {
684360
684546
  cachedActivity = [];
684361
684547
  });
684362
684548
 
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));
684549
+ // src/components/LogoV2/OccMark.tsx
684550
+ function normalizeMark(lines2) {
684551
+ const width = Math.max(...lines2.map(stringWidth));
684552
+ return lines2.map((line) => line + " ".repeat(width - stringWidth(line)));
684367
684553
  }
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}`));
684554
+ function getOccMark(mode) {
684555
+ return OCC_MARKS[mode];
684556
+ }
684557
+ function getOccMarkWidth(art) {
684558
+ return Math.max(...art.map(stringWidth));
684559
+ }
684560
+ function gradientThemeFamily(themeName) {
684561
+ return themeName.startsWith("light") ? "light" : "dark";
684562
+ }
684563
+ function sampleGradient(stops, t4) {
684564
+ if (stops.length === 0)
684565
+ return [0, 0, 0];
684566
+ if (stops.length === 1)
684567
+ return stops[0];
684568
+ const clamped = Math.min(Math.max(t4, 0), 1);
684569
+ const scaled = clamped * (stops.length - 1);
684570
+ const index2 = Math.min(Math.floor(scaled), stops.length - 2);
684571
+ const local = scaled - index2;
684572
+ const from2 = stops[index2];
684573
+ const to = stops[index2 + 1];
684574
+ return [
684575
+ Math.round(from2[0] + (to[0] - from2[0]) * local),
684576
+ Math.round(from2[1] + (to[1] - from2[1]) * local),
684577
+ Math.round(from2[2] + (to[2] - from2[2]) * local)
684578
+ ];
684579
+ }
684580
+ function markCellT(art, row, column) {
684581
+ const width = getOccMarkWidth(art);
684582
+ const horizontal = width > 1 ? column / (width - 1) : 0;
684583
+ const vertical = art.length > 1 ? row / (art.length - 1) : 0;
684584
+ return horizontal * 0.72 + vertical * 0.28;
684585
+ }
684586
+ function rgbColor(rgb3) {
684587
+ return `rgb(${rgb3[0]},${rgb3[1]},${rgb3[2]})`;
684588
+ }
684589
+ function highlightColor(rgb3, amount = 0.62) {
684590
+ return [
684591
+ Math.round(rgb3[0] + (255 - rgb3[0]) * amount),
684592
+ Math.round(rgb3[1] + (255 - rgb3[1]) * amount),
684593
+ Math.round(rgb3[2] + (255 - rgb3[2]) * amount)
684594
+ ];
684595
+ }
684596
+ function isShimmerCell(art, row, column, progress) {
684597
+ if (progress === null)
684598
+ return false;
684599
+ const width = getOccMarkWidth(art);
684600
+ const diagonal = (column + (art.length - 1 - row) * 1.6) / (width + (art.length - 1) * 1.6);
684601
+ const bandPosition = -SHIMMER_BAND_WIDTH + progress * 1.45;
684602
+ return Math.abs(diagonal - bandPosition) < SHIMMER_BAND_WIDTH;
684603
+ }
684604
+ function MarkRow({
684605
+ art,
684606
+ row,
684607
+ stops,
684608
+ progress
684609
+ }) {
684610
+ const line = art[row];
684611
+ const cells = [...line];
684612
+ const nodes = [];
684613
+ let spaceRun = "";
684614
+ const flushSpaces = (key4) => {
684615
+ if (spaceRun.length > 0) {
684616
+ nodes.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684617
+ children: spaceRun
684618
+ }, key4));
684619
+ spaceRun = "";
684620
+ }
684621
+ };
684622
+ for (let column = 0;column < cells.length; column++) {
684623
+ const char = cells[column];
684624
+ if (char === " " || char === "\t") {
684625
+ spaceRun += " ";
684391
684626
  continue;
684392
684627
  }
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
- }
684628
+ flushSpaces(`${row}-sp-${column}`);
684629
+ const base2 = sampleGradient(stops, markCellT(art, row, column));
684630
+ const shimmering = isShimmerCell(art, row, column, progress);
684631
+ nodes.push(/* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684632
+ color: rgbColor(shimmering ? highlightColor(base2) : base2),
684633
+ bold: true,
684634
+ children: char
684635
+ }, `${row}-${column}`));
684402
684636
  }
684403
- flush(line.length);
684637
+ flushSpaces(`${row}-end`);
684404
684638
  return /* @__PURE__ */ jsx_runtime258.jsx(ThemedText, {
684405
- children: segments
684406
- }, lineKey);
684639
+ children: nodes
684640
+ });
684407
684641
  }
684408
- function Clawd(_props) {
684642
+ function OccMark(props) {
684643
+ const mode = props.mode ?? "compact";
684644
+ const art = getOccMark(mode);
684645
+ const [themeName] = useTheme();
684646
+ const stops = GRADIENT_STOPS[gradientThemeFamily(themeName)];
684647
+ const animate = props.animate ?? !(getInitialSettings().prefersReducedMotion ?? false);
684648
+ const [done, setDone] = import_react146.useState(!animate);
684649
+ const startTimeRef = import_react146.useRef(null);
684650
+ const [ref, time3] = useAnimationFrame(done ? null : SHIMMER_FRAME_MS);
684651
+ import_react146.useEffect(() => {
684652
+ if (done)
684653
+ return;
684654
+ const timer2 = setTimeout(setDone, SHIMMER_DURATION_MS, true);
684655
+ return () => clearTimeout(timer2);
684656
+ }, [done]);
684657
+ if (startTimeRef.current === null) {
684658
+ startTimeRef.current = time3;
684659
+ }
684660
+ const elapsed = Math.max(0, time3 - startTimeRef.current);
684661
+ const progress = done ? null : Math.min(elapsed / SHIMMER_DURATION_MS, 1);
684409
684662
  return /* @__PURE__ */ jsx_runtime258.jsx(ThemedBox_default, {
684663
+ ref,
684410
684664
  flexDirection: "column",
684411
- children: DOGE_LINES.map((line, i6) => renderLine(line, i6))
684665
+ flexShrink: 0,
684666
+ children: art.map((_4, row) => /* @__PURE__ */ jsx_runtime258.jsx(MarkRow, {
684667
+ art,
684668
+ row,
684669
+ stops,
684670
+ progress
684671
+ }, row))
684412
684672
  });
684413
684673
  }
684414
- var jsx_runtime258, BODY_LINES, ACCENT_CHARS, DOGE_LINES;
684415
- var init_Clawd = __esm(() => {
684674
+ var import_react146, jsx_runtime258, OCC_MARKS, GRADIENT_STOPS, SHIMMER_FRAME_MS = 84, SHIMMER_DURATION_MS = 1850, SHIMMER_BAND_WIDTH = 0.24;
684675
+ var init_OccMark = __esm(() => {
684416
684676
  init_ink2();
684677
+ init_stringWidth();
684678
+ init_settings2();
684679
+ init_ThemeProvider();
684680
+ import_react146 = __toESM(require_react(), 1);
684417
684681
  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);
684682
+ OCC_MARKS = {
684683
+ wide: normalizeMark([
684684
+ "\u259F\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2599",
684685
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B",
684686
+ "\u2588\u2588",
684687
+ "\u2588\u2588",
684688
+ "\u2588\u2588",
684689
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259C",
684690
+ "\u259C\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B"
684691
+ ]),
684692
+ compact: normalizeMark([
684693
+ "\u259F\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2599",
684694
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B",
684695
+ "\u2588\u2588",
684696
+ "\u2588\u2588",
684697
+ "\u2588\u2588",
684698
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259C",
684699
+ "\u259C\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u259B"
684700
+ ]),
684701
+ plain: normalizeMark(["\u259F\u2588\u2588\u2588\u2588\u2588\u2588\u2599", "\u2588\u2588", "\u2588\u2588", "\u2588\u2588", "\u259C\u2588\u2588\u2588\u2588\u2588\u2588\u259B"])
684702
+ };
684703
+ GRADIENT_STOPS = {
684704
+ dark: [
684705
+ [255, 199, 110],
684706
+ [255, 116, 64],
684707
+ [233, 60, 136]
684708
+ ],
684709
+ light: [
684710
+ [181, 110, 0],
684711
+ [194, 62, 24],
684712
+ [162, 22, 82]
684713
+ ]
684714
+ };
684427
684715
  });
684428
684716
 
684429
684717
  // src/components/LogoV2/Feed.tsx
@@ -684947,7 +685235,7 @@ function shouldShowGuestPassesUpsell() {
684947
685235
  return true;
684948
685236
  }
684949
685237
  function useShowGuestPassesUpsell() {
684950
- const [show] = import_react146.useState(_temp120);
685238
+ const [show] = import_react147.useState(_temp120);
684951
685239
  return show;
684952
685240
  }
684953
685241
  function _temp120() {
@@ -684999,28 +685287,18 @@ function GuestPassesUpsell() {
684999
685287
  }
685000
685288
  return t0;
685001
685289
  }
685002
- var import_compiler_runtime196, import_react146, jsx_runtime262;
685290
+ var import_compiler_runtime196, import_react147, jsx_runtime262;
685003
685291
  var init_GuestPassesUpsell = __esm(() => {
685004
685292
  init_ink2();
685005
685293
  init_analytics();
685006
685294
  init_referral();
685007
685295
  init_config4();
685008
685296
  import_compiler_runtime196 = __toESM(require_compiler_runtime(), 1);
685009
- import_react146 = __toESM(require_react(), 1);
685297
+ import_react147 = __toESM(require_react(), 1);
685010
685298
  jsx_runtime262 = __toESM(require_jsx_runtime(), 1);
685011
685299
  });
685012
685300
 
685013
685301
  // 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
685302
  function getOccWelcomeMode(columns, plain = false) {
685025
685303
  if (plain || columns < COMPACT_MIN_COLUMNS)
685026
685304
  return "plain";
@@ -685047,92 +685325,33 @@ function welcomeTip(mode, sessionTip) {
685047
685325
  }
685048
685326
  return "Type /help for commands";
685049
685327
  }
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,
685328
+ function DataRow({
685329
+ label,
685330
+ value,
685106
685331
  width
685107
685332
  }) {
685108
- return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685109
- width,
685110
- justifyContent: "space-between",
685333
+ const labelCell = `${label} `.slice(0, LABEL_COLUMN_WIDTH).padEnd(LABEL_COLUMN_WIDTH);
685334
+ return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
685335
+ wrap: "truncate",
685111
685336
  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
- ]
685337
+ /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685338
+ color: "inactive",
685339
+ children: labelCell
685127
685340
  }),
685128
- showTagline && /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685129
- dimColor: true,
685130
- wrap: "truncate",
685131
- children: "Open C Code"
685341
+ /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685342
+ children: truncate(value, Math.max(width - LABEL_COLUMN_WIDTH, 1))
685132
685343
  })
685133
685344
  ]
685134
685345
  });
685135
685346
  }
685347
+ function DashedRule({ width }) {
685348
+ return /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685349
+ color: "inactive",
685350
+ dimColor: true,
685351
+ wrap: "truncate",
685352
+ children: "\u254C".repeat(Math.max(width, 1))
685353
+ });
685354
+ }
685136
685355
  function Metadata({
685137
685356
  width,
685138
685357
  model,
@@ -685142,37 +685361,25 @@ function Metadata({
685142
685361
  }) {
685143
685362
  const modelLine = truncate(`${model} \xB7 ${billing}`, Math.max(width, 1));
685144
685363
  const agentPrefix = agentName ? `@${agentName} \xB7 ` : "";
685145
- const locationWidth = Math.max(width - stringWidth(agentPrefix), 1);
685364
+ const locationValue = `${agentPrefix}${location}`;
685146
685365
  return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685147
685366
  flexDirection: "column",
685148
685367
  minWidth: 0,
685149
685368
  children: [
685150
685369
  /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685151
685370
  bold: true,
685152
- children: "Ready when you are."
685153
- }),
685154
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685155
- dimColor: true,
685156
685371
  wrap: "truncate",
685157
- children: modelLine
685372
+ children: "Ready when you are."
685158
685373
  }),
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
- ]
685374
+ /* @__PURE__ */ jsx_runtime263.jsx(DataRow, {
685375
+ label: "MODEL",
685376
+ value: modelLine,
685377
+ width
685171
685378
  }),
685172
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685173
- dimColor: true,
685174
- wrap: "truncate",
685175
- children: "Safe, open, and auditable."
685379
+ /* @__PURE__ */ jsx_runtime263.jsx(DataRow, {
685380
+ label: "PROJ",
685381
+ value: locationValue,
685382
+ width
685176
685383
  })
685177
685384
  ]
685178
685385
  });
@@ -685181,16 +685388,17 @@ function PlainWelcome(props) {
685181
685388
  const width = Math.max(props.columns, 1);
685182
685389
  const location = formatWelcomeLocation(props.branch, props.cwd, width);
685183
685390
  const modelLine = truncate(`${props.model} \xB7 ${props.billing}`, width);
685184
- const logo = getOccLogo("plain");
685185
- const showLogo = !props.plain && width >= getOccLogoWidth(logo);
685391
+ const logo = getOccMark("plain");
685392
+ const showLogo = !props.plain && width >= getOccMarkWidth(logo);
685393
+ const animate = !props.reducedMotion && !props.plain;
685186
685394
  return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685187
685395
  flexDirection: "column",
685188
685396
  children: [
685189
685397
  showLogo && /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685190
685398
  marginBottom: 1,
685191
- children: /* @__PURE__ */ jsx_runtime263.jsx(OccLogo, {
685192
- art: logo,
685193
- animate: !props.reducedMotion
685399
+ children: /* @__PURE__ */ jsx_runtime263.jsx(OccMark, {
685400
+ mode: "plain",
685401
+ animate
685194
685402
  })
685195
685403
  }),
685196
685404
  /* @__PURE__ */ jsx_runtime263.jsxs(ThemedText, {
@@ -685234,37 +685442,36 @@ function OccWelcome(props) {
685234
685442
  ...props
685235
685443
  });
685236
685444
  }
685445
+ const [themeName] = useTheme();
685237
685446
  const cardWidth = Math.min(Math.max(props.columns, 1), WELCOME_MAX_WIDTH);
685238
685447
  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);
685448
+ const markMode = mode === "wide" ? "wide" : "compact";
685449
+ const logo = getOccMark(markMode);
685450
+ const logoWidth = getOccMarkWidth(logo);
685451
+ const metaWidth = mode === "wide" ? Math.max(contentWidth - logoWidth - 3, 1) : contentWidth;
685452
+ const location = formatWelcomeLocation(props.branch, props.cwd, metaWidth);
685242
685453
  const animate = !props.reducedMotion;
685454
+ const borderTitle = `${color("claude", themeName)("OCC")}${color("inactive", themeName)(` v${props.version} \xB7 Open C Code`)}`;
685243
685455
  return /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685244
685456
  width: cardWidth,
685245
685457
  flexDirection: "column",
685246
685458
  borderStyle: "round",
685247
- borderColor: "inactive",
685248
- borderDimColor: true,
685459
+ borderColor: "claude",
685460
+ borderText: { content: borderTitle, position: "top", align: "start", offset: 2 },
685249
685461
  paddingX: 1,
685250
685462
  children: [
685251
- /* @__PURE__ */ jsx_runtime263.jsx(Header, {
685252
- version: props.version,
685253
- showTagline: true,
685254
- width: contentWidth
685255
- }),
685256
685463
  mode === "wide" ? /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685257
685464
  marginTop: 1,
685258
685465
  flexDirection: "row",
685259
685466
  gap: 3,
685260
685467
  alignItems: "center",
685261
685468
  children: [
685262
- /* @__PURE__ */ jsx_runtime263.jsx(OccLogo, {
685263
- art: logo,
685469
+ /* @__PURE__ */ jsx_runtime263.jsx(OccMark, {
685470
+ mode: "wide",
685264
685471
  animate
685265
685472
  }),
685266
685473
  /* @__PURE__ */ jsx_runtime263.jsx(Metadata, {
685267
- width: Math.max(contentWidth - logoWidth - 3, 1),
685474
+ width: metaWidth,
685268
685475
  model: props.model,
685269
685476
  billing: props.billing,
685270
685477
  location,
@@ -685276,8 +685483,8 @@ function OccWelcome(props) {
685276
685483
  flexDirection: "column",
685277
685484
  alignItems: "center",
685278
685485
  children: [
685279
- /* @__PURE__ */ jsx_runtime263.jsx(OccLogo, {
685280
- art: logo,
685486
+ /* @__PURE__ */ jsx_runtime263.jsx(OccMark, {
685487
+ mode: "compact",
685281
685488
  animate
685282
685489
  }),
685283
685490
  /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
@@ -685293,19 +685500,22 @@ function OccWelcome(props) {
685293
685500
  })
685294
685501
  ]
685295
685502
  }),
685296
- /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685503
+ /* @__PURE__ */ jsx_runtime263.jsxs(ThemedBox_default, {
685297
685504
  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
- })
685505
+ flexDirection: "column",
685506
+ children: [
685507
+ /* @__PURE__ */ jsx_runtime263.jsx(DashedRule, {
685508
+ width: contentWidth
685509
+ }),
685510
+ /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685511
+ marginTop: 0,
685512
+ children: /* @__PURE__ */ jsx_runtime263.jsx(ThemedText, {
685513
+ dimColor: true,
685514
+ wrap: "truncate",
685515
+ children: `\u25B8 ${welcomeTip(mode, props.tip)}`
685516
+ })
685517
+ })
685518
+ ]
685309
685519
  }),
685310
685520
  props.children && /* @__PURE__ */ jsx_runtime263.jsx(ThemedBox_default, {
685311
685521
  marginTop: 1,
@@ -685314,32 +685524,13 @@ function OccWelcome(props) {
685314
685524
  ]
685315
685525
  });
685316
685526
  }
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;
685527
+ var jsx_runtime263, WELCOME_MAX_WIDTH = 84, WIDE_MIN_COLUMNS = 76, COMPACT_MIN_COLUMNS = 44, LABEL_COLUMN_WIDTH = 7;
685318
685528
  var init_OccWelcome = __esm(() => {
685319
685529
  init_ink2();
685320
- init_stringWidth();
685321
685530
  init_format();
685322
- import_react147 = __toESM(require_react(), 1);
685531
+ init_ThemeProvider();
685532
+ init_OccMark();
685323
685533
  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
685534
  });
685344
685535
 
685345
685536
  // src/components/LogoV2/welcomeTips.ts
@@ -686356,7 +686547,9 @@ function LogoV2() {
686356
686547
  if ($4[34] === Symbol.for("react.memo_cache_sentinel")) {
686357
686548
  t122 = /* @__PURE__ */ jsx_runtime270.jsx(ThemedBox_default, {
686358
686549
  marginY: 1,
686359
- children: /* @__PURE__ */ jsx_runtime270.jsx(Clawd, {})
686550
+ children: /* @__PURE__ */ jsx_runtime270.jsx(OccMark, {
686551
+ mode: "compact"
686552
+ })
686360
686553
  });
686361
686554
  $4[34] = t122;
686362
686555
  } else {
@@ -686501,7 +686694,9 @@ function LogoV2() {
686501
686694
  }
686502
686695
  let t19;
686503
686696
  if ($4[48] === Symbol.for("react.memo_cache_sentinel")) {
686504
- t19 = /* @__PURE__ */ jsx_runtime270.jsx(Clawd, {});
686697
+ t19 = /* @__PURE__ */ jsx_runtime270.jsx(OccMark, {
686698
+ mode: "compact"
686699
+ });
686505
686700
  $4[48] = t19;
686506
686701
  } else {
686507
686702
  t19 = $4[48];
@@ -686802,7 +686997,7 @@ var init_LogoV2 = __esm(() => {
686802
686997
  init_logoV2Utils();
686803
686998
  init_format();
686804
686999
  init_file();
686805
- init_Clawd();
687000
+ init_OccMark();
686806
687001
  init_FeedColumn();
686807
687002
  init_feedConfigs();
686808
687003
  init_config4();
@@ -690688,8 +690883,8 @@ function formatSnippet({
690688
690883
  before,
690689
690884
  match,
690690
690885
  after
690691
- }, highlightColor) {
690692
- return source_default.dim(before) + highlightColor(match) + source_default.dim(after);
690886
+ }, highlightColor2) {
690887
+ return source_default.dim(before) + highlightColor2(match) + source_default.dim(after);
690693
690888
  }
690694
690889
  function extractSnippet(text2, query2, contextChars) {
690695
690890
  const matchIndex = text2.toLowerCase().indexOf(query2.toLowerCase());
@@ -690778,7 +690973,7 @@ function LogSelector(t0) {
690778
690973
  } else {
690779
690974
  t5 = $4[4];
690780
690975
  }
690781
- const highlightColor = t5;
690976
+ const highlightColor2 = t5;
690782
690977
  const isAgenticSearchEnabled = false;
690783
690978
  const [currentBranch, setCurrentBranch] = import_react163.default.useState(null);
690784
690979
  const [branchFilterEnabled, setBranchFilterEnabled] = import_react163.default.useState(false);
@@ -691143,14 +691338,14 @@ function LogSelector(t0) {
691143
691338
  break bb2;
691144
691339
  }
691145
691340
  let t302;
691146
- if ($4[66] !== displayedLogs || $4[67] !== highlightColor || $4[68] !== maxLabelWidth || $4[69] !== showAllProjects || $4[70] !== snippets) {
691341
+ if ($4[66] !== displayedLogs || $4[67] !== highlightColor2 || $4[68] !== maxLabelWidth || $4[69] !== showAllProjects || $4[70] !== snippets) {
691147
691342
  const sessionGroups = groupLogsBySessionId(displayedLogs);
691148
691343
  t302 = Array.from(sessionGroups.entries()).map((t312) => {
691149
691344
  const [sessionId, groupLogs] = t312;
691150
691345
  const latestLog = groupLogs[0];
691151
691346
  const indexInFiltered = displayedLogs.indexOf(latestLog);
691152
691347
  const snippet_0 = snippets.get(latestLog);
691153
- const snippetStr = snippet_0 ? formatSnippet(snippet_0, highlightColor) : null;
691348
+ const snippetStr = snippet_0 ? formatSnippet(snippet_0, highlightColor2) : null;
691154
691349
  if (groupLogs.length === 1) {
691155
691350
  const metadata = buildLogMetadata(latestLog, {
691156
691351
  showProjectPath: showAllProjects
@@ -691171,7 +691366,7 @@ function LogSelector(t0) {
691171
691366
  const children3 = groupLogs.slice(1).map((log_8, index2) => {
691172
691367
  const childIndexInFiltered = displayedLogs.indexOf(log_8);
691173
691368
  const childSnippet = snippets.get(log_8);
691174
- const childSnippetStr = childSnippet ? formatSnippet(childSnippet, highlightColor) : null;
691369
+ const childSnippetStr = childSnippet ? formatSnippet(childSnippet, highlightColor2) : null;
691175
691370
  const childMetadata = buildLogMetadata(log_8, {
691176
691371
  isChild: true,
691177
691372
  showProjectPath: showAllProjects
@@ -691210,7 +691405,7 @@ function LogSelector(t0) {
691210
691405
  };
691211
691406
  });
691212
691407
  $4[66] = displayedLogs;
691213
- $4[67] = highlightColor;
691408
+ $4[67] = highlightColor2;
691214
691409
  $4[68] = maxLabelWidth;
691215
691410
  $4[69] = showAllProjects;
691216
691411
  $4[70] = snippets;
@@ -691235,9 +691430,9 @@ function LogSelector(t0) {
691235
691430
  break bb3;
691236
691431
  }
691237
691432
  let t312;
691238
- if ($4[73] !== displayedLogs || $4[74] !== highlightColor || $4[75] !== maxLabelWidth || $4[76] !== showAllProjects || $4[77] !== snippets) {
691433
+ if ($4[73] !== displayedLogs || $4[74] !== highlightColor2 || $4[75] !== maxLabelWidth || $4[76] !== showAllProjects || $4[77] !== snippets) {
691239
691434
  let t323;
691240
- if ($4[79] !== highlightColor || $4[80] !== maxLabelWidth || $4[81] !== showAllProjects || $4[82] !== snippets) {
691435
+ if ($4[79] !== highlightColor2 || $4[80] !== maxLabelWidth || $4[81] !== showAllProjects || $4[82] !== snippets) {
691241
691436
  t323 = (log_9, index_0) => {
691242
691437
  const rawSummary = getLogDisplayTitle(log_9);
691243
691438
  const summaryWithSidechain = rawSummary + (log_9.isSidechain ? " (sidechain)" : "");
@@ -691245,7 +691440,7 @@ function LogSelector(t0) {
691245
691440
  const baseDescription = formatLogMetadata(log_9);
691246
691441
  const projectSuffix = showAllProjects && log_9.projectPath ? ` \xB7 ${log_9.projectPath}` : "";
691247
691442
  const snippet_1 = snippets.get(log_9);
691248
- const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1, highlightColor) : null;
691443
+ const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1, highlightColor2) : null;
691249
691444
  return {
691250
691445
  label: summary,
691251
691446
  description: snippetStr_0 ? `${baseDescription}${projectSuffix}
@@ -691254,7 +691449,7 @@ function LogSelector(t0) {
691254
691449
  value: index_0.toString()
691255
691450
  };
691256
691451
  };
691257
- $4[79] = highlightColor;
691452
+ $4[79] = highlightColor2;
691258
691453
  $4[80] = maxLabelWidth;
691259
691454
  $4[81] = showAllProjects;
691260
691455
  $4[82] = snippets;
@@ -691264,7 +691459,7 @@ function LogSelector(t0) {
691264
691459
  }
691265
691460
  t312 = displayedLogs.map(t323);
691266
691461
  $4[73] = displayedLogs;
691267
- $4[74] = highlightColor;
691462
+ $4[74] = highlightColor2;
691268
691463
  $4[75] = maxLabelWidth;
691269
691464
  $4[76] = showAllProjects;
691270
691465
  $4[77] = snippets;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnwenf/occ",
3
- "version": "2.1.293",
3
+ "version": "2.1.294",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {