mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
fix: rename /schedule slash command to /triggers to avoid bundled-skill collision
Both `src/commands/schedule/index.ts` (our new UI command) and the upstream `src/skills/bundled/scheduleRemoteAgents.ts` registered `name: 'schedule'`, producing two `/schedule` entries in the slash-command picker — one tagged "(bundled)" with the prompt-skill description, the other our CRUD UI. Rename the primary name to `triggers` (matches the API endpoint `/v1/code/triggers`) and drop `'schedule'` from the alias list. `/cron` alias is preserved. Directory stays `src/commands/schedule/` because renaming the dir would touch every test file's import path for negligible benefit. Updated test that asserted the old name + alias, and the user-facing feature guide that documented `/schedule create ...` examples. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
1. [Buddy 伴侣系统](#1-buddy-伴侣系统)
|
||||
2. [Remote Control 远程控制](#2-remote-control-远程控制)
|
||||
3. [定时任务 /schedule](#3-定时任务-schedule)
|
||||
3. [定时任务 /triggers](#3-定时任务-triggers)
|
||||
4. [Voice Mode 语音模式](#4-voice-mode-语音模式)
|
||||
5. [Chrome 浏览器控制](#5-chrome-浏览器控制)
|
||||
6. [Computer Use 屏幕操控](#6-computer-use-屏幕操控)
|
||||
@@ -72,19 +72,21 @@ CLAUDE_BRIDGE_BASE_URL=https://your-server.com CLAUDE_BRIDGE_OAUTH_TOKEN=your-to
|
||||
|
||||
---
|
||||
|
||||
## 3. 定时任务 /schedule
|
||||
## 3. 定时任务 /triggers
|
||||
|
||||
**PR**: #88 `feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE`
|
||||
**Feature Flag**: `AGENT_TRIGGERS_REMOTE`
|
||||
|
||||
> 命令名已从 `/schedule` 改为 `/triggers`,避免与上游 bundled skill `schedule` 冲突。`/cron` 是别名。
|
||||
|
||||
### 说明
|
||||
创建定时执行的远程 agent 任务,支持 cron 表达式。
|
||||
|
||||
### 使用
|
||||
```
|
||||
/schedule create "每天检查依赖更新" --cron "0 9 * * *" --prompt "检查 package.json 中的过期依赖并创建更新 PR"
|
||||
/schedule list — 列出所有定时任务
|
||||
/schedule delete <id> — 删除指定任务
|
||||
/triggers create "每天检查依赖更新" --cron "0 9 * * *" --prompt "检查 package.json 中的过期依赖并创建更新 PR"
|
||||
/triggers list — 列出所有定时任务
|
||||
/triggers delete <id> — 删除指定任务
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -24,8 +24,8 @@ beforeAll(async () => {
|
||||
})
|
||||
|
||||
describe('scheduleCommand metadata', () => {
|
||||
test('name is "schedule"', () => {
|
||||
expect(cmd.name).toBe('schedule')
|
||||
test('name is "triggers" (renamed from "schedule" to avoid bundled-skill collision)', () => {
|
||||
expect(cmd.name).toBe('triggers')
|
||||
})
|
||||
|
||||
test('type is local-jsx', () => {
|
||||
@@ -36,9 +36,11 @@ describe('scheduleCommand metadata', () => {
|
||||
expect(cmd.isEnabled?.()).toBe(true)
|
||||
})
|
||||
|
||||
test('aliases include cron and triggers', () => {
|
||||
test('aliases include cron (triggers is now the primary name)', () => {
|
||||
expect(cmd.aliases).toContain('cron')
|
||||
expect(cmd.aliases).toContain('triggers')
|
||||
// 'triggers' moved to primary `name`; the bundled skill /schedule
|
||||
// owns the 'schedule' slot upstream so we don't alias to it either.
|
||||
expect(cmd.aliases).not.toContain('schedule')
|
||||
})
|
||||
|
||||
test('bridgeSafe is false', () => {
|
||||
|
||||
@@ -2,8 +2,13 @@ import type { Command } from '../../types/command.js'
|
||||
|
||||
const scheduleCommand: Command = {
|
||||
type: 'local-jsx',
|
||||
name: 'schedule',
|
||||
aliases: ['cron', 'triggers'],
|
||||
// Primary name renamed from 'schedule' → 'triggers' to avoid collision
|
||||
// with the upstream bundled skill `src/skills/bundled/scheduleRemoteAgents.ts`,
|
||||
// which also registers as `/schedule`. The new name matches the underlying
|
||||
// API endpoint (`/v1/code/triggers`). Directory still named schedule/ to
|
||||
// keep the rename minimal — only the user-facing slash name changes.
|
||||
name: 'triggers',
|
||||
aliases: ['cron'],
|
||||
description:
|
||||
'Manage scheduled remote agent triggers (cloud cron). Requires Claude Pro/Max/Team subscription.',
|
||||
// REPL markdown renderer strips `<...>` as HTML tags — use uppercase.
|
||||
|
||||
Reference in New Issue
Block a user