()
| 72 | } |
| 73 | |
| 74 | export function registerLoopSkill(): void { |
| 75 | registerBundledSkill({ |
| 76 | name: 'loop', |
| 77 | description: |
| 78 | 'Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)', |
| 79 | whenToUse: |
| 80 | 'When the user wants to set up a recurring task, poll for status, or run something repeatedly on an interval (e.g. "check the deploy every 5 minutes", "keep running /babysit-prs"). Do NOT invoke for one-off tasks.', |
| 81 | argumentHint: '[interval] <prompt>', |
| 82 | userInvocable: true, |
| 83 | isEnabled: isKairosCronEnabled, |
| 84 | async getPromptForCommand(args) { |
| 85 | const trimmed = args.trim() |
| 86 | if (!trimmed) { |
| 87 | return [{ type: 'text', text: USAGE_MESSAGE }] |
| 88 | } |
| 89 | return [{ type: 'text', text: buildPrompt(trimmed) }] |
| 90 | }, |
| 91 | }) |
| 92 | } |
| 93 |
no test coverage detected