copyToClipboard (intentExecutor.ts)

lumiere · automation

Executes user intents via integrations: clipboard, calendar, contacts, calls, maps.

import * as Calendar from 'expo-calendar'
import * as Clipboard from 'expo-clipboard'
import * as Contacts from 'expo-contacts'
import * as Linking from 'expo-linking'
import * as WebBrowser from 'expo-web-browser'

import { type ChatIntent } from '../../utils/chatIntents'
import { logger } from '../../utils/logger'

const intentLogger = logger.create('IntentExecutor')

/** Callbacks for session-related operations that depend on app state. */
export interface SessionHandlers {
  setSessionAlias: (key: string, label: string) => void
  switchSession: (key: string) => void
  clearMessages: () => void
}

/** Copy text to the system clipboard. */
export async function copyToClipboard(text: string): Promise<void> {
  await Clipboard.setStringAsync(text)
}

/** Save a contact to the device addres

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key