mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(shortcuts): rework shortcut bindings, focus restore, and input guards
Resolve effective bindings from stored prefs plus defaults with leader/direct collision handling and default leader Ctrl+X; let direct actions pass through in terminals and suppress abort while an overlay is open. Add half-page scroll disengage, verified overlay focus restore, and consolidate prompt reset.
This commit is contained in:
1 parent
7e8443f54f
commit
994a8b82e8
33 files changed
+784
-195
No files matched your search
@@ -16,7 +16,7 @@ import { RepoActionsContent } from '@/components/repo/RepoActionsDialog'
|
||||
import { RepoSkillsContent } from '@/components/repo/RepoSkillsDialog'
|
||||
import { RepoSchedulesContent } from '@/components/schedules/RepoSchedulesContent'
|
||||
import type { SkillFileInfo } from '@opencode-manager/shared'
|
||||
import { buildToolItems, type MoreDrawerItem } from '@/components/navigation/moreDrawerItems'
|
||||
import { buildToolItems, toolKeyOf, type MoreDrawerItem } from '@/components/navigation/moreDrawerItems'
|
||||
import { isPanelTool, type ToolPanelState, type PanelTool } from '@/hooks/useToolPanel'
|
||||
import { useOpenNavItem } from '@/hooks/useOpenNavItem'
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
@@ -108,7 +108,7 @@ export function ToolSidePanel({
|
||||
const panelTools: Array<{ item: MoreDrawerItem; tool: PanelTool }> = []
|
||||
const actionItems: MoreDrawerItem[] = []
|
||||
for (const item of buildToolItems(location.pathname)) {
|
||||
const tool = item.panelTool ?? item.dialog ?? null
|
||||
const tool = toolKeyOf(item)
|
||||
if (isPanelTool(tool)) panelTools.push({ item, tool })
|
||||
else actionItems.push(item)
|
||||
}
|
||||
|
||||
@@ -60,6 +60,11 @@ export function buildToolItems(pathname: string): MoreDrawerItem[] {
|
||||
return buildNavModel(pathname).items.filter((item) => !NON_TOOL_ITEM_KEYS.has(item.key))
|
||||
}
|
||||
|
||||
/** The `?panel=`/`?dialog=` tool identifier an item targets, preferring its panel tool. */
|
||||
export function toolKeyOf(item: MoreDrawerItem): string | null {
|
||||
return item.panelTool ?? item.dialog ?? null
|
||||
}
|
||||
|
||||
function buildRouteNavModel(pathname: string): NavModel {
|
||||
const baseItems = getBaseItems()
|
||||
|
||||
|
||||
Reference in new issue
Block a user