mux-sesh 1.6.4 → 1.7.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.
- package/README.md +90 -59
- package/package.json +7 -5
- package/src/app/commands.ts +120 -0
- package/src/app/controller.ts +397 -0
- package/src/app/controls.ts +121 -0
- package/src/app/core-state.ts +71 -0
- package/src/app/data.ts +90 -0
- package/src/app/derived.ts +77 -0
- package/src/app/effects.ts +392 -0
- package/src/app/handlers.ts +325 -0
- package/src/app/keyboard.ts +161 -0
- package/src/app/modal-keyboard.ts +118 -0
- package/src/app/modal-state.ts +50 -0
- package/src/app/modals-layer.tsx +159 -0
- package/src/app/modals.ts +108 -0
- package/src/app/notifications.ts +21 -0
- package/src/app/opencode.ts +49 -0
- package/src/app/operations.ts +31 -0
- package/src/app/runtime.ts +76 -0
- package/src/app/screen.tsx +217 -0
- package/src/app/state.ts +166 -0
- package/src/app/textarea.ts +16 -0
- package/src/app/view.ts +89 -0
- package/src/app.tsx +7 -1136
- package/src/config/index.ts +36 -42
- package/src/config/paths.ts +13 -0
- package/src/config/session-rules.ts +6 -2
- package/src/config/store.ts +26 -0
- package/src/handlers/action-helpers.ts +50 -0
- package/src/handlers/actions.ts +34 -65
- package/src/handlers/keyboard/index.ts +5 -0
- package/src/handlers/keyboard/new-session.ts +57 -0
- package/src/handlers/keyboard/normal.ts +201 -0
- package/src/handlers/keyboard/opencode.ts +104 -0
- package/src/handlers/keyboard/search.ts +113 -0
- package/src/handlers/keyboard/shared.ts +116 -0
- package/src/opencode/sqlite.ts +21 -6
- package/src/preview/project.ts +41 -15
- package/src/search/index.ts +4 -1
- package/src/settings.ts +294 -297
- package/src/styles/opencode-themes-a.ts +1442 -1
- package/src/styles/opencode-themes-b.ts +1212 -1
- package/src/styles/opencode-tui-colors.ts +1784 -1
- package/src/styles/theme.tsx +2 -1
- package/src/tmux/actions.ts +103 -0
- package/src/tmux/details.ts +123 -0
- package/src/tmux/helpers.ts +35 -0
- package/src/tmux/index.ts +10 -288
- package/src/tmux/list.ts +31 -0
- package/src/tmux/project-discovery.ts +113 -0
- package/src/tmux/project-loader.ts +74 -0
- package/src/tmux/project-zoxide.ts +128 -0
- package/src/tmux/projects.ts +23 -262
- package/src/types/index.ts +0 -1
- package/src/ui/CommandsModal.tsx +87 -22
- package/src/ui/HighlightedText.tsx +1 -5
- package/src/ui/ItemList.tsx +14 -4
- package/src/ui/Modal.tsx +8 -1
- package/src/ui/OpencodeSessionGroup.tsx +20 -9
- package/src/ui/OpencodeStatsPanel.tsx +48 -15
- package/src/ui/RenameModal.tsx +17 -17
- package/src/ui/SearchInput.tsx +1 -20
- package/src/ui/SessionDetailsPanel.tsx +43 -15
- package/src/ui/SessionList.tsx +23 -6
- package/src/ui/SettingEditorModal.tsx +15 -9
- package/src/ui/SettingOptionsModal.tsx +30 -12
- package/src/ui/SettingsModal.tsx +20 -14
- package/src/ui/VersionBadge.tsx +3 -1
- package/src/ui/item-icon.ts +5 -1
- package/src/ui/list-window.ts +5 -1
- package/src/ui/use-textarea-focus.ts +26 -0
- package/src/update/index.ts +10 -2
- package/src/update/installation.ts +6 -2
- package/src/util/ansi.ts +3 -0
- package/src/util/glob.ts +5 -1
- package/src/components/KeybindHelp.tsx +0 -289
- package/src/handlers/keyboard.ts +0 -654
- package/src/ui/SessionStats.tsx +0 -32
package/src/ui/SessionList.tsx
CHANGED
|
@@ -43,12 +43,19 @@ export default function SessionList({
|
|
|
43
43
|
const sectionHeader = formatSectionHeader(theme, currentSection, icons)
|
|
44
44
|
const pendingKill = item.title === pendingKillSessionName
|
|
45
45
|
const selected = absoluteIndex === cursor
|
|
46
|
-
const mutedLabelSpacer =
|
|
46
|
+
const mutedLabelSpacer =
|
|
47
|
+
item.isSession && item.desc ? getMutedLabelSpacer(item.title, mutedLabelColumnWidth) : ''
|
|
47
48
|
|
|
48
49
|
return (
|
|
49
50
|
<box key={i} style={{ flexDirection: 'column' }}>
|
|
50
51
|
{showSectionHeader && (
|
|
51
|
-
<text
|
|
52
|
+
<text
|
|
53
|
+
style={{
|
|
54
|
+
fg: theme.textSubtle,
|
|
55
|
+
marginTop: absoluteIndex === 0 ? 0 : 1,
|
|
56
|
+
marginBottom: 1,
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
52
59
|
<span style={{ fg: sectionHeader.color }}>{sectionHeader.text}</span>
|
|
53
60
|
</text>
|
|
54
61
|
)}
|
|
@@ -57,21 +64,31 @@ export default function SessionList({
|
|
|
57
64
|
style={{
|
|
58
65
|
flexDirection: 'row',
|
|
59
66
|
justifyContent: 'space-between',
|
|
60
|
-
backgroundColor: pendingKill
|
|
67
|
+
backgroundColor: pendingKill
|
|
68
|
+
? theme.dangerSurface
|
|
69
|
+
: selected
|
|
70
|
+
? theme.surfaceAlt
|
|
71
|
+
: 'transparent',
|
|
61
72
|
paddingLeft: 1,
|
|
62
73
|
paddingRight: 1,
|
|
63
74
|
}}
|
|
64
75
|
>
|
|
65
76
|
<text>
|
|
66
|
-
<span style={{ fg: selected ? theme.primary : theme.textSubtle }}>
|
|
67
|
-
|
|
77
|
+
<span style={{ fg: selected ? theme.primary : theme.textSubtle }}>
|
|
78
|
+
{selected ? '› ' : ' '}
|
|
79
|
+
</span>
|
|
80
|
+
<span style={{ fg: item.isAttached ? theme.active : theme.inactive }}>
|
|
81
|
+
{item.isAttached ? '●' : '○'}
|
|
82
|
+
</span>
|
|
68
83
|
<span style={{ fg: icon.color }}>{icon.glyph ? ` ${icon.glyph}` : ''}</span>{' '}
|
|
69
84
|
{isSearching && matchIndices && matchIndices.length > 0 ? (
|
|
70
85
|
<HighlightedText text={item.title} matchIndices={matchIndices} />
|
|
71
86
|
) : (
|
|
72
87
|
<span style={{ fg: theme.text }}>{item.title}</span>
|
|
73
88
|
)}
|
|
74
|
-
{item.isSession && item.desc ?
|
|
89
|
+
{item.isSession && item.desc ? (
|
|
90
|
+
<span style={{ fg: theme.textSubtle }}>{`${mutedLabelSpacer}${item.desc}`}</span>
|
|
91
|
+
) : null}
|
|
75
92
|
</text>
|
|
76
93
|
|
|
77
94
|
<text style={{ fg: pendingKill ? theme.danger : theme.textSubtle }}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TextareaRenderable } from '@opentui/core'
|
|
2
|
-
import { useEffect } from 'react'
|
|
3
2
|
import { useTheme } from '../styles/theme'
|
|
4
3
|
import Modal from './Modal'
|
|
4
|
+
import { useTextareaFocus } from './use-textarea-focus'
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
title: string
|
|
@@ -25,15 +25,16 @@ export default function SettingEditorModal({
|
|
|
25
25
|
onContentChange,
|
|
26
26
|
}: Props) {
|
|
27
27
|
const theme = useTheme()
|
|
28
|
-
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
queueMicrotask(() => {
|
|
31
|
-
textareaRef.current?.focus()
|
|
32
|
-
})
|
|
33
|
-
}, [textareaRef])
|
|
28
|
+
useTextareaFocus(textareaRef, [])
|
|
34
29
|
|
|
35
30
|
return (
|
|
36
|
-
<Modal
|
|
31
|
+
<Modal
|
|
32
|
+
title={title}
|
|
33
|
+
description={description}
|
|
34
|
+
footer="Enter apply"
|
|
35
|
+
columns={columns}
|
|
36
|
+
preferredWidth={88}
|
|
37
|
+
>
|
|
37
38
|
{error && <text style={{ fg: theme.danger, marginBottom: 1 }}>{error}</text>}
|
|
38
39
|
|
|
39
40
|
<box
|
|
@@ -42,7 +43,12 @@ export default function SettingEditorModal({
|
|
|
42
43
|
height: Math.max(6, rows - 16),
|
|
43
44
|
}}
|
|
44
45
|
>
|
|
45
|
-
<textarea
|
|
46
|
+
<textarea
|
|
47
|
+
ref={textareaRef}
|
|
48
|
+
initialValue={value}
|
|
49
|
+
onContentChange={onContentChange}
|
|
50
|
+
focused
|
|
51
|
+
/>
|
|
46
52
|
</box>
|
|
47
53
|
</Modal>
|
|
48
54
|
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TextareaRenderable } from '@opentui/core'
|
|
2
|
-
import { useEffect } from 'react'
|
|
3
2
|
import { useTheme } from '../styles/theme'
|
|
4
3
|
import type { SettingsOption } from '../settings'
|
|
5
4
|
import Modal from './Modal'
|
|
5
|
+
import { useTextareaFocus } from './use-textarea-focus'
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
title: string
|
|
@@ -27,17 +27,31 @@ export default function SettingOptionsModal({
|
|
|
27
27
|
}: Props) {
|
|
28
28
|
const theme = useTheme()
|
|
29
29
|
const selected = options[cursor]
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
queueMicrotask(() => {
|
|
33
|
-
textareaRef.current?.focus()
|
|
34
|
-
})
|
|
35
|
-
}, [textareaRef])
|
|
30
|
+
useTextareaFocus(textareaRef, [])
|
|
36
31
|
|
|
37
32
|
return (
|
|
38
|
-
<Modal
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
<Modal
|
|
34
|
+
title={title}
|
|
35
|
+
description={description}
|
|
36
|
+
footer="↑/↓ navigate enter apply esc back"
|
|
37
|
+
columns={columns}
|
|
38
|
+
preferredWidth={68}
|
|
39
|
+
>
|
|
40
|
+
<box
|
|
41
|
+
style={{
|
|
42
|
+
backgroundColor: theme.surfaceAlt,
|
|
43
|
+
paddingLeft: 1,
|
|
44
|
+
paddingRight: 1,
|
|
45
|
+
marginBottom: 1,
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<textarea
|
|
49
|
+
ref={textareaRef}
|
|
50
|
+
initialValue={searchQuery}
|
|
51
|
+
onContentChange={onContentChange}
|
|
52
|
+
focused
|
|
53
|
+
placeholder="Filter options"
|
|
54
|
+
/>
|
|
41
55
|
</box>
|
|
42
56
|
|
|
43
57
|
<box style={{ flexDirection: 'column' }}>
|
|
@@ -58,8 +72,12 @@ export default function SettingOptionsModal({
|
|
|
58
72
|
paddingRight: 1,
|
|
59
73
|
}}
|
|
60
74
|
>
|
|
61
|
-
<text style={{ fg: active ? theme.selectionText : theme.text }}>
|
|
62
|
-
|
|
75
|
+
<text style={{ fg: active ? theme.selectionText : theme.text }}>
|
|
76
|
+
{option.label}
|
|
77
|
+
</text>
|
|
78
|
+
<text style={{ fg: active ? theme.selectionText : theme.textMuted }}>
|
|
79
|
+
{option.value}
|
|
80
|
+
</text>
|
|
63
81
|
</box>
|
|
64
82
|
)
|
|
65
83
|
})
|
package/src/ui/SettingsModal.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TextareaRenderable } from '@opentui/core'
|
|
2
|
-
import { useEffect } from 'react'
|
|
3
2
|
import { useTheme } from '../styles/theme'
|
|
4
3
|
import type { SettingsEntry } from '../settings'
|
|
5
4
|
import Modal from './Modal'
|
|
5
|
+
import { useTextareaFocus } from './use-textarea-focus'
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
configPath: string
|
|
@@ -29,33 +29,37 @@ export default function SettingsModal({
|
|
|
29
29
|
}: Props) {
|
|
30
30
|
const theme = useTheme()
|
|
31
31
|
const selected = entries[cursor]
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
queueMicrotask(() => {
|
|
35
|
-
textareaRef.current?.focus()
|
|
36
|
-
})
|
|
37
|
-
}, [textareaRef])
|
|
32
|
+
useTextareaFocus(textareaRef, [])
|
|
38
33
|
|
|
39
34
|
return (
|
|
40
35
|
<Modal
|
|
41
|
-
title=
|
|
42
|
-
description=
|
|
43
|
-
footer=
|
|
36
|
+
title="Settings"
|
|
37
|
+
description="Search for a setting, then open its option or editor screen"
|
|
38
|
+
footer="↑/↓ navigate enter open esc close"
|
|
44
39
|
columns={columns}
|
|
45
40
|
preferredWidth={74}
|
|
46
41
|
>
|
|
47
42
|
<box style={{ flexDirection: 'column', marginBottom: 1 }}>
|
|
48
43
|
<text style={{ fg: theme.textMuted }}>Path: {configPath}</text>
|
|
49
|
-
<text style={{ fg: theme.textMuted }}>
|
|
44
|
+
<text style={{ fg: theme.textMuted }}>
|
|
45
|
+
{themeName} ({colorMode})
|
|
46
|
+
</text>
|
|
50
47
|
</box>
|
|
51
48
|
|
|
52
|
-
<box
|
|
49
|
+
<box
|
|
50
|
+
style={{
|
|
51
|
+
backgroundColor: theme.surfaceAlt,
|
|
52
|
+
paddingLeft: 1,
|
|
53
|
+
paddingRight: 1,
|
|
54
|
+
marginBottom: 1,
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
53
57
|
<textarea
|
|
54
58
|
ref={textareaRef}
|
|
55
59
|
initialValue={searchQuery}
|
|
56
60
|
onContentChange={onContentChange}
|
|
57
61
|
focused
|
|
58
|
-
placeholder=
|
|
62
|
+
placeholder="Search settings"
|
|
59
63
|
/>
|
|
60
64
|
</box>
|
|
61
65
|
|
|
@@ -78,7 +82,9 @@ export default function SettingsModal({
|
|
|
78
82
|
}}
|
|
79
83
|
>
|
|
80
84
|
<text style={{ fg: active ? theme.selectionText : theme.text }}>{entry.label}</text>
|
|
81
|
-
<text style={{ fg: active ? theme.selectionText : theme.textMuted }}>
|
|
85
|
+
<text style={{ fg: active ? theme.selectionText : theme.textMuted }}>
|
|
86
|
+
{entry.value}
|
|
87
|
+
</text>
|
|
82
88
|
</box>
|
|
83
89
|
)
|
|
84
90
|
})
|
package/src/ui/VersionBadge.tsx
CHANGED
|
@@ -24,7 +24,9 @@ export default function VersionBadge({ currentVersion, updatedVersion }: Version
|
|
|
24
24
|
right: 1,
|
|
25
25
|
}}
|
|
26
26
|
>
|
|
27
|
-
<text style={{ fg: theme.textSubtle }}>
|
|
27
|
+
<text style={{ fg: theme.textSubtle }}>
|
|
28
|
+
{formatVersionBadge(currentVersion, updatedVersion)}
|
|
29
|
+
</text>
|
|
28
30
|
</box>
|
|
29
31
|
)
|
|
30
32
|
}
|
package/src/ui/item-icon.ts
CHANGED
|
@@ -14,7 +14,11 @@ function getIconConfig(icons?: IconConfig): IconConfig {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function getItemIconPresentation(
|
|
17
|
+
export function getItemIconPresentation(
|
|
18
|
+
theme: ThemeColors,
|
|
19
|
+
item: Item,
|
|
20
|
+
icons?: IconConfig
|
|
21
|
+
): ItemIconPresentation {
|
|
18
22
|
const resolvedIcons = getIconConfig(icons)
|
|
19
23
|
|
|
20
24
|
if (item.itemKind === 'configured') {
|
package/src/ui/list-window.ts
CHANGED
|
@@ -3,7 +3,11 @@ export interface VisibleWindow<T> {
|
|
|
3
3
|
startIndex: number
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export function getVisibleWindow<T>(
|
|
6
|
+
export function getVisibleWindow<T>(
|
|
7
|
+
items: T[],
|
|
8
|
+
cursor: number,
|
|
9
|
+
maxItems: number
|
|
10
|
+
): VisibleWindow<T> {
|
|
7
11
|
if (items.length === 0) {
|
|
8
12
|
return {
|
|
9
13
|
items: [],
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TextareaRenderable } from '@opentui/core'
|
|
2
|
+
import { useEffect } from 'react'
|
|
3
|
+
|
|
4
|
+
interface Options {
|
|
5
|
+
gotoLineEnd?: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function useTextareaFocus(
|
|
9
|
+
textareaRef: { current: TextareaRenderable | null },
|
|
10
|
+
dependencies: readonly unknown[],
|
|
11
|
+
options: Options = {}
|
|
12
|
+
) {
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
queueMicrotask(() => {
|
|
15
|
+
const textarea = textareaRef.current
|
|
16
|
+
if (!textarea) {
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
textarea.focus()
|
|
21
|
+
if (options.gotoLineEnd) {
|
|
22
|
+
textarea.gotoLineEnd()
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
}, [options.gotoLineEnd, textareaRef, ...dependencies])
|
|
26
|
+
}
|
package/src/update/index.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Config } from '../types'
|
|
2
2
|
import { CURRENT_VERSION, getLatestVersion, isNewerVersion } from './version'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
canAutoUpdate,
|
|
5
|
+
detectInstallMethod,
|
|
6
|
+
getInstalledVersion,
|
|
7
|
+
performUpgrade,
|
|
8
|
+
} from './installation'
|
|
4
9
|
import { updateEvents } from './events'
|
|
5
10
|
|
|
6
11
|
interface UpdateDependencies {
|
|
@@ -28,7 +33,10 @@ function truthy(key: string): boolean {
|
|
|
28
33
|
return value === 'true' || value === '1'
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
export async function checkAndUpdate(
|
|
36
|
+
export async function checkAndUpdate(
|
|
37
|
+
config: Config,
|
|
38
|
+
dependencies: Partial<UpdateDependencies> = {}
|
|
39
|
+
): Promise<void> {
|
|
32
40
|
const resolvedDependencies = {
|
|
33
41
|
...defaultDependencies,
|
|
34
42
|
...dependencies,
|
|
@@ -71,7 +71,9 @@ async function detectInstallMethodFromPath(runtimePath: string): Promise<Install
|
|
|
71
71
|
return (await findPackageRoot(normalizedPath)) ? 'source' : 'unknown'
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
export async function detectInstallMethod(
|
|
74
|
+
export async function detectInstallMethod(
|
|
75
|
+
runtimePath = getDefaultRuntimePath()
|
|
76
|
+
): Promise<InstallMethod> {
|
|
75
77
|
const activeMethod = await detectInstallMethodFromPath(runtimePath)
|
|
76
78
|
if (activeMethod !== 'unknown') {
|
|
77
79
|
return activeMethod
|
|
@@ -111,7 +113,9 @@ export function canAutoUpdate(method: InstallMethod): boolean {
|
|
|
111
113
|
return method === 'npm' || method === 'bun'
|
|
112
114
|
}
|
|
113
115
|
|
|
114
|
-
export async function getInstalledVersion(
|
|
116
|
+
export async function getInstalledVersion(
|
|
117
|
+
runtimePath = getDefaultRuntimePath()
|
|
118
|
+
): Promise<string | null> {
|
|
115
119
|
const packageRoot = await findPackageRoot(runtimePath)
|
|
116
120
|
|
|
117
121
|
if (!packageRoot) {
|
package/src/util/ansi.ts
ADDED
package/src/util/glob.ts
CHANGED
|
@@ -42,6 +42,10 @@ export function globToRegExp(pattern: string, options: MatchGlobOptions = {}): R
|
|
|
42
42
|
return new RegExp(regex)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function matchesGlob(
|
|
45
|
+
export function matchesGlob(
|
|
46
|
+
value: string,
|
|
47
|
+
pattern: string,
|
|
48
|
+
options: MatchGlobOptions = {}
|
|
49
|
+
): boolean {
|
|
46
50
|
return globToRegExp(pattern, options).test(value)
|
|
47
51
|
}
|
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '../styles/theme'
|
|
2
|
-
import { AppMode, KeybindMode, type Item } from '../types'
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
appMode: AppMode
|
|
6
|
-
keybindMode?: KeybindMode
|
|
7
|
-
selectedItem?: Item
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default function KeybindHelp({ appMode, keybindMode = 'vim', selectedItem }: Props) {
|
|
11
|
-
const theme = useTheme()
|
|
12
|
-
const isStandard = keybindMode === 'standard'
|
|
13
|
-
const showEditTarget = selectedItem?.itemKind === 'configured' && appMode === AppMode.Normal
|
|
14
|
-
|
|
15
|
-
if (appMode === AppMode.Search || appMode === AppMode.NewSession || appMode === AppMode.Rename) {
|
|
16
|
-
if (isStandard) {
|
|
17
|
-
return (
|
|
18
|
-
<>
|
|
19
|
-
<text>
|
|
20
|
-
<span style={{ fg: theme.key }}>↑/↓ </span>
|
|
21
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
22
|
-
<span style={{ fg: theme.action }}>navigate</span>
|
|
23
|
-
</text>
|
|
24
|
-
<text>
|
|
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>
|
|
28
|
-
</text>
|
|
29
|
-
<text>
|
|
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>
|
|
33
|
-
</text>
|
|
34
|
-
<text>
|
|
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>
|
|
38
|
-
</text>
|
|
39
|
-
<text>
|
|
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>
|
|
43
|
-
</text>
|
|
44
|
-
<text>
|
|
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>
|
|
58
|
-
</text>
|
|
59
|
-
{showEditTarget && (
|
|
60
|
-
<text>
|
|
61
|
-
<span style={{ fg: theme.key }}>Ctrl+E </span>
|
|
62
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
63
|
-
<span style={{ fg: theme.action }}>edit</span>
|
|
64
|
-
</text>
|
|
65
|
-
)}
|
|
66
|
-
<text>
|
|
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>
|
|
70
|
-
</text>
|
|
71
|
-
<text>
|
|
72
|
-
<span style={{ fg: theme.key }}>Ctrl+Q </span>
|
|
73
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
74
|
-
<span style={{ fg: theme.action }}>quit</span>
|
|
75
|
-
</text>
|
|
76
|
-
</>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<text>
|
|
82
|
-
<span style={{ fg: theme.key }}>Enter</span>
|
|
83
|
-
<span style={{ fg: theme.separator }}> │ </span>
|
|
84
|
-
<span style={{ fg: theme.action }}>select</span>
|
|
85
|
-
{' '}
|
|
86
|
-
<span style={{ fg: theme.key }}>↑/↓</span>
|
|
87
|
-
<span style={{ fg: theme.separator }}> │ </span>
|
|
88
|
-
<span style={{ fg: theme.action }}>navigate</span>
|
|
89
|
-
{' '}
|
|
90
|
-
<span style={{ fg: theme.key }}>Esc</span>
|
|
91
|
-
<span style={{ fg: theme.separator }}> │ </span>
|
|
92
|
-
<span style={{ fg: theme.action }}>cancel</span>
|
|
93
|
-
</text>
|
|
94
|
-
)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (appMode === AppMode.OpencodeManage) {
|
|
98
|
-
if (isStandard) {
|
|
99
|
-
return (
|
|
100
|
-
<>
|
|
101
|
-
<text>
|
|
102
|
-
<span style={{ fg: theme.key }}>↑/↓ </span>
|
|
103
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
104
|
-
<span style={{ fg: theme.action }}>navigate</span>
|
|
105
|
-
</text>
|
|
106
|
-
<text>
|
|
107
|
-
<span style={{ fg: theme.key }}>Ctrl+D </span>
|
|
108
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
109
|
-
<span style={{ fg: theme.action }}>kill</span>
|
|
110
|
-
</text>
|
|
111
|
-
<text>
|
|
112
|
-
<span style={{ fg: theme.key }}>Ctrl+R </span>
|
|
113
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
114
|
-
<span style={{ fg: theme.action }}>rename</span>
|
|
115
|
-
</text>
|
|
116
|
-
<text>
|
|
117
|
-
<span style={{ fg: theme.key }}>Ctrl+O </span>
|
|
118
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
119
|
-
<span style={{ fg: theme.action }}>back</span>
|
|
120
|
-
</text>
|
|
121
|
-
</>
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return (
|
|
126
|
-
<>
|
|
127
|
-
<text>
|
|
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>
|
|
136
|
-
</text>
|
|
137
|
-
<text>
|
|
138
|
-
<span style={{ fg: theme.key }}>r </span>
|
|
139
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
140
|
-
<span style={{ fg: theme.action }}>rename</span>
|
|
141
|
-
</text>
|
|
142
|
-
<text>
|
|
143
|
-
<span style={{ fg: theme.key }}>o/Esc </span>
|
|
144
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
145
|
-
<span style={{ fg: theme.action }}>back</span>
|
|
146
|
-
</text>
|
|
147
|
-
<text>
|
|
148
|
-
<span style={{ fg: theme.key }}>, </span>
|
|
149
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
150
|
-
<span style={{ fg: theme.action }}>settings</span>
|
|
151
|
-
</text>
|
|
152
|
-
</>
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (isStandard) {
|
|
157
|
-
return (
|
|
158
|
-
<>
|
|
159
|
-
<text>
|
|
160
|
-
<span style={{ fg: theme.key }}>↑/↓ </span>
|
|
161
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
162
|
-
<span style={{ fg: theme.action }}>navigate</span>
|
|
163
|
-
</text>
|
|
164
|
-
<text>
|
|
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>
|
|
168
|
-
</text>
|
|
169
|
-
<text>
|
|
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>
|
|
173
|
-
</text>
|
|
174
|
-
<text>
|
|
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>
|
|
178
|
-
</text>
|
|
179
|
-
<text>
|
|
180
|
-
<span style={{ fg: theme.key }}>Ctrl+I </span>
|
|
181
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
182
|
-
<span style={{ fg: theme.action }}>search</span>
|
|
183
|
-
</text>
|
|
184
|
-
<text>
|
|
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>
|
|
188
|
-
</text>
|
|
189
|
-
<text>
|
|
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>
|
|
193
|
-
</text>
|
|
194
|
-
<text>
|
|
195
|
-
<span style={{ fg: theme.key }}>Ctrl+L </span>
|
|
196
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
197
|
-
<span style={{ fg: theme.action }}>last</span>
|
|
198
|
-
</text>
|
|
199
|
-
<text>
|
|
200
|
-
<span style={{ fg: theme.key }}>Ctrl+G </span>
|
|
201
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
202
|
-
<span style={{ fg: theme.action }}>root</span>
|
|
203
|
-
</text>
|
|
204
|
-
<text>
|
|
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>
|
|
213
|
-
</text>
|
|
214
|
-
</>
|
|
215
|
-
)
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return (
|
|
219
|
-
<>
|
|
220
|
-
<text>
|
|
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>
|
|
229
|
-
</text>
|
|
230
|
-
<text>
|
|
231
|
-
<span style={{ fg: theme.key }}>d </span>
|
|
232
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
233
|
-
<span style={{ fg: theme.action }}>kill</span>
|
|
234
|
-
</text>
|
|
235
|
-
<text>
|
|
236
|
-
<span style={{ fg: theme.key }}>r </span>
|
|
237
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
238
|
-
<span style={{ fg: theme.action }}>rename</span>
|
|
239
|
-
</text>
|
|
240
|
-
<text>
|
|
241
|
-
<span style={{ fg: theme.key }}>n </span>
|
|
242
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
243
|
-
<span style={{ fg: theme.action }}>new</span>
|
|
244
|
-
</text>
|
|
245
|
-
<text>
|
|
246
|
-
<span style={{ fg: theme.key }}>i </span>
|
|
247
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
248
|
-
<span style={{ fg: theme.action }}>search</span>
|
|
249
|
-
</text>
|
|
250
|
-
<text>
|
|
251
|
-
<span style={{ fg: theme.key }}>o </span>
|
|
252
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
253
|
-
<span style={{ fg: theme.action }}>opencode</span>
|
|
254
|
-
</text>
|
|
255
|
-
<text>
|
|
256
|
-
<span style={{ fg: theme.key }}>, </span>
|
|
257
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
258
|
-
<span style={{ fg: theme.action }}>settings</span>
|
|
259
|
-
</text>
|
|
260
|
-
<text>
|
|
261
|
-
<span style={{ fg: theme.key }}>l </span>
|
|
262
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
263
|
-
<span style={{ fg: theme.action }}>last</span>
|
|
264
|
-
</text>
|
|
265
|
-
<text>
|
|
266
|
-
<span style={{ fg: theme.key }}>g </span>
|
|
267
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
268
|
-
<span style={{ fg: theme.action }}>root</span>
|
|
269
|
-
</text>
|
|
270
|
-
{showEditTarget && (
|
|
271
|
-
<text>
|
|
272
|
-
<span style={{ fg: theme.key }}>e </span>
|
|
273
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
274
|
-
<span style={{ fg: theme.action }}>edit</span>
|
|
275
|
-
</text>
|
|
276
|
-
)}
|
|
277
|
-
<text>
|
|
278
|
-
<span style={{ fg: theme.key }}>R </span>
|
|
279
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
280
|
-
<span style={{ fg: theme.action }}>refresh</span>
|
|
281
|
-
</text>
|
|
282
|
-
<text>
|
|
283
|
-
<span style={{ fg: theme.key }}>q </span>
|
|
284
|
-
<span style={{ fg: theme.separator }}>│ </span>
|
|
285
|
-
<span style={{ fg: theme.action }}>quit</span>
|
|
286
|
-
</text>
|
|
287
|
-
</>
|
|
288
|
-
)
|
|
289
|
-
}
|