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-09 08:52:07 +08:00
|
|
|
import { logger } from './util/logger';
|
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-09 08:52:07 +08:00
|
|
|
logger.init(context);
|
2023-05-04 11:50:45 +08:00
|
|
|
|
2023-05-10 14:31:17 +08:00
|
|
|
// 创建 .chat 目录并复制 workflows
|
2023-05-04 11:50:45 +08:00
|
|
|
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
|
|
|
}
|
2023-04-21 06:44:26 +08:00
|
|
|
exports.activate = activate;
|