mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(composer): unify prompt suggestions with fuzzy matching and a mobile keybar
This commit is contained in:
1 parent
704f81884b
commit
855b78297e
24 files changed
+1121
-399
No files matched your search
@@ -103,19 +103,12 @@ describe('MoreDrawer', () => {
|
||||
vi.clearAllMocks()
|
||||
vi.mocked(useNavigate).mockReturnValue(vi.fn())
|
||||
vi.mocked(useCommands).mockReturnValue({
|
||||
commands: [],
|
||||
commands: [{ name: 'help', description: 'Show help' }],
|
||||
recentNames: [],
|
||||
loading: false,
|
||||
error: null,
|
||||
filterCommands: vi.fn().mockReturnValue([
|
||||
{
|
||||
name: 'help',
|
||||
description: 'Show help',
|
||||
template: '',
|
||||
agent: '',
|
||||
model: '',
|
||||
hints: [],
|
||||
},
|
||||
]),
|
||||
searchCommands: vi.fn(),
|
||||
findCommand: vi.fn(),
|
||||
})
|
||||
useUIState.getState().clearPendingPromptCommand()
|
||||
useUIState.getState().clearPendingPromptFile()
|
||||
|
||||
@@ -38,7 +38,7 @@ export function MoreDrawer({ isOpen, onClose }: MoreDrawerProps) {
|
||||
const isSessionDetail = /^\/repos\/\d+\/sessions\/[^/]+$/.test(location.pathname)
|
||||
const isAssistantRoute = isAssistantPath(location.pathname)
|
||||
const isAssistantSession = isSessionDetail && searchParams.get('assistant') === '1'
|
||||
const { filterCommands } = useCommands({ enabled: isSessionDetail })
|
||||
const { commands } = useCommands({ enabled: isSessionDetail })
|
||||
const activePromptFileBasePath = useUIState((state) => state.activePromptFileBasePath)
|
||||
const selectPromptCommand = useUIState((state) => state.selectPromptCommand)
|
||||
const selectPromptFile = useUIState((state) => state.selectPromptFile)
|
||||
@@ -121,7 +121,6 @@ export function MoreDrawer({ isOpen, onClose }: MoreDrawerProps) {
|
||||
const assistantCta = isSessionDetail && !isAssistantSession
|
||||
? buildNavModel(location.pathname).primary.find((cta) => cta.key === 'assistant')
|
||||
: undefined
|
||||
const commands = filterCommands('')
|
||||
|
||||
const opencodeVersion = health?.opencodeVersion
|
||||
const managerVersion = health?.opencodeManagerVersion
|
||||
|
||||
Reference in new issue
Block a user