feat: restructure command for Claude models and add new remote routes
- Deleted the old cc.ts command and created a new cc.ts under src/command/claude for better organization. - Added support for a new model 'bailian' in the command. - Implemented remote app connection status and connection routes in assistant/src/routes/remote/index.ts. - Updated index.ts to reflect the new path for the cc command. - Added a placeholder for future management of plugin operations in src/command/opencode/plugin.ts.
This commit is contained in:
@@ -10,10 +10,12 @@ import './call/index.ts'
|
||||
// TODO: 移除
|
||||
// import './hot-api/key-sender/index.ts';
|
||||
import './opencode/index.ts';
|
||||
import './remote/index.ts';
|
||||
|
||||
import os from 'node:os';
|
||||
import { authCache } from '@/module/cache/auth.ts';
|
||||
import { createSkill } from '@kevisual/router';
|
||||
import { logger } from '@/module/logger.ts';
|
||||
const getTokenUser = async (token: string) => {
|
||||
const query = assistantConfig.query
|
||||
const res = await query.post({
|
||||
@@ -41,7 +43,7 @@ export const checkAuth = async (ctx: any, isAdmin = false) => {
|
||||
const config = assistantConfig.getConfig();
|
||||
const { auth = {} } = config;
|
||||
const token = ctx.query.token;
|
||||
console.log('checkAuth', ctx.query, { token });
|
||||
logger.debug('checkAuth', ctx.query, { token });
|
||||
if (!token) {
|
||||
return {
|
||||
code: 401,
|
||||
@@ -120,7 +122,7 @@ app
|
||||
description: '管理员鉴权, 获取用户信息,并验证是否为管理员。',
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
console.log('query', ctx.query);
|
||||
logger.debug('query', ctx.query);
|
||||
if (!ctx.query?.token && ctx.appId === app.appId) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user