File size: 863 Bytes
68d7816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { Feature } from '#/features/feature';
import { registerFeature } from '#/features/featureRegistry';

import { AgentNotifyUserNudgeService, IAgentNotifyUserNudgeService } from './notifyUserNudgeService';
import { ISessionNotify } from './sessionNotify';
import { INotifyUserTool, NOTIFY_USER_TOOL_NAME } from './tools/notify-user/notify-user';
import { NotifyUserTool } from './tools/notify-user/notifyUserTool';

export class NotifyFeature extends Feature {
  static override readonly name = 'notify';

  constructor() {
    super();
    this.contributeTool(INotifyUserTool, NotifyUserTool, {
      name: NOTIFY_USER_TOOL_NAME,
      domain: 'notify',
      when: (accessor) => accessor.get(ISessionNotify).enabled,
    });
    this.contributeAgentService(IAgentNotifyUserNudgeService, AgentNotifyUserNudgeService);
  }
}

registerFeature(NotifyFeature);