Creating Plot Twists
    Preparing search index...

    Type Alias PickPriorityConfig

    Configuration for automatic priority selection based on activity similarity.

    Maps activity fields to scoring weights or required exact matches:

    • Number value: Maximum score for similarity matching on this field
    • true value: Required exact match - activities must match exactly or be excluded

    Scoring rules:

    • content: Uses vector similarity on activity embedding (cosine similarity)
    • type: Exact match on ActivityType
    • mentions: Percentage of existing activity's mentions that appear in new activity
    • meta.field: Exact match on top-level meta fields (e.g., "meta.sourceId")

    When content is true, applies a strong similarity threshold to ensure only close matches. Default (when neither priority nor pickPriority specified): {content: true}

    // Require exact content match with strong similarity
    pickPriority: { content: true }

    // Score based on content (max 100 points) and require exact type match
    pickPriority: { content: 100, type: true }

    // Match on meta source and score content
    pickPriority: { "meta.source": true, content: 50 }
    type PickPriorityConfig = {
        content?: number | true;
        type?: number | true;
        mentions?: number | true;
        [key: `meta.${string}`]: number | true;
    }

    Indexable

    • [key: `meta.${string}`]: number | true
    Index

    Properties

    content?: number | true
    type?: number | true
    mentions?: number | true