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 +1 -1
- package/package.json +1 -1
- package/src/app.tsx +12 -1
package/bin/mux-sesh
CHANGED
package/package.json
CHANGED
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'
|