mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
16 lines
481 B
TypeScript
16 lines
481 B
TypeScript
import { validateComputerClipboardPasteTextWithBoundedYield } from './computer-clipboard-paste-validation'
|
|
|
|
export function validateComputerSidecarPasteText(
|
|
method: string,
|
|
params: unknown
|
|
): Promise<void> | void {
|
|
if (method !== 'pasteText' || !params || typeof params !== 'object') {
|
|
return
|
|
}
|
|
const text = (params as Record<string, unknown>).text
|
|
if (typeof text !== 'string') {
|
|
return
|
|
}
|
|
return validateComputerClipboardPasteTextWithBoundedYield(text)
|
|
}
|