Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

908 B
Raw Blame
import { requireOptionalNativeModule } from 'expo-modules-core';

interface CindyHtmlPreviewModule {
  appHostAvailable?: boolean;
  startApp?(root: string, entry: string, token: string, csp: string, files: string[][]): Promise<string>;
  start(root: string, entry: string, token: string, csp: string, files: string[][]): Promise<string>;
  startOnDemand?(root: string, entry: string, token: string, csp: string): Promise<string>;
  resolveRequest?(token: string, id: string, filename: string, mime: string, status: number): Promise<boolean>;
  addListener(event: 'resourceRequest' | 'resourceClosed', listener: (event: { token: string; id: string; path?: string }) => void): { remove(): void };
  stop(token: string): Promise<void>;
}
// An older installed binary can still open source view without crashing at import.
export default requireOptionalNativeModule<CindyHtmlPreviewModule>('CindyHtmlPreview');