Fray Electron
    Preparing search index...

    Interface PromptMessages

    Prompt request/result functions exposed to React components through context.

    interface PromptMessages {
        requestPrompt: (options: Omit<PromptOptions, "onResponse">) => string;
        takePromptResult: (requestId: string) => PromptResult | undefined;
    }
    Index
    requestPrompt: (options: Omit<PromptOptions, "onResponse">) => string

    Requests a prompt through the renderer messaging layer.

    Type Declaration

      • (options: Omit<PromptOptions, "onResponse">): string
      • Parameters

        • options: Omit<PromptOptions, "onResponse">

          Prompt title, description, buttons, and dismissal policy.

        Returns string

        Request id used to retrieve the eventual result.

    takePromptResult: (requestId: string) => PromptResult | undefined

    Consumes a completed prompt result, if one has arrived.

    Type Declaration

      • (requestId: string): PromptResult | undefined
      • Parameters

        • requestId: string

          Prompt request id.

        Returns PromptResult | undefined

        Result once available, otherwise undefined; retrieval is non-blocking.