Change summary
internal/ui/model/skills.go | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Detailed changes
@@ -58,6 +58,15 @@ func (m *UI) skillStatusItems() []skillStatusItem {
var items []skillStatusItem
stateNames := make(map[string]struct{}, len(m.skillStates))
+ disabledSet := make(map[string]bool)
+ if m.com != nil && m.com.Workspace != nil {
+ if cfg := m.com.Config(); cfg != nil {
+ for _, name := range cfg.Options.DisabledSkills {
+ disabledSet[name] = true
+ }
+ }
+ }
+
states := slices.Clone(m.skillStates)
slices.SortStableFunc(states, func(a, b *skills.SkillState) int {
return strings.Compare(a.Path, b.Path)
@@ -67,6 +76,9 @@ func (m *UI) skillStatusItems() []skillStatusItem {
if name == "" {
name = filepath.Base(filepath.Dir(state.Path))
}
+ if disabledSet[name] {
+ continue
+ }
stateNames[name] = struct{}{}
icon := t.Resource.OnlineIcon.String()
if state.State == skills.StateError {
@@ -87,6 +99,9 @@ func (m *UI) skillStatusItems() []skillStatusItem {
if _, ok := stateNames[skill.Name]; ok {
continue
}
+ if disabledSet[skill.Name] {
+ continue
+ }
items = append(items, skillStatusItem{
icon: t.Resource.OnlineIcon.String(),
name: skill.Name,