port to contact4

This commit is contained in:
Green Sky
2025-03-10 16:45:16 +01:00
parent 998ba002e4
commit f321cea6eb
7 changed files with 114 additions and 98 deletions

View File

@ -36,13 +36,13 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
try {
auto* completion = PLUG_RESOLVE_INSTANCE(TextCompletionI);
auto* conf = PLUG_RESOLVE_INSTANCE(ConfigModelI);
auto* cr = PLUG_RESOLVE_INSTANCE_VERSIONED(Contact3Registry, "1");
auto* cs = PLUG_RESOLVE_INSTANCE(ContactStore4I);
auto* rmm = PLUG_RESOLVE_INSTANCE(RegistryMessageModelI);
auto* mcd = PLUG_RESOLVE_INSTANCE(MessageCommandDispatcher);
// static store, could be anywhere tho
// construct with fetched dependencies
g_rpbot = std::make_unique<RPBot>(*completion, *conf, *cr, *rmm, mcd);
g_rpbot = std::make_unique<RPBot>(*completion, *conf, *cs, *rmm, mcd);
// register types
PLUG_PROVIDE_INSTANCE(RPBot, plugin_name, g_rpbot.get());