decord/alpha/source/modules/vibegrations/lib/VibegrationsCustomWidget.tsx
github-actions 97fd043558 chore: update source for alpha 347.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4941.js (118.4 MB)
2026-09-19 06:52:51 +00:00

37 lines
1.7 KiB
TypeScript

// Module ID: 13357
// Function ID: 13358
// Name: VibegrationsCustomWidget
// Dependencies: [2063, 504, 1434, 7484, 2]
// Exports: composeVibegrationsCustomWidgetPrompt, useCanConjureVibegrationsCustomWidget
// Module 13357 (VibegrationsCustomWidget)
import GuildStore from "GuildStore" /* 2063 */;
const require = globalThis.__r;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/lib/VibegrationsCustomWidget.tsx");
export const VIBEGRATIONS_CUSTOM_WIDGET_PROMPT_MAX_LENGTH = 2000;
export const useCanConjureVibegrationsCustomWidget = function useCanConjureVibegrationsCustomWidget(UserProfileContent, isMobileGameCollectionExperimentEnabled) {
_require = UserProfileContent;
let flag = isMobileGameCollectionExperimentEnabled;
if (isMobileGameCollectionExperimentEnabled === undefined) {
flag = true;
}
const items = [GuildStore, require("ApexExperiment").ApexExperimentStore];
const items1 = [UserProfileContent, flag];
return require("initialize").useStateFromStores(items, () => {
let someResult = flag;
if (flag) {
const guildsArray = GuildStore.getGuildsArray();
someResult = guildsArray.some((item) => closure_0(flag[3]).isVibegrationsGuildEligible(item, UserProfileContent));
}
return someResult;
}, items1);
};
export const composeVibegrationsCustomWidgetPrompt = function composeVibegrationsCustomWidgetPrompt(arg0) {
const items = ["Build a profile card (an application profile widget) for my Discord profile.", "Read the data from the public source below \u2014 it must be reachable without a login.", "Recommend which fields the card should show and ask me to confirm or edit them before you build.", "", arg0];
return items.join("\n");
};