Files
claude-code/commands/version.ts
2026-04-02 15:19:28 +03:00

22 lines
603 B
TypeScript

import type { Command, LocalCommandCall } from '../types/command.js'
import { VERSION, BUILD_TIME } from '../constants/product.js'
const call: LocalCommandCall = async () => {
return {
type: 'text',
value: BUILD_TIME ? `${VERSION} (built ${BUILD_TIME})` : VERSION,
}
}
const version = {
type: 'local',
name: 'version',
description:
'Print the version this session is running (not what autoupdate downloaded)',
isEnabled: () => process.env.USER_TYPE === 'ant',
supportsNonInteractive: true,
load: () => Promise.resolve({ call }),
} satisfies Command
export default version