mux-sesh 1.3.5 → 1.3.7

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 CHANGED
@@ -31,4 +31,4 @@ if [ -z "$resolved" ]; then
31
31
  fi
32
32
 
33
33
  # Execute with bun
34
- exec bun "$resolved" "$@"
34
+ cd "$(dirname "$resolved")/.." && exec bun "$resolved" "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mux-sesh",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
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": {
package/src/app.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useKeyboard } from '@opentui/react'
2
- import { useState, useEffect, useRef } from 'react'
2
+ import { useState, useEffect, useRef, use } from 'react'
3
3
  import { AppMode, ViewMode, type Item, type Config, type OpencodeSessionStats } from './types'
4
4
  import { loadConfig } from './config'
5
5
  import { listTmuxSessions } from './tmux'
@@ -294,6 +294,17 @@ export function App() {
294
294
  }
295
295
  }, [searchQuery, appMode, allItems])
296
296
 
297
+ useEffect(() => {
298
+ if (appMode === AppMode.Rename && textareaRef.current && renameTarget) {
299
+ setTimeout(() => {
300
+ if (textareaRef.current && !textareaRef.current.isDestroyed) {
301
+ const textLength = Bun.stringWidth(renameTarget)
302
+ textareaRef.current.cursorOffset = textLength
303
+ }
304
+ }, 0)
305
+ }
306
+ }, [appMode, renameTarget])
307
+
297
308
  const title =
298
309
  appMode === AppMode.Search
299
310
  ? ' Search Sessions'