26 lines
742 B
TypeScript
Raw Normal View History

2023-05-04 07:27:26 +08:00
import * as vscode from 'vscode';
2023-05-04 11:50:45 +08:00
2023-05-05 21:27:40 +08:00
import { createChatDirectoryAndCopyInstructionsSync } from './init/chatConfig';
import {
registerOpenChatPanelCommand,
registerAddContextCommand,
registerAskForCodeCommand,
registerAskForFileCommand,
} from './contributes/commands';
2023-04-27 14:07:46 +08:00
2023-05-05 21:27:40 +08:00
import ExtensionContextHolder from './util/extensionContext';
2023-05-04 11:50:45 +08:00
2023-05-04 07:27:26 +08:00
function activate(context: vscode.ExtensionContext) {
ExtensionContextHolder.context = context;
2023-05-04 11:50:45 +08:00
// 创建 .chat 目录并复制 instructions
createChatDirectoryAndCopyInstructionsSync(context.extensionUri);
2023-05-05 21:27:40 +08:00
registerOpenChatPanelCommand(context);
registerAddContextCommand(context);
registerAskForCodeCommand(context);
registerAskForFileCommand(context);
2023-04-14 08:05:41 +08:00
}
exports.activate = activate;