mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 03:34:22 +01:00
tui: move debug shortcuts to command palette for better discoverability
This commit is contained in:
@@ -176,19 +176,6 @@ function App() {
|
||||
const { theme, mode, setMode } = useTheme()
|
||||
const exit = useExit()
|
||||
|
||||
useKeyboard(async (evt) => {
|
||||
if (!Installation.isLocal()) return
|
||||
if (evt.meta && evt.name === "t") {
|
||||
renderer.toggleDebugOverlay()
|
||||
return
|
||||
}
|
||||
|
||||
if (evt.meta && evt.name === "d") {
|
||||
renderer.console.toggle()
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
console.log(JSON.stringify(route.data))
|
||||
})
|
||||
@@ -310,6 +297,22 @@ function App() {
|
||||
onSelect: exit,
|
||||
category: "System",
|
||||
},
|
||||
{
|
||||
title: "Toggle debug panel",
|
||||
value: "app.debug",
|
||||
onSelect: (dialog) => {
|
||||
renderer.toggleDebugOverlay()
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Toggle console",
|
||||
value: "app.fps",
|
||||
onSelect: (dialog) => {
|
||||
renderer.console.toggle()
|
||||
dialog.clear()
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
createEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user