mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-29 05:25:43 +02:00
fix(ci): align skill fixture source info
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { installDownloadSpec } from "./skills-install-download.js";
|
||||
import { setTempStateDir } from "./skills-install.download-test-utils.js";
|
||||
@@ -79,7 +80,7 @@ function createFixtureSkill(params: {
|
||||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
source: params.source,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildWorkspaceSkillStatus } from "./skills-status.js";
|
||||
import type { SkillEntry } from "./skills/types.js";
|
||||
@@ -53,7 +54,7 @@ function createFixtureSkill(params: {
|
||||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
source: params.source,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { withEnv, withEnvAsync } from "../test-utils/env.js";
|
||||
import { buildWorkspaceSkillStatus } from "./skills-status.js";
|
||||
@@ -62,9 +63,9 @@ function createFixtureSkill(params: {
|
||||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
source: params.source,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
disableModelInvocation: false,
|
||||
} as SkillEntry["skill"];
|
||||
};
|
||||
}
|
||||
|
||||
describe("buildWorkspaceSkillStatus", () => {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveSkillsPromptForRun } from "./skills.js";
|
||||
import type { SkillEntry } from "./skills/types.js";
|
||||
@@ -42,7 +43,7 @@ function createFixtureSkill(params: {
|
||||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
source: params.source,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import os from "node:os";
|
||||
import { formatSkillsForPrompt, type Skill } from "@mariozechner/pi-coding-agent";
|
||||
import {
|
||||
createSyntheticSourceInfo,
|
||||
formatSkillsForPrompt,
|
||||
type Skill,
|
||||
} from "@mariozechner/pi-coding-agent";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import type { SkillEntry } from "./types.js";
|
||||
@@ -15,7 +19,7 @@ function makeSkill(name: string, desc = "A skill", filePath = `/skills/${name}/S
|
||||
description: desc,
|
||||
filePath,
|
||||
baseDir: `/skills/${name}`,
|
||||
source: "workspace",
|
||||
sourceInfo: createSyntheticSourceInfo(filePath, { source: "workspace" }),
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { buildWorkspaceSkillStatus } from "../agents/skills-status.js";
|
||||
import type { SkillEntry } from "../agents/skills.js";
|
||||
@@ -97,7 +98,7 @@ function createFixtureSkill(params: {
|
||||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
source: params.source,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user