The CallRecordingTranscriptTextSelectionAction API is experimental and may change in the future. It has been marked as @deprecated to remind the developer that it is experimental. It is not "deprecated", just experimental. Please don't use it in production versions of your app. We do not guarantee backward compatibility, or that the API will remain stable.
import {type CallRecordingTranscriptTextSelectionAction} from "attio/client"
Any file with a named export of callRecordingTranscriptTextSelectionAction will register a call recording transcript text selection action.

Example

TypeScript
import {type CallRecordingTranscriptTextSelectionAction, showDialog} from "attio/client"
import {ProcessCallTranscriptDialog} from "./your-code"

export const callRecordingTranscriptTextSelectionAction: CallRecordingTranscriptTextSelectionAction =
  {
    id: "process-call-transcript",
    label: "Process transcript",
    onTrigger: async ({
      transcript,
      url,
    }: {
      transcript: {speaker: string; text: string}[]
      url: string
    }) => {
      await showDialog({
          title: "Process call transcript",
          Dialog: ({hideDialog}: {hideDialog: () => void}) => {
            return (
              <ProcessCallTranscriptDialog
                transcript={transcript}
                url={url}
                onDone={hideDialog}
              />
            )
          },
        })
    },
  }

Arguments

id
string
required
The unique identifier for this call recording transcript selection action.It is only used internally; never shown to the user.
label
string
required
A human-readable label of the call recording transcript selection action that will be shown to the user when they make a text selection on a call recording transcript.
icon
string
An AttioIcon to display beside the label.
If no icon prop is provided, it will default to your app’s icon that you set up in the Developer dashboard.
onTrigger
async (selection: { transcript: Array<{ speaker: string text: string }>, url: string }) => Promise<void>
The function to run when the action is triggered. You’ll likely want to show a dialog or run a server function here.The function will be given an object containing:
  • transcript – the portion of the transcript that was selected, with speaker information
  • url – a url linking directly back to the call recording transcript section selected