66 lines
2.0 KiB
TypeScript
Raw Normal View History

2023-05-04 07:27:26 +08:00
import * as vscode from 'vscode';
2023-05-10 18:30:17 +08:00
2023-05-05 21:27:40 +08:00
import {
2023-05-11 10:27:54 +08:00
registerOpenChatPanelCommand,
registerAddContextCommand,
registerAskForCodeCommand,
registerAskForFileCommand,
registerOpenAiApiKeySettingCommand,
registerDevChatApiKeySettingCommand,
2023-05-31 16:10:53 +08:00
regTopicDeleteCommand,
regAddTopicCommand,
regDeleteSelectTopicCommand,
regSelectTopicCommand,
regReloadTopicCommand,
regApplyDiffResultCommand,
registerStatusBarItemClickCommand,
regPythonPathCommand,
registerAskCodeIndexStartCommand,
registerAskCodeIndexStopCommand,
2023-05-05 21:27:40 +08:00
} from './contributes/commands';
2023-05-31 16:10:53 +08:00
import { regLanguageContext } from './contributes/context';
import { regDevChatView, regTopicView } from './contributes/views';
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-31 16:10:53 +08:00
import { LoggerChannelVscode } from './util/logger_vscode';
import { createStatusBarItem, createAskCodeStatusBarItem } from './panel/statusBarView';
2023-05-31 16:10:53 +08:00
import { UiUtilWrapper } from './util/uiUtil';
import { UiUtilVscode } from './util/uiUtil_vscode';
2023-05-19 20:07:34 +08:00
2023-05-04 11:50:45 +08:00
2023-05-04 07:27:26 +08:00
function activate(context: vscode.ExtensionContext) {
2023-05-11 10:27:54 +08:00
ExtensionContextHolder.context = context;
2023-05-31 16:10:53 +08:00
logger.init(LoggerChannelVscode.getInstance());
UiUtilWrapper.init(new UiUtilVscode());
2023-05-04 11:50:45 +08:00
2023-05-31 16:10:53 +08:00
regLanguageContext();
2023-05-31 16:10:53 +08:00
regDevChatView(context);
regTopicView(context);
registerOpenAiApiKeySettingCommand(context);
registerDevChatApiKeySettingCommand(context);
2023-05-11 10:27:54 +08:00
registerOpenChatPanelCommand(context);
registerAddContextCommand(context);
registerAskForCodeCommand(context);
registerAskForFileCommand(context);
registerStatusBarItemClickCommand(context);
2023-05-16 14:24:24 +08:00
createStatusBarItem(context);
createAskCodeStatusBarItem(context);
2023-05-18 15:25:46 +08:00
regTopicDeleteCommand(context);
regAddTopicCommand(context);
regDeleteSelectTopicCommand(context);
regSelectTopicCommand(context);
regReloadTopicCommand(context);
regApplyDiffResultCommand(context);
regPythonPathCommand(context);
registerAskCodeIndexStartCommand(context);
registerAskCodeIndexStopCommand(context);
2023-04-14 08:05:41 +08:00
}
exports.activate = activate;