@cnwenf/occ 2.1.325 → 2.1.327
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 +114 -71
- 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.327","BINARY_NAME":"occ","BUILD_TIME":"2026-09-09T22:35:02.507Z","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;
|
|
@@ -101087,7 +101087,8 @@ var init_aliases = __esm(() => {
|
|
|
101087
101087
|
"fable",
|
|
101088
101088
|
"sonnet[1m]",
|
|
101089
101089
|
"opus[1m]",
|
|
101090
|
-
"opusplan"
|
|
101090
|
+
"opusplan",
|
|
101091
|
+
"opusplan[1m]"
|
|
101091
101092
|
];
|
|
101092
101093
|
MODEL_FAMILY_ALIASES = ["sonnet", "opus", "haiku", "fable"];
|
|
101093
101094
|
});
|
|
@@ -101501,6 +101502,9 @@ function renderModelSetting(setting) {
|
|
|
101501
101502
|
if (setting === "opusplan") {
|
|
101502
101503
|
return "Opus Plan";
|
|
101503
101504
|
}
|
|
101505
|
+
if (setting === "opusplan[1m]") {
|
|
101506
|
+
return renderModelName(parseUserSpecifiedModel(setting));
|
|
101507
|
+
}
|
|
101504
101508
|
if (isModelAlias(setting)) {
|
|
101505
101509
|
return capitalize(setting);
|
|
101506
101510
|
}
|
|
@@ -474592,6 +474596,9 @@ function KeybindingSetup({
|
|
|
474592
474596
|
});
|
|
474593
474597
|
const [isReload, setIsReload] = import_react83.useState(false);
|
|
474594
474598
|
useKeybindingWarnings(warnings, isReload);
|
|
474599
|
+
const {
|
|
474600
|
+
addNotification
|
|
474601
|
+
} = useNotifications();
|
|
474595
474602
|
const pendingChordRef = import_react83.useRef(null);
|
|
474596
474603
|
const [pendingChord, setPendingChordState] = import_react83.useState(null);
|
|
474597
474604
|
const chordTimeoutRef = import_react83.useRef(null);
|
|
@@ -474612,15 +474619,24 @@ function KeybindingSetup({
|
|
|
474612
474619
|
const setPendingChord = import_react83.useCallback((pending) => {
|
|
474613
474620
|
clearChordTimeout();
|
|
474614
474621
|
if (pending !== null) {
|
|
474615
|
-
chordTimeoutRef.current = setTimeout((pendingChordRef_0, setPendingChordState_0) => {
|
|
474622
|
+
chordTimeoutRef.current = setTimeout((pendingChordRef_0, setPendingChordState_0, addNotification_0) => {
|
|
474616
474623
|
logForDebugging("[keybindings] Chord timeout - cancelling");
|
|
474624
|
+
const timedOutChord = pendingChordRef_0.current;
|
|
474625
|
+
if (timedOutChord !== null) {
|
|
474626
|
+
addNotification_0({
|
|
474627
|
+
key: "chord-timeout",
|
|
474628
|
+
text: `${chordToDisplayString(timedOutChord, getPlatform())} cancelled \u2014 no next key within ${CHORD_TIMEOUT_MS / 1000}s`,
|
|
474629
|
+
priority: "immediate",
|
|
474630
|
+
timeoutMs: 3000
|
|
474631
|
+
});
|
|
474632
|
+
}
|
|
474617
474633
|
pendingChordRef_0.current = null;
|
|
474618
474634
|
setPendingChordState_0(null);
|
|
474619
|
-
}, CHORD_TIMEOUT_MS, pendingChordRef, setPendingChordState);
|
|
474635
|
+
}, CHORD_TIMEOUT_MS, pendingChordRef, setPendingChordState, addNotification);
|
|
474620
474636
|
}
|
|
474621
474637
|
pendingChordRef.current = pending;
|
|
474622
474638
|
setPendingChordState(pending);
|
|
474623
|
-
}, [clearChordTimeout]);
|
|
474639
|
+
}, [clearChordTimeout, addNotification]);
|
|
474624
474640
|
import_react83.useEffect(() => {
|
|
474625
474641
|
initializeKeybindingWatcher();
|
|
474626
474642
|
const unsubscribe2 = subscribeToKeybindingChanges((result_0) => {
|
|
@@ -474681,44 +474697,43 @@ function ChordInterceptor(t0) {
|
|
|
474681
474697
|
const contexts = [...handlerContexts, ...activeContexts, "Global"];
|
|
474682
474698
|
const wasInChord = pendingChordRef.current !== null;
|
|
474683
474699
|
const result = resolveKeyWithChordState(input, key3, contexts, bindings, pendingChordRef.current);
|
|
474684
|
-
|
|
474685
|
-
|
|
474686
|
-
|
|
474687
|
-
|
|
474688
|
-
|
|
474689
|
-
|
|
474690
|
-
|
|
474691
|
-
|
|
474692
|
-
|
|
474693
|
-
|
|
474694
|
-
|
|
474695
|
-
|
|
474696
|
-
|
|
474697
|
-
|
|
474698
|
-
|
|
474699
|
-
|
|
474700
|
-
|
|
474701
|
-
|
|
474702
|
-
break;
|
|
474703
|
-
}
|
|
474700
|
+
switch (result.type) {
|
|
474701
|
+
case "chord_started": {
|
|
474702
|
+
setPendingChord(result.pending);
|
|
474703
|
+
event.stopImmediatePropagation();
|
|
474704
|
+
break;
|
|
474705
|
+
}
|
|
474706
|
+
case "match": {
|
|
474707
|
+
setPendingChord(null);
|
|
474708
|
+
if (wasInChord) {
|
|
474709
|
+
const contextsSet = new Set(contexts);
|
|
474710
|
+
if (registry2) {
|
|
474711
|
+
const handlers_0 = registry2.get(result.action);
|
|
474712
|
+
if (handlers_0 && handlers_0.size > 0) {
|
|
474713
|
+
for (const registration_0 of handlers_0) {
|
|
474714
|
+
if (contextsSet.has(registration_0.context)) {
|
|
474715
|
+
registration_0.handler();
|
|
474716
|
+
event.stopImmediatePropagation();
|
|
474717
|
+
break;
|
|
474704
474718
|
}
|
|
474705
474719
|
}
|
|
474706
474720
|
}
|
|
474707
474721
|
}
|
|
474708
|
-
break bb23;
|
|
474709
474722
|
}
|
|
474710
|
-
|
|
474711
|
-
|
|
474712
|
-
|
|
474713
|
-
|
|
474714
|
-
|
|
474715
|
-
|
|
474716
|
-
setPendingChord(null);
|
|
474717
|
-
event.stopImmediatePropagation();
|
|
474718
|
-
break bb23;
|
|
474719
|
-
}
|
|
474720
|
-
case "none":
|
|
474723
|
+
break;
|
|
474724
|
+
}
|
|
474725
|
+
case "chord_cancelled": {
|
|
474726
|
+
setPendingChord(null);
|
|
474727
|
+
event.stopImmediatePropagation();
|
|
474728
|
+
break;
|
|
474721
474729
|
}
|
|
474730
|
+
case "unbound": {
|
|
474731
|
+
setPendingChord(null);
|
|
474732
|
+
event.stopImmediatePropagation();
|
|
474733
|
+
break;
|
|
474734
|
+
}
|
|
474735
|
+
case "none":
|
|
474736
|
+
}
|
|
474722
474737
|
};
|
|
474723
474738
|
$3[0] = activeContexts;
|
|
474724
474739
|
$3[1] = bindings;
|
|
@@ -474733,11 +474748,12 @@ function ChordInterceptor(t0) {
|
|
|
474733
474748
|
use_input_default(handleInput);
|
|
474734
474749
|
return null;
|
|
474735
474750
|
}
|
|
474736
|
-
var import_compiler_runtime112, import_react83, jsx_runtime132, CHORD_TIMEOUT_MS =
|
|
474751
|
+
var import_compiler_runtime112, import_react83, jsx_runtime132, CHORD_TIMEOUT_MS = 3000;
|
|
474737
474752
|
var init_KeybindingProviderSetup = __esm(() => {
|
|
474738
474753
|
init_notifications();
|
|
474739
474754
|
init_ink2();
|
|
474740
474755
|
init_debug();
|
|
474756
|
+
init_platform2();
|
|
474741
474757
|
init_stringUtils();
|
|
474742
474758
|
init_KeybindingContext();
|
|
474743
474759
|
init_loadUserBindings();
|
|
@@ -714975,8 +714991,33 @@ var init_export2 = __esm(() => {
|
|
|
714975
714991
|
// src/commands/model/model.tsx
|
|
714976
714992
|
var exports_model2 = {};
|
|
714977
714993
|
__export(exports_model2, {
|
|
714994
|
+
saveModelAsDefault: () => saveModelAsDefault,
|
|
714995
|
+
renderModelSaveFailureSuffix: () => renderModelSaveFailureSuffix,
|
|
714978
714996
|
call: () => call78
|
|
714979
714997
|
});
|
|
714998
|
+
import { homedir as homedir42 } from "os";
|
|
714999
|
+
function saveModelAsDefault(model) {
|
|
715000
|
+
const {
|
|
715001
|
+
error: error52
|
|
715002
|
+
} = updateSettingsForSource("userSettings", {
|
|
715003
|
+
model
|
|
715004
|
+
});
|
|
715005
|
+
return error52 ? {
|
|
715006
|
+
kind: "failed",
|
|
715007
|
+
error: error52
|
|
715008
|
+
} : {
|
|
715009
|
+
kind: "saved"
|
|
715010
|
+
};
|
|
715011
|
+
}
|
|
715012
|
+
function renderModelSaveFailureSuffix(result) {
|
|
715013
|
+
if (result.kind === "saved") {
|
|
715014
|
+
return "";
|
|
715015
|
+
}
|
|
715016
|
+
const settingsPath = getSettingsFilePathForSource("userSettings") ?? "settings.json";
|
|
715017
|
+
const displayPath = settingsPath.replace(homedir42(), "~");
|
|
715018
|
+
const reason = result.error.message.startsWith("Invalid JSON syntax") ? "isn't valid JSON" : `can't be written (${result.error.message})`;
|
|
715019
|
+
return ` \xB7 couldn't save it as your default: ${displayPath} ${reason}`;
|
|
715020
|
+
}
|
|
714980
715021
|
function ModelPickerWrapper({ onDone }) {
|
|
714981
715022
|
const mainLoopModel = useAppState((s4) => s4.mainLoopModel);
|
|
714982
715023
|
const mainLoopModelForSession = useAppState((s4) => s4.mainLoopModelForSession);
|
|
@@ -715006,8 +715047,9 @@ function ModelPickerWrapper({ onDone }) {
|
|
|
715006
715047
|
onDone("Model reset to default for this session");
|
|
715007
715048
|
return;
|
|
715008
715049
|
}
|
|
715009
|
-
|
|
715010
|
-
|
|
715050
|
+
const saveResult = saveModelAsDefault(model);
|
|
715051
|
+
const isSaved = saveResult.kind === "saved";
|
|
715052
|
+
let message = `Set model to ${source_default.bold(renderModelLabel(model))}${isSaved ? " and saved as your default for new sessions" : " for this session only"}`;
|
|
715011
715053
|
if (effort !== undefined) {
|
|
715012
715054
|
message = message + ` with ${source_default.bold(effort)} effort`;
|
|
715013
715055
|
}
|
|
@@ -715027,6 +715069,7 @@ function ModelPickerWrapper({ onDone }) {
|
|
|
715027
715069
|
}
|
|
715028
715070
|
}
|
|
715029
715071
|
}
|
|
715072
|
+
message = message + renderModelSaveFailureSuffix(saveResult);
|
|
715030
715073
|
if (isBilledAsExtraUsage(model, wasFastModeToggledOn === true, isOpus1mMergeEnabled())) {
|
|
715031
715074
|
message = message + " \xB7 Billed as extra usage";
|
|
715032
715075
|
}
|
|
@@ -715106,13 +715149,13 @@ function SetModelAndClose({
|
|
|
715106
715149
|
return;
|
|
715107
715150
|
}
|
|
715108
715151
|
if (model && isOpus1mUnavailable(model)) {
|
|
715109
|
-
onDone(`Opus
|
|
715152
|
+
onDone(`Opus with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`, {
|
|
715110
715153
|
display: "system"
|
|
715111
715154
|
});
|
|
715112
715155
|
return;
|
|
715113
715156
|
}
|
|
715114
715157
|
if (model && isSonnet1mUnavailable(model)) {
|
|
715115
|
-
onDone(`Sonnet
|
|
715158
|
+
onDone(`Sonnet with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m`, {
|
|
715116
715159
|
display: "system"
|
|
715117
715160
|
});
|
|
715118
715161
|
return;
|
|
@@ -715177,7 +715220,7 @@ function isOpus1mUnavailable(model) {
|
|
|
715177
715220
|
}
|
|
715178
715221
|
function isSonnet1mUnavailable(model) {
|
|
715179
715222
|
const m5 = model.toLowerCase();
|
|
715180
|
-
return !checkSonnet1mAccess() && (m5.includes("sonnet[1m]") || m5.includes("sonnet-4-6[1m]"));
|
|
715223
|
+
return !checkSonnet1mAccess() && (m5.includes("sonnet[1m]") || m5.includes("sonnet-4-6[1m]") || m5.includes("sonnet-5[1m]") || m5.trim() === "opusplan[1m]");
|
|
715181
715224
|
}
|
|
715182
715225
|
function ShowModelAndClose(t0) {
|
|
715183
715226
|
const {
|
|
@@ -718607,7 +718650,7 @@ var init_force_snip = __esm(() => {
|
|
|
718607
718650
|
});
|
|
718608
718651
|
|
|
718609
718652
|
// src/utils/effort/workflowSavePath.ts
|
|
718610
|
-
import { homedir as
|
|
718653
|
+
import { homedir as homedir43 } from "os";
|
|
718611
718654
|
import { join as join159, sep as sep45 } from "path";
|
|
718612
718655
|
function userWorkflowsDir2() {
|
|
718613
718656
|
return join159(getClaudeConfigHomeDir(), "workflows");
|
|
@@ -718619,7 +718662,7 @@ function resolveWorkflowsDir(scope, cwd2) {
|
|
|
718619
718662
|
return join159(cwd2, ".claude", "workflows");
|
|
718620
718663
|
}
|
|
718621
718664
|
function tildeShortenPath(absPath) {
|
|
718622
|
-
const home =
|
|
718665
|
+
const home = homedir43();
|
|
718623
718666
|
if (absPath === home)
|
|
718624
718667
|
return "~";
|
|
718625
718668
|
if (absPath.startsWith(home + sep45))
|
|
@@ -726138,7 +726181,7 @@ var init_agentMemory = __esm(() => {
|
|
|
726138
726181
|
|
|
726139
726182
|
// src/utils/permissions/filesystem.ts
|
|
726140
726183
|
import { randomBytes as randomBytes19 } from "crypto";
|
|
726141
|
-
import { homedir as
|
|
726184
|
+
import { homedir as homedir44, tmpdir as tmpdir15 } from "os";
|
|
726142
726185
|
import { join as join164, normalize as normalize18, posix as posix8, sep as sep47 } from "path";
|
|
726143
726186
|
function normalizeCaseForComparison2(path39) {
|
|
726144
726187
|
return path39.toLowerCase();
|
|
@@ -726152,7 +726195,7 @@ function getClaudeSkillScope(filePath) {
|
|
|
726152
726195
|
prefix: "/.claude/skills/"
|
|
726153
726196
|
},
|
|
726154
726197
|
{
|
|
726155
|
-
dir: expandPath(join164(
|
|
726198
|
+
dir: expandPath(join164(homedir44(), ".claude", "skills")),
|
|
726156
726199
|
prefix: "~/.claude/skills/"
|
|
726157
726200
|
}
|
|
726158
726201
|
];
|
|
@@ -726466,7 +726509,7 @@ function patternWithRoot(pattern, source2) {
|
|
|
726466
726509
|
} else if (pattern.startsWith(`~${DIR_SEP}`)) {
|
|
726467
726510
|
return {
|
|
726468
726511
|
relativePattern: pattern.slice(1),
|
|
726469
|
-
root:
|
|
726512
|
+
root: homedir44().normalize("NFC")
|
|
726470
726513
|
};
|
|
726471
726514
|
} else if (pattern.startsWith(DIR_SEP)) {
|
|
726472
726515
|
return {
|
|
@@ -726497,7 +726540,7 @@ function getCachedPatternMatchers(toolPermissionContext, toolType, behavior) {
|
|
|
726497
726540
|
toolType,
|
|
726498
726541
|
behavior,
|
|
726499
726542
|
getPlatform(),
|
|
726500
|
-
|
|
726543
|
+
homedir44(),
|
|
726501
726544
|
getCwd(),
|
|
726502
726545
|
getOriginalCwd(),
|
|
726503
726546
|
additionalDirs
|
|
@@ -733712,7 +733755,7 @@ import {
|
|
|
733712
733755
|
unlink as unlink28
|
|
733713
733756
|
} from "fs/promises";
|
|
733714
733757
|
import { createServer as createServer8 } from "net";
|
|
733715
|
-
import { homedir as
|
|
733758
|
+
import { homedir as homedir45, platform as platform6 } from "os";
|
|
733716
733759
|
import { join as join167 } from "path";
|
|
733717
733760
|
function log3(message, ...args) {
|
|
733718
733761
|
if (LOG_FILE) {
|
|
@@ -734051,7 +734094,7 @@ var init_chromeNativeHost = __esm(() => {
|
|
|
734051
734094
|
init_slowOperations();
|
|
734052
734095
|
init_common4();
|
|
734053
734096
|
MAX_MESSAGE_SIZE = 1024 * 1024;
|
|
734054
|
-
LOG_FILE = process.env.USER_TYPE === "ant" ? join167(
|
|
734097
|
+
LOG_FILE = process.env.USER_TYPE === "ant" ? join167(homedir45(), ".claude", "debug", "chrome-native-host.txt") : undefined;
|
|
734055
734098
|
messageSchema = lazySchema(() => exports_external.object({
|
|
734056
734099
|
type: exports_external.string()
|
|
734057
734100
|
}).passthrough());
|
|
@@ -740292,7 +740335,7 @@ __export(exports_upstreamproxy, {
|
|
|
740292
740335
|
SESSION_TOKEN_PATH: () => SESSION_TOKEN_PATH
|
|
740293
740336
|
});
|
|
740294
740337
|
import { mkdir as mkdir57, readFile as readFile65, unlink as unlink30, writeFile as writeFile57 } from "fs/promises";
|
|
740295
|
-
import { homedir as
|
|
740338
|
+
import { homedir as homedir46 } from "os";
|
|
740296
740339
|
import { join as join173 } from "path";
|
|
740297
740340
|
async function initUpstreamProxy(opts) {
|
|
740298
740341
|
if (!isEnvTruthy(process.env.CLAUDE_CODE_REMOTE)) {
|
|
@@ -740314,7 +740357,7 @@ async function initUpstreamProxy(opts) {
|
|
|
740314
740357
|
}
|
|
740315
740358
|
setNonDumpable();
|
|
740316
740359
|
const baseUrl = opts?.ccrBaseUrl ?? process.env.ANTHROPIC_BASE_URL ?? "https://api.anthropic.com";
|
|
740317
|
-
const caBundlePath = opts?.caBundlePath ?? join173(
|
|
740360
|
+
const caBundlePath = opts?.caBundlePath ?? join173(homedir46(), ".ccr", "ca-bundle.crt");
|
|
740318
740361
|
const caOk = await downloadCaBundle(baseUrl, opts?.systemCaPath ?? SYSTEM_CA_BUNDLE, caBundlePath);
|
|
740319
740362
|
if (!caOk)
|
|
740320
740363
|
return state3;
|
|
@@ -752826,7 +752869,7 @@ var init_ShowInIDEPrompt = __esm(() => {
|
|
|
752826
752869
|
});
|
|
752827
752870
|
|
|
752828
752871
|
// src/components/permissions/FilePermissionDialog/permissionOptions.tsx
|
|
752829
|
-
import { homedir as
|
|
752872
|
+
import { homedir as homedir47 } from "os";
|
|
752830
752873
|
import { basename as basename58, join as join175, sep as sep48 } from "path";
|
|
752831
752874
|
function isInClaudeFolder(filePath) {
|
|
752832
752875
|
const absolutePath = expandPath(filePath);
|
|
@@ -752837,7 +752880,7 @@ function isInClaudeFolder(filePath) {
|
|
|
752837
752880
|
}
|
|
752838
752881
|
function isInGlobalClaudeFolder(filePath) {
|
|
752839
752882
|
const absolutePath = expandPath(filePath);
|
|
752840
|
-
const globalClaudeFolderPath = join175(
|
|
752883
|
+
const globalClaudeFolderPath = join175(homedir47(), ".claude");
|
|
752841
752884
|
const normalizedAbsolutePath = normalizeCaseForComparison2(absolutePath);
|
|
752842
752885
|
const normalizedGlobalClaudeFolderPath = normalizeCaseForComparison2(globalClaudeFolderPath);
|
|
752843
752886
|
return normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + sep48.toLowerCase()) || normalizedAbsolutePath.startsWith(normalizedGlobalClaudeFolderPath + "/");
|
|
@@ -752879,7 +752922,7 @@ function getFilePermissionOptions({
|
|
|
752879
752922
|
const inGlobalClaudeFolder = isInGlobalClaudeFolder(filePath);
|
|
752880
752923
|
if ((inClaudeFolder || inGlobalClaudeFolder) && operationType !== "read") {
|
|
752881
752924
|
options.push({
|
|
752882
|
-
label: "Yes, and allow Claude to edit its
|
|
752925
|
+
label: inGlobalClaudeFolder ? "Yes, and allow Claude to edit files in its ~/.claude folder for this session" : "Yes, and allow Claude to edit files in this project's .claude folder for this session",
|
|
752883
752926
|
value: "yes-claude-folder",
|
|
752884
752927
|
option: {
|
|
752885
752928
|
type: "accept-session",
|
|
@@ -787478,7 +787521,7 @@ var require_lib20 = __commonJS((exports, module) => {
|
|
|
787478
787521
|
|
|
787479
787522
|
// src/utils/cleanup.ts
|
|
787480
787523
|
import * as fs26 from "fs/promises";
|
|
787481
|
-
import { homedir as
|
|
787524
|
+
import { homedir as homedir48 } from "os";
|
|
787482
787525
|
import { join as join176 } from "path";
|
|
787483
787526
|
function getCutoffDate() {
|
|
787484
787527
|
const settings = getSettings_DEPRECATED() || {};
|
|
@@ -787792,7 +787835,7 @@ async function cleanupNpmCacheForAnthropicPackages() {
|
|
|
787792
787835
|
return;
|
|
787793
787836
|
}
|
|
787794
787837
|
logForDebugging("npm cache cleanup: starting");
|
|
787795
|
-
const npmCachePath = join176(
|
|
787838
|
+
const npmCachePath = join176(homedir48(), ".npm", "_cacache");
|
|
787796
787839
|
const NPM_CACHE_RETENTION_COUNT = 5;
|
|
787797
787840
|
const startTime2 = Date.now();
|
|
787798
787841
|
try {
|
|
@@ -809397,7 +809440,7 @@ var exports_TrustDialog = {};
|
|
|
809397
809440
|
__export(exports_TrustDialog, {
|
|
809398
809441
|
TrustDialog: () => TrustDialog
|
|
809399
809442
|
});
|
|
809400
|
-
import { homedir as
|
|
809443
|
+
import { homedir as homedir50 } from "os";
|
|
809401
809444
|
function TrustDialog(t0) {
|
|
809402
809445
|
const $4 = import_compiler_runtime351.c(33);
|
|
809403
809446
|
const {
|
|
@@ -809508,7 +809551,7 @@ function TrustDialog(t0) {
|
|
|
809508
809551
|
let t13;
|
|
809509
809552
|
if ($4[13] !== hasAnyBashExecution) {
|
|
809510
809553
|
t12 = () => {
|
|
809511
|
-
const isHomeDir =
|
|
809554
|
+
const isHomeDir = homedir50() === getCwd();
|
|
809512
809555
|
logEvent2("tengu_trust_dialog_shown", {
|
|
809513
809556
|
isHomeDir,
|
|
809514
809557
|
hasMcpServers,
|
|
@@ -809537,7 +809580,7 @@ function TrustDialog(t0) {
|
|
|
809537
809580
|
gracefulShutdownSync(1);
|
|
809538
809581
|
return;
|
|
809539
809582
|
}
|
|
809540
|
-
const isHomeDir_0 =
|
|
809583
|
+
const isHomeDir_0 = homedir50() === getCwd();
|
|
809541
809584
|
logEvent2("tengu_trust_dialog_accept", {
|
|
809542
809585
|
isHomeDir: isHomeDir_0,
|
|
809543
809586
|
hasMcpServers,
|
|
@@ -815384,7 +815427,7 @@ var init_bundled3 = __esm(() => {
|
|
|
815384
815427
|
|
|
815385
815428
|
// src/utils/deepLink/banner.ts
|
|
815386
815429
|
import { stat as stat53 } from "fs/promises";
|
|
815387
|
-
import { homedir as
|
|
815430
|
+
import { homedir as homedir51 } from "os";
|
|
815388
815431
|
import { join as join184, sep as sep52 } from "path";
|
|
815389
815432
|
function buildDeepLinkBanner(info) {
|
|
815390
815433
|
const lines2 = [
|
|
@@ -815423,7 +815466,7 @@ async function mtimeOrUndefined(p4) {
|
|
|
815423
815466
|
}
|
|
815424
815467
|
}
|
|
815425
815468
|
function tildify(p4) {
|
|
815426
|
-
const home =
|
|
815469
|
+
const home = homedir51();
|
|
815427
815470
|
if (p4 === home)
|
|
815428
815471
|
return "~";
|
|
815429
815472
|
if (p4.startsWith(home + sep52))
|
|
@@ -816736,7 +816779,7 @@ __export(exports_protocolHandler, {
|
|
|
816736
816779
|
handleUrlSchemeLaunch: () => handleUrlSchemeLaunch,
|
|
816737
816780
|
handleDeepLinkUri: () => handleDeepLinkUri
|
|
816738
816781
|
});
|
|
816739
|
-
import { homedir as
|
|
816782
|
+
import { homedir as homedir52 } from "os";
|
|
816740
816783
|
async function handleDeepLinkUri(uri3) {
|
|
816741
816784
|
logForDebugging(`Handling deep link URI: ${uri3}`);
|
|
816742
816785
|
let action2;
|
|
@@ -816790,7 +816833,7 @@ async function resolveCwd(action2) {
|
|
|
816790
816833
|
}
|
|
816791
816834
|
logForDebugging(`No local clone found for repo ${action2.repo}, falling back to home`);
|
|
816792
816835
|
}
|
|
816793
|
-
return { cwd:
|
|
816836
|
+
return { cwd: homedir52() };
|
|
816794
816837
|
}
|
|
816795
816838
|
var init_protocolHandler = __esm(() => {
|
|
816796
816839
|
init_debug();
|
|
@@ -817130,7 +817173,7 @@ var init_sessionMemory = __esm(() => {
|
|
|
817130
817173
|
|
|
817131
817174
|
// src/utils/iTermBackup.ts
|
|
817132
817175
|
import { copyFile as copyFile12, stat as stat54 } from "fs/promises";
|
|
817133
|
-
import { homedir as
|
|
817176
|
+
import { homedir as homedir53 } from "os";
|
|
817134
817177
|
import { join as join188 } from "path";
|
|
817135
817178
|
function markITerm2SetupComplete() {
|
|
817136
817179
|
saveGlobalConfig((current) => ({
|
|
@@ -817146,7 +817189,7 @@ function getIterm2RecoveryInfo() {
|
|
|
817146
817189
|
};
|
|
817147
817190
|
}
|
|
817148
817191
|
function getITerm2PlistPath() {
|
|
817149
|
-
return join188(
|
|
817192
|
+
return join188(homedir53(), "Library", "Preferences", "com.googlecode.iterm2.plist");
|
|
817150
817193
|
}
|
|
817151
817194
|
async function checkAndRestoreITerm2Backup() {
|
|
817152
817195
|
const { inProgress, backupPath } = getIterm2RecoveryInfo();
|
|
@@ -823316,7 +823359,7 @@ __export(exports_claudeDesktop, {
|
|
|
823316
823359
|
getClaudeDesktopConfigPath: () => getClaudeDesktopConfigPath
|
|
823317
823360
|
});
|
|
823318
823361
|
import { readdir as readdir38, readFile as readFile70, stat as stat56 } from "fs/promises";
|
|
823319
|
-
import { homedir as
|
|
823362
|
+
import { homedir as homedir54 } from "os";
|
|
823320
823363
|
import { join as join191 } from "path";
|
|
823321
823364
|
async function getClaudeDesktopConfigPath() {
|
|
823322
823365
|
const platform7 = getPlatform();
|
|
@@ -823324,7 +823367,7 @@ async function getClaudeDesktopConfigPath() {
|
|
|
823324
823367
|
throw new Error(`Unsupported platform: ${platform7} - Claude Desktop integration only works on macOS and WSL.`);
|
|
823325
823368
|
}
|
|
823326
823369
|
if (platform7 === "macos") {
|
|
823327
|
-
return join191(
|
|
823370
|
+
return join191(homedir54(), "Library", "Application Support", "Claude", "claude_desktop_config.json");
|
|
823328
823371
|
}
|
|
823329
823372
|
const windowsHome = process.env.USERPROFILE ? process.env.USERPROFILE.replace(/\\/g, "/") : null;
|
|
823330
823373
|
if (windowsHome) {
|
|
@@ -824388,11 +824431,11 @@ var exports_install = {};
|
|
|
824388
824431
|
__export(exports_install, {
|
|
824389
824432
|
install: () => install2
|
|
824390
824433
|
});
|
|
824391
|
-
import { homedir as
|
|
824434
|
+
import { homedir as homedir55 } from "os";
|
|
824392
824435
|
import { join as join192 } from "path";
|
|
824393
824436
|
function getInstallationPath2() {
|
|
824394
824437
|
const isWindows3 = env4.platform === "win32";
|
|
824395
|
-
const homeDir =
|
|
824438
|
+
const homeDir = homedir55();
|
|
824396
824439
|
if (isWindows3) {
|
|
824397
824440
|
const windowsPath = join192(homeDir, ".local", "bin", "claude.exe");
|
|
824398
824441
|
return windowsPath.replace(/\//g, "\\");
|