// Chat+: its rows of the feature table (docs/AREA-PLUGINS.md). `FEATURES` is what its card lists; // `POWER` are the flags Power User turns on besides the defaults. A flag id never changes once it // shipped. New words go to ./messages.en.json; modules to ./index.ts. // // X's chat is a heavy page: every row says `heavy`, so it runs there (nothing else of the app does). import type { FeatureSpec } from '../../../../../waybetter/packages/runtime/src/featureTable.ts'; import { modules } from '../rows.ts'; const CHAT = ['chat']; /** The words of a feature's row on the card (./messages.en.json). */ const words = (name: string) => ({ label: `plugin.chat-plus.feature.${name}.label`, description: `plugin.chat-plus.feature.${name}.description` }); export const FEATURES: readonly FeatureSpec[] = [ ...modules('chat', '', [ // No surfaces: the list of starred messages opens from any page of X (its star buttons only exist in chats). { id: 'chat.bookmarks', heavy: true, ...words('bookmarks'), keywords: 'star starred messages bookmarks saved dm reply jump', permissions: ['storage', 'ui', 'clipboard', 'commands'] }, { id: 'chat.searchLoaded', surfaces: CHAT, heavy: true, ...words('searchLoaded'), keywords: 'find search in conversation ctrl shift f messages', permissions: ['ui', 'commands'] }, { id: 'chat.pins', surfaces: CHAT, heavy: true, ...words('pins'), keywords: 'pin pinned label color chats conversations strip', permissions: ['storage', 'ui', 'commands'] }, { id: 'chat.personFilter', surfaces: CHAT, heavy: true, ...words('personFilter'), keywords: 'group chat person participant filter only from', permissions: ['storage', 'ui', 'commands'] }, // On by default (owner, 2026-10-10): asks native code for the preview of a link on screen (link_preview.rs). { id: 'chat.linkPreviews', surfaces: CHAT, heavy: true, default: true, ...words('linkPreviews'), keywords: 'link preview embed youtube card unfurl', permissions: ['ui'] }, { id: 'chat.keywords', surfaces: CHAT, heavy: true, settings: true, ...words('keywords'), keywords: 'highlight mute words keywords hide messages', permissions: ['storage', 'ui'] }, ]), ]; /** * Flags Power User turns on besides the defaults (this area's advanced features). None of them does * anything by itself: a star, a pin, a picked person or a word list of the owner's comes first. */ export const POWER: readonly string[] = ['chat.bookmarks', 'chat.searchLoaded', 'chat.pins', 'chat.personFilter', 'chat.keywords'];