Files
claude-code/src/commands/version.ts
claude-code-best fdddb6dbe8 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>
2026-05-09 23:04:31 +08:00

25 lines
696 B
TypeScript

import type { Command, LocalCommandCall } from '../types/command.js'
const call: LocalCommandCall = async () => {
return {
type: 'text',
value: MACRO.BUILD_TIME
? `${MACRO.VERSION} (built ${MACRO.BUILD_TIME})`
: MACRO.VERSION,
}
}
const version = {
type: 'local',
name: 'version',
description:
'Print the version this session is running (not what autoupdate downloaded)',
// Was Ant-only upstream; for fork subscribers we want this universally
// available — version info is harmless and useful for bug reports.
isEnabled: () => true,
supportsNonInteractive: true,
load: () => Promise.resolve({ call }),
} satisfies Command
export default version