mux-sesh 1.10.0 → 2.0.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/README.md +133 -86
- package/bin/mux-sesh +45 -17
- package/bin/platform.sh +139 -0
- package/bin/postinstall +22 -0
- package/package.json +27 -38
- package/src/agents/index.ts +0 -1
- package/src/agents/session-name.ts +0 -24
- package/src/app/commands.ts +0 -138
- package/src/app/controller.ts +0 -437
- package/src/app/controls.ts +0 -123
- package/src/app/core-state.ts +0 -75
- package/src/app/data.ts +0 -130
- package/src/app/derived.ts +0 -77
- package/src/app/effects.ts +0 -650
- package/src/app/handlers.ts +0 -406
- package/src/app/keyboard.ts +0 -165
- package/src/app/modal-keyboard.ts +0 -137
- package/src/app/modal-state.ts +0 -53
- package/src/app/modals-layer.tsx +0 -159
- package/src/app/modals.ts +0 -108
- package/src/app/notifications.ts +0 -21
- package/src/app/opencode.ts +0 -49
- package/src/app/operations.ts +0 -31
- package/src/app/runtime.ts +0 -79
- package/src/app/screen.tsx +0 -240
- package/src/app/state.ts +0 -178
- package/src/app/textarea.ts +0 -16
- package/src/app/view.ts +0 -101
- package/src/app.tsx +0 -50
- package/src/config/index.ts +0 -475
- package/src/config/listed-sessions.ts +0 -33
- package/src/config/paths.ts +0 -13
- package/src/config/session-rules.ts +0 -100
- package/src/config/store.ts +0 -33
- package/src/files/target.ts +0 -96
- package/src/handlers/action-helpers.ts +0 -83
- package/src/handlers/actions.ts +0 -216
- package/src/handlers/keyboard/agents.ts +0 -134
- package/src/handlers/keyboard/index.ts +0 -5
- package/src/handlers/keyboard/new-session.ts +0 -58
- package/src/handlers/keyboard/normal.ts +0 -220
- package/src/handlers/keyboard/search.ts +0 -118
- package/src/handlers/keyboard/shared.ts +0 -117
- package/src/herdr/backend.ts +0 -357
- package/src/herdr/protocol.ts +0 -268
- package/src/index.tsx +0 -23
- package/src/items/order.ts +0 -95
- package/src/multiplexer/backend.ts +0 -43
- package/src/multiplexer/command.ts +0 -48
- package/src/multiplexer/index.ts +0 -21
- package/src/multiplexer/items.ts +0 -66
- package/src/multiplexer/resolve.ts +0 -109
- package/src/multiplexer/tmux-backend.ts +0 -87
- package/src/multiplexer/types.ts +0 -93
- package/src/opencode/constants.ts +0 -7
- package/src/opencode/index.ts +0 -20
- package/src/opencode/parser.ts +0 -45
- package/src/opencode/session-name.ts +0 -13
- package/src/opencode/session.ts +0 -146
- package/src/opencode/sqlite.ts +0 -447
- package/src/opencode/stats.ts +0 -26
- package/src/opencode/tokens.ts +0 -116
- package/src/opencode/types.ts +0 -33
- package/src/preview/project.ts +0 -362
- package/src/projects/session-links.ts +0 -52
- package/src/search/fff.ts +0 -224
- package/src/search/index.ts +0 -198
- package/src/settings.ts +0 -465
- package/src/styles/omarchy.ts +0 -295
- package/src/styles/opencode-themes-a.ts +0 -1442
- package/src/styles/opencode-themes-b.ts +0 -1212
- package/src/styles/opencode-tui-colors.ts +0 -1784
- package/src/styles/terminal-palette.ts +0 -156
- package/src/styles/theme-follow.ts +0 -94
- package/src/styles/theme.tsx +0 -311
- package/src/tmux/actions.ts +0 -145
- package/src/tmux/details.ts +0 -104
- package/src/tmux/helpers.ts +0 -35
- package/src/tmux/index.ts +0 -10
- package/src/tmux/list.ts +0 -31
- package/src/tmux/project-discovery.ts +0 -116
- package/src/tmux/project-loader.ts +0 -92
- package/src/tmux/project-zoxide.ts +0 -128
- package/src/tmux/projects.ts +0 -38
- package/src/tmux/workflows.ts +0 -26
- package/src/types/index.ts +0 -221
- package/src/ui/AgentSessionGroup.tsx +0 -93
- package/src/ui/CommandsModal.tsx +0 -246
- package/src/ui/ErrorScreen.tsx +0 -102
- package/src/ui/HighlightedText.tsx +0 -60
- package/src/ui/ItemList.tsx +0 -119
- package/src/ui/Modal.tsx +0 -48
- package/src/ui/OpencodeStatsPanel.tsx +0 -233
- package/src/ui/RenameModal.tsx +0 -42
- package/src/ui/SearchInput.tsx +0 -43
- package/src/ui/SessionDetailsPanel.tsx +0 -273
- package/src/ui/SessionList.tsx +0 -119
- package/src/ui/SettingEditorModal.tsx +0 -55
- package/src/ui/SettingOptionsModal.tsx +0 -95
- package/src/ui/SettingsModal.tsx +0 -102
- package/src/ui/Toast.tsx +0 -34
- package/src/ui/VersionBadge.tsx +0 -45
- package/src/ui/item-icon.ts +0 -110
- package/src/ui/list-window.ts +0 -35
- package/src/ui/session-meta.ts +0 -10
- package/src/ui/text-columns.ts +0 -17
- package/src/ui/use-textarea-focus.ts +0 -29
- package/src/update/events.ts +0 -28
- package/src/update/index.ts +0 -91
- package/src/update/installation.ts +0 -161
- package/src/update/version.ts +0 -33
- package/src/util/ansi.ts +0 -3
- package/src/util/browser.ts +0 -37
- package/src/util/clipboard.ts +0 -22
- package/src/util/errors.ts +0 -170
- package/src/util/github.ts +0 -100
- package/src/util/glob.ts +0 -51
- package/src/util/path-display.ts +0 -98
- package/src/util/perf.ts +0 -23
- package/src/util/shell.ts +0 -3
- package/src/util/shutdown.ts +0 -111
- package/src/util/terminal.ts +0 -28
- package/src/util/time.ts +0 -48
- package/tsconfig.json +0 -25
package/src/styles/omarchy.ts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs'
|
|
2
|
-
import { join } from 'path'
|
|
3
|
-
import type { ThemeColors } from '../types'
|
|
4
|
-
|
|
5
|
-
export const OMARCHY_STATE_DIR = ['.local', 'state', 'omarchy', 'current'] as const
|
|
6
|
-
|
|
7
|
-
export type OmarchyMode = 'light' | 'dark'
|
|
8
|
-
|
|
9
|
-
export interface OmarchyPalette {
|
|
10
|
-
mode: OmarchyMode
|
|
11
|
-
background: string
|
|
12
|
-
foreground: string
|
|
13
|
-
accent?: string
|
|
14
|
-
selection?: string
|
|
15
|
-
muted?: string
|
|
16
|
-
dark_background?: string
|
|
17
|
-
darker_background?: string
|
|
18
|
-
lighter_background?: string
|
|
19
|
-
dark_foreground?: string
|
|
20
|
-
light_foreground?: string
|
|
21
|
-
bright_foreground?: string
|
|
22
|
-
red?: string
|
|
23
|
-
yellow?: string
|
|
24
|
-
orange?: string
|
|
25
|
-
green?: string
|
|
26
|
-
cyan?: string
|
|
27
|
-
blue?: string
|
|
28
|
-
magenta?: string
|
|
29
|
-
brown?: string
|
|
30
|
-
bright_red?: string
|
|
31
|
-
bright_yellow?: string
|
|
32
|
-
bright_green?: string
|
|
33
|
-
bright_cyan?: string
|
|
34
|
-
bright_blue?: string
|
|
35
|
-
bright_magenta?: string
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const COLOR_KEYS = [
|
|
39
|
-
'background',
|
|
40
|
-
'foreground',
|
|
41
|
-
'accent',
|
|
42
|
-
'selection',
|
|
43
|
-
'muted',
|
|
44
|
-
'dark_background',
|
|
45
|
-
'darker_background',
|
|
46
|
-
'lighter_background',
|
|
47
|
-
'dark_foreground',
|
|
48
|
-
'light_foreground',
|
|
49
|
-
'bright_foreground',
|
|
50
|
-
'red',
|
|
51
|
-
'yellow',
|
|
52
|
-
'orange',
|
|
53
|
-
'green',
|
|
54
|
-
'cyan',
|
|
55
|
-
'blue',
|
|
56
|
-
'magenta',
|
|
57
|
-
'brown',
|
|
58
|
-
'bright_red',
|
|
59
|
-
'bright_yellow',
|
|
60
|
-
'bright_green',
|
|
61
|
-
'bright_cyan',
|
|
62
|
-
'bright_blue',
|
|
63
|
-
'bright_magenta',
|
|
64
|
-
] as const
|
|
65
|
-
|
|
66
|
-
type OmarchyColorKey = (typeof COLOR_KEYS)[number]
|
|
67
|
-
|
|
68
|
-
const COLOR_KEY_SET = new Set<string>(COLOR_KEYS)
|
|
69
|
-
|
|
70
|
-
function isOmarchyColorKey(key: string): key is OmarchyColorKey {
|
|
71
|
-
return COLOR_KEY_SET.has(key)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function clamp(value: number): number {
|
|
75
|
-
return Math.max(0, Math.min(255, Math.round(value)))
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function normalizeHex(color: string): string {
|
|
79
|
-
const normalized = color.startsWith('#') ? color.slice(1) : color
|
|
80
|
-
|
|
81
|
-
if (normalized.length === 3 || normalized.length === 4) {
|
|
82
|
-
return `#${normalized
|
|
83
|
-
.split('')
|
|
84
|
-
.map(char => `${char}${char}`)
|
|
85
|
-
.join('')}`
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return color.startsWith('#') ? color : `#${color}`
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function hexToRgb(hex: string): { r: number; g: number; b: number } {
|
|
92
|
-
const normalized = normalizeHex(hex).slice(1)
|
|
93
|
-
const channel = (offset: number) => parseInt(normalized.slice(offset, offset + 2), 16)
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
r: channel(0),
|
|
97
|
-
g: channel(2),
|
|
98
|
-
b: channel(4),
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function rgbToHex(r: number, g: number, b: number): string {
|
|
103
|
-
return `#${[r, g, b].map(channel => clamp(channel).toString(16).padStart(2, '0')).join('')}`
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function luminance(color: string): number {
|
|
107
|
-
const { r, g, b } = hexToRgb(color)
|
|
108
|
-
return 0.299 * r + 0.587 * g + 0.114 * b
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function readableText(background: string): string {
|
|
112
|
-
return luminance(background) > 150 ? '#171717' : '#f5f5f5'
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function mix(colorA: string, colorB: string, ratio: number): string {
|
|
116
|
-
const from = hexToRgb(colorA)
|
|
117
|
-
const to = hexToRgb(colorB)
|
|
118
|
-
|
|
119
|
-
return rgbToHex(
|
|
120
|
-
from.r + (to.r - from.r) * ratio,
|
|
121
|
-
from.g + (to.g - from.g) * ratio,
|
|
122
|
-
from.b + (to.b - from.b) * ratio
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function parseHexColor(value: string): string | null {
|
|
127
|
-
const unquoted = stripQuotes(value)
|
|
128
|
-
const hex = unquoted.startsWith('#') ? unquoted.slice(1) : unquoted
|
|
129
|
-
|
|
130
|
-
if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{4}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex)) {
|
|
131
|
-
return null
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return normalizeHex(`#${hex}`)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function stripQuotes(value: string): string {
|
|
138
|
-
if (
|
|
139
|
-
(value.startsWith('"') && value.endsWith('"') && value.length >= 2) ||
|
|
140
|
-
(value.startsWith("'") && value.endsWith("'") && value.length >= 2)
|
|
141
|
-
) {
|
|
142
|
-
return value.slice(1, -1)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return value
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function parseMode(value: string): OmarchyMode | null {
|
|
149
|
-
const normalized = stripQuotes(value).toLowerCase()
|
|
150
|
-
return normalized === 'light' || normalized === 'dark' ? normalized : null
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export function getOmarchyThemeNamePath(homeDir: string): string {
|
|
154
|
-
return join(homeDir, ...OMARCHY_STATE_DIR, 'theme.name')
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export function getOmarchyColorsPath(homeDir: string): string {
|
|
158
|
-
return join(homeDir, ...OMARCHY_STATE_DIR, 'theme', 'colors.toml')
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export function isOmarchyPresent(homeDir: string): boolean {
|
|
162
|
-
return existsSync(getOmarchyColorsPath(homeDir))
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export function parseOmarchyColorsToml(text: string): OmarchyPalette | null {
|
|
166
|
-
const colors: Partial<Record<OmarchyColorKey, string>> = {}
|
|
167
|
-
let mode: OmarchyMode | null = null
|
|
168
|
-
let themeType: OmarchyMode | null = null
|
|
169
|
-
|
|
170
|
-
for (const rawLine of text.split(/\r?\n/)) {
|
|
171
|
-
const line = rawLine.trim()
|
|
172
|
-
if (!line || line.startsWith('#')) {
|
|
173
|
-
continue
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const separator = line.indexOf('=')
|
|
177
|
-
if (separator === -1) {
|
|
178
|
-
continue
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const key = line.slice(0, separator).trim().toLowerCase()
|
|
182
|
-
const value = line.slice(separator + 1).trim()
|
|
183
|
-
|
|
184
|
-
if (key === 'mode') {
|
|
185
|
-
mode = parseMode(value) ?? mode
|
|
186
|
-
continue
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (key === 'theme_type') {
|
|
190
|
-
themeType = parseMode(value) ?? themeType
|
|
191
|
-
continue
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (!isOmarchyColorKey(key)) {
|
|
195
|
-
continue
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
const color = parseHexColor(value)
|
|
199
|
-
if (!color) {
|
|
200
|
-
if (key === 'background' || key === 'foreground') {
|
|
201
|
-
return null
|
|
202
|
-
}
|
|
203
|
-
continue
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
colors[key] = color
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const background = colors.background
|
|
210
|
-
const foreground = colors.foreground
|
|
211
|
-
if (!background || !foreground) {
|
|
212
|
-
return null
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const resolvedMode = mode ?? themeType ?? (luminance(background) > 150 ? 'light' : 'dark')
|
|
216
|
-
|
|
217
|
-
return {
|
|
218
|
-
mode: resolvedMode,
|
|
219
|
-
background,
|
|
220
|
-
foreground,
|
|
221
|
-
accent: colors.accent,
|
|
222
|
-
selection: colors.selection,
|
|
223
|
-
muted: colors.muted,
|
|
224
|
-
dark_background: colors.dark_background,
|
|
225
|
-
darker_background: colors.darker_background,
|
|
226
|
-
lighter_background: colors.lighter_background,
|
|
227
|
-
dark_foreground: colors.dark_foreground,
|
|
228
|
-
light_foreground: colors.light_foreground,
|
|
229
|
-
bright_foreground: colors.bright_foreground,
|
|
230
|
-
red: colors.red,
|
|
231
|
-
yellow: colors.yellow,
|
|
232
|
-
orange: colors.orange,
|
|
233
|
-
green: colors.green,
|
|
234
|
-
cyan: colors.cyan,
|
|
235
|
-
blue: colors.blue,
|
|
236
|
-
magenta: colors.magenta,
|
|
237
|
-
brown: colors.brown,
|
|
238
|
-
bright_red: colors.bright_red,
|
|
239
|
-
bright_yellow: colors.bright_yellow,
|
|
240
|
-
bright_green: colors.bright_green,
|
|
241
|
-
bright_cyan: colors.bright_cyan,
|
|
242
|
-
bright_blue: colors.bright_blue,
|
|
243
|
-
bright_magenta: colors.bright_magenta,
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export function readOmarchyPalette(homeDir: string): OmarchyPalette | null {
|
|
248
|
-
try {
|
|
249
|
-
const colorsPath = getOmarchyColorsPath(homeDir)
|
|
250
|
-
if (!existsSync(colorsPath)) {
|
|
251
|
-
return null
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
return parseOmarchyColorsToml(readFileSync(colorsPath, 'utf8'))
|
|
255
|
-
} catch {
|
|
256
|
-
return null
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export function omarchyPaletteToThemeColors(palette: OmarchyPalette): ThemeColors {
|
|
261
|
-
const background = palette.background
|
|
262
|
-
const text = palette.foreground
|
|
263
|
-
const muted = palette.muted ?? palette.dark_foreground ?? mix(text, background, 0.5)
|
|
264
|
-
const chrome = palette.cyan ?? palette.blue ?? palette.accent ?? text
|
|
265
|
-
const accent = palette.accent ?? palette.orange ?? chrome
|
|
266
|
-
const danger = palette.red ?? palette.bright_red ?? text
|
|
267
|
-
const selection = chrome
|
|
268
|
-
|
|
269
|
-
return {
|
|
270
|
-
background,
|
|
271
|
-
surface: background,
|
|
272
|
-
surfaceAlt: palette.lighter_background ?? mix(background, text, 0.08),
|
|
273
|
-
surfaceModal: palette.dark_background ?? mix(background, text, 0.04),
|
|
274
|
-
overlay: '#000000',
|
|
275
|
-
border: muted,
|
|
276
|
-
borderMuted: palette.dark_foreground ?? muted,
|
|
277
|
-
text,
|
|
278
|
-
textMuted: muted,
|
|
279
|
-
textSubtle: muted,
|
|
280
|
-
primary: chrome,
|
|
281
|
-
secondary: palette.magenta ?? accent,
|
|
282
|
-
accent,
|
|
283
|
-
active: palette.green ?? palette.bright_green ?? text,
|
|
284
|
-
inactive: muted,
|
|
285
|
-
key: palette.yellow ?? palette.bright_yellow ?? palette.orange ?? text,
|
|
286
|
-
action: accent,
|
|
287
|
-
separator: muted,
|
|
288
|
-
program: palette.green ?? palette.bright_green ?? text,
|
|
289
|
-
fileTree: chrome,
|
|
290
|
-
danger,
|
|
291
|
-
dangerSurface: mix(background, danger, 0.2),
|
|
292
|
-
selection,
|
|
293
|
-
selectionText: readableText(selection),
|
|
294
|
-
}
|
|
295
|
-
}
|