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

import { AgentSkillService, IAgentSkillService } from './skillService';
import { ISkillTool } from './tools/skill';
import { SkillTool } from './tools/skillTool';

export class SkillFeature extends Feature {
  static override readonly name = 'skill';

  constructor() {
    super();
    this.contributeAgentService(IAgentSkillService, AgentSkillService, {
      activation: ScopeActivation.OnDemand,
    });
    this.contributeTool(ISkillTool, SkillTool, { name: 'Skill', domain: 'skill' });
  }
}

registerFeature(SkillFeature);