From d6bce3228bd0b581082cd906d0206ae6a5a35362 Mon Sep 17 00:00:00 2001 From: Hyu Date: Sun, 25 Oct 2026 00:07:37 +0800 Subject: [PATCH] refactor(skill): remove legacy host scan endpoint and client method --- .../pkg/api/http/controller/groups/skills.py | 17 ----------------- web/src/app/infra/http/BackendClient.ts | 10 ---------- 2 files changed, 27 deletions(-) diff --git a/src/langbot/pkg/api/http/controller/groups/skills.py b/src/langbot/pkg/api/http/controller/groups/skills.py index 9d245b525..d7f801fee 100644 --- a/src/langbot/pkg/api/http/controller/groups/skills.py +++ b/src/langbot/pkg/api/http/controller/groups/skills.py @@ -274,20 +274,3 @@ class SkillsRouterGroup(group.RouterGroup): return self.http_status(400, -1, str(exc)) except Exception: raise - - @self.route( - '/scan', - methods=['GET'], - auth_type=group.AuthType.USER_TOKEN_OR_API_KEY, - permission=Permission.RESOURCE_MANAGE, - ) - async def scan_skill_directory(request_context: RequestContext) -> quart.Response: - path = quart.request.args.get('path', '').strip() - if not path: - return self.http_status(400, -1, 'Missing required parameter: path') - - try: - result = await self.ap.skill_service.scan_directory_async(request_context, path) - return self.success(data=result) - except ValueError as exc: - return self.http_status(400, -1, str(exc)) diff --git a/web/src/app/infra/http/BackendClient.ts b/web/src/app/infra/http/BackendClient.ts index 35ddf99df..ceba70e49 100644 --- a/web/src/app/infra/http/BackendClient.ts +++ b/web/src/app/infra/http/BackendClient.ts @@ -2497,16 +2497,6 @@ export class BackendClient extends BaseHttpClient { return this.get('/api/v1/skills/index', params); } - public scanSkillDirectory(path: string): Promise<{ - package_root: string; - name: string; - display_name?: string; - description: string; - instructions: string; - }> { - return this.get('/api/v1/skills/scan', { path }); - } - public listSkillFiles( skillName: string, path: string = '.',