@ogpoyraz/wtx 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/completions/_wtx.zsh +8 -0
- package/completions/wtx.bash +1 -0
- package/completions/wtx.fish +3 -0
- package/dist/cli.mjs +32 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ If origin already has a branch with that name owned by someone else, `wtx` warns
|
|
|
96
96
|
| `stack` | `<branch>` | `--repo`, `--json` | Show recorded parent and descendant branches |
|
|
97
97
|
| `prs` | | `--repo`, `--json`, `--all` | Pull request status across worktrees |
|
|
98
98
|
| `exec` | `<branch> <command...>` | `--repo` | Run a command inside a worktree (`WTX_PORT` injected) |
|
|
99
|
-
| `terminal` | | | Interactive worktree dashboard (requires Bun) |
|
|
99
|
+
| `terminal` | | `--wo-details` | Interactive worktree dashboard (requires Bun) |
|
|
100
100
|
| `mcp` | | | Run MCP server exposing worktree tools over stdio |
|
|
101
101
|
| `cd` | `<repo> <branch>` | | cd into worktree (requires shell integration) |
|
|
102
102
|
| `history` | | `--limit`, `--json`, `--source` | Show recent action history (`~/.local/state/wtx/history.jsonl`) |
|
|
@@ -304,6 +304,7 @@ Stack metadata is stored under the repository's common Git directory and is not
|
|
|
304
304
|
|
|
305
305
|
Launch the TUI with `wtx terminal` (requires [Bun](https://bun.sh)). Navigation never locks, and actions run in the background.
|
|
306
306
|
`wtx terminal` opens a full-screen dashboard across all configured repos (requires the [Bun](https://bun.sh) runtime).
|
|
307
|
+
Pass `--wo-details` for a repositories-only view: the right pane (Details, Changes, terminal sessions) is hidden and the worktree list takes the full width.
|
|
307
308
|
|
|
308
309
|
| Key | Action |
|
|
309
310
|
|---|---|
|
package/completions/_wtx.zsh
CHANGED
|
@@ -73,6 +73,7 @@ _wtx() {
|
|
|
73
73
|
'prs[Show pull request status across worktrees]' \
|
|
74
74
|
'init[Output shell integration code]' \
|
|
75
75
|
'skill[Manage AI agent skills]' \
|
|
76
|
+
'terminal[Interactive terminal dashboard]' \
|
|
76
77
|
'mcp[Run MCP server exposing worktree tools]' \
|
|
77
78
|
'exec[Execute commands across worktrees]'
|
|
78
79
|
;;
|
|
@@ -227,6 +228,13 @@ _wtx() {
|
|
|
227
228
|
'--verbose[Show git commands]' \
|
|
228
229
|
'--dry-run[Show what would happen]'
|
|
229
230
|
;;
|
|
231
|
+
terminal)
|
|
232
|
+
_arguments \
|
|
233
|
+
'--wo-details[Repositories panel only (hide details/right pane)]' \
|
|
234
|
+
{-q,--quiet}'[Suppress output]' \
|
|
235
|
+
'--verbose[Show git commands]' \
|
|
236
|
+
'--dry-run[Show what would happen]'
|
|
237
|
+
;;
|
|
230
238
|
esac
|
|
231
239
|
;;
|
|
232
240
|
esac
|
package/completions/wtx.bash
CHANGED
|
@@ -102,6 +102,7 @@ _wtx_completions() {
|
|
|
102
102
|
status) flags="-r --repo --base --json -q --quiet --verbose --dry-run --help" ;;
|
|
103
103
|
stack) flags="-r --repo --json -q --quiet --verbose --dry-run --help" ;;
|
|
104
104
|
prs) flags="-r --repo --json --all -q --quiet --verbose --dry-run --help" ;;
|
|
105
|
+
terminal) flags="--wo-details -q --quiet --verbose --dry-run --help" ;;
|
|
105
106
|
config)
|
|
106
107
|
case "$subsubcommand" in
|
|
107
108
|
add-repo) flags="--sync-files --post-create --post-sync --help" ;;
|
package/completions/wtx.fish
CHANGED
|
@@ -99,6 +99,9 @@ complete -c wtx -n "__fish_seen_subcommand_from ls" -l pr -d "Include pull reque
|
|
|
99
99
|
# prs flags
|
|
100
100
|
complete -c wtx -n "__fish_seen_subcommand_from prs" -l all -d "Include drafts and closed/merged PRs"
|
|
101
101
|
|
|
102
|
+
# terminal flags
|
|
103
|
+
complete -c wtx -n "__fish_seen_subcommand_from terminal" -l wo-details -d "Repositories panel only (hide details/right pane)"
|
|
104
|
+
|
|
102
105
|
# stack-aware flags
|
|
103
106
|
complete -c wtx -n "__fish_seen_subcommand_from rebase" -l onto -xa "main master develop dev" -d "Override recorded base"
|
|
104
107
|
complete -c wtx -n "__fish_seen_subcommand_from status" -l base -xa "main master develop dev" -d "Override recorded base"
|
package/dist/cli.mjs
CHANGED
|
@@ -28096,10 +28096,11 @@ var init_Overlay = __esm(() => {
|
|
|
28096
28096
|
|
|
28097
28097
|
// src/tui/components/HelpOverlay.tsx
|
|
28098
28098
|
import { jsx as jsx10, jsxs as jsxs8 } from "@opentui/react/jsx-runtime";
|
|
28099
|
-
function HelpOverlay() {
|
|
28099
|
+
function HelpOverlay({ withoutDetails = false }) {
|
|
28100
28100
|
const theme = useTheme();
|
|
28101
|
+
const groups = withoutDetails ? HELP_GROUPS.filter((g) => g.title !== "Terminal & Tabs" && !g.title.startsWith("Changes Explorer")) : HELP_GROUPS;
|
|
28101
28102
|
return /* @__PURE__ */ jsxs8(Overlay, {
|
|
28102
|
-
title: "Help",
|
|
28103
|
+
title: withoutDetails ? "Help (repositories only)" : "Help",
|
|
28103
28104
|
borderColor: theme.border,
|
|
28104
28105
|
width: 100,
|
|
28105
28106
|
children: [
|
|
@@ -28108,7 +28109,7 @@ function HelpOverlay() {
|
|
|
28108
28109
|
style: { maxHeight: 38 },
|
|
28109
28110
|
children: /* @__PURE__ */ jsx10("scrollbox", {
|
|
28110
28111
|
flexGrow: 1,
|
|
28111
|
-
children:
|
|
28112
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs8("box", {
|
|
28112
28113
|
flexDirection: "column",
|
|
28113
28114
|
style: { marginBottom: 1 },
|
|
28114
28115
|
children: [
|
|
@@ -29811,7 +29812,7 @@ function createTerminalResizeScheduler(getSessionsByKey, resizeSession, onSettle
|
|
|
29811
29812
|
flush
|
|
29812
29813
|
};
|
|
29813
29814
|
}
|
|
29814
|
-
function App({ opts }) {
|
|
29815
|
+
function App({ opts, withoutDetails = false }) {
|
|
29815
29816
|
const renderer = useRenderer2();
|
|
29816
29817
|
const { blocks, loading, refreshing, error: error52, warnings, lastRefreshed, pendingRepos, favorites, refresh, clearWarnings, applyFavorites } = useWorktrees(opts);
|
|
29817
29818
|
const [selectedIndex, setSelectedIndex] = useState11(0);
|
|
@@ -30097,6 +30098,10 @@ function App({ opts }) {
|
|
|
30097
30098
|
setChangesFocused(id === "changes" && selectedRow != null && !selectedRow.isMainCheckout && selectedRow.dirtyFiles.length > 0);
|
|
30098
30099
|
}, [activeTabId, renderer, worktreeKey, sessionsForSelected, selectedRow]);
|
|
30099
30100
|
const handleAddSession = useCallback7(() => {
|
|
30101
|
+
if (withoutDetails) {
|
|
30102
|
+
flash("Terminal sessions disabled (--wo-details)");
|
|
30103
|
+
return;
|
|
30104
|
+
}
|
|
30100
30105
|
if (!selectedRow) {
|
|
30101
30106
|
flash("No worktree selected");
|
|
30102
30107
|
return;
|
|
@@ -30121,7 +30126,7 @@ function App({ opts }) {
|
|
|
30121
30126
|
setTerminalFocused(true);
|
|
30122
30127
|
setChangesFocused(false);
|
|
30123
30128
|
flash(`Session ${session.label} created`, 2000);
|
|
30124
|
-
}, [selectedRow, terminalSessions, flash, totalWidth, splitRatio, totalHeight, activeTabId, sessionsForSelected]);
|
|
30129
|
+
}, [selectedRow, terminalSessions, flash, totalWidth, splitRatio, totalHeight, activeTabId, sessionsForSelected, withoutDetails]);
|
|
30125
30130
|
const handleCloseSession = useCallback7((id) => {
|
|
30126
30131
|
let targetRepo;
|
|
30127
30132
|
let targetBranch;
|
|
@@ -30498,6 +30503,10 @@ function App({ opts }) {
|
|
|
30498
30503
|
return;
|
|
30499
30504
|
}
|
|
30500
30505
|
if (key === "t") {
|
|
30506
|
+
if (withoutDetails) {
|
|
30507
|
+
flash("Terminal sessions disabled (--wo-details)");
|
|
30508
|
+
return;
|
|
30509
|
+
}
|
|
30501
30510
|
if (!selectedRow)
|
|
30502
30511
|
return;
|
|
30503
30512
|
const sessions = terminalSessions.getSessions(selectedRow.repoName, selectedRow.branch, selectedRow.path);
|
|
@@ -30508,7 +30517,7 @@ function App({ opts }) {
|
|
|
30508
30517
|
handleAddSession();
|
|
30509
30518
|
return;
|
|
30510
30519
|
}
|
|
30511
|
-
}, [selectedRow, selection, combinedWarnings, busyRepos, busyRowPaths, doRefresh, flash, blocks, terminalSessions]);
|
|
30520
|
+
}, [selectedRow, selection, combinedWarnings, busyRepos, busyRowPaths, doRefresh, flash, blocks, terminalSessions, withoutDetails]);
|
|
30512
30521
|
useKeyboard4((key) => {
|
|
30513
30522
|
if (changesFocused) {
|
|
30514
30523
|
if (key.ctrl && key.name === "g" || key.name === "escape") {
|
|
@@ -30566,6 +30575,8 @@ function App({ opts }) {
|
|
|
30566
30575
|
return;
|
|
30567
30576
|
}
|
|
30568
30577
|
if (key.ctrl && key.name === "g") {
|
|
30578
|
+
if (withoutDetails)
|
|
30579
|
+
return;
|
|
30569
30580
|
if (sessionsForSelected.length > 0) {
|
|
30570
30581
|
const targetId = activeTabId !== "details" ? activeTabId : sessionsForSelected[0].id;
|
|
30571
30582
|
if (worktreeKey) {
|
|
@@ -30923,6 +30934,10 @@ function App({ opts }) {
|
|
|
30923
30934
|
return;
|
|
30924
30935
|
}
|
|
30925
30936
|
if (key.name === "t") {
|
|
30937
|
+
if (withoutDetails) {
|
|
30938
|
+
flash("Terminal sessions disabled (--wo-details)");
|
|
30939
|
+
return;
|
|
30940
|
+
}
|
|
30926
30941
|
if (!selectedRow) {
|
|
30927
30942
|
flash("No worktree selected");
|
|
30928
30943
|
return;
|
|
@@ -30937,7 +30952,7 @@ function App({ opts }) {
|
|
|
30937
30952
|
}
|
|
30938
30953
|
});
|
|
30939
30954
|
const rawLeft = Math.floor(totalWidth * splitRatio);
|
|
30940
|
-
const leftCols = Math.max(20, Math.min(totalWidth - 20 - DIVIDER_WIDTH, rawLeft));
|
|
30955
|
+
const leftCols = withoutDetails ? totalWidth : Math.max(20, Math.min(totalWidth - 20 - DIVIDER_WIDTH, rawLeft));
|
|
30941
30956
|
const rightCols = Math.max(20, totalWidth - leftCols - DIVIDER_WIDTH);
|
|
30942
30957
|
const paneCols = Math.max(20, rightCols - 4);
|
|
30943
30958
|
const paneRows = Math.max(10, totalHeight - 10);
|
|
@@ -31000,13 +31015,13 @@ function App({ opts }) {
|
|
|
31000
31015
|
onToggleSelect: (path39) => setSelection((prev) => toggleSelection(prev, path39))
|
|
31001
31016
|
})
|
|
31002
31017
|
}),
|
|
31003
|
-
/* @__PURE__ */ jsx18(Divider, {
|
|
31018
|
+
!withoutDetails && /* @__PURE__ */ jsx18(Divider, {
|
|
31004
31019
|
splitRatio,
|
|
31005
31020
|
totalWidth,
|
|
31006
31021
|
onChange: setSplitRatio,
|
|
31007
31022
|
onDraggingChange: setIsResizing
|
|
31008
31023
|
}),
|
|
31009
|
-
/* @__PURE__ */ jsx18("box", {
|
|
31024
|
+
!withoutDetails && /* @__PURE__ */ jsx18("box", {
|
|
31010
31025
|
width: rightCols,
|
|
31011
31026
|
height: "100%",
|
|
31012
31027
|
flexDirection: "column",
|
|
@@ -31083,7 +31098,9 @@ function App({ opts }) {
|
|
|
31083
31098
|
},
|
|
31084
31099
|
onCancel: () => setWorkspacePickerOpen(false)
|
|
31085
31100
|
}),
|
|
31086
|
-
modal.type === "help" && /* @__PURE__ */ jsx18(HelpOverlay, {
|
|
31101
|
+
modal.type === "help" && /* @__PURE__ */ jsx18(HelpOverlay, {
|
|
31102
|
+
withoutDetails
|
|
31103
|
+
}),
|
|
31087
31104
|
modal.type === "history" && /* @__PURE__ */ jsx18(HistoryOverlay, {}),
|
|
31088
31105
|
modal.type === "warnings" && /* @__PURE__ */ jsx18(WarningsOverlay, {
|
|
31089
31106
|
warnings: combinedWarnings,
|
|
@@ -31377,7 +31394,7 @@ __export(exports_tui, {
|
|
|
31377
31394
|
import { createCliRenderer, TextTableRenderable, EmbeddedTerminalRenderable } from "@opentui/core";
|
|
31378
31395
|
import { createRoot, extend as extend2 } from "@opentui/react";
|
|
31379
31396
|
import { jsx as jsx19 } from "@opentui/react/jsx-runtime";
|
|
31380
|
-
async function runTerminal(opts) {
|
|
31397
|
+
async function runTerminal(opts, runOpts = {}) {
|
|
31381
31398
|
setQuiet(true);
|
|
31382
31399
|
const prevLog = console.log;
|
|
31383
31400
|
const prevInfo = console.info;
|
|
@@ -31452,7 +31469,8 @@ async function runTerminal(opts) {
|
|
|
31452
31469
|
const root = createRoot(renderer);
|
|
31453
31470
|
try {
|
|
31454
31471
|
root.render(/* @__PURE__ */ jsx19(App, {
|
|
31455
|
-
opts
|
|
31472
|
+
opts,
|
|
31473
|
+
withoutDetails: runOpts.withoutDetails ?? false
|
|
31456
31474
|
}));
|
|
31457
31475
|
} catch (err) {
|
|
31458
31476
|
restoreConsole();
|
|
@@ -36507,7 +36525,7 @@ function tryRelaunchViaBun(forwardedArgs) {
|
|
|
36507
36525
|
return null;
|
|
36508
36526
|
}
|
|
36509
36527
|
function registerTerminalCommand(program2) {
|
|
36510
|
-
program2.command("terminal").description("Interactive worktree dashboard (requires Bun)").action(async () => {
|
|
36528
|
+
program2.command("terminal").description("Interactive worktree dashboard (requires Bun)").option("--wo-details", "Repositories panel only (hide details/right pane)").action(async (options) => {
|
|
36511
36529
|
const opts = program2.optsWithGlobals();
|
|
36512
36530
|
if (typeof Bun === "undefined") {
|
|
36513
36531
|
const forwarded = process.argv.slice(2);
|
|
@@ -36556,7 +36574,7 @@ function registerTerminalCommand(program2) {
|
|
|
36556
36574
|
process.env.PAGE_LIST_LOG ??= "off";
|
|
36557
36575
|
process.env.OPENTUI_LOG ??= "off";
|
|
36558
36576
|
const { runTerminal: runTerminal2 } = await Promise.resolve().then(() => (init_tui(), exports_tui));
|
|
36559
|
-
await runTerminal2(opts);
|
|
36577
|
+
await runTerminal2(opts, { withoutDetails: Boolean(options.woDetails) });
|
|
36560
36578
|
});
|
|
36561
36579
|
}
|
|
36562
36580
|
|