mux-sesh 1.0.1 → 1.1.1

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/bin/mux-sesh ADDED
@@ -0,0 +1,34 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ # Get the real path of this script, resolving any symlinks
5
+ script_path="$0"
6
+ while [ -L "$script_path" ]; do
7
+ link_target="$(readlink "$script_path")"
8
+ case "$link_target" in
9
+ /*) script_path="$link_target" ;;
10
+ *) script_path="$(dirname "$script_path")/$link_target" ;;
11
+ esac
12
+ done
13
+ script_dir="$(dirname "$script_path")"
14
+ script_dir="$(cd "$script_dir" && pwd)"
15
+
16
+ # Find the package directory and run with bun
17
+ resolved=""
18
+ current_dir="$script_dir"
19
+ while [ "$current_dir" != "/" ]; do
20
+ candidate="$current_dir/src/index.tsx"
21
+ if [ -f "$candidate" ]; then
22
+ resolved="$candidate"
23
+ break
24
+ fi
25
+ current_dir="$(dirname "$current_dir")"
26
+ done
27
+
28
+ if [ -z "$resolved" ]; then
29
+ printf "Could not find mux-sesh source files\n" >&2
30
+ exit 1
31
+ fi
32
+
33
+ # Execute with bun
34
+ exec bun "$resolved" "$@"
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "mux-sesh",
3
- "version": "1.0.1",
3
+ "version": "1.1.1",
4
4
  "description": "A beautiful tmux session manager built with OpenTUI - fuzzy search sessions, manage projects, clone from GitHub",
5
5
  "type": "module",
6
6
  "bin": {
7
- "mux-sesh": "./src/index.tsx"
7
+ "mux-sesh": "./bin/mux-sesh"
8
8
  },
9
9
  "files": [
10
10
  "src",
11
+ "bin",
11
12
  "README.md",
12
13
  "LICENSE",
13
14
  "config.example.json"
@@ -178,7 +178,7 @@ export function handleOpencodeManageMode(
178
178
  if (key.name === 'down' || (!isStandard && key.name === 'j')) {
179
179
  ctx.setOpencodeCursor(c => {
180
180
  const newCursor = Math.min(c + 1, ctx.opencodeSessions.length - 1)
181
- if (newCursor !== c) {
181
+ if (newCursor !== c && ctx.opencodeSessions[newCursor]) {
182
182
  ctx.loadOpencodeStatsForSession(ctx.opencodeSessions[newCursor].title)
183
183
  }
184
184
  return newCursor
@@ -190,7 +190,7 @@ export function handleOpencodeManageMode(
190
190
  if (key.name === 'up' || (!isStandard && key.name === 'k')) {
191
191
  ctx.setOpencodeCursor(c => {
192
192
  const newCursor = Math.max(c - 1, 0)
193
- if (newCursor !== c) {
193
+ if (newCursor !== c && ctx.opencodeSessions[newCursor]) {
194
194
  ctx.loadOpencodeStatsForSession(ctx.opencodeSessions[newCursor].title)
195
195
  }
196
196
  return newCursor