chore: remove unused h-setup-ai-tools command and update vue-devtools plugin logic
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 2m1s
CI/CD Pipeline / build-and-deploy (push) Successful in 1m49s

This commit is contained in:
严浩
2025-12-07 16:38:52 +08:00
parent 52b1e4fb6b
commit 9cb70b7827
3 changed files with 13 additions and 11 deletions

View File

@@ -10,5 +10,4 @@ h-setup-locale
h-setup-zsh h-setup-zsh
h-setup-bun-bin h-setup-bun-bin
h-setup-ai-tools
h-setup-pnpm-bin h-setup-pnpm-bin

2
typed-router.d.ts vendored
View File

@@ -2,7 +2,7 @@
/* prettier-ignore */ /* prettier-ignore */
// @ts-nocheck // @ts-nocheck
// noinspection ES6UnusedImports // noinspection ES6UnusedImports
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️ // Generated by unplugin-vue-router. !! DO NOT MODIFY THIS FILE !!
// It's recommended to commit this file. // It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry. // Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.

View File

@@ -1,20 +1,23 @@
import consola from 'consola'; import consola from 'consola';
import type { ConfigEnv, PluginOption } from 'vite'; import type { ConfigEnv, PluginOption } from 'vite';
import { loadEnv } from 'vite';
import vueDevTools from 'vite-plugin-vue-devtools'; import vueDevTools from 'vite-plugin-vue-devtools';
export function loadPlugin(configEnv: ConfigEnv): PluginOption { export function loadPlugin(configEnv: ConfigEnv): PluginOption {
const env = loadEnv(configEnv.mode, process.cwd()); if (configEnv.mode !== 'development') {
consola.info('vue-devtools 插件仅在开发模式下使用。');
if (configEnv.command === 'build') {
consola.info('vue-devtools plugin is not used in build mode.');
return []; return [];
} }
if (env.VITE_APP_ENABLE_VUE_DEVTOOLS !== 'true') { let launchEditor = 'code';
consola.info('vue-devtools plugin disabled by env');
return []; if (process.env.TERM_PROGRAM_VERSION?.toLowerCase()?.includes('insider')) {
consola.info('检测到 VSCode Insiders 环境。');
launchEditor = 'code-insiders';
} }
return [vueDevTools()]; return [
vueDevTools({
launchEditor: launchEditor,
}),
];
} }