@kianax/wt 0.1.5 → 0.1.6
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/LICENSE +21 -0
- package/README.md +72 -19
- package/dist/cli.js +716 -192
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -14768,35 +14768,23 @@ async function loadGlobalConfig() {
|
|
|
14768
14768
|
}
|
|
14769
14769
|
return result.data;
|
|
14770
14770
|
}
|
|
14771
|
-
async function
|
|
14772
|
-
const
|
|
14773
|
-
const raw = await loadJsonFile(path);
|
|
14774
|
-
if (!raw) {
|
|
14775
|
-
return null;
|
|
14776
|
-
}
|
|
14777
|
-
const result = LocalConfigSchema.safeParse(raw);
|
|
14778
|
-
if (!result.success) {
|
|
14779
|
-
console.warn(`Invalid local config at ${path}, ignoring`);
|
|
14780
|
-
return null;
|
|
14781
|
-
}
|
|
14782
|
-
return result.data;
|
|
14783
|
-
}
|
|
14784
|
-
async function getConfig(repoRoot, repoId) {
|
|
14785
|
-
const [config2, localConfig] = await Promise.all([
|
|
14786
|
-
loadGlobalConfig(),
|
|
14787
|
-
loadLocalConfig(repoRoot)
|
|
14788
|
-
]);
|
|
14771
|
+
async function getConfig(_repoRoot, repoId) {
|
|
14772
|
+
const config2 = await loadGlobalConfig();
|
|
14789
14773
|
const repoOverride = config2.repos?.[repoId];
|
|
14790
|
-
const branchPrefix =
|
|
14774
|
+
const branchPrefix = repoOverride?.branchPrefix ?? config2.defaults.branchPrefix;
|
|
14791
14775
|
const worktreeBase = expandHome(repoOverride?.base ?? config2.paths.base);
|
|
14776
|
+
const comparisonBranch = repoOverride?.comparisonBranch ?? config2.defaults.comparisonBranch;
|
|
14792
14777
|
return {
|
|
14793
14778
|
config: config2,
|
|
14794
|
-
localConfig,
|
|
14795
14779
|
branchPrefix,
|
|
14796
|
-
worktreeBase
|
|
14780
|
+
worktreeBase,
|
|
14781
|
+
comparisonBranch
|
|
14797
14782
|
};
|
|
14798
14783
|
}
|
|
14799
|
-
|
|
14784
|
+
async function saveGlobalConfig(config2) {
|
|
14785
|
+
await writeFileText(GLOBAL_CONFIG_PATH, JSON.stringify(config2, null, 2));
|
|
14786
|
+
}
|
|
14787
|
+
var GLOBAL_CONFIG_PATH, RepoOverrideSchema, ConfigSchema, DEFAULT_CONFIG;
|
|
14800
14788
|
var init_config = __esm(() => {
|
|
14801
14789
|
init_zod();
|
|
14802
14790
|
init_compat();
|
|
@@ -14804,7 +14792,8 @@ var init_config = __esm(() => {
|
|
|
14804
14792
|
GLOBAL_CONFIG_PATH = join2(homedir2(), ".config", "wt", "config.json");
|
|
14805
14793
|
RepoOverrideSchema = exports_external.object({
|
|
14806
14794
|
branchPrefix: exports_external.string().max(30).regex(/^[a-zA-Z0-9_/-]*$/, "Invalid branch prefix format").optional(),
|
|
14807
|
-
base: exports_external.string().optional()
|
|
14795
|
+
base: exports_external.string().optional(),
|
|
14796
|
+
comparisonBranch: exports_external.string().optional()
|
|
14808
14797
|
});
|
|
14809
14798
|
ConfigSchema = exports_external.object({
|
|
14810
14799
|
paths: exports_external.object({
|
|
@@ -14813,15 +14802,11 @@ var init_config = __esm(() => {
|
|
|
14813
14802
|
}).default({ strategy: "centralized", base: "~/.worktrees" }),
|
|
14814
14803
|
defaults: exports_external.object({
|
|
14815
14804
|
branchPrefix: exports_external.string().default(""),
|
|
14816
|
-
staleDays: exports_external.number().default(30)
|
|
14805
|
+
staleDays: exports_external.number().default(30),
|
|
14806
|
+
comparisonBranch: exports_external.string().optional()
|
|
14817
14807
|
}).default({ branchPrefix: "", staleDays: 30 }),
|
|
14818
14808
|
repos: exports_external.record(exports_external.string(), RepoOverrideSchema).optional()
|
|
14819
14809
|
});
|
|
14820
|
-
LocalConfigSchema = exports_external.object({
|
|
14821
|
-
defaults: exports_external.object({
|
|
14822
|
-
branchPrefix: exports_external.string().optional()
|
|
14823
|
-
}).optional()
|
|
14824
|
-
});
|
|
14825
14810
|
DEFAULT_CONFIG = {
|
|
14826
14811
|
paths: {
|
|
14827
14812
|
strategy: "centralized",
|
|
@@ -14851,7 +14836,7 @@ var package_default;
|
|
|
14851
14836
|
var init_package = __esm(() => {
|
|
14852
14837
|
package_default = {
|
|
14853
14838
|
name: "@kianax/wt",
|
|
14854
|
-
version: "0.1.
|
|
14839
|
+
version: "0.1.6",
|
|
14855
14840
|
description: "Git worktree manager - make worktrees as effortless as branches",
|
|
14856
14841
|
type: "module",
|
|
14857
14842
|
main: "dist/cli.js",
|
|
@@ -53143,7 +53128,15 @@ function DetailsView({ worktree, onClose, onSelect }) {
|
|
|
53143
53128
|
}, undefined, true, undefined, this),
|
|
53144
53129
|
worktree.ahead === 0 && worktree.behind === 0 && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
53145
53130
|
children: "up to date"
|
|
53146
|
-
}, undefined, false, undefined, this)
|
|
53131
|
+
}, undefined, false, undefined, this),
|
|
53132
|
+
worktree.comparisonBranch && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Text, {
|
|
53133
|
+
dimColor: true,
|
|
53134
|
+
children: [
|
|
53135
|
+
" (vs ",
|
|
53136
|
+
worktree.comparisonBranch,
|
|
53137
|
+
")"
|
|
53138
|
+
]
|
|
53139
|
+
}, undefined, true, undefined, this)
|
|
53147
53140
|
]
|
|
53148
53141
|
}, undefined, true, undefined, this),
|
|
53149
53142
|
commitMessage && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Box_default, {
|
|
@@ -53331,118 +53324,616 @@ var init_RenameDialog = __esm(async () => {
|
|
|
53331
53324
|
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53332
53325
|
});
|
|
53333
53326
|
|
|
53327
|
+
// src/tui/components/SettingsDialog.tsx
|
|
53328
|
+
function SettingsDialog({
|
|
53329
|
+
repoId,
|
|
53330
|
+
onClose,
|
|
53331
|
+
onSaved
|
|
53332
|
+
}) {
|
|
53333
|
+
const [config2, setConfig] = import_react30.useState(null);
|
|
53334
|
+
const [selectedField, setSelectedField] = import_react30.useState("paths.strategy");
|
|
53335
|
+
const [editMode, setEditMode] = import_react30.useState(false);
|
|
53336
|
+
const [editValue, setEditValue] = import_react30.useState("");
|
|
53337
|
+
const [error48, setError] = import_react30.useState(null);
|
|
53338
|
+
const [isSaving, setIsSaving] = import_react30.useState(false);
|
|
53339
|
+
const [repoOverrideIds, setRepoOverrideIds] = import_react30.useState([]);
|
|
53340
|
+
import_react30.useEffect(() => {
|
|
53341
|
+
loadGlobalConfig().then((cfg) => {
|
|
53342
|
+
setConfig(cfg);
|
|
53343
|
+
setRepoOverrideIds(Object.keys(cfg.repos ?? {}));
|
|
53344
|
+
});
|
|
53345
|
+
}, []);
|
|
53346
|
+
const allFields = [
|
|
53347
|
+
...FIELD_ORDER,
|
|
53348
|
+
...repoOverrideIds.flatMap((id) => [
|
|
53349
|
+
`repos.${id}.branchPrefix`,
|
|
53350
|
+
`repos.${id}.base`,
|
|
53351
|
+
`repos.${id}.comparisonBranch`
|
|
53352
|
+
]),
|
|
53353
|
+
"addRepo"
|
|
53354
|
+
];
|
|
53355
|
+
const selectedIndex = allFields.indexOf(selectedField);
|
|
53356
|
+
function getFieldValue(fieldId) {
|
|
53357
|
+
if (!config2)
|
|
53358
|
+
return "";
|
|
53359
|
+
if (fieldId === "paths.strategy")
|
|
53360
|
+
return config2.paths.strategy;
|
|
53361
|
+
if (fieldId === "paths.base")
|
|
53362
|
+
return config2.paths.base;
|
|
53363
|
+
if (fieldId === "defaults.branchPrefix")
|
|
53364
|
+
return config2.defaults.branchPrefix;
|
|
53365
|
+
if (fieldId === "defaults.staleDays")
|
|
53366
|
+
return String(config2.defaults.staleDays);
|
|
53367
|
+
if (fieldId === "defaults.comparisonBranch")
|
|
53368
|
+
return config2.defaults.comparisonBranch ?? "";
|
|
53369
|
+
const match = fieldId.match(/^repos\.(.+)\.(branchPrefix|base|comparisonBranch)$/);
|
|
53370
|
+
if (match) {
|
|
53371
|
+
const [, repoId2, field] = match;
|
|
53372
|
+
const repoConfig = config2.repos?.[repoId2];
|
|
53373
|
+
if (!repoConfig)
|
|
53374
|
+
return "";
|
|
53375
|
+
return repoConfig[field] ?? "";
|
|
53376
|
+
}
|
|
53377
|
+
return "";
|
|
53378
|
+
}
|
|
53379
|
+
function updateField(fieldId, value) {
|
|
53380
|
+
if (!config2)
|
|
53381
|
+
return;
|
|
53382
|
+
const newConfig = { ...config2 };
|
|
53383
|
+
if (fieldId === "paths.strategy") {
|
|
53384
|
+
newConfig.paths = {
|
|
53385
|
+
...newConfig.paths,
|
|
53386
|
+
strategy: value
|
|
53387
|
+
};
|
|
53388
|
+
} else if (fieldId === "paths.base") {
|
|
53389
|
+
newConfig.paths = { ...newConfig.paths, base: value };
|
|
53390
|
+
} else if (fieldId === "defaults.branchPrefix") {
|
|
53391
|
+
newConfig.defaults = { ...newConfig.defaults, branchPrefix: value };
|
|
53392
|
+
} else if (fieldId === "defaults.staleDays") {
|
|
53393
|
+
const num = Number.parseInt(value, 10);
|
|
53394
|
+
if (!Number.isNaN(num) && num > 0) {
|
|
53395
|
+
newConfig.defaults = { ...newConfig.defaults, staleDays: num };
|
|
53396
|
+
}
|
|
53397
|
+
} else if (fieldId === "defaults.comparisonBranch") {
|
|
53398
|
+
newConfig.defaults = {
|
|
53399
|
+
...newConfig.defaults,
|
|
53400
|
+
comparisonBranch: value || undefined
|
|
53401
|
+
};
|
|
53402
|
+
} else {
|
|
53403
|
+
const match = fieldId.match(/^repos\.(.+)\.(branchPrefix|base|comparisonBranch)$/);
|
|
53404
|
+
if (match) {
|
|
53405
|
+
const [, repoIdMatch, field] = match;
|
|
53406
|
+
newConfig.repos = {
|
|
53407
|
+
...newConfig.repos,
|
|
53408
|
+
[repoIdMatch]: {
|
|
53409
|
+
...newConfig.repos?.[repoIdMatch],
|
|
53410
|
+
[field]: value || undefined
|
|
53411
|
+
}
|
|
53412
|
+
};
|
|
53413
|
+
}
|
|
53414
|
+
}
|
|
53415
|
+
setConfig(newConfig);
|
|
53416
|
+
}
|
|
53417
|
+
function addRepoOverride(id) {
|
|
53418
|
+
if (!config2 || !id.trim())
|
|
53419
|
+
return;
|
|
53420
|
+
const newConfig = {
|
|
53421
|
+
...config2,
|
|
53422
|
+
repos: {
|
|
53423
|
+
...config2.repos,
|
|
53424
|
+
[id]: { branchPrefix: "", base: "", comparisonBranch: "" }
|
|
53425
|
+
}
|
|
53426
|
+
};
|
|
53427
|
+
setConfig(newConfig);
|
|
53428
|
+
setRepoOverrideIds([...repoOverrideIds, id]);
|
|
53429
|
+
setSelectedField(`repos.${id}.branchPrefix`);
|
|
53430
|
+
}
|
|
53431
|
+
function deleteRepoOverride(id) {
|
|
53432
|
+
if (!config2)
|
|
53433
|
+
return;
|
|
53434
|
+
const newRepos = { ...config2.repos };
|
|
53435
|
+
delete newRepos[id];
|
|
53436
|
+
setConfig({ ...config2, repos: newRepos });
|
|
53437
|
+
setRepoOverrideIds(repoOverrideIds.filter((r) => r !== id));
|
|
53438
|
+
setSelectedField("addRepo");
|
|
53439
|
+
}
|
|
53440
|
+
async function handleSave() {
|
|
53441
|
+
if (!config2)
|
|
53442
|
+
return;
|
|
53443
|
+
const result = ConfigSchema.safeParse(config2);
|
|
53444
|
+
if (!result.success) {
|
|
53445
|
+
const firstIssue = result.error.issues[0];
|
|
53446
|
+
setError(`Validation error: ${firstIssue?.message ?? "Unknown error"}`);
|
|
53447
|
+
return;
|
|
53448
|
+
}
|
|
53449
|
+
setIsSaving(true);
|
|
53450
|
+
setError(null);
|
|
53451
|
+
try {
|
|
53452
|
+
await saveGlobalConfig(config2);
|
|
53453
|
+
onSaved();
|
|
53454
|
+
} catch (err) {
|
|
53455
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
53456
|
+
setIsSaving(false);
|
|
53457
|
+
}
|
|
53458
|
+
}
|
|
53459
|
+
use_input_default((input, key) => {
|
|
53460
|
+
if (isSaving)
|
|
53461
|
+
return;
|
|
53462
|
+
if (editMode) {
|
|
53463
|
+
if (key.escape) {
|
|
53464
|
+
setEditMode(false);
|
|
53465
|
+
setEditValue("");
|
|
53466
|
+
return;
|
|
53467
|
+
}
|
|
53468
|
+
if (key.return) {
|
|
53469
|
+
if (selectedField === "addRepo" && editValue.trim()) {
|
|
53470
|
+
addRepoOverride(editValue.trim());
|
|
53471
|
+
} else {
|
|
53472
|
+
updateField(selectedField, editValue);
|
|
53473
|
+
}
|
|
53474
|
+
setEditMode(false);
|
|
53475
|
+
setEditValue("");
|
|
53476
|
+
return;
|
|
53477
|
+
}
|
|
53478
|
+
if (selectedField === "paths.strategy") {
|
|
53479
|
+
if (key.leftArrow || key.rightArrow) {
|
|
53480
|
+
const currentIdx = STRATEGIES.indexOf(editValue);
|
|
53481
|
+
const newIdx = key.rightArrow ? (currentIdx + 1) % STRATEGIES.length : (currentIdx - 1 + STRATEGIES.length) % STRATEGIES.length;
|
|
53482
|
+
setEditValue(STRATEGIES[newIdx]);
|
|
53483
|
+
}
|
|
53484
|
+
return;
|
|
53485
|
+
}
|
|
53486
|
+
if (selectedField === "defaults.staleDays") {
|
|
53487
|
+
if (key.backspace || key.delete) {
|
|
53488
|
+
setEditValue((v) => v.slice(0, -1));
|
|
53489
|
+
return;
|
|
53490
|
+
}
|
|
53491
|
+
if (input && /^\d$/.test(input)) {
|
|
53492
|
+
setEditValue((v) => v + input);
|
|
53493
|
+
}
|
|
53494
|
+
return;
|
|
53495
|
+
}
|
|
53496
|
+
if (key.backspace || key.delete) {
|
|
53497
|
+
setEditValue((v) => v.slice(0, -1));
|
|
53498
|
+
return;
|
|
53499
|
+
}
|
|
53500
|
+
if (input && /^[a-zA-Z0-9_/~.-]$/.test(input)) {
|
|
53501
|
+
setEditValue((v) => v + input);
|
|
53502
|
+
}
|
|
53503
|
+
return;
|
|
53504
|
+
}
|
|
53505
|
+
if (key.escape) {
|
|
53506
|
+
onClose();
|
|
53507
|
+
return;
|
|
53508
|
+
}
|
|
53509
|
+
if (key.ctrl && input === "s") {
|
|
53510
|
+
handleSave();
|
|
53511
|
+
return;
|
|
53512
|
+
}
|
|
53513
|
+
if (input === "j" || key.downArrow) {
|
|
53514
|
+
const nextIndex = Math.min(selectedIndex + 1, allFields.length - 1);
|
|
53515
|
+
setSelectedField(allFields[nextIndex]);
|
|
53516
|
+
return;
|
|
53517
|
+
}
|
|
53518
|
+
if (input === "k" || key.upArrow) {
|
|
53519
|
+
const prevIndex = Math.max(selectedIndex - 1, 0);
|
|
53520
|
+
setSelectedField(allFields[prevIndex]);
|
|
53521
|
+
return;
|
|
53522
|
+
}
|
|
53523
|
+
if (key.tab) {
|
|
53524
|
+
const nextIndex = (selectedIndex + 1) % allFields.length;
|
|
53525
|
+
setSelectedField(allFields[nextIndex]);
|
|
53526
|
+
return;
|
|
53527
|
+
}
|
|
53528
|
+
if (key.return) {
|
|
53529
|
+
if (selectedField === "addRepo") {
|
|
53530
|
+
setEditValue(repoId);
|
|
53531
|
+
setEditMode(true);
|
|
53532
|
+
return;
|
|
53533
|
+
}
|
|
53534
|
+
setEditValue(getFieldValue(selectedField));
|
|
53535
|
+
setEditMode(true);
|
|
53536
|
+
return;
|
|
53537
|
+
}
|
|
53538
|
+
if (input === "d") {
|
|
53539
|
+
const match = selectedField.match(/^repos\.(.+)\./);
|
|
53540
|
+
if (match) {
|
|
53541
|
+
deleteRepoOverride(match[1]);
|
|
53542
|
+
}
|
|
53543
|
+
}
|
|
53544
|
+
});
|
|
53545
|
+
if (!config2) {
|
|
53546
|
+
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53547
|
+
flexDirection: "column",
|
|
53548
|
+
borderStyle: "round",
|
|
53549
|
+
borderColor: theme.dialog.info,
|
|
53550
|
+
padding: 1,
|
|
53551
|
+
marginTop: 1,
|
|
53552
|
+
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53553
|
+
dimColor: true,
|
|
53554
|
+
children: "Loading configuration..."
|
|
53555
|
+
}, undefined, false, undefined, this)
|
|
53556
|
+
}, undefined, false, undefined, this);
|
|
53557
|
+
}
|
|
53558
|
+
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53559
|
+
flexDirection: "column",
|
|
53560
|
+
borderStyle: "round",
|
|
53561
|
+
borderColor: theme.dialog.info,
|
|
53562
|
+
padding: 1,
|
|
53563
|
+
marginTop: 1,
|
|
53564
|
+
children: [
|
|
53565
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53566
|
+
bold: true,
|
|
53567
|
+
color: theme.dialog.info,
|
|
53568
|
+
children: "Settings"
|
|
53569
|
+
}, undefined, false, undefined, this),
|
|
53570
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53571
|
+
marginTop: 1,
|
|
53572
|
+
flexDirection: "column",
|
|
53573
|
+
children: [
|
|
53574
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53575
|
+
bold: true,
|
|
53576
|
+
dimColor: true,
|
|
53577
|
+
children: "Worktree Storage"
|
|
53578
|
+
}, undefined, false, undefined, this),
|
|
53579
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53580
|
+
dimColor: true,
|
|
53581
|
+
children: "─".repeat(17)
|
|
53582
|
+
}, undefined, false, undefined, this),
|
|
53583
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53584
|
+
label: "Strategy",
|
|
53585
|
+
value: config2.paths.strategy,
|
|
53586
|
+
isSelected: selectedField === "paths.strategy",
|
|
53587
|
+
isEditing: editMode && selectedField === "paths.strategy",
|
|
53588
|
+
editValue,
|
|
53589
|
+
isEnum: true
|
|
53590
|
+
}, undefined, false, undefined, this),
|
|
53591
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53592
|
+
label: "Base path",
|
|
53593
|
+
value: config2.paths.base,
|
|
53594
|
+
isSelected: selectedField === "paths.base",
|
|
53595
|
+
isEditing: editMode && selectedField === "paths.base",
|
|
53596
|
+
editValue
|
|
53597
|
+
}, undefined, false, undefined, this)
|
|
53598
|
+
]
|
|
53599
|
+
}, undefined, true, undefined, this),
|
|
53600
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53601
|
+
marginTop: 1,
|
|
53602
|
+
flexDirection: "column",
|
|
53603
|
+
children: [
|
|
53604
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53605
|
+
bold: true,
|
|
53606
|
+
dimColor: true,
|
|
53607
|
+
children: "Defaults"
|
|
53608
|
+
}, undefined, false, undefined, this),
|
|
53609
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53610
|
+
dimColor: true,
|
|
53611
|
+
children: "─".repeat(8)
|
|
53612
|
+
}, undefined, false, undefined, this),
|
|
53613
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53614
|
+
label: "Branch prefix",
|
|
53615
|
+
value: config2.defaults.branchPrefix || "(none)",
|
|
53616
|
+
isSelected: selectedField === "defaults.branchPrefix",
|
|
53617
|
+
isEditing: editMode && selectedField === "defaults.branchPrefix",
|
|
53618
|
+
editValue
|
|
53619
|
+
}, undefined, false, undefined, this),
|
|
53620
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53621
|
+
label: "Stale days",
|
|
53622
|
+
value: String(config2.defaults.staleDays),
|
|
53623
|
+
isSelected: selectedField === "defaults.staleDays",
|
|
53624
|
+
isEditing: editMode && selectedField === "defaults.staleDays",
|
|
53625
|
+
editValue
|
|
53626
|
+
}, undefined, false, undefined, this),
|
|
53627
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53628
|
+
label: "Compare branch",
|
|
53629
|
+
value: config2.defaults.comparisonBranch || "(auto)",
|
|
53630
|
+
isSelected: selectedField === "defaults.comparisonBranch",
|
|
53631
|
+
isEditing: editMode && selectedField === "defaults.comparisonBranch",
|
|
53632
|
+
editValue
|
|
53633
|
+
}, undefined, false, undefined, this)
|
|
53634
|
+
]
|
|
53635
|
+
}, undefined, true, undefined, this),
|
|
53636
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53637
|
+
marginTop: 1,
|
|
53638
|
+
flexDirection: "column",
|
|
53639
|
+
children: [
|
|
53640
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53641
|
+
bold: true,
|
|
53642
|
+
dimColor: true,
|
|
53643
|
+
children: "Repository Overrides"
|
|
53644
|
+
}, undefined, false, undefined, this),
|
|
53645
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53646
|
+
dimColor: true,
|
|
53647
|
+
children: "─".repeat(20)
|
|
53648
|
+
}, undefined, false, undefined, this),
|
|
53649
|
+
repoOverrideIds.map((id) => /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53650
|
+
flexDirection: "column",
|
|
53651
|
+
marginLeft: 1,
|
|
53652
|
+
children: [
|
|
53653
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53654
|
+
dimColor: true,
|
|
53655
|
+
children: id
|
|
53656
|
+
}, undefined, false, undefined, this),
|
|
53657
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53658
|
+
marginLeft: 2,
|
|
53659
|
+
flexDirection: "column",
|
|
53660
|
+
children: [
|
|
53661
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53662
|
+
label: "branchPrefix",
|
|
53663
|
+
value: config2.repos?.[id]?.branchPrefix || "(none)",
|
|
53664
|
+
isSelected: selectedField === `repos.${id}.branchPrefix`,
|
|
53665
|
+
isEditing: editMode && selectedField === `repos.${id}.branchPrefix`,
|
|
53666
|
+
editValue
|
|
53667
|
+
}, undefined, false, undefined, this),
|
|
53668
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53669
|
+
label: "base",
|
|
53670
|
+
value: config2.repos?.[id]?.base || "(none)",
|
|
53671
|
+
isSelected: selectedField === `repos.${id}.base`,
|
|
53672
|
+
isEditing: editMode && selectedField === `repos.${id}.base`,
|
|
53673
|
+
editValue
|
|
53674
|
+
}, undefined, false, undefined, this),
|
|
53675
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(FieldRow, {
|
|
53676
|
+
label: "compareBranch",
|
|
53677
|
+
value: config2.repos?.[id]?.comparisonBranch || "(auto)",
|
|
53678
|
+
isSelected: selectedField === `repos.${id}.comparisonBranch`,
|
|
53679
|
+
isEditing: editMode && selectedField === `repos.${id}.comparisonBranch`,
|
|
53680
|
+
editValue
|
|
53681
|
+
}, undefined, false, undefined, this)
|
|
53682
|
+
]
|
|
53683
|
+
}, undefined, true, undefined, this)
|
|
53684
|
+
]
|
|
53685
|
+
}, id, true, undefined, this)),
|
|
53686
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53687
|
+
marginTop: repoOverrideIds.length > 0 ? 1 : 0,
|
|
53688
|
+
children: selectedField === "addRepo" && editMode ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53689
|
+
children: [
|
|
53690
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53691
|
+
color: theme.accent,
|
|
53692
|
+
children: "[+ Add: "
|
|
53693
|
+
}, undefined, false, undefined, this),
|
|
53694
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53695
|
+
color: theme.accent,
|
|
53696
|
+
children: editValue
|
|
53697
|
+
}, undefined, false, undefined, this),
|
|
53698
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53699
|
+
color: theme.accent,
|
|
53700
|
+
children: "█]"
|
|
53701
|
+
}, undefined, false, undefined, this)
|
|
53702
|
+
]
|
|
53703
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53704
|
+
color: selectedField === "addRepo" ? theme.accent : undefined,
|
|
53705
|
+
inverse: selectedField === "addRepo",
|
|
53706
|
+
children: "[+ Add override]"
|
|
53707
|
+
}, undefined, false, undefined, this)
|
|
53708
|
+
}, undefined, false, undefined, this)
|
|
53709
|
+
]
|
|
53710
|
+
}, undefined, true, undefined, this),
|
|
53711
|
+
error48 && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53712
|
+
marginTop: 1,
|
|
53713
|
+
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53714
|
+
color: theme.ui.error,
|
|
53715
|
+
children: error48
|
|
53716
|
+
}, undefined, false, undefined, this)
|
|
53717
|
+
}, undefined, false, undefined, this),
|
|
53718
|
+
isSaving && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53719
|
+
marginTop: 1,
|
|
53720
|
+
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53721
|
+
dimColor: true,
|
|
53722
|
+
children: "Saving..."
|
|
53723
|
+
}, undefined, false, undefined, this)
|
|
53724
|
+
}, undefined, false, undefined, this),
|
|
53725
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53726
|
+
marginTop: 1,
|
|
53727
|
+
borderStyle: "single",
|
|
53728
|
+
borderTop: true,
|
|
53729
|
+
borderBottom: false,
|
|
53730
|
+
borderLeft: false,
|
|
53731
|
+
borderRight: false,
|
|
53732
|
+
paddingTop: 1,
|
|
53733
|
+
children: editMode ? selectedField === "paths.strategy" ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53734
|
+
dimColor: true,
|
|
53735
|
+
children: "←/→ cycle Enter confirm Esc cancel"
|
|
53736
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53737
|
+
dimColor: true,
|
|
53738
|
+
children: "Type to edit Enter confirm Esc cancel"
|
|
53739
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53740
|
+
dimColor: true,
|
|
53741
|
+
children: "↑/↓ navigate Tab next Enter edit Esc cancel ^S save"
|
|
53742
|
+
}, undefined, false, undefined, this)
|
|
53743
|
+
}, undefined, false, undefined, this)
|
|
53744
|
+
]
|
|
53745
|
+
}, undefined, true, undefined, this);
|
|
53746
|
+
}
|
|
53747
|
+
function FieldRow({
|
|
53748
|
+
label,
|
|
53749
|
+
value,
|
|
53750
|
+
isSelected,
|
|
53751
|
+
isEditing,
|
|
53752
|
+
editValue,
|
|
53753
|
+
isEnum
|
|
53754
|
+
}) {
|
|
53755
|
+
const displayValue = isEditing ? editValue : value;
|
|
53756
|
+
const labelWidth = 14;
|
|
53757
|
+
const paddedLabel = `${label}:`.padEnd(labelWidth);
|
|
53758
|
+
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53759
|
+
children: [
|
|
53760
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53761
|
+
dimColor: !isSelected,
|
|
53762
|
+
children: paddedLabel
|
|
53763
|
+
}, undefined, false, undefined, this),
|
|
53764
|
+
isEditing ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53765
|
+
children: isEnum ? /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53766
|
+
color: theme.accent,
|
|
53767
|
+
children: [
|
|
53768
|
+
"[",
|
|
53769
|
+
displayValue,
|
|
53770
|
+
" ▾]"
|
|
53771
|
+
]
|
|
53772
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Box_default, {
|
|
53773
|
+
children: [
|
|
53774
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53775
|
+
color: theme.accent,
|
|
53776
|
+
children: displayValue
|
|
53777
|
+
}, undefined, false, undefined, this),
|
|
53778
|
+
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53779
|
+
color: theme.accent,
|
|
53780
|
+
children: "█"
|
|
53781
|
+
}, undefined, false, undefined, this)
|
|
53782
|
+
]
|
|
53783
|
+
}, undefined, true, undefined, this)
|
|
53784
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Text, {
|
|
53785
|
+
color: isSelected ? theme.accent : undefined,
|
|
53786
|
+
inverse: isSelected,
|
|
53787
|
+
children: displayValue
|
|
53788
|
+
}, undefined, false, undefined, this)
|
|
53789
|
+
]
|
|
53790
|
+
}, undefined, true, undefined, this);
|
|
53791
|
+
}
|
|
53792
|
+
var import_react30, jsx_dev_runtime5, FIELD_ORDER, STRATEGIES;
|
|
53793
|
+
var init_SettingsDialog = __esm(async () => {
|
|
53794
|
+
init_config();
|
|
53795
|
+
init_theme();
|
|
53796
|
+
await init_build2();
|
|
53797
|
+
import_react30 = __toESM(require_react(), 1);
|
|
53798
|
+
jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53799
|
+
FIELD_ORDER = [
|
|
53800
|
+
"paths.strategy",
|
|
53801
|
+
"paths.base",
|
|
53802
|
+
"defaults.branchPrefix",
|
|
53803
|
+
"defaults.staleDays",
|
|
53804
|
+
"defaults.comparisonBranch"
|
|
53805
|
+
];
|
|
53806
|
+
STRATEGIES = ["centralized", "sibling"];
|
|
53807
|
+
});
|
|
53808
|
+
|
|
53334
53809
|
// src/tui/components/StatusBar.tsx
|
|
53335
53810
|
function StatusBar() {
|
|
53336
|
-
return /* @__PURE__ */
|
|
53811
|
+
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Box_default, {
|
|
53337
53812
|
paddingLeft: 3,
|
|
53338
53813
|
marginBottom: 1,
|
|
53339
|
-
children: /* @__PURE__ */
|
|
53814
|
+
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53340
53815
|
children: [
|
|
53341
|
-
/* @__PURE__ */
|
|
53816
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53342
53817
|
dimColor: true,
|
|
53343
53818
|
children: "["
|
|
53344
53819
|
}, undefined, false, undefined, this),
|
|
53345
|
-
/* @__PURE__ */
|
|
53820
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53346
53821
|
color: theme.accent,
|
|
53347
53822
|
children: "↵"
|
|
53348
53823
|
}, undefined, false, undefined, this),
|
|
53349
|
-
/* @__PURE__ */
|
|
53824
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53350
53825
|
dimColor: true,
|
|
53351
53826
|
children: "]"
|
|
53352
53827
|
}, undefined, false, undefined, this),
|
|
53353
|
-
/* @__PURE__ */
|
|
53828
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53354
53829
|
dimColor: true,
|
|
53355
53830
|
children: " select "
|
|
53356
53831
|
}, undefined, false, undefined, this),
|
|
53357
|
-
/* @__PURE__ */
|
|
53832
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53358
53833
|
dimColor: true,
|
|
53359
53834
|
children: "["
|
|
53360
53835
|
}, undefined, false, undefined, this),
|
|
53361
|
-
/* @__PURE__ */
|
|
53836
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53362
53837
|
color: theme.accent,
|
|
53363
53838
|
children: "q"
|
|
53364
53839
|
}, undefined, false, undefined, this),
|
|
53365
|
-
/* @__PURE__ */
|
|
53840
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53366
53841
|
dimColor: true,
|
|
53367
53842
|
children: "]"
|
|
53368
53843
|
}, undefined, false, undefined, this),
|
|
53369
|
-
/* @__PURE__ */
|
|
53844
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53370
53845
|
dimColor: true,
|
|
53371
53846
|
children: " quit "
|
|
53372
53847
|
}, undefined, false, undefined, this),
|
|
53373
|
-
/* @__PURE__ */
|
|
53848
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53374
53849
|
dimColor: true,
|
|
53375
53850
|
children: "["
|
|
53376
53851
|
}, undefined, false, undefined, this),
|
|
53377
|
-
/* @__PURE__ */
|
|
53852
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53378
53853
|
color: theme.accent,
|
|
53379
53854
|
children: "n"
|
|
53380
53855
|
}, undefined, false, undefined, this),
|
|
53381
|
-
/* @__PURE__ */
|
|
53856
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53382
53857
|
dimColor: true,
|
|
53383
53858
|
children: "]"
|
|
53384
53859
|
}, undefined, false, undefined, this),
|
|
53385
|
-
/* @__PURE__ */
|
|
53860
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53386
53861
|
dimColor: true,
|
|
53387
53862
|
children: " new "
|
|
53388
53863
|
}, undefined, false, undefined, this),
|
|
53389
|
-
/* @__PURE__ */
|
|
53864
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53390
53865
|
dimColor: true,
|
|
53391
53866
|
children: "["
|
|
53392
53867
|
}, undefined, false, undefined, this),
|
|
53393
|
-
/* @__PURE__ */
|
|
53868
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53394
53869
|
color: theme.accent,
|
|
53395
53870
|
children: "d"
|
|
53396
53871
|
}, undefined, false, undefined, this),
|
|
53397
|
-
/* @__PURE__ */
|
|
53872
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53398
53873
|
dimColor: true,
|
|
53399
53874
|
children: "]"
|
|
53400
53875
|
}, undefined, false, undefined, this),
|
|
53401
|
-
/* @__PURE__ */
|
|
53876
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53402
53877
|
dimColor: true,
|
|
53403
53878
|
children: " delete "
|
|
53404
53879
|
}, undefined, false, undefined, this),
|
|
53405
|
-
/* @__PURE__ */
|
|
53880
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53406
53881
|
dimColor: true,
|
|
53407
53882
|
children: "["
|
|
53408
53883
|
}, undefined, false, undefined, this),
|
|
53409
|
-
/* @__PURE__ */
|
|
53884
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53410
53885
|
color: theme.accent,
|
|
53411
53886
|
children: "r"
|
|
53412
53887
|
}, undefined, false, undefined, this),
|
|
53413
|
-
/* @__PURE__ */
|
|
53888
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53414
53889
|
dimColor: true,
|
|
53415
53890
|
children: "]"
|
|
53416
53891
|
}, undefined, false, undefined, this),
|
|
53417
|
-
/* @__PURE__ */
|
|
53892
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53418
53893
|
dimColor: true,
|
|
53419
53894
|
children: " rename "
|
|
53420
53895
|
}, undefined, false, undefined, this),
|
|
53421
|
-
/* @__PURE__ */
|
|
53896
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53422
53897
|
dimColor: true,
|
|
53423
53898
|
children: "["
|
|
53424
53899
|
}, undefined, false, undefined, this),
|
|
53425
|
-
/* @__PURE__ */
|
|
53900
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53426
53901
|
color: theme.accent,
|
|
53427
53902
|
children: "i"
|
|
53428
53903
|
}, undefined, false, undefined, this),
|
|
53429
|
-
/* @__PURE__ */
|
|
53904
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53905
|
+
dimColor: true,
|
|
53906
|
+
children: "]"
|
|
53907
|
+
}, undefined, false, undefined, this),
|
|
53908
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53909
|
+
dimColor: true,
|
|
53910
|
+
children: " info "
|
|
53911
|
+
}, undefined, false, undefined, this),
|
|
53912
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53913
|
+
dimColor: true,
|
|
53914
|
+
children: "["
|
|
53915
|
+
}, undefined, false, undefined, this),
|
|
53916
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53917
|
+
color: theme.accent,
|
|
53918
|
+
children: "s"
|
|
53919
|
+
}, undefined, false, undefined, this),
|
|
53920
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53430
53921
|
dimColor: true,
|
|
53431
53922
|
children: "]"
|
|
53432
53923
|
}, undefined, false, undefined, this),
|
|
53433
|
-
/* @__PURE__ */
|
|
53924
|
+
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Text, {
|
|
53434
53925
|
dimColor: true,
|
|
53435
|
-
children: "
|
|
53926
|
+
children: " settings"
|
|
53436
53927
|
}, undefined, false, undefined, this)
|
|
53437
53928
|
]
|
|
53438
53929
|
}, undefined, true, undefined, this)
|
|
53439
53930
|
}, undefined, false, undefined, this);
|
|
53440
53931
|
}
|
|
53441
|
-
var
|
|
53932
|
+
var jsx_dev_runtime6;
|
|
53442
53933
|
var init_StatusBar = __esm(async () => {
|
|
53443
53934
|
init_theme();
|
|
53444
53935
|
await init_build2();
|
|
53445
|
-
|
|
53936
|
+
jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53446
53937
|
});
|
|
53447
53938
|
|
|
53448
53939
|
// src/lib/version.ts
|
|
@@ -53497,8 +53988,8 @@ function WorktreeItem({
|
|
|
53497
53988
|
isSelected,
|
|
53498
53989
|
isCurrent
|
|
53499
53990
|
}) {
|
|
53500
|
-
const [age, setAge] =
|
|
53501
|
-
|
|
53991
|
+
const [age, setAge] = import_react31.useState(null);
|
|
53992
|
+
import_react31.useEffect(() => {
|
|
53502
53993
|
getCommitInfo(worktree.path).then((info) => {
|
|
53503
53994
|
if (info) {
|
|
53504
53995
|
setAge(formatAge(info.timestamp));
|
|
@@ -53555,48 +54046,48 @@ function WorktreeItem({
|
|
|
53555
54046
|
const pathEnd = nameEnd + GAP + COLUMNS.path;
|
|
53556
54047
|
const ageEnd = pathEnd + GAP + COLUMNS.age;
|
|
53557
54048
|
const statusEnd = ageEnd + GAP + COLUMNS.status;
|
|
53558
|
-
return /* @__PURE__ */
|
|
54049
|
+
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
|
|
53559
54050
|
children: [
|
|
53560
|
-
/* @__PURE__ */
|
|
54051
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53561
54052
|
color: isSelected ? theme.accent : undefined,
|
|
53562
54053
|
children: rowText.slice(0, cursorEnd)
|
|
53563
54054
|
}, undefined, false, undefined, this),
|
|
53564
|
-
/* @__PURE__ */
|
|
54055
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53565
54056
|
color: isCurrent ? theme.accent : "dim",
|
|
53566
54057
|
children: rowText.slice(cursorEnd, iconEnd)
|
|
53567
54058
|
}, undefined, false, undefined, this),
|
|
53568
|
-
/* @__PURE__ */
|
|
54059
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53569
54060
|
color: isSelected ? theme.accent : undefined,
|
|
53570
54061
|
children: rowText.slice(iconEnd, nameEnd)
|
|
53571
54062
|
}, undefined, false, undefined, this),
|
|
53572
|
-
/* @__PURE__ */
|
|
54063
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53573
54064
|
dimColor: true,
|
|
53574
54065
|
children: rowText.slice(nameEnd, pathEnd)
|
|
53575
54066
|
}, undefined, false, undefined, this),
|
|
53576
|
-
/* @__PURE__ */
|
|
54067
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53577
54068
|
dimColor: true,
|
|
53578
54069
|
children: rowText.slice(pathEnd, ageEnd)
|
|
53579
54070
|
}, undefined, false, undefined, this),
|
|
53580
|
-
/* @__PURE__ */
|
|
54071
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53581
54072
|
color: statusColor,
|
|
53582
54073
|
children: rowText.slice(ageEnd, statusEnd)
|
|
53583
54074
|
}, undefined, false, undefined, this),
|
|
53584
|
-
/* @__PURE__ */
|
|
54075
|
+
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
|
|
53585
54076
|
color: ahead && ahead > 0 ? theme.ui.success : theme.status.behind,
|
|
53586
54077
|
children: rowText.slice(statusEnd)
|
|
53587
54078
|
}, undefined, false, undefined, this)
|
|
53588
54079
|
]
|
|
53589
54080
|
}, undefined, true, undefined, this);
|
|
53590
54081
|
}
|
|
53591
|
-
var
|
|
54082
|
+
var import_react31, jsx_dev_runtime7;
|
|
53592
54083
|
var init_WorktreeItem = __esm(async () => {
|
|
53593
54084
|
init_log();
|
|
53594
54085
|
init_paths();
|
|
53595
54086
|
init_theme();
|
|
53596
54087
|
init_columns();
|
|
53597
54088
|
await init_build2();
|
|
53598
|
-
|
|
53599
|
-
|
|
54089
|
+
import_react31 = __toESM(require_react(), 1);
|
|
54090
|
+
jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53600
54091
|
});
|
|
53601
54092
|
|
|
53602
54093
|
// src/tui/components/WorktreeList.tsx
|
|
@@ -53614,20 +54105,20 @@ function WorktreeList({
|
|
|
53614
54105
|
return currentPath === wt.path || currentPath.startsWith(`${wt.path}/`);
|
|
53615
54106
|
};
|
|
53616
54107
|
if (isLoading && worktrees.length === 0) {
|
|
53617
|
-
return /* @__PURE__ */
|
|
54108
|
+
return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53618
54109
|
paddingX: 1,
|
|
53619
54110
|
paddingY: 1,
|
|
53620
|
-
children: /* @__PURE__ */
|
|
54111
|
+
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53621
54112
|
dimColor: true,
|
|
53622
54113
|
children: "Loading worktrees..."
|
|
53623
54114
|
}, undefined, false, undefined, this)
|
|
53624
54115
|
}, undefined, false, undefined, this);
|
|
53625
54116
|
}
|
|
53626
54117
|
if (worktrees.length === 0) {
|
|
53627
|
-
return /* @__PURE__ */
|
|
54118
|
+
return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53628
54119
|
paddingX: 1,
|
|
53629
54120
|
paddingY: 1,
|
|
53630
|
-
children: /* @__PURE__ */
|
|
54121
|
+
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53631
54122
|
dimColor: true,
|
|
53632
54123
|
children: "No worktrees found"
|
|
53633
54124
|
}, undefined, false, undefined, this)
|
|
@@ -53636,12 +54127,12 @@ function WorktreeList({
|
|
|
53636
54127
|
const title = ` worktrees v${VERSION2} `;
|
|
53637
54128
|
const boxWidth = terminalWidth - 2;
|
|
53638
54129
|
const titleLineWidth = boxWidth - title.length - 4;
|
|
53639
|
-
return /* @__PURE__ */
|
|
54130
|
+
return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53640
54131
|
flexDirection: "column",
|
|
53641
54132
|
paddingX: 1,
|
|
53642
54133
|
paddingTop: 1,
|
|
53643
54134
|
children: [
|
|
53644
|
-
/* @__PURE__ */
|
|
54135
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53645
54136
|
dimColor: true,
|
|
53646
54137
|
children: [
|
|
53647
54138
|
"╭─",
|
|
@@ -53650,46 +54141,46 @@ function WorktreeList({
|
|
|
53650
54141
|
"─╮"
|
|
53651
54142
|
]
|
|
53652
54143
|
}, undefined, true, undefined, this),
|
|
53653
|
-
/* @__PURE__ */
|
|
54144
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53654
54145
|
children: [
|
|
53655
|
-
/* @__PURE__ */
|
|
54146
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53656
54147
|
dimColor: true,
|
|
53657
54148
|
children: "│"
|
|
53658
54149
|
}, undefined, false, undefined, this),
|
|
53659
|
-
/* @__PURE__ */
|
|
54150
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53660
54151
|
width: boxWidth - 2,
|
|
53661
|
-
children: /* @__PURE__ */
|
|
54152
|
+
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53662
54153
|
dimColor: true,
|
|
53663
54154
|
children: formatHeader()
|
|
53664
54155
|
}, undefined, false, undefined, this)
|
|
53665
54156
|
}, undefined, false, undefined, this),
|
|
53666
|
-
/* @__PURE__ */
|
|
54157
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53667
54158
|
dimColor: true,
|
|
53668
54159
|
children: "│"
|
|
53669
54160
|
}, undefined, false, undefined, this)
|
|
53670
54161
|
]
|
|
53671
54162
|
}, undefined, true, undefined, this),
|
|
53672
|
-
worktrees.map((wt, index) => /* @__PURE__ */
|
|
54163
|
+
worktrees.map((wt, index) => /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53673
54164
|
children: [
|
|
53674
|
-
/* @__PURE__ */
|
|
54165
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53675
54166
|
dimColor: true,
|
|
53676
54167
|
children: "│"
|
|
53677
54168
|
}, undefined, false, undefined, this),
|
|
53678
|
-
/* @__PURE__ */
|
|
54169
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
|
|
53679
54170
|
width: boxWidth - 2,
|
|
53680
|
-
children: /* @__PURE__ */
|
|
54171
|
+
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(WorktreeItem, {
|
|
53681
54172
|
worktree: wt,
|
|
53682
54173
|
isSelected: index === selectedIndex,
|
|
53683
54174
|
isCurrent: isCurrentWorktree(wt)
|
|
53684
54175
|
}, undefined, false, undefined, this)
|
|
53685
54176
|
}, undefined, false, undefined, this),
|
|
53686
|
-
/* @__PURE__ */
|
|
54177
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53687
54178
|
dimColor: true,
|
|
53688
54179
|
children: "│"
|
|
53689
54180
|
}, undefined, false, undefined, this)
|
|
53690
54181
|
]
|
|
53691
54182
|
}, wt.path, true, undefined, this)),
|
|
53692
|
-
/* @__PURE__ */
|
|
54183
|
+
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
|
|
53693
54184
|
dimColor: true,
|
|
53694
54185
|
children: [
|
|
53695
54186
|
"╰",
|
|
@@ -53700,7 +54191,7 @@ function WorktreeList({
|
|
|
53700
54191
|
]
|
|
53701
54192
|
}, undefined, true, undefined, this);
|
|
53702
54193
|
}
|
|
53703
|
-
var
|
|
54194
|
+
var jsx_dev_runtime8;
|
|
53704
54195
|
var init_WorktreeList = __esm(async () => {
|
|
53705
54196
|
init_version();
|
|
53706
54197
|
init_columns();
|
|
@@ -53708,14 +54199,15 @@ var init_WorktreeList = __esm(async () => {
|
|
|
53708
54199
|
init_build2(),
|
|
53709
54200
|
init_WorktreeItem()
|
|
53710
54201
|
]);
|
|
53711
|
-
|
|
54202
|
+
jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53712
54203
|
});
|
|
53713
54204
|
|
|
53714
54205
|
// src/lib/git/status.ts
|
|
53715
|
-
async function getWorktreeStatus(worktreePath, branch) {
|
|
54206
|
+
async function getWorktreeStatus(worktreePath, branch, configuredBranch) {
|
|
53716
54207
|
const status = [];
|
|
53717
54208
|
let ahead;
|
|
53718
54209
|
let behind;
|
|
54210
|
+
let actualComparisonBranch;
|
|
53719
54211
|
const statusResult = await git(["status", "--porcelain"], {
|
|
53720
54212
|
cwd: worktreePath
|
|
53721
54213
|
});
|
|
@@ -53724,11 +54216,12 @@ async function getWorktreeStatus(worktreePath, branch) {
|
|
|
53724
54216
|
}
|
|
53725
54217
|
if (branch) {
|
|
53726
54218
|
const mainBranch = await getMainBranch(worktreePath);
|
|
53727
|
-
const comparisonBranch = await getComparisonBranch(worktreePath);
|
|
54219
|
+
const comparisonBranch = configuredBranch ? await verifyBranch(worktreePath, configuredBranch) : await getComparisonBranch(worktreePath);
|
|
53728
54220
|
if (comparisonBranch) {
|
|
53729
54221
|
const isPrimaryWorktree = mainBranch && branch === mainBranch;
|
|
53730
54222
|
const hasRemoteComparison = comparisonBranch.startsWith("origin/");
|
|
53731
54223
|
if (!isPrimaryWorktree || hasRemoteComparison) {
|
|
54224
|
+
actualComparisonBranch = comparisonBranch;
|
|
53732
54225
|
const aheadBehindResult = await git(["rev-list", "--left-right", "--count", `${comparisonBranch}...HEAD`], { cwd: worktreePath });
|
|
53733
54226
|
if (aheadBehindResult.success) {
|
|
53734
54227
|
const parts = aheadBehindResult.stdout.trim().split(/\s+/);
|
|
@@ -53778,7 +54271,7 @@ async function getWorktreeStatus(worktreePath, branch) {
|
|
|
53778
54271
|
}
|
|
53779
54272
|
}
|
|
53780
54273
|
}
|
|
53781
|
-
return { status, ahead, behind };
|
|
54274
|
+
return { status, ahead, behind, comparisonBranch: actualComparisonBranch };
|
|
53782
54275
|
}
|
|
53783
54276
|
async function getMainBranch(cwd2) {
|
|
53784
54277
|
for (const branch of DEFAULT_BRANCHES) {
|
|
@@ -53804,6 +54297,13 @@ async function getComparisonBranch(cwd2) {
|
|
|
53804
54297
|
}
|
|
53805
54298
|
return null;
|
|
53806
54299
|
}
|
|
54300
|
+
async function verifyBranch(cwd2, branch) {
|
|
54301
|
+
const result = await git(["rev-parse", "--verify", branch], { cwd: cwd2 });
|
|
54302
|
+
if (result.success) {
|
|
54303
|
+
return branch;
|
|
54304
|
+
}
|
|
54305
|
+
return getComparisonBranch(cwd2);
|
|
54306
|
+
}
|
|
53807
54307
|
var init_status = __esm(() => {
|
|
53808
54308
|
init_exec();
|
|
53809
54309
|
init_constants();
|
|
@@ -53811,11 +54311,11 @@ var init_status = __esm(() => {
|
|
|
53811
54311
|
|
|
53812
54312
|
// src/tui/hooks/useWorktrees.ts
|
|
53813
54313
|
function useWorktrees() {
|
|
53814
|
-
const [worktrees, setWorktrees] =
|
|
53815
|
-
const [isLoading, setIsLoading] =
|
|
53816
|
-
const [error48, setError] =
|
|
53817
|
-
const primaryPathRef =
|
|
53818
|
-
const fetchWorktrees =
|
|
54314
|
+
const [worktrees, setWorktrees] = import_react32.useState([]);
|
|
54315
|
+
const [isLoading, setIsLoading] = import_react32.useState(true);
|
|
54316
|
+
const [error48, setError] = import_react32.useState(null);
|
|
54317
|
+
const primaryPathRef = import_react32.useRef(null);
|
|
54318
|
+
const fetchWorktrees = import_react32.useCallback(async () => {
|
|
53819
54319
|
setIsLoading(true);
|
|
53820
54320
|
setError(null);
|
|
53821
54321
|
try {
|
|
@@ -53824,6 +54324,14 @@ function useWorktrees() {
|
|
|
53824
54324
|
if (primary) {
|
|
53825
54325
|
primaryPathRef.current = primary.path;
|
|
53826
54326
|
}
|
|
54327
|
+
let configuredComparisonBranch;
|
|
54328
|
+
try {
|
|
54329
|
+
const repoInfo = await getRepoInfo();
|
|
54330
|
+
if (repoInfo) {
|
|
54331
|
+
const { comparisonBranch } = await getConfig(repoInfo.worktreeRoot, repoInfo.repoId);
|
|
54332
|
+
configuredComparisonBranch = comparisonBranch;
|
|
54333
|
+
}
|
|
54334
|
+
} catch {}
|
|
53827
54335
|
const initialWorktrees = list.map((wt) => ({
|
|
53828
54336
|
...wt,
|
|
53829
54337
|
status: []
|
|
@@ -53832,12 +54340,13 @@ function useWorktrees() {
|
|
|
53832
54340
|
setIsLoading(false);
|
|
53833
54341
|
const withStatus = await Promise.all(list.map(async (wt) => {
|
|
53834
54342
|
try {
|
|
53835
|
-
const statusResult = await getWorktreeStatus(wt.path, wt.branch);
|
|
54343
|
+
const statusResult = await getWorktreeStatus(wt.path, wt.branch, configuredComparisonBranch);
|
|
53836
54344
|
return {
|
|
53837
54345
|
...wt,
|
|
53838
54346
|
status: statusResult.status,
|
|
53839
54347
|
ahead: statusResult.ahead,
|
|
53840
|
-
behind: statusResult.behind
|
|
54348
|
+
behind: statusResult.behind,
|
|
54349
|
+
comparisonBranch: statusResult.comparisonBranch
|
|
53841
54350
|
};
|
|
53842
54351
|
} catch {
|
|
53843
54352
|
return { ...wt, status: [] };
|
|
@@ -53849,7 +54358,7 @@ function useWorktrees() {
|
|
|
53849
54358
|
setIsLoading(false);
|
|
53850
54359
|
}
|
|
53851
54360
|
}, []);
|
|
53852
|
-
|
|
54361
|
+
import_react32.useEffect(() => {
|
|
53853
54362
|
fetchWorktrees();
|
|
53854
54363
|
}, [fetchWorktrees]);
|
|
53855
54364
|
return {
|
|
@@ -53859,22 +54368,24 @@ function useWorktrees() {
|
|
|
53859
54368
|
refresh: fetchWorktrees
|
|
53860
54369
|
};
|
|
53861
54370
|
}
|
|
53862
|
-
var
|
|
54371
|
+
var import_react32;
|
|
53863
54372
|
var init_useWorktrees = __esm(() => {
|
|
54373
|
+
init_config();
|
|
54374
|
+
init_repo();
|
|
53864
54375
|
init_status();
|
|
53865
54376
|
init_worktree();
|
|
53866
|
-
|
|
54377
|
+
import_react32 = __toESM(require_react(), 1);
|
|
53867
54378
|
});
|
|
53868
54379
|
|
|
53869
54380
|
// src/tui/App.tsx
|
|
53870
|
-
function App2({ repoName
|
|
54381
|
+
function App2({ repoName, currentPath, onSelect }) {
|
|
53871
54382
|
const { exit } = use_app_default();
|
|
53872
54383
|
const { worktrees, isLoading, error: error48, refresh } = useWorktrees();
|
|
53873
|
-
const [selectedIndex, setSelectedIndex] =
|
|
53874
|
-
const [activeDialog, setActiveDialog] =
|
|
53875
|
-
const [initialSelectionDone, setInitialSelectionDone] =
|
|
53876
|
-
const [destinationPath, setDestinationPath] =
|
|
53877
|
-
|
|
54384
|
+
const [selectedIndex, setSelectedIndex] = import_react33.useState(0);
|
|
54385
|
+
const [activeDialog, setActiveDialog] = import_react33.useState("none");
|
|
54386
|
+
const [initialSelectionDone, setInitialSelectionDone] = import_react33.useState(false);
|
|
54387
|
+
const [destinationPath, setDestinationPath] = import_react33.useState(currentPath);
|
|
54388
|
+
import_react33.useEffect(() => {
|
|
53878
54389
|
if (!initialSelectionDone && worktrees.length > 0 && currentPath) {
|
|
53879
54390
|
const index = worktrees.findIndex((wt) => currentPath === wt.path || currentPath.startsWith(`${wt.path}/`));
|
|
53880
54391
|
if (index !== -1) {
|
|
@@ -53883,7 +54394,7 @@ function App2({ repoName: _repoName, currentPath, onSelect }) {
|
|
|
53883
54394
|
setInitialSelectionDone(true);
|
|
53884
54395
|
}
|
|
53885
54396
|
}, [worktrees, currentPath, initialSelectionDone]);
|
|
53886
|
-
|
|
54397
|
+
import_react33.useEffect(() => {
|
|
53887
54398
|
if (selectedIndex >= worktrees.length && worktrees.length > 0) {
|
|
53888
54399
|
setSelectedIndex(worktrees.length - 1);
|
|
53889
54400
|
}
|
|
@@ -53917,6 +54428,10 @@ function App2({ repoName: _repoName, currentPath, onSelect }) {
|
|
|
53917
54428
|
setActiveDialog("details");
|
|
53918
54429
|
return;
|
|
53919
54430
|
}
|
|
54431
|
+
if (input === "s") {
|
|
54432
|
+
setActiveDialog("settings");
|
|
54433
|
+
return;
|
|
54434
|
+
}
|
|
53920
54435
|
if (input === "q") {
|
|
53921
54436
|
if (destinationPath && destinationPath !== currentPath) {
|
|
53922
54437
|
onSelect(destinationPath);
|
|
@@ -53945,10 +54460,10 @@ function App2({ repoName: _repoName, currentPath, onSelect }) {
|
|
|
53945
54460
|
setActiveDialog("none");
|
|
53946
54461
|
};
|
|
53947
54462
|
if (error48) {
|
|
53948
|
-
return /* @__PURE__ */
|
|
54463
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
53949
54464
|
flexDirection: "column",
|
|
53950
54465
|
padding: 1,
|
|
53951
|
-
children: /* @__PURE__ */
|
|
54466
|
+
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
|
|
53952
54467
|
color: "red",
|
|
53953
54468
|
children: [
|
|
53954
54469
|
"Error: ",
|
|
@@ -53957,21 +54472,21 @@ function App2({ repoName: _repoName, currentPath, onSelect }) {
|
|
|
53957
54472
|
}, undefined, true, undefined, this)
|
|
53958
54473
|
}, undefined, false, undefined, this);
|
|
53959
54474
|
}
|
|
53960
|
-
return /* @__PURE__ */
|
|
54475
|
+
return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
|
|
53961
54476
|
flexDirection: "column",
|
|
53962
54477
|
children: [
|
|
53963
|
-
/* @__PURE__ */
|
|
54478
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(WorktreeList, {
|
|
53964
54479
|
worktrees,
|
|
53965
54480
|
selectedIndex,
|
|
53966
54481
|
isLoading,
|
|
53967
54482
|
currentPath: destinationPath
|
|
53968
54483
|
}, undefined, false, undefined, this),
|
|
53969
|
-
/* @__PURE__ */
|
|
53970
|
-
activeDialog === "create" && /* @__PURE__ */
|
|
54484
|
+
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(StatusBar, {}, undefined, false, undefined, this),
|
|
54485
|
+
activeDialog === "create" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(CreateDialog, {
|
|
53971
54486
|
onClose: handleDialogClose,
|
|
53972
54487
|
onCreated: handleCreated
|
|
53973
54488
|
}, undefined, false, undefined, this),
|
|
53974
|
-
activeDialog === "delete" && selectedWorktree && primaryWorktree && /* @__PURE__ */
|
|
54489
|
+
activeDialog === "delete" && selectedWorktree && primaryWorktree && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(DeleteConfirm, {
|
|
53975
54490
|
worktree: selectedWorktree,
|
|
53976
54491
|
primaryWorktree,
|
|
53977
54492
|
currentPath,
|
|
@@ -53983,23 +54498,31 @@ function App2({ repoName: _repoName, currentPath, onSelect }) {
|
|
|
53983
54498
|
handleDeleted();
|
|
53984
54499
|
}
|
|
53985
54500
|
}, undefined, false, undefined, this),
|
|
53986
|
-
activeDialog === "rename" && selectedWorktree && /* @__PURE__ */
|
|
54501
|
+
activeDialog === "rename" && selectedWorktree && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(RenameDialog, {
|
|
53987
54502
|
worktree: selectedWorktree,
|
|
53988
54503
|
onClose: handleDialogClose,
|
|
53989
54504
|
onRenamed: handleRenamed
|
|
53990
54505
|
}, undefined, false, undefined, this),
|
|
53991
|
-
activeDialog === "details" && selectedWorktree && /* @__PURE__ */
|
|
54506
|
+
activeDialog === "details" && selectedWorktree && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(DetailsView, {
|
|
53992
54507
|
worktree: selectedWorktree,
|
|
53993
54508
|
onClose: handleDialogClose,
|
|
53994
54509
|
onSelect: () => {
|
|
53995
54510
|
setDestinationPath(selectedWorktree.path);
|
|
53996
54511
|
setActiveDialog("none");
|
|
53997
54512
|
}
|
|
54513
|
+
}, undefined, false, undefined, this),
|
|
54514
|
+
activeDialog === "settings" && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(SettingsDialog, {
|
|
54515
|
+
repoId: repoName,
|
|
54516
|
+
onClose: handleDialogClose,
|
|
54517
|
+
onSaved: () => {
|
|
54518
|
+
refresh();
|
|
54519
|
+
setActiveDialog("none");
|
|
54520
|
+
}
|
|
53998
54521
|
}, undefined, false, undefined, this)
|
|
53999
54522
|
]
|
|
54000
54523
|
}, undefined, true, undefined, this);
|
|
54001
54524
|
}
|
|
54002
|
-
var
|
|
54525
|
+
var import_react33, jsx_dev_runtime9;
|
|
54003
54526
|
var init_App2 = __esm(async () => {
|
|
54004
54527
|
init_useWorktrees();
|
|
54005
54528
|
await __promiseAll([
|
|
@@ -54008,11 +54531,12 @@ var init_App2 = __esm(async () => {
|
|
|
54008
54531
|
init_DeleteConfirm(),
|
|
54009
54532
|
init_DetailsView(),
|
|
54010
54533
|
init_RenameDialog(),
|
|
54534
|
+
init_SettingsDialog(),
|
|
54011
54535
|
init_StatusBar(),
|
|
54012
54536
|
init_WorktreeList()
|
|
54013
54537
|
]);
|
|
54014
|
-
|
|
54015
|
-
|
|
54538
|
+
import_react33 = __toESM(require_react(), 1);
|
|
54539
|
+
jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
|
|
54016
54540
|
});
|
|
54017
54541
|
|
|
54018
54542
|
// src/tui/components/SetupFlow.tsx
|
|
@@ -54070,9 +54594,9 @@ ${command}
|
|
|
54070
54594
|
}
|
|
54071
54595
|
function SetupFlow({ onComplete, onQuit }) {
|
|
54072
54596
|
const { exit } = use_app_default();
|
|
54073
|
-
const [state, setState] =
|
|
54074
|
-
const [error48, setError] =
|
|
54075
|
-
const [isProcessing, setIsProcessing] =
|
|
54597
|
+
const [state, setState] = import_react34.useState("prompt");
|
|
54598
|
+
const [error48, setError] = import_react34.useState(null);
|
|
54599
|
+
const [isProcessing, setIsProcessing] = import_react34.useState(false);
|
|
54076
54600
|
const shellInfo = detectShell();
|
|
54077
54601
|
use_input_default(async (input, key) => {
|
|
54078
54602
|
if (isProcessing)
|
|
@@ -54118,37 +54642,37 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54118
54642
|
}
|
|
54119
54643
|
});
|
|
54120
54644
|
if (state === "success") {
|
|
54121
|
-
return /* @__PURE__ */
|
|
54645
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54122
54646
|
flexDirection: "column",
|
|
54123
54647
|
padding: 1,
|
|
54124
|
-
children: /* @__PURE__ */
|
|
54648
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54125
54649
|
borderStyle: "round",
|
|
54126
54650
|
borderColor: theme.ui.success,
|
|
54127
54651
|
paddingX: 2,
|
|
54128
54652
|
paddingY: 1,
|
|
54129
54653
|
flexDirection: "column",
|
|
54130
54654
|
children: [
|
|
54131
|
-
/* @__PURE__ */
|
|
54655
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54132
54656
|
bold: true,
|
|
54133
54657
|
color: theme.ui.success,
|
|
54134
54658
|
children: "✓ Shell integration installed!"
|
|
54135
54659
|
}, undefined, false, undefined, this),
|
|
54136
|
-
/* @__PURE__ */
|
|
54660
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54137
54661
|
marginTop: 1,
|
|
54138
54662
|
flexDirection: "column",
|
|
54139
54663
|
children: [
|
|
54140
|
-
/* @__PURE__ */
|
|
54664
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54141
54665
|
children: [
|
|
54142
54666
|
"Added to ",
|
|
54143
54667
|
shellInfo.configPath
|
|
54144
54668
|
]
|
|
54145
54669
|
}, undefined, true, undefined, this),
|
|
54146
|
-
/* @__PURE__ */
|
|
54670
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54147
54671
|
dimColor: true,
|
|
54148
54672
|
children: [
|
|
54149
54673
|
"Restart your terminal or run:",
|
|
54150
54674
|
" ",
|
|
54151
|
-
/* @__PURE__ */
|
|
54675
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54152
54676
|
color: theme.accent,
|
|
54153
54677
|
children: [
|
|
54154
54678
|
"source ",
|
|
@@ -54159,9 +54683,9 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54159
54683
|
}, undefined, true, undefined, this)
|
|
54160
54684
|
]
|
|
54161
54685
|
}, undefined, true, undefined, this),
|
|
54162
|
-
/* @__PURE__ */
|
|
54686
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54163
54687
|
marginTop: 1,
|
|
54164
|
-
children: /* @__PURE__ */
|
|
54688
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54165
54689
|
dimColor: true,
|
|
54166
54690
|
children: "Press any key to continue..."
|
|
54167
54691
|
}, undefined, false, undefined, this)
|
|
@@ -54171,37 +54695,37 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54171
54695
|
}, undefined, false, undefined, this);
|
|
54172
54696
|
}
|
|
54173
54697
|
if (state === "already-setup") {
|
|
54174
|
-
return /* @__PURE__ */
|
|
54698
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54175
54699
|
flexDirection: "column",
|
|
54176
54700
|
padding: 1,
|
|
54177
|
-
children: /* @__PURE__ */
|
|
54701
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54178
54702
|
borderStyle: "round",
|
|
54179
54703
|
borderColor: theme.ui.warning,
|
|
54180
54704
|
paddingX: 2,
|
|
54181
54705
|
paddingY: 1,
|
|
54182
54706
|
flexDirection: "column",
|
|
54183
54707
|
children: [
|
|
54184
|
-
/* @__PURE__ */
|
|
54708
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54185
54709
|
bold: true,
|
|
54186
54710
|
color: theme.ui.warning,
|
|
54187
54711
|
children: "Shell integration already configured"
|
|
54188
54712
|
}, undefined, false, undefined, this),
|
|
54189
|
-
/* @__PURE__ */
|
|
54713
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54190
54714
|
marginTop: 1,
|
|
54191
54715
|
flexDirection: "column",
|
|
54192
54716
|
children: [
|
|
54193
|
-
/* @__PURE__ */
|
|
54717
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54194
54718
|
children: [
|
|
54195
54719
|
'Found "wt shell-init" in ',
|
|
54196
54720
|
shellInfo.configPath
|
|
54197
54721
|
]
|
|
54198
54722
|
}, undefined, true, undefined, this),
|
|
54199
|
-
/* @__PURE__ */
|
|
54723
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54200
54724
|
dimColor: true,
|
|
54201
54725
|
children: [
|
|
54202
54726
|
"Try restarting your terminal or run:",
|
|
54203
54727
|
" ",
|
|
54204
|
-
/* @__PURE__ */
|
|
54728
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54205
54729
|
color: theme.accent,
|
|
54206
54730
|
children: [
|
|
54207
54731
|
"source ",
|
|
@@ -54212,9 +54736,9 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54212
54736
|
}, undefined, true, undefined, this)
|
|
54213
54737
|
]
|
|
54214
54738
|
}, undefined, true, undefined, this),
|
|
54215
|
-
/* @__PURE__ */
|
|
54739
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54216
54740
|
marginTop: 1,
|
|
54217
|
-
children: /* @__PURE__ */
|
|
54741
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54218
54742
|
dimColor: true,
|
|
54219
54743
|
children: "Press any key to continue..."
|
|
54220
54744
|
}, undefined, false, undefined, this)
|
|
@@ -54224,48 +54748,48 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54224
54748
|
}, undefined, false, undefined, this);
|
|
54225
54749
|
}
|
|
54226
54750
|
if (state === "error") {
|
|
54227
|
-
return /* @__PURE__ */
|
|
54751
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54228
54752
|
flexDirection: "column",
|
|
54229
54753
|
padding: 1,
|
|
54230
|
-
children: /* @__PURE__ */
|
|
54754
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54231
54755
|
borderStyle: "round",
|
|
54232
54756
|
borderColor: theme.ui.error,
|
|
54233
54757
|
paddingX: 2,
|
|
54234
54758
|
paddingY: 1,
|
|
54235
54759
|
flexDirection: "column",
|
|
54236
54760
|
children: [
|
|
54237
|
-
/* @__PURE__ */
|
|
54761
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54238
54762
|
bold: true,
|
|
54239
54763
|
color: theme.ui.error,
|
|
54240
54764
|
children: "✗ Failed to set up shell integration"
|
|
54241
54765
|
}, undefined, false, undefined, this),
|
|
54242
|
-
/* @__PURE__ */
|
|
54766
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54243
54767
|
marginTop: 1,
|
|
54244
|
-
children: /* @__PURE__ */
|
|
54768
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54245
54769
|
color: theme.ui.error,
|
|
54246
54770
|
children: error48
|
|
54247
54771
|
}, undefined, false, undefined, this)
|
|
54248
54772
|
}, undefined, false, undefined, this),
|
|
54249
|
-
/* @__PURE__ */
|
|
54773
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54250
54774
|
marginTop: 1,
|
|
54251
54775
|
flexDirection: "column",
|
|
54252
54776
|
children: [
|
|
54253
|
-
/* @__PURE__ */
|
|
54777
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54254
54778
|
children: [
|
|
54255
54779
|
"You can manually add this to ",
|
|
54256
54780
|
shellInfo.configPath,
|
|
54257
54781
|
":"
|
|
54258
54782
|
]
|
|
54259
54783
|
}, undefined, true, undefined, this),
|
|
54260
|
-
/* @__PURE__ */
|
|
54784
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54261
54785
|
color: theme.accent,
|
|
54262
54786
|
children: shellInfo.command
|
|
54263
54787
|
}, undefined, false, undefined, this)
|
|
54264
54788
|
]
|
|
54265
54789
|
}, undefined, true, undefined, this),
|
|
54266
|
-
/* @__PURE__ */
|
|
54790
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54267
54791
|
marginTop: 1,
|
|
54268
|
-
children: /* @__PURE__ */
|
|
54792
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54269
54793
|
dimColor: true,
|
|
54270
54794
|
children: "Press any key to continue..."
|
|
54271
54795
|
}, undefined, false, undefined, this)
|
|
@@ -54274,56 +54798,56 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54274
54798
|
}, undefined, true, undefined, this)
|
|
54275
54799
|
}, undefined, false, undefined, this);
|
|
54276
54800
|
}
|
|
54277
|
-
return /* @__PURE__ */
|
|
54801
|
+
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54278
54802
|
flexDirection: "column",
|
|
54279
54803
|
padding: 1,
|
|
54280
|
-
children: /* @__PURE__ */
|
|
54804
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54281
54805
|
borderStyle: "round",
|
|
54282
54806
|
borderColor: theme.accent,
|
|
54283
54807
|
paddingX: 2,
|
|
54284
54808
|
paddingY: 1,
|
|
54285
54809
|
flexDirection: "column",
|
|
54286
54810
|
children: [
|
|
54287
|
-
/* @__PURE__ */
|
|
54811
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54288
54812
|
bold: true,
|
|
54289
54813
|
color: theme.accent,
|
|
54290
54814
|
children: "Shell Integration Setup"
|
|
54291
54815
|
}, undefined, false, undefined, this),
|
|
54292
|
-
/* @__PURE__ */
|
|
54816
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54293
54817
|
marginTop: 1,
|
|
54294
54818
|
flexDirection: "column",
|
|
54295
54819
|
children: [
|
|
54296
|
-
/* @__PURE__ */
|
|
54820
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54297
54821
|
children: [
|
|
54298
54822
|
"Shell integration lets you ",
|
|
54299
|
-
/* @__PURE__ */
|
|
54823
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54300
54824
|
bold: true,
|
|
54301
54825
|
children: "cd"
|
|
54302
54826
|
}, undefined, false, undefined, this),
|
|
54303
54827
|
" into worktrees by selecting them in the TUI."
|
|
54304
54828
|
]
|
|
54305
54829
|
}, undefined, true, undefined, this),
|
|
54306
|
-
/* @__PURE__ */
|
|
54830
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54307
54831
|
dimColor: true,
|
|
54308
54832
|
children: "Without it, selections just print the path."
|
|
54309
54833
|
}, undefined, false, undefined, this)
|
|
54310
54834
|
]
|
|
54311
54835
|
}, undefined, true, undefined, this),
|
|
54312
|
-
/* @__PURE__ */
|
|
54836
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54313
54837
|
marginTop: 1,
|
|
54314
54838
|
flexDirection: "column",
|
|
54315
54839
|
children: [
|
|
54316
|
-
/* @__PURE__ */
|
|
54840
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54317
54841
|
children: [
|
|
54318
54842
|
"Detected shell:",
|
|
54319
54843
|
" ",
|
|
54320
|
-
/* @__PURE__ */
|
|
54844
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54321
54845
|
color: theme.ui.success,
|
|
54322
54846
|
children: shellInfo.name
|
|
54323
54847
|
}, undefined, false, undefined, this)
|
|
54324
54848
|
]
|
|
54325
54849
|
}, undefined, true, undefined, this),
|
|
54326
|
-
/* @__PURE__ */
|
|
54850
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54327
54851
|
dimColor: true,
|
|
54328
54852
|
children: [
|
|
54329
54853
|
"Will add to: ",
|
|
@@ -54332,72 +54856,72 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54332
54856
|
}, undefined, true, undefined, this)
|
|
54333
54857
|
]
|
|
54334
54858
|
}, undefined, true, undefined, this),
|
|
54335
|
-
/* @__PURE__ */
|
|
54859
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54336
54860
|
marginTop: 1,
|
|
54337
54861
|
flexDirection: "column",
|
|
54338
54862
|
children: [
|
|
54339
|
-
/* @__PURE__ */
|
|
54863
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54340
54864
|
dimColor: true,
|
|
54341
54865
|
children: "Command to be added:"
|
|
54342
54866
|
}, undefined, false, undefined, this),
|
|
54343
|
-
/* @__PURE__ */
|
|
54867
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54344
54868
|
color: theme.accent,
|
|
54345
54869
|
children: shellInfo.command
|
|
54346
54870
|
}, undefined, false, undefined, this)
|
|
54347
54871
|
]
|
|
54348
54872
|
}, undefined, true, undefined, this),
|
|
54349
|
-
/* @__PURE__ */
|
|
54873
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54350
54874
|
marginTop: 1,
|
|
54351
54875
|
flexDirection: "column",
|
|
54352
54876
|
gap: 0,
|
|
54353
54877
|
children: [
|
|
54354
|
-
/* @__PURE__ */
|
|
54878
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54355
54879
|
children: [
|
|
54356
|
-
/* @__PURE__ */
|
|
54880
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54357
54881
|
color: theme.accent,
|
|
54358
54882
|
bold: true,
|
|
54359
54883
|
children: "y"
|
|
54360
54884
|
}, undefined, false, undefined, this),
|
|
54361
|
-
/* @__PURE__ */
|
|
54885
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54362
54886
|
dimColor: true,
|
|
54363
54887
|
children: " - Set up now (recommended)"
|
|
54364
54888
|
}, undefined, false, undefined, this)
|
|
54365
54889
|
]
|
|
54366
54890
|
}, undefined, true, undefined, this),
|
|
54367
|
-
/* @__PURE__ */
|
|
54891
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54368
54892
|
children: [
|
|
54369
|
-
/* @__PURE__ */
|
|
54893
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54370
54894
|
color: theme.accent,
|
|
54371
54895
|
bold: true,
|
|
54372
54896
|
children: "s"
|
|
54373
54897
|
}, undefined, false, undefined, this),
|
|
54374
|
-
/* @__PURE__ */
|
|
54898
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54375
54899
|
dimColor: true,
|
|
54376
54900
|
children: " - Skip for now"
|
|
54377
54901
|
}, undefined, false, undefined, this)
|
|
54378
54902
|
]
|
|
54379
54903
|
}, undefined, true, undefined, this),
|
|
54380
|
-
/* @__PURE__ */
|
|
54904
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54381
54905
|
children: [
|
|
54382
|
-
/* @__PURE__ */
|
|
54906
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54383
54907
|
color: theme.accent,
|
|
54384
54908
|
bold: true,
|
|
54385
54909
|
children: "n"
|
|
54386
54910
|
}, undefined, false, undefined, this),
|
|
54387
|
-
/* @__PURE__ */
|
|
54911
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54388
54912
|
dimColor: true,
|
|
54389
54913
|
children: " - Don't ask again"
|
|
54390
54914
|
}, undefined, false, undefined, this)
|
|
54391
54915
|
]
|
|
54392
54916
|
}, undefined, true, undefined, this),
|
|
54393
|
-
/* @__PURE__ */
|
|
54917
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54394
54918
|
children: [
|
|
54395
|
-
/* @__PURE__ */
|
|
54919
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54396
54920
|
color: theme.accent,
|
|
54397
54921
|
bold: true,
|
|
54398
54922
|
children: "q"
|
|
54399
54923
|
}, undefined, false, undefined, this),
|
|
54400
|
-
/* @__PURE__ */
|
|
54924
|
+
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54401
54925
|
dimColor: true,
|
|
54402
54926
|
children: " - Quit"
|
|
54403
54927
|
}, undefined, false, undefined, this)
|
|
@@ -54405,9 +54929,9 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54405
54929
|
}, undefined, true, undefined, this)
|
|
54406
54930
|
]
|
|
54407
54931
|
}, undefined, true, undefined, this),
|
|
54408
|
-
isProcessing && /* @__PURE__ */
|
|
54932
|
+
isProcessing && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Box_default, {
|
|
54409
54933
|
marginTop: 1,
|
|
54410
|
-
children: /* @__PURE__ */
|
|
54934
|
+
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Text, {
|
|
54411
54935
|
dimColor: true,
|
|
54412
54936
|
children: "Setting up..."
|
|
54413
54937
|
}, undefined, false, undefined, this)
|
|
@@ -54416,14 +54940,14 @@ function SetupFlow({ onComplete, onQuit }) {
|
|
|
54416
54940
|
}, undefined, true, undefined, this)
|
|
54417
54941
|
}, undefined, false, undefined, this);
|
|
54418
54942
|
}
|
|
54419
|
-
var
|
|
54943
|
+
var import_react34, jsx_dev_runtime10;
|
|
54420
54944
|
var init_SetupFlow = __esm(async () => {
|
|
54421
54945
|
init_preferences();
|
|
54422
54946
|
init_compat();
|
|
54423
54947
|
init_theme();
|
|
54424
54948
|
await init_build2();
|
|
54425
|
-
|
|
54426
|
-
|
|
54949
|
+
import_react34 = __toESM(require_react(), 1);
|
|
54950
|
+
jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
|
|
54427
54951
|
});
|
|
54428
54952
|
|
|
54429
54953
|
// src/tui/index.ts
|
|
@@ -54442,7 +54966,7 @@ function hasShellIntegration() {
|
|
|
54442
54966
|
}
|
|
54443
54967
|
async function showSetupFlow() {
|
|
54444
54968
|
return new Promise((resolve2) => {
|
|
54445
|
-
const { waitUntilExit } = render_default(
|
|
54969
|
+
const { waitUntilExit } = render_default(import_react35.default.createElement(SetupFlow, {
|
|
54446
54970
|
onComplete: () => resolve2(true),
|
|
54447
54971
|
onQuit: () => resolve2(false)
|
|
54448
54972
|
}), getRenderOptions());
|
|
@@ -54453,7 +54977,7 @@ async function showMainTui(repoName) {
|
|
|
54453
54977
|
return new Promise((resolve2) => {
|
|
54454
54978
|
let selectedPath = null;
|
|
54455
54979
|
const currentPath = process.cwd();
|
|
54456
|
-
const { waitUntilExit } = render_default(
|
|
54980
|
+
const { waitUntilExit } = render_default(import_react35.default.createElement(App2, {
|
|
54457
54981
|
repoName,
|
|
54458
54982
|
currentPath,
|
|
54459
54983
|
onSelect: (path) => {
|
|
@@ -54489,7 +55013,7 @@ async function launchTui() {
|
|
|
54489
55013
|
}
|
|
54490
55014
|
return showMainTui(repoInfo.repoId);
|
|
54491
55015
|
}
|
|
54492
|
-
var
|
|
55016
|
+
var import_react35;
|
|
54493
55017
|
var init_tui = __esm(async () => {
|
|
54494
55018
|
init_source();
|
|
54495
55019
|
init_repo();
|
|
@@ -54499,7 +55023,7 @@ var init_tui = __esm(async () => {
|
|
|
54499
55023
|
init_App2(),
|
|
54500
55024
|
init_SetupFlow()
|
|
54501
55025
|
]);
|
|
54502
|
-
|
|
55026
|
+
import_react35 = __toESM(require_react(), 1);
|
|
54503
55027
|
if (!process.env.NO_COLOR) {
|
|
54504
55028
|
source_default.level = 3;
|
|
54505
55029
|
}
|
|
@@ -54927,7 +55451,7 @@ wt() {
|
|
|
54927
55451
|
# Check for cd handoff (TUI selection)
|
|
54928
55452
|
# Output format is __wt_cd__"/path/to/dir" (quoted to handle spaces)
|
|
54929
55453
|
if [[ "$output" == __wt_cd__* ]]; then
|
|
54930
|
-
eval cd
|
|
55454
|
+
eval cd \${output#__wt_cd__}
|
|
54931
55455
|
elif [[ -n "$output" ]]; then
|
|
54932
55456
|
echo "$output"
|
|
54933
55457
|
fi
|