(registry *skills.SkillRegistry, cwd string)
| 74 | |
| 75 | const ( |
| 76 | SlashDispatchNone SlashDispatchKind = "none" |
| 77 | SlashDispatchBuiltin SlashDispatchKind = "builtin" |
| 78 | SlashDispatchExit SlashDispatchKind = "exit" |
| 79 | SlashDispatchSkill SlashDispatchKind = "skill" |
| 80 | SlashDispatchUnknown SlashDispatchKind = "unknown" |
| 81 | ) |
| 82 | |
| 83 | type SlashDispatch struct { |
| 84 | Kind SlashDispatchKind |
| 85 | Command string |
| 86 | Name string |
| 87 | } |
| 88 | |
| 89 | func IterCommandCompletionItems(registry *skills.SkillRegistry, cwd string) []CommandCompletionItem { |
| 90 | items := make([]CommandCompletionItem, 0, len(BuiltinCommands)) |
| 91 | for _, name := range BuiltinCommands { |
| 92 | items = append(items, CommandCompletionItem{Name: name, Description: CommandMeta[name]}) |
| 93 | } |
| 94 | if registry == nil || cwd == "" { |
no test coverage detected