Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

1.0 KB
Raw Blame
import type { RpcClient } from '../../../transport/rpc-client'
import type { StructuredAgentSessionHostSupport } from '../../mobile-structured-agent-session-host-support'
import { useMobileNativeChatFileSearch } from './use-mobile-native-chat-file-search'
import { useMobileNativeChatSkills } from './use-mobile-native-chat-skills'

/** The workspace's files for `@` and its disk-scanned skills for `/` and `$`. */
export function useMobileNativeChatWorkspaceCatalog(
  scope: {
    client: RpcClient | null
    worktreeId: string
    agentSessionHostSupport?: StructuredAgentSessionHostSupport | null
  },
  agent: string | null
): ReturnType<typeof useMobileNativeChatFileSearch> & ReturnType<typeof useMobileNativeChatSkills> {
  const { client, worktreeId } = scope
  const files = useMobileNativeChatFileSearch({ client, worktreeId })
  const skills = useMobileNativeChatSkills({
    client,
    worktreeId,
    agent,
    supported: scope.agentSessionHostSupport?.discoverWorkspaceSkills === true
  })
  return { ...files, ...skills }
}