mirror of https://github.com/openclaw/openclaw.git
fix: replay skill source fixture drift
This commit is contained in:
parent
b9560f4685
commit
1adf08a19d
|
|
@ -1,7 +1,6 @@
|
|||
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 +78,7 @@ function createFixtureSkill(params: {
|
|||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
source: params.source,
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
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";
|
||||
|
|
@ -54,7 +53,7 @@ function createFixtureSkill(params: {
|
|||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
source: params.source,
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { createSyntheticSourceInfo } from "@mariozechner/pi-coding-agent";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { withEnv } from "../test-utils/env.js";
|
||||
import { buildWorkspaceSkillStatus } from "./skills-status.js";
|
||||
|
|
@ -49,7 +48,7 @@ function createFixtureSkill(params: {
|
|||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
source: params.source,
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
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";
|
||||
|
|
@ -43,7 +42,7 @@ function createFixtureSkill(params: {
|
|||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
source: params.source,
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import os from "node:os";
|
||||
import {
|
||||
createSyntheticSourceInfo,
|
||||
formatSkillsForPrompt,
|
||||
type Skill,
|
||||
} from "@mariozechner/pi-coding-agent";
|
||||
import { 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";
|
||||
|
|
@ -19,7 +15,7 @@ function makeSkill(name: string, desc = "A skill", filePath = `/skills/${name}/S
|
|||
description: desc,
|
||||
filePath,
|
||||
baseDir: `/skills/${name}`,
|
||||
sourceInfo: createSyntheticSourceInfo(filePath, { source: "workspace" }),
|
||||
source: "workspace",
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
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 +96,7 @@ function createFixtureSkill(params: {
|
|||
description: params.description,
|
||||
filePath: params.filePath,
|
||||
baseDir: params.baseDir,
|
||||
sourceInfo: createSyntheticSourceInfo(params.filePath, { source: params.source }),
|
||||
source: params.source,
|
||||
disableModelInvocation: false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue