All files / app/mods comment.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38117x       117x                                                       117x          
import { DateTime } from 'luxon';
import { Plugin } from '../model/plugin';
import { Mod } from '../model/tag';
 
export const commentPlugin: Plugin = {
  tag: 'plugin/comment',
  name: $localize`💬️ Comment`,
  config: {
    mod: $localize`💬️ Comment`,
    version: 1,
    type: 'plugin',
    default: true,
    genId: true,
    internal: true,
    reply: ['internal', 'plugin/comment'],
    responseButton: $localize`💬️`,
    generated: $localize`Generated by jasper-ui ${DateTime.now().toISO()}`,
    description: $localize`Activates built-in comment support and allows users to create comments.`,
    aiInstructions: `# plugin/comment
    The plugin/comment tag indicates the Ref represents a comment on it's source.
    The first source (sources[0]) should be the immediate parent.
    The second source (sources[1]) should be the top of the comment thread.
    For top posts and first responses, including the top of the comment thread as both sources (sources[0] and sources[1])
    is recommended, as this will allow adding additional sources to be added without breaking threading.`,
    icons: [{ thumbnail: $localize`💬️`, order: 1 }],
    filters: [
      { query: 'plugin/comment', label: $localize`💬️ comments`, title: $localize`Comments`, group: $localize`Plugins 🧰️` },
    ],
    sorts: [{ sort: 'metadata->plugins->plugin/comment', label: $localize`💬️ comments`, title: $localize`Number of comments` }],
  },
};
 
export const commentMod: Mod = {
  plugin: [
    commentPlugin,
  ]
};