mux-sesh 1.5.0 → 1.6.0

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.
@@ -1,4 +1,4 @@
1
- import { colors } from '../styles/theme'
1
+ import { useTheme } from '../styles/theme'
2
2
  import { AppMode, KeybindMode, type Item } from '../types'
3
3
 
4
4
  interface Props {
@@ -8,82 +8,88 @@ interface Props {
8
8
  }
9
9
 
10
10
  export default function KeybindHelp({ appMode, keybindMode = 'vim', selectedItem }: Props) {
11
+ const theme = useTheme()
11
12
  const isStandard = keybindMode === 'standard'
12
13
  const showEditTarget = selectedItem?.itemKind === 'configured' && appMode === AppMode.Normal
14
+
13
15
  if (appMode === AppMode.Search || appMode === AppMode.NewSession || appMode === AppMode.Rename) {
14
16
  if (isStandard) {
15
- // Standard mode: show Ctrl+X prefix keybinds in vertical layout matching vim mode
16
17
  return (
17
18
  <>
18
19
  <text>
19
- <span style={{ fg: colors.key }}>↑/↓ </span>
20
- <span style={{ fg: colors.separator }}>│ </span>
21
- <span style={{ fg: colors.action }}>navigate</span>
20
+ <span style={{ fg: theme.key }}>↑/↓ </span>
21
+ <span style={{ fg: theme.separator }}>│ </span>
22
+ <span style={{ fg: theme.action }}>navigate</span>
22
23
  </text>
23
24
  <text>
24
- <span style={{ fg: colors.key }}>Ctrl+X d </span>
25
- <span style={{ fg: colors.separator }}>│ </span>
26
- <span style={{ fg: colors.action }}>kill</span>
25
+ <span style={{ fg: theme.key }}>Ctrl+X d </span>
26
+ <span style={{ fg: theme.separator }}>│ </span>
27
+ <span style={{ fg: theme.action }}>kill</span>
27
28
  </text>
28
29
  <text>
29
- <span style={{ fg: colors.key }}>Ctrl+X r </span>
30
- <span style={{ fg: colors.separator }}>│ </span>
31
- <span style={{ fg: colors.action }}>rename</span>
30
+ <span style={{ fg: theme.key }}>Ctrl+X r </span>
31
+ <span style={{ fg: theme.separator }}>│ </span>
32
+ <span style={{ fg: theme.action }}>rename</span>
32
33
  </text>
33
34
  <text>
34
- <span style={{ fg: colors.key }}>Ctrl+X n </span>
35
- <span style={{ fg: colors.separator }}>│ </span>
36
- <span style={{ fg: colors.action }}>new</span>
35
+ <span style={{ fg: theme.key }}>Ctrl+X n </span>
36
+ <span style={{ fg: theme.separator }}>│ </span>
37
+ <span style={{ fg: theme.action }}>new</span>
37
38
  </text>
38
39
  <text>
39
- <span style={{ fg: colors.key }}>Ctrl+X o </span>
40
- <span style={{ fg: colors.separator }}>│ </span>
41
- <span style={{ fg: colors.action }}>opencode</span>
40
+ <span style={{ fg: theme.key }}>Ctrl+X o </span>
41
+ <span style={{ fg: theme.separator }}>│ </span>
42
+ <span style={{ fg: theme.action }}>opencode</span>
42
43
  </text>
43
44
  <text>
44
- <span style={{ fg: colors.key }}>Ctrl+X l </span>
45
- <span style={{ fg: colors.separator }}>│ </span>
46
- <span style={{ fg: colors.action }}>last</span>
45
+ <span style={{ fg: theme.key }}>Ctrl+X s </span>
46
+ <span style={{ fg: theme.separator }}>│ </span>
47
+ <span style={{ fg: theme.action }}>settings</span>
48
+ </text>
49
+ <text>
50
+ <span style={{ fg: theme.key }}>Ctrl+X l </span>
51
+ <span style={{ fg: theme.separator }}>│ </span>
52
+ <span style={{ fg: theme.action }}>last</span>
53
+ </text>
54
+ <text>
55
+ <span style={{ fg: theme.key }}>Ctrl+X g </span>
56
+ <span style={{ fg: theme.separator }}>│ </span>
57
+ <span style={{ fg: theme.action }}>root</span>
47
58
  </text>
48
- <text>
49
- <span style={{ fg: colors.key }}>Ctrl+X g </span>
50
- <span style={{ fg: colors.separator }}>│ </span>
51
- <span style={{ fg: colors.action }}>root</span>
52
- </text>
53
59
  {showEditTarget && (
54
60
  <text>
55
- <span style={{ fg: colors.key }}>Ctrl+E </span>
56
- <span style={{ fg: colors.separator }}>│ </span>
57
- <span style={{ fg: colors.action }}>edit</span>
61
+ <span style={{ fg: theme.key }}>Ctrl+E </span>
62
+ <span style={{ fg: theme.separator }}>│ </span>
63
+ <span style={{ fg: theme.action }}>edit</span>
58
64
  </text>
59
65
  )}
60
66
  <text>
61
- <span style={{ fg: colors.key }}>Ctrl+X R </span>
62
- <span style={{ fg: colors.separator }}>│ </span>
63
- <span style={{ fg: colors.action }}>refresh</span>
67
+ <span style={{ fg: theme.key }}>Ctrl+X R </span>
68
+ <span style={{ fg: theme.separator }}>│ </span>
69
+ <span style={{ fg: theme.action }}>refresh</span>
64
70
  </text>
65
71
  <text>
66
- <span style={{ fg: colors.key }}>Ctrl+Q </span>
67
- <span style={{ fg: colors.separator }}>│ </span>
68
- <span style={{ fg: colors.action }}>quit</span>
72
+ <span style={{ fg: theme.key }}>Ctrl+Q </span>
73
+ <span style={{ fg: theme.separator }}>│ </span>
74
+ <span style={{ fg: theme.action }}>quit</span>
69
75
  </text>
70
76
  </>
71
77
  )
72
78
  }
73
- // Vim mode: simple keybinds
79
+
74
80
  return (
75
81
  <text>
76
- <span style={{ fg: colors.key }}>Enter</span>
77
- <span style={{ fg: colors.separator }}> │ </span>
78
- <span style={{ fg: colors.action }}>select</span>
82
+ <span style={{ fg: theme.key }}>Enter</span>
83
+ <span style={{ fg: theme.separator }}> │ </span>
84
+ <span style={{ fg: theme.action }}>select</span>
79
85
  {' '}
80
- <span style={{ fg: colors.key }}>↑/↓</span>
81
- <span style={{ fg: colors.separator }}> │ </span>
82
- <span style={{ fg: colors.action }}>navigate</span>
86
+ <span style={{ fg: theme.key }}>↑/↓</span>
87
+ <span style={{ fg: theme.separator }}> │ </span>
88
+ <span style={{ fg: theme.action }}>navigate</span>
83
89
  {' '}
84
- <span style={{ fg: colors.key }}>Esc</span>
85
- <span style={{ fg: colors.separator }}> │ </span>
86
- <span style={{ fg: colors.action }}>cancel</span>
90
+ <span style={{ fg: theme.key }}>Esc</span>
91
+ <span style={{ fg: theme.separator }}> │ </span>
92
+ <span style={{ fg: theme.action }}>cancel</span>
87
93
  </text>
88
94
  )
89
95
  }
@@ -93,107 +99,117 @@ export default function KeybindHelp({ appMode, keybindMode = 'vim', selectedItem
93
99
  return (
94
100
  <>
95
101
  <text>
96
- <span style={{ fg: colors.key }}>↑/↓ </span>
97
- <span style={{ fg: colors.separator }}>│ </span>
98
- <span style={{ fg: colors.action }}>navigate</span>
102
+ <span style={{ fg: theme.key }}>↑/↓ </span>
103
+ <span style={{ fg: theme.separator }}>│ </span>
104
+ <span style={{ fg: theme.action }}>navigate</span>
99
105
  </text>
100
106
  <text>
101
- <span style={{ fg: colors.key }}>Ctrl+D </span>
102
- <span style={{ fg: colors.separator }}>│ </span>
103
- <span style={{ fg: colors.action }}>kill</span>
107
+ <span style={{ fg: theme.key }}>Ctrl+D </span>
108
+ <span style={{ fg: theme.separator }}>│ </span>
109
+ <span style={{ fg: theme.action }}>kill</span>
104
110
  </text>
105
111
  <text>
106
- <span style={{ fg: colors.key }}>Ctrl+R </span>
107
- <span style={{ fg: colors.separator }}>│ </span>
108
- <span style={{ fg: colors.action }}>rename</span>
112
+ <span style={{ fg: theme.key }}>Ctrl+R </span>
113
+ <span style={{ fg: theme.separator }}>│ </span>
114
+ <span style={{ fg: theme.action }}>rename</span>
109
115
  </text>
110
116
  <text>
111
- <span style={{ fg: colors.key }}>Ctrl+O </span>
112
- <span style={{ fg: colors.separator }}>│ </span>
113
- <span style={{ fg: colors.action }}>back</span>
117
+ <span style={{ fg: theme.key }}>Ctrl+O </span>
118
+ <span style={{ fg: theme.separator }}>│ </span>
119
+ <span style={{ fg: theme.action }}>back</span>
114
120
  </text>
115
121
  </>
116
122
  )
117
123
  }
124
+
118
125
  return (
119
126
  <>
120
127
  <text>
121
- <span style={{ fg: colors.key }}>j/k </span>
122
- <span style={{ fg: colors.separator }}>│ </span>
123
- <span style={{ fg: colors.action }}>navigate</span>
128
+ <span style={{ fg: theme.key }}>j/k </span>
129
+ <span style={{ fg: theme.separator }}>│ </span>
130
+ <span style={{ fg: theme.action }}>navigate</span>
131
+ </text>
132
+ <text>
133
+ <span style={{ fg: theme.key }}>d </span>
134
+ <span style={{ fg: theme.separator }}>│ </span>
135
+ <span style={{ fg: theme.action }}>kill</span>
124
136
  </text>
125
137
  <text>
126
- <span style={{ fg: colors.key }}>d </span>
127
- <span style={{ fg: colors.separator }}>│ </span>
128
- <span style={{ fg: colors.action }}>kill</span>
138
+ <span style={{ fg: theme.key }}>r </span>
139
+ <span style={{ fg: theme.separator }}>│ </span>
140
+ <span style={{ fg: theme.action }}>rename</span>
129
141
  </text>
130
142
  <text>
131
- <span style={{ fg: colors.key }}>r </span>
132
- <span style={{ fg: colors.separator }}>│ </span>
133
- <span style={{ fg: colors.action }}>rename</span>
143
+ <span style={{ fg: theme.key }}>o/Esc </span>
144
+ <span style={{ fg: theme.separator }}>│ </span>
145
+ <span style={{ fg: theme.action }}>back</span>
134
146
  </text>
135
147
  <text>
136
- <span style={{ fg: colors.key }}>o/Esc </span>
137
- <span style={{ fg: colors.separator }}>│ </span>
138
- <span style={{ fg: colors.action }}>back</span>
148
+ <span style={{ fg: theme.key }}>, </span>
149
+ <span style={{ fg: theme.separator }}>│ </span>
150
+ <span style={{ fg: theme.action }}>settings</span>
139
151
  </text>
140
152
  </>
141
153
  )
142
154
  }
143
155
 
144
- // Single column layout - all keys in left column, all actions in right column
145
156
  if (isStandard) {
146
157
  return (
147
158
  <>
148
159
  <text>
149
- <span style={{ fg: colors.key }}>↑/↓ </span>
150
- <span style={{ fg: colors.separator }}>│ </span>
151
- <span style={{ fg: colors.action }}>navigate</span>
160
+ <span style={{ fg: theme.key }}>↑/↓ </span>
161
+ <span style={{ fg: theme.separator }}>│ </span>
162
+ <span style={{ fg: theme.action }}>navigate</span>
152
163
  </text>
153
164
  <text>
154
- <span style={{ fg: colors.key }}>Ctrl+X d </span>
155
- <span style={{ fg: colors.separator }}>│ </span>
156
- <span style={{ fg: colors.action }}>kill</span>
165
+ <span style={{ fg: theme.key }}>Ctrl+X d </span>
166
+ <span style={{ fg: theme.separator }}>│ </span>
167
+ <span style={{ fg: theme.action }}>kill</span>
157
168
  </text>
158
169
  <text>
159
- <span style={{ fg: colors.key }}>Ctrl+X r </span>
160
- <span style={{ fg: colors.separator }}>│ </span>
161
- <span style={{ fg: colors.action }}>rename</span>
170
+ <span style={{ fg: theme.key }}>Ctrl+X r </span>
171
+ <span style={{ fg: theme.separator }}>│ </span>
172
+ <span style={{ fg: theme.action }}>rename</span>
162
173
  </text>
163
174
  <text>
164
- <span style={{ fg: colors.key }}>Ctrl+X n </span>
165
- <span style={{ fg: colors.separator }}>│ </span>
166
- <span style={{ fg: colors.action }}>new</span>
175
+ <span style={{ fg: theme.key }}>Ctrl+X n </span>
176
+ <span style={{ fg: theme.separator }}>│ </span>
177
+ <span style={{ fg: theme.action }}>new</span>
167
178
  </text>
168
179
  <text>
169
- <span style={{ fg: colors.key }}>Ctrl+I </span>
170
- <span style={{ fg: colors.separator }}>│ </span>
171
- <span style={{ fg: colors.action }}>search</span>
180
+ <span style={{ fg: theme.key }}>Ctrl+I </span>
181
+ <span style={{ fg: theme.separator }}>│ </span>
182
+ <span style={{ fg: theme.action }}>search</span>
172
183
  </text>
173
184
  <text>
174
- <span style={{ fg: colors.key }}>Ctrl+X o </span>
175
- <span style={{ fg: colors.separator }}>│ </span>
176
- <span style={{ fg: colors.action }}>opencode</span>
185
+ <span style={{ fg: theme.key }}>Ctrl+X o </span>
186
+ <span style={{ fg: theme.separator }}>│ </span>
187
+ <span style={{ fg: theme.action }}>opencode</span>
177
188
  </text>
178
189
  <text>
179
- <span style={{ fg: colors.key }}>Ctrl+L </span>
180
- <span style={{ fg: colors.separator }}>│ </span>
181
- <span style={{ fg: colors.action }}>last</span>
190
+ <span style={{ fg: theme.key }}>Ctrl+X s </span>
191
+ <span style={{ fg: theme.separator }}>│ </span>
192
+ <span style={{ fg: theme.action }}>settings</span>
182
193
  </text>
183
194
  <text>
184
- <span style={{ fg: colors.key }}>Ctrl+G </span>
185
- <span style={{ fg: colors.separator }}>│ </span>
186
- <span style={{ fg: colors.action }}>root</span>
195
+ <span style={{ fg: theme.key }}>Ctrl+L </span>
196
+ <span style={{ fg: theme.separator }}>│ </span>
197
+ <span style={{ fg: theme.action }}>last</span>
187
198
  </text>
188
199
  <text>
189
- <span style={{ fg: colors.key }}>Ctrl+X R </span>
190
- <span style={{ fg: colors.separator }}>│ </span>
191
- <span style={{ fg: colors.action }}>refresh</span>
200
+ <span style={{ fg: theme.key }}>Ctrl+G </span>
201
+ <span style={{ fg: theme.separator }}>│ </span>
202
+ <span style={{ fg: theme.action }}>root</span>
192
203
  </text>
193
204
  <text>
194
- <span style={{ fg: colors.key }}>Ctrl+Q </span>
195
- <span style={{ fg: colors.separator }}>│ </span>
196
- <span style={{ fg: colors.action }}>quit</span>
205
+ <span style={{ fg: theme.key }}>Ctrl+X R </span>
206
+ <span style={{ fg: theme.separator }}>│ </span>
207
+ <span style={{ fg: theme.action }}>refresh</span>
208
+ </text>
209
+ <text>
210
+ <span style={{ fg: theme.key }}>Ctrl+Q </span>
211
+ <span style={{ fg: theme.separator }}>│ </span>
212
+ <span style={{ fg: theme.action }}>quit</span>
197
213
  </text>
198
214
  </>
199
215
  )
@@ -202,66 +218,71 @@ export default function KeybindHelp({ appMode, keybindMode = 'vim', selectedItem
202
218
  return (
203
219
  <>
204
220
  <text>
205
- <span style={{ fg: colors.key }}>j/k </span>
206
- <span style={{ fg: colors.separator }}>│ </span>
207
- <span style={{ fg: colors.action }}>navigate</span>
221
+ <span style={{ fg: theme.key }}>j/k </span>
222
+ <span style={{ fg: theme.separator }}>│ </span>
223
+ <span style={{ fg: theme.action }}>navigate</span>
224
+ </text>
225
+ <text>
226
+ <span style={{ fg: theme.key }}>1-9 </span>
227
+ <span style={{ fg: theme.separator }}>│ </span>
228
+ <span style={{ fg: theme.action }}>switch</span>
208
229
  </text>
209
230
  <text>
210
- <span style={{ fg: colors.key }}>1-9 </span>
211
- <span style={{ fg: colors.separator }}>│ </span>
212
- <span style={{ fg: colors.action }}>switch</span>
231
+ <span style={{ fg: theme.key }}>d </span>
232
+ <span style={{ fg: theme.separator }}>│ </span>
233
+ <span style={{ fg: theme.action }}>kill</span>
213
234
  </text>
214
235
  <text>
215
- <span style={{ fg: colors.key }}>d </span>
216
- <span style={{ fg: colors.separator }}>│ </span>
217
- <span style={{ fg: colors.action }}>kill</span>
236
+ <span style={{ fg: theme.key }}>r </span>
237
+ <span style={{ fg: theme.separator }}>│ </span>
238
+ <span style={{ fg: theme.action }}>rename</span>
218
239
  </text>
219
240
  <text>
220
- <span style={{ fg: colors.key }}>r </span>
221
- <span style={{ fg: colors.separator }}>│ </span>
222
- <span style={{ fg: colors.action }}>rename</span>
241
+ <span style={{ fg: theme.key }}>n </span>
242
+ <span style={{ fg: theme.separator }}>│ </span>
243
+ <span style={{ fg: theme.action }}>new</span>
223
244
  </text>
224
245
  <text>
225
- <span style={{ fg: colors.key }}>n </span>
226
- <span style={{ fg: colors.separator }}>│ </span>
227
- <span style={{ fg: colors.action }}>new</span>
246
+ <span style={{ fg: theme.key }}>i </span>
247
+ <span style={{ fg: theme.separator }}>│ </span>
248
+ <span style={{ fg: theme.action }}>search</span>
228
249
  </text>
229
250
  <text>
230
- <span style={{ fg: colors.key }}>i </span>
231
- <span style={{ fg: colors.separator }}>│ </span>
232
- <span style={{ fg: colors.action }}>search</span>
251
+ <span style={{ fg: theme.key }}>o </span>
252
+ <span style={{ fg: theme.separator }}>│ </span>
253
+ <span style={{ fg: theme.action }}>opencode</span>
233
254
  </text>
234
255
  <text>
235
- <span style={{ fg: colors.key }}>o </span>
236
- <span style={{ fg: colors.separator }}>│ </span>
237
- <span style={{ fg: colors.action }}>opencode</span>
256
+ <span style={{ fg: theme.key }}>, </span>
257
+ <span style={{ fg: theme.separator }}>│ </span>
258
+ <span style={{ fg: theme.action }}>settings</span>
238
259
  </text>
239
260
  <text>
240
- <span style={{ fg: colors.key }}>l </span>
241
- <span style={{ fg: colors.separator }}>│ </span>
242
- <span style={{ fg: colors.action }}>last</span>
261
+ <span style={{ fg: theme.key }}>l </span>
262
+ <span style={{ fg: theme.separator }}>│ </span>
263
+ <span style={{ fg: theme.action }}>last</span>
243
264
  </text>
244
265
  <text>
245
- <span style={{ fg: colors.key }}>g </span>
246
- <span style={{ fg: colors.separator }}>│ </span>
247
- <span style={{ fg: colors.action }}>root</span>
266
+ <span style={{ fg: theme.key }}>g </span>
267
+ <span style={{ fg: theme.separator }}>│ </span>
268
+ <span style={{ fg: theme.action }}>root</span>
248
269
  </text>
249
270
  {showEditTarget && (
250
271
  <text>
251
- <span style={{ fg: colors.key }}>e </span>
252
- <span style={{ fg: colors.separator }}>│ </span>
253
- <span style={{ fg: colors.action }}>edit</span>
272
+ <span style={{ fg: theme.key }}>e </span>
273
+ <span style={{ fg: theme.separator }}>│ </span>
274
+ <span style={{ fg: theme.action }}>edit</span>
254
275
  </text>
255
276
  )}
256
277
  <text>
257
- <span style={{ fg: colors.key }}>R </span>
258
- <span style={{ fg: colors.separator }}>│ </span>
259
- <span style={{ fg: colors.action }}>refresh</span>
278
+ <span style={{ fg: theme.key }}>R </span>
279
+ <span style={{ fg: theme.separator }}>│ </span>
280
+ <span style={{ fg: theme.action }}>refresh</span>
260
281
  </text>
261
282
  <text>
262
- <span style={{ fg: colors.key }}>q </span>
263
- <span style={{ fg: colors.separator }}>│ </span>
264
- <span style={{ fg: colors.action }}>quit</span>
283
+ <span style={{ fg: theme.key }}>q </span>
284
+ <span style={{ fg: theme.separator }}>│ </span>
285
+ <span style={{ fg: theme.action }}>quit</span>
265
286
  </text>
266
287
  </>
267
288
  )