remove task

This commit is contained in:
2025-10-28 15:09:45 +08:00
parent 4dbee366c5
commit 6eb6b7ec79
30 changed files with 14 additions and 790 deletions

View File

@@ -26,11 +26,16 @@ export const app = useContextKey('app', () => {
const init = isInit;
if (init) {
const config = assistantConfig.getConfig();
if (config?.https?.type !== 'https') {
console.log('http模式', 'http');
return new App({
serverOptions: {
path: '/client/router',
httpType: 'http',
cors: {
origin: '*',
}
},
});
}
@@ -41,6 +46,9 @@ export const app = useContextKey('app', () => {
httpType: 'https',
httpsCert: httpsPem.cert,
httpsKey: httpsPem.key,
cors: {
origin: '*',
}
},
});
});

View File

@@ -7,7 +7,7 @@ import dotenv from 'dotenv';
/**
* 助手配置文件路径, 全局配置文件目录
*/
export const configDir = createDir(path.join(homedir(), '.config/envision/assistant-app'));
export const configDir = createDir(path.join(homedir(), 'kevisual/assistant-app'));
/**
* 助手配置文件初始化

View File

@@ -84,6 +84,8 @@ program
const listenPort = options.port || config?.server?.port;
const listenPath = config?.server?.path || '127.0.0.1';
const server = await runServer(listenPort, listenPath);
} else {
console.log('请使用 -s 参数启动服务');
}
});

View File

@@ -144,7 +144,7 @@ export class AssistantInit extends AssistantConfig {
const https = this.getConfig()?.https || {};
return {
https,
protocol: https?.type === 'http' ? 'http' : 'https',
protocol: https?.type === 'https' ? 'https' : 'http',
};
}
}