Skip to content

Commit a0a82ad

Browse files
committed
fix(skill): resolve typecheck errors
- Add missing withStatics import and remove non-existent zod helper - Add missing OPENCODE_EXPERIMENTAL_CUSTOMIZE_SKILL flag - Remove stray extra closing brace
1 parent 31c6d8b commit a0a82ad

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/core/src/flag/flag.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const Flag = {
4545

4646
OPENCODE_WORKSPACE_ID: process.env["OPENCODE_WORKSPACE_ID"],
4747
OPENCODE_EXPERIMENTAL_WORKSPACES: OPENCODE_EXPERIMENTAL || truthy("OPENCODE_EXPERIMENTAL_WORKSPACES"),
48+
OPENCODE_EXPERIMENTAL_CUSTOMIZE_SKILL: OPENCODE_EXPERIMENTAL || truthy("OPENCODE_EXPERIMENTAL_CUSTOMIZE_SKILL"),
4849

4950
// Evaluated at access time (not module load) because tests, the CLI, and
5051
// external tooling set these env vars at runtime.

packages/opencode/src/skill/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { Config } from "@/config/config"
1212
import { ConfigMarkdown } from "@/config/markdown"
1313
import { RuntimeFlags } from "@/effect/runtime-flags"
1414
import { Glob } from "@opencode-ai/core/util/glob"
15+
import { withStatics } from "@opencode-ai/core/schema"
1516
import * as Log from "@opencode-ai/core/util/log"
1617
import { Discovery } from "./discovery"
1718
import CUSTOMIZE_OPENCODE_SKILL_BODY from "./prompt/customize-opencode.md" with { type: "text" }
@@ -39,7 +40,7 @@ export const Info = Schema.Struct({
3940
location: Schema.String,
4041
content: Schema.String,
4142
scope: Schema.Union([Schema.Literal("global"), Schema.Literal("project")]),
42-
}).pipe(withStatics((s) => ({ zod: zod(s) })))
43+
}).pipe(withStatics(() => ({})))
4344
export type Info = Schema.Schema.Type<typeof Info>
4445

4546
const Issue = Schema.StructWithRest(
@@ -272,7 +273,6 @@ export const layer = Layer.effect(
272273
scope: "global",
273274
}
274275
}
275-
}
276276
yield* loadSkills(s, yield* InstanceState.get(discovered), bus)
277277
return s
278278
}),

0 commit comments

Comments
 (0)