feat(plugin): expose app metadata (#38179)
This commit is contained in:
parent
2ed8fe5960
commit
8de40be6ea
71 changed files with 477 additions and 286 deletions
|
|
@ -3,7 +3,6 @@ import { NodeFileSystem } from "@effect/platform-node"
|
|||
import { Config } from "@opencode-ai/core/config"
|
||||
import { AppNodeBuilder } from "@opencode-ai/core/effect/app-node-builder"
|
||||
import { FSUtil } from "@opencode-ai/util/fs-util"
|
||||
import { InstallationVersion } from "@opencode-ai/util/installation/version"
|
||||
import { Location } from "@opencode-ai/core/location"
|
||||
import { Effect } from "effect"
|
||||
import { SkillPlugin } from "@opencode-ai/core/plugin/skill"
|
||||
|
|
@ -21,6 +20,7 @@ describe("SkillPlugin.Plugin", () => {
|
|||
const skill = yield* SkillV2.Service
|
||||
yield* SkillPlugin.Plugin.effect(
|
||||
host({
|
||||
app: { name: "test", version: "1.2.3", channel: "beta" },
|
||||
skill: {
|
||||
list: () => Effect.die("unused skill.list"),
|
||||
transform: skill.transform,
|
||||
|
|
@ -54,7 +54,8 @@ describe("SkillPlugin.Plugin", () => {
|
|||
}),
|
||||
)
|
||||
expect(report?.slash).toBe(true)
|
||||
expect(report?.content).toContain(`- opencode version: ${InstallationVersion}`)
|
||||
expect(report?.content).toContain("- opencode version: 1.2.3")
|
||||
expect(report?.content).toContain("- install/channel: beta")
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue