@cnwenf/occ 2.1.307 → 2.1.308
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 +35 -3
- 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.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.308","BINARY_NAME":"occ","BUILD_TIME":"2026-08-21T18:25:57.305Z","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;
|
|
@@ -59651,6 +59651,7 @@ var init_types2 = __esm(() => {
|
|
|
59651
59651
|
tui: exports_external.enum(["default", "fullscreen"]).optional().describe('Terminal UI renderer. "fullscreen" uses the flicker-free alt-screen renderer with virtualized scrollback (equivalent to CLAUDE_CODE_NO_FLICKER=1). "default" uses the classic main-screen renderer.'),
|
|
59652
59652
|
axScreenReader: exports_external.boolean().optional().describe("Render screen-reader friendly output (flat text, no decorative borders or animations). Overridden by the CLAUDE_AX_SCREEN_READER env var and the --ax-screen-reader CLI flag."),
|
|
59653
59653
|
viewMode: exports_external.enum(["default", "verbose", "focus"]).optional().catch(undefined).describe("Default transcript view mode on startup"),
|
|
59654
|
+
keybindingFlavor: exports_external.enum(["classic", "readline"]).optional().catch(undefined).describe(`Which conventions the prompt's editing keys follow: "readline" matches Bash and other readline programs (Ctrl+W deletes back to the previous whitespace); "classic" (default) keeps Claude Code's long-standing behavior (Ctrl+W deletes the previous word)`),
|
|
59654
59655
|
vimInsertModeRemaps: exports_external.record(exports_external.string(), exports_external.unknown()).optional().catch(undefined).describe('Vim INSERT-mode key-sequence remaps, e.g. {"jj": "<Esc>"}. Each key is exactly two printable characters typed in sequence; "<Esc>" (return to NORMAL mode) is the only supported target. Applies when editorMode is "vim".'),
|
|
59655
59656
|
externalEditorContext: exports_external.boolean().optional().describe("Show the last assistant response as commented context above the prompt when opening the external editor (Ctrl+G)."),
|
|
59656
59657
|
prUrlTemplate: exports_external.string().optional().describe('URL template for the footer PR badge (e.g. "https://internal-review.example.com/pr/{number}"). Uses {number} as the PR number placeholder. Defaults to github.com.'),
|
|
@@ -637861,6 +637862,15 @@ class Cursor {
|
|
|
637861
637862
|
const killed = this.text.slice(prevWordCursor.offset, this.offset);
|
|
637862
637863
|
return { cursor: prevWordCursor.modifyText(this), killed };
|
|
637863
637864
|
}
|
|
637865
|
+
deleteWORDBefore() {
|
|
637866
|
+
if (this.isAtStart()) {
|
|
637867
|
+
return { cursor: this, killed: "" };
|
|
637868
|
+
}
|
|
637869
|
+
const target = this.snapOutOfImageRef(this.prevWORD().offset, "start");
|
|
637870
|
+
const prevWORDCursor = new Cursor(this.measuredText, target);
|
|
637871
|
+
const killed = this.text.slice(prevWORDCursor.offset, this.offset);
|
|
637872
|
+
return { cursor: prevWORDCursor.modifyText(this), killed };
|
|
637873
|
+
}
|
|
637864
637874
|
deleteTokenBefore() {
|
|
637865
637875
|
const chipAfter = this.imageRefStartingAt(this.offset);
|
|
637866
637876
|
if (chipAfter) {
|
|
@@ -638274,6 +638284,18 @@ var init_Cursor = __esm(() => {
|
|
|
638274
638284
|
WHITESPACE_REGEX2 = /\s/;
|
|
638275
638285
|
});
|
|
638276
638286
|
|
|
638287
|
+
// src/utils/keybindingFlavor.ts
|
|
638288
|
+
function getKeybindingFlavor() {
|
|
638289
|
+
return getInitialSettings().keybindingFlavor === "readline" ? "readline" : DEFAULT_KEYBINDING_FLAVOR;
|
|
638290
|
+
}
|
|
638291
|
+
function isReadlineKeybindingFlavor() {
|
|
638292
|
+
return getKeybindingFlavor() === "readline";
|
|
638293
|
+
}
|
|
638294
|
+
var DEFAULT_KEYBINDING_FLAVOR = "classic";
|
|
638295
|
+
var init_keybindingFlavor = __esm(() => {
|
|
638296
|
+
init_settings2();
|
|
638297
|
+
});
|
|
638298
|
+
|
|
638277
638299
|
// packages/modifiers-napi/src/index.ts
|
|
638278
638300
|
var exports_src6 = {};
|
|
638279
638301
|
__export(exports_src6, {
|
|
@@ -638386,6 +638408,7 @@ function useTextInput({
|
|
|
638386
638408
|
const setOffset = onOffsetChange;
|
|
638387
638409
|
const cursor = Cursor.fromText(originalValue, columns, offset);
|
|
638388
638410
|
const { addNotification, removeNotification } = useNotifications();
|
|
638411
|
+
const isReadline = isReadlineKeybindingFlavor();
|
|
638389
638412
|
const handleCtrlC = useDoublePress((show) => {
|
|
638390
638413
|
onExitMessage?.(show, "Ctrl-C");
|
|
638391
638414
|
}, () => onExit2?.(), () => {
|
|
@@ -638461,6 +638484,12 @@ function useTextInput({
|
|
|
638461
638484
|
announceDeletedText(killed);
|
|
638462
638485
|
return newCursor;
|
|
638463
638486
|
}
|
|
638487
|
+
function killWORDBefore() {
|
|
638488
|
+
const { cursor: newCursor, killed } = cursor.deleteWORDBefore();
|
|
638489
|
+
pushToKillRing(killed, "prepend");
|
|
638490
|
+
announceDeletedText(killed);
|
|
638491
|
+
return newCursor;
|
|
638492
|
+
}
|
|
638464
638493
|
function yank() {
|
|
638465
638494
|
const text2 = getLastKill();
|
|
638466
638495
|
if (text2.length > 0) {
|
|
@@ -638496,7 +638525,7 @@ function useTextInput({
|
|
|
638496
638525
|
["n", () => downOrHistoryDown()],
|
|
638497
638526
|
["p", () => upOrHistoryUp()],
|
|
638498
638527
|
["u", fullscreen ? NOOP_HANDLER : killToLineStart],
|
|
638499
|
-
["w", killWordBefore],
|
|
638528
|
+
["w", isReadline ? killWORDBefore : killWordBefore],
|
|
638500
638529
|
["y", yank]
|
|
638501
638530
|
]);
|
|
638502
638531
|
const handleMeta = mapInput([
|
|
@@ -638706,6 +638735,7 @@ var init_useTextInput = __esm(() => {
|
|
|
638706
638735
|
init_Cursor();
|
|
638707
638736
|
init_env();
|
|
638708
638737
|
init_fullscreen();
|
|
638738
|
+
init_keybindingFlavor();
|
|
638709
638739
|
init_useDoublePress();
|
|
638710
638740
|
init_srA11y();
|
|
638711
638741
|
init_screenReader();
|
|
@@ -649218,6 +649248,7 @@ function useSearchInput({
|
|
|
649218
649248
|
const effectiveColumns = columns ?? terminalColumns;
|
|
649219
649249
|
const [query2, setQueryState] = import_react107.useState(initialQuery);
|
|
649220
649250
|
const [cursorOffset, setCursorOffset] = import_react107.useState(initialQuery.length);
|
|
649251
|
+
const isReadline = isReadlineKeybindingFlavor();
|
|
649221
649252
|
const setQuery = import_react107.useCallback((q6) => {
|
|
649222
649253
|
setQueryState(q6);
|
|
649223
649254
|
setCursorOffset(q6.length);
|
|
@@ -649370,7 +649401,7 @@ function useSearchInput({
|
|
|
649370
649401
|
return;
|
|
649371
649402
|
}
|
|
649372
649403
|
case "w": {
|
|
649373
|
-
const { cursor: newCursor, killed } = cursor.deleteWordBefore();
|
|
649404
|
+
const { cursor: newCursor, killed } = isReadline ? cursor.deleteWORDBefore() : cursor.deleteWordBefore();
|
|
649374
649405
|
pushToKillRing(killed, "prepend");
|
|
649375
649406
|
setQueryState(newCursor.text);
|
|
649376
649407
|
setCursorOffset(newCursor.offset);
|
|
@@ -649448,6 +649479,7 @@ var init_useSearchInput = __esm(() => {
|
|
|
649448
649479
|
init_keyboard_event();
|
|
649449
649480
|
init_ink2();
|
|
649450
649481
|
init_Cursor();
|
|
649482
|
+
init_keybindingFlavor();
|
|
649451
649483
|
init_useTerminalSize();
|
|
649452
649484
|
import_react107 = __toESM(require_react(), 1);
|
|
649453
649485
|
UNHANDLED_SPECIAL_KEYS = new Set([
|