2026-10-01 06:55:13 +00:00
// Module ID: 12849
// Function ID: 12850
2026-09-19 06:52:51 +00:00
// Name: VibegrationsCustomWidget
2026-10-01 06:55:13 +00:00
// Dependencies: [2066, 504, 1435, 5554, 2]
2026-09-19 06:52:51 +00:00
// Exports: composeVibegrationsCustomWidgetPrompt, useCanConjureVibegrationsCustomWidget
2026-10-01 06:55:13 +00:00
// Module 12849 (VibegrationsCustomWidget)
import GuildStore from "GuildStore" /* 2066 */ ;
2026-09-19 06:52:51 +00:00
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 ;
2026-09-29 09:27:02 +00:00
export const useCanConjureVibegrationsCustomWidget = function useCanConjureVibegrationsCustomWidget ( UserProfileContent , arg1 ) {
2026-09-19 06:52:51 +00:00
_require = UserProfileContent ;
2026-09-29 09:27:02 +00:00
let flag = arg1 ;
if ( arg1 === undefined ) {
2026-09-19 06:52:51 +00:00
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" ) ;
} ;