Skip to content

Commit 18850c4

Browse files
jerome-benoitTest Usernexxeln
authored
fix(opencode): disable session navigation commands when no parent session (anomalyco#15762)
Co-authored-by: Test User <test@test.com> Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
1 parent 48412f7 commit 18850c4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • packages/opencode/src/cli/cmd/tui/routes/session

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ export function Session() {
925925
keybind: "session_parent",
926926
category: "Session",
927927
hidden: true,
928+
enabled: !!session()?.parentID,
928929
onSelect: childSessionHandler((dialog) => {
929930
const parentID = session()?.parentID
930931
if (parentID) {
@@ -942,6 +943,7 @@ export function Session() {
942943
keybind: "session_child_cycle",
943944
category: "Session",
944945
hidden: true,
946+
enabled: !!session()?.parentID,
945947
onSelect: childSessionHandler((dialog) => {
946948
moveChild(1)
947949
dialog.clear()
@@ -953,6 +955,7 @@ export function Session() {
953955
keybind: "session_child_cycle_reverse",
954956
category: "Session",
955957
hidden: true,
958+
enabled: !!session()?.parentID,
956959
onSelect: childSessionHandler((dialog) => {
957960
moveChild(-1)
958961
dialog.clear()

0 commit comments

Comments
 (0)