(
onKeyUp={handleKeyUp}
onPaste={handlePaste}
top={
- replyDraft && (
-
+ <>
+ {commandHint && (
- setReplyDraft(undefined)}
- variant="SurfaceVariant"
- size="300"
- radii="300"
- >
-
-
-
- {replyDraft.relation?.rel_type === RelationType.Thread && }
-
-
- {getMemberDisplayName(room, replyDraft.userId) ??
- getMxIdLocalPart(replyDraft.userId) ??
- replyDraft.userId}
-
-
- }
- >
-
- {trimReplyFromBody(replyDraft.body)}
-
-
-
+
+ /{commandHint.command}
+ {commandHint.args && commandHint.args.length > 0 && (
+ {commandHint.args.map(arg => `[${arg}]`).join(' ')}
+ )}
+
+ {commandHint.description && (
+
+ {commandHint.description}
+
+ )}
-
- )
+ )}
+ {replyDraft && (
+
+
+ setReplyDraft(undefined)}
+ variant="SurfaceVariant"
+ size="300"
+ radii="300"
+ >
+
+
+
+ {replyDraft.relation?.rel_type === RelationType.Thread && }
+
+
+ {getMemberDisplayName(room, replyDraft.userId) ??
+ getMxIdLocalPart(replyDraft.userId) ??
+ replyDraft.userId}
+
+
+ }
+ >
+
+ {trimReplyFromBody(replyDraft.body)}
+
+
+
+
+
+ )}
+ >
}
before={
{
const loadPlugins = async () => {
try {
console.log('[PluginLoader] Loading plugins...');
+ console.log('[PluginLoader] window.electron:', !!window.electron);
+ console.log('[PluginLoader] window.electron.plugins:', !!window.electron?.plugins);
if (!window.electron?.plugins) {
console.log('[PluginLoader] Running in web mode, plugins not supported');
@@ -27,6 +31,7 @@ export function PluginLoader({ matrixClient, children }: PluginLoaderProps) {
const pluginsToLoad = await pluginMarketplaceManager.listEnabledPlugins();
console.log('[PluginLoader] Plugins to load:', pluginsToLoad.length);
+ console.log('[PluginLoader] Plugin list:', pluginsToLoad.map(p => p.id));
for (const installedPlugin of pluginsToLoad) {
try {
@@ -65,6 +70,7 @@ export function PluginLoader({ matrixClient, children }: PluginLoaderProps) {
);
const compatContext = Object.assign(context as Record, {
+ matrixClient,
matrix: {
on: (eventType: string, handler: (...args: unknown[]) => void) =>
matrixClient.on(eventType as any, handler as any),
@@ -74,6 +80,10 @@ export function PluginLoader({ matrixClient, children }: PluginLoaderProps) {
React,
});
+ console.log('[PluginLoader] compatContext.React:', !!compatContext.React);
+ console.log('[PluginLoader] compatContext.ui:', !!compatContext.ui);
+ console.log('[PluginLoader] About to register plugin and call onLoad...');
+
pluginRegistry.registerPlugin(installedPlugin.id, plugin, context);
await plugin.onLoad(compatContext as any);
console.log(`[PluginLoader] Successfully loaded plugin: ${installedPlugin.id}`);