mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
29 lines
766 B
TypeScript
29 lines
766 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import type { SlashCommand } from './types.js';
|
|
import { CommandKind } from './types.js';
|
|
import { MessageType, type HistoryItemAbout } from '../types.js';
|
|
import { getExtendedSystemInfo } from '../../utils/systemInfo.js';
|
|
import { t } from '../../i18n/index.js';
|
|
|
|
export const aboutCommand: SlashCommand = {
|
|
name: 'about',
|
|
get description() {
|
|
return t('show version info');
|
|
},
|
|
kind: CommandKind.BUILT_IN,
|
|
action: async (context) => {
|
|
const systemInfo = await getExtendedSystemInfo(context);
|
|
|
|
const aboutItem: Omit<HistoryItemAbout, 'id'> = {
|
|
type: MessageType.ABOUT,
|
|
systemInfo,
|
|
};
|
|
|
|
context.ui.addItem(aboutItem, Date.now());
|
|
},
|
|
};
|