momolulu 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/client.js +15 -7
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -458,13 +458,21 @@ window.__ModuleLoader__.load({
458
458
  ctx.inject(['commandUi'], (scope) => {
459
459
  const commandUi = scope.get('commandUi');
460
460
  if (commandUi === undefined) return;
461
- scope.effect(() => commandUi.register({
462
- name: 'focus',
463
- label: () => t('focusCommand'),
464
- description: () => t('focusCommandHint'),
465
- available: () => true,
466
- ui: { kind: 'action', run: () => { if (state.status === 'running') pause(); else startFocused(); } },
467
- }), 'momolulu /focus command');
461
+ scope.effect(() => {
462
+ try {
463
+ return commandUi.register({
464
+ name: 'focus',
465
+ label: () => t('focusCommand'),
466
+ description: () => t('focusCommandHint'),
467
+ available: () => true,
468
+ ui: { kind: 'action', run: () => { if (state.status === 'running') pause(); else startFocused(); } },
469
+ });
470
+ } catch (error) {
471
+ // A host /focus command or another plugin may already own the name; the widget still works without it.
472
+ console.warn('momolulu: /focus command unavailable', error);
473
+ return () => {};
474
+ }
475
+ }, 'momolulu /focus command');
468
476
  });
469
477
  ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({ name: 'sidebar.panellist', id: 'lumululu-mei', order: 18, label: () => t('title') }, Icon));
470
478
  ctx.slots.inject('main', () => ctx.slots.register({ name: 'main', key: 'lumululu-mei' }, (props) => h(Companion, { ...props, panelMode: true })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "momolulu",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "momolulu, a gentle coding companion with scenic backgrounds, live session activity, focus timing and wellbeing nudges.",
6
6
  "exports": {