(definition: BundledSkillDefinition)
| 130 | // -- |
| 131 | |
| 132 | function skillDefinitionToCommand(definition: BundledSkillDefinition): Command { |
| 133 | return { |
| 134 | type: 'prompt', |
| 135 | name: definition.name, |
| 136 | description: definition.description, |
| 137 | hasUserSpecifiedDescription: true, |
| 138 | allowedTools: definition.allowedTools ?? [], |
| 139 | argumentHint: definition.argumentHint, |
| 140 | whenToUse: definition.whenToUse, |
| 141 | model: definition.model, |
| 142 | disableModelInvocation: definition.disableModelInvocation ?? false, |
| 143 | userInvocable: definition.userInvocable ?? true, |
| 144 | contentLength: 0, |
| 145 | // 'bundled' not 'builtin' — 'builtin' in Command.source means hardcoded |
| 146 | // slash commands (/help, /clear). Using 'bundled' keeps these skills in |
| 147 | // the Skill tool's listing, analytics name logging, and prompt-truncation |
| 148 | // exemption. The user-toggleable aspect is tracked on LoadedPlugin.isBuiltin. |
| 149 | source: 'bundled', |
| 150 | loadedFrom: 'bundled', |
| 151 | hooks: definition.hooks, |
| 152 | context: definition.context, |
| 153 | agent: definition.agent, |
| 154 | isEnabled: definition.isEnabled ?? (() => true), |
| 155 | isHidden: !(definition.userInvocable ?? true), |
| 156 | progressMessage: 'running', |
| 157 | getPromptForCommand: definition.getPromptForCommand, |
| 158 | } |
| 159 | } |
| 160 |
no outgoing calls
no test coverage detected