Skip to content

Commit 275598d

Browse files
committed
🧹 修复 lint 问题:prettier 格式化、移除未使用变量
1 parent 0e0a3b3 commit 275598d

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

src/app/repo/skill_repo.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ export class SkillRepo extends OPFSRepo {
9393
// 保留已有的 enabled 状态
9494
...(idx >= 0 && registry[idx].enabled !== undefined ? { enabled: registry[idx].enabled } : {}),
9595
// 保留或更新 installUrl
96-
...(record.installUrl ? { installUrl: record.installUrl } : idx >= 0 && registry[idx].installUrl ? { installUrl: registry[idx].installUrl } : {}),
96+
...(record.installUrl
97+
? { installUrl: record.installUrl }
98+
: idx >= 0 && registry[idx].installUrl
99+
? { installUrl: registry[idx].installUrl }
100+
: {}),
97101
installtime: record.installtime,
98102
updatetime: record.updatetime,
99103
};

src/app/service/agent/service_worker/skill.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ Prompt.`;
560560

561561
describe("installFromUrl", () => {
562562
it("应从 URL 获取 SKILL.cat.md 并安装", async () => {
563-
const { service, mockSkillRepo } = createTestService();
563+
const { service } = createTestService();
564564

565565
const skillMd = `---
566566
name: remote-skill

src/app/service/service_worker/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ export class AgentClient extends Client {
389389
return this.do("cancelSkillInstall", uuid);
390390
}
391391

392-
checkForUpdates(): Promise<Array<{ name: string; currentVersion: string; remoteVersion: string; installUrl: string }>> {
392+
checkForUpdates(): Promise<
393+
Array<{ name: string; currentVersion: string; remoteVersion: string; installUrl: string }>
394+
> {
393395
return this.doThrow("checkForUpdates");
394396
}
395397

src/pages/options/routes/AgentSkills.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ import {
1313
Tag,
1414
Typography,
1515
} from "@arco-design/web-react";
16-
import { IconDelete, IconDownload, IconEye, IconLink, IconPlus, IconRefresh, IconSettings } from "@arco-design/web-react/icon";
16+
import {
17+
IconDelete,
18+
IconDownload,
19+
IconEye,
20+
IconLink,
21+
IconPlus,
22+
IconRefresh,
23+
IconSettings,
24+
} from "@arco-design/web-react/icon";
1725
import { useTranslation } from "react-i18next";
1826
import { useCallback, useEffect, useRef, useState } from "react";
1927
import type {

0 commit comments

Comments
 (0)