feat: 添加工具类命令(teleport、recap、break-cache、env、tui 等)

- /teleport: 从 claude.ai 恢复会话
- /recap: 生成会话摘要
- /break-cache: 提示缓存管理(once/always/off/status)
- /env: 环境信息展示(含密钥脱敏)
- /tui: 无闪烁 TUI 模式管理
- /onboarding: 引导流程
- /perf-issue: 性能问题诊断
- /debug-tool-call: 工具调用调试
- /usage: 用量统计(合并 /cost 和 /stats 别名)

Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-05-09 23:04:31 +08:00
parent 6766f08e47
commit fdddb6dbe8
38 changed files with 5494 additions and 43 deletions

View File

@@ -1,23 +1,8 @@
/**
* Cost command - minimal metadata only.
* Implementation is lazy-loaded from cost.ts to reduce startup time.
* /cost — alias for /usage (v2.1.118 upstream alignment).
*
* /usage is the primary command; /cost and /stats are registered as aliases.
* This file re-exports the unified usage command so that any code that imports
* from cost/index directly still gets the correct Command object.
*/
import type { Command } from '../../commands.js'
import { isClaudeAISubscriber } from '../../utils/auth.js'
const cost = {
type: 'local',
name: 'cost',
description: 'Show the total cost and duration of the current session',
get isHidden() {
// Keep visible for Ants even if they're subscribers (they see cost breakdowns)
if (process.env.USER_TYPE === 'ant') {
return false
}
return isClaudeAISubscriber()
},
supportsNonInteractive: true,
load: () => import('./cost.js'),
} satisfies Command
export default cost
export { default } from '../usage/index.js'