@cnwenf/occ 2.1.339 → 2.1.340

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.
Files changed (2) hide show
  1. package/dist/cli.js +32 -21
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- globalThis.MACRO={"VERSION":"2.1.339","BINARY_NAME":"occ","BUILD_TIME":"2026-09-17T03:37:58.902Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
2
+ globalThis.MACRO={"VERSION":"2.1.340","BINARY_NAME":"occ","BUILD_TIME":"2026-09-17T20:08:32.450Z","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;
@@ -9112,6 +9112,17 @@ async function appendAsync(needMkdir, dir, path2, content) {
9112
9112
  updateLatestDebugLogSymlink();
9113
9113
  }
9114
9114
  function noop2() {}
9115
+ function appendFileSyncWithDirFallback(path2, content) {
9116
+ try {
9117
+ getFsImplementation().appendFileSync(path2, content);
9118
+ } catch (e) {
9119
+ if (e?.code !== "EISDIR")
9120
+ throw e;
9121
+ const fallback = join3(path2, `${getSessionId()}.txt`);
9122
+ dirFallbackLogPath = fallback;
9123
+ getFsImplementation().appendFileSync(fallback, content);
9124
+ }
9125
+ }
9115
9126
  function getDebugWriter() {
9116
9127
  if (!debugWriter) {
9117
9128
  let ensuredDir = null;
@@ -9127,7 +9138,7 @@ function getDebugWriter() {
9127
9138
  getFsImplementation().mkdirSync(dir);
9128
9139
  } catch {}
9129
9140
  }
9130
- getFsImplementation().appendFileSync(path2, content);
9141
+ appendFileSyncWithDirFallback(path2, content);
9131
9142
  updateLatestDebugLogSymlink();
9132
9143
  return;
9133
9144
  }
@@ -9167,7 +9178,7 @@ function logForDebugging(message, { level } = {
9167
9178
  getDebugWriter().write(output);
9168
9179
  }
9169
9180
  function getDebugLogPath() {
9170
- return getDebugFilePath() ?? process.env.CLAUDE_CODE_DEBUG_LOGS_DIR ?? join3(getClaudeConfigHomeDir(), "debug", `${getSessionId()}.txt`);
9181
+ return dirFallbackLogPath ?? getDebugFilePath() ?? process.env.CLAUDE_CODE_DEBUG_LOGS_DIR ?? join3(getClaudeConfigHomeDir(), "debug", `${getSessionId()}.txt`);
9171
9182
  }
9172
9183
  function logAntError(context, error2) {
9173
9184
  if (process.env.USER_TYPE !== "ant") {
@@ -9180,7 +9191,7 @@ ${error2.stack}`, {
9180
9191
  });
9181
9192
  }
9182
9193
  }
9183
- var LEVEL_ORDER, getMinDebugLogLevel, runtimeDebugEnabled = false, isDebugMode, getDebugFilter, isDebugToStdErr, getDebugFilePath, hasFormattedOutput = false, debugWriter = null, pendingWrite, updateLatestDebugLogSymlink;
9194
+ var LEVEL_ORDER, getMinDebugLogLevel, runtimeDebugEnabled = false, isDebugMode, getDebugFilter, isDebugToStdErr, getDebugFilePath, hasFormattedOutput = false, debugWriter = null, pendingWrite, dirFallbackLogPath = null, updateLatestDebugLogSymlink;
9184
9195
  var init_debug = __esm(() => {
9185
9196
  init_memoize();
9186
9197
  init_state();
@@ -473601,8 +473612,8 @@ async function getMessagesForSlashCommand(commandName, args, setToolJSX, context
473601
473612
  command4.load().then((mod2) => mod2.call(onDone, {
473602
473613
  ...context6,
473603
473614
  canUseTool
473604
- }, args)).then((jsx128) => {
473605
- if (jsx128 == null)
473615
+ }, args)).then((commandJsx) => {
473616
+ if (commandJsx == null)
473606
473617
  return;
473607
473618
  if (context6.options.isNonInteractiveSession) {
473608
473619
  resolve37({
@@ -473615,7 +473626,7 @@ async function getMessagesForSlashCommand(commandName, args, setToolJSX, context
473615
473626
  if (doneWasCalled)
473616
473627
  return;
473617
473628
  setToolJSX({
473618
- jsx: jsx128,
473629
+ jsx: commandJsx,
473619
473630
  shouldHidePromptInput: true,
473620
473631
  showSpinner: false,
473621
473632
  isLocalJSXCommand: true,
@@ -718166,9 +718177,9 @@ function RateLimitOptionsMenu(t0) {
718166
718177
  t5 = function handleSelect2(value) {
718167
718178
  if (value === "upgrade") {
718168
718179
  logEvent2("tengu_rate_limit_options_menu_select_upgrade", {});
718169
- call81(onDone, context8).then((jsx346) => {
718170
- if (jsx346) {
718171
- setSubCommandJSX(jsx346);
718180
+ call81(onDone, context8).then((upgradeJsx) => {
718181
+ if (upgradeJsx) {
718182
+ setSubCommandJSX(upgradeJsx);
718172
718183
  }
718173
718184
  });
718174
718185
  } else {
@@ -776622,7 +776633,7 @@ function ModeIndicator({
776622
776633
  if (mode === "bash") {
776623
776634
  return /* @__PURE__ */ jsx_runtime432.jsx(ThemedText, {
776624
776635
  color: "bashBorder",
776625
- children: "! for bash mode"
776636
+ children: "! for shell mode"
776626
776637
  });
776627
776638
  }
776628
776639
  const currentMode = toolPermissionContext?.mode;
@@ -779123,7 +779134,7 @@ function PromptInput({
779123
779134
  if (getPlatform() === "macos" && isMacosOptionChar(char)) {
779124
779135
  const shortcut = MACOS_OPTION_SPECIAL_CHARS[char];
779125
779136
  const terminalName = getNativeCSIuTerminalDisplayName();
779126
- const jsx430 = terminalName ? /* @__PURE__ */ jsx_runtime437.jsxs(ThemedText, {
779137
+ const hintJsx = terminalName ? /* @__PURE__ */ jsx_runtime437.jsxs(ThemedText, {
779127
779138
  dimColor: true,
779128
779139
  children: [
779129
779140
  "To enable ",
@@ -779148,7 +779159,7 @@ function PromptInput({
779148
779159
  });
779149
779160
  addNotification({
779150
779161
  key: "option-meta-hint",
779151
- jsx: jsx430,
779162
+ jsx: hintJsx,
779152
779163
  priority: "immediate",
779153
779164
  timeoutMs: 5000
779154
779165
  });
@@ -792719,9 +792730,9 @@ async function processBashCommand(inputString, precedingInputBlocks, attachmentM
792719
792730
  precedingInputBlocks
792720
792731
  })
792721
792732
  });
792722
- let jsx434;
792733
+ let backgroundJsx;
792723
792734
  setToolJSX({
792724
- jsx: /* @__PURE__ */ jsx434(BashModeProgress, {
792735
+ jsx: /* @__PURE__ */ jsx_runtime442.jsx(BashModeProgress, {
792725
792736
  input: inputString,
792726
792737
  progress: null,
792727
792738
  verbose: context8.options.verbose
@@ -792732,19 +792743,19 @@ async function processBashCommand(inputString, precedingInputBlocks, attachmentM
792732
792743
  const bashModeContext = {
792733
792744
  ...context8,
792734
792745
  setToolJSX: (_4) => {
792735
- jsx434 = _4?.jsx;
792746
+ backgroundJsx = _4?.jsx;
792736
792747
  }
792737
792748
  };
792738
792749
  const onProgress = (progress) => {
792739
792750
  setToolJSX({
792740
792751
  jsx: /* @__PURE__ */ jsx_runtime442.jsxs(jsx_runtime442.Fragment, {
792741
792752
  children: [
792742
- /* @__PURE__ */ jsx434(BashModeProgress, {
792753
+ /* @__PURE__ */ jsx_runtime442.jsx(BashModeProgress, {
792743
792754
  input: inputString,
792744
792755
  progress: progress.data,
792745
792756
  verbose: context8.options.verbose
792746
792757
  }),
792747
- jsx434
792758
+ backgroundJsx
792748
792759
  ]
792749
792760
  }),
792750
792761
  shouldHidePromptInput: false,
@@ -807284,10 +807295,10 @@ Error: sandbox required but unavailable: ${reason}
807284
807295
  };
807285
807296
  const context8 = getToolUseContext(messagesRef.current, [], createAbortController(), mainLoopModel);
807286
807297
  const mod2 = await matchingCommand.load();
807287
- const jsx463 = await mod2.call(onDone, context8, commandArgs);
807288
- if (jsx463 && !doneWasCalled) {
807298
+ const commandJsx = await mod2.call(onDone, context8, commandArgs);
807299
+ if (commandJsx && !doneWasCalled) {
807289
807300
  setToolJSX({
807290
- jsx: jsx463,
807301
+ jsx: commandJsx,
807291
807302
  shouldHidePromptInput: false,
807292
807303
  isLocalJSXCommand: true
807293
807304
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnwenf/occ",
3
- "version": "2.1.339",
3
+ "version": "2.1.340",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {