fix build
This commit is contained in:
4
packages/core/src/markdown.d.ts
vendored
Normal file
4
packages/core/src/markdown.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
declare module "*.md" {
|
||||||
|
const content: string
|
||||||
|
export default content
|
||||||
|
}
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
|
/// <reference path="../markdown.d.ts" />
|
||||||
|
|
||||||
export * as SkillPlugin from "./skill"
|
export * as SkillPlugin from "./skill"
|
||||||
|
|
||||||
import { Effect } from "effect"
|
import { Effect } from "effect"
|
||||||
import { PluginV2 } from "../plugin"
|
import { PluginV2 } from "../plugin"
|
||||||
import { AbsolutePath } from "../schema"
|
import { AbsolutePath } from "../schema"
|
||||||
import { SkillV2 } from "../skill"
|
import { SkillV2 } from "../skill"
|
||||||
|
import customizeOpencodeContent from "./skill/customize-opencode.md" with { type: "text" }
|
||||||
|
|
||||||
|
export const CustomizeOpencodeContent = customizeOpencodeContent
|
||||||
|
|
||||||
export const Plugin = PluginV2.define({
|
export const Plugin = PluginV2.define({
|
||||||
id: PluginV2.ID.make("skill"),
|
id: PluginV2.ID.make("skill"),
|
||||||
effect: Effect.gen(function* () {
|
effect: Effect.gen(function* () {
|
||||||
const skill = yield* SkillV2.Service
|
const skill = yield* SkillV2.Service
|
||||||
const transform = yield* skill.transform()
|
const transform = yield* skill.transform()
|
||||||
const content = yield* Effect.promise(() =>
|
|
||||||
Bun.file(new URL("./skill/customize-opencode.md", import.meta.url)).text(),
|
|
||||||
)
|
|
||||||
|
|
||||||
yield* transform((editor) => {
|
yield* transform((editor) => {
|
||||||
editor.source(
|
editor.source(
|
||||||
@@ -23,7 +25,7 @@ export const Plugin = PluginV2.define({
|
|||||||
description:
|
description:
|
||||||
"Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself.",
|
"Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself.",
|
||||||
location: AbsolutePath.make("/builtin/customize-opencode.md"),
|
location: AbsolutePath.make("/builtin/customize-opencode.md"),
|
||||||
content,
|
content: CustomizeOpencodeContent,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import type { Agent } from "@/agent/agent"
|
|||||||
import { EventV2Bridge } from "@/event-v2-bridge"
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
||||||
import { InstanceState } from "@/effect/instance-state"
|
import { InstanceState } from "@/effect/instance-state"
|
||||||
import { Global } from "@opencode-ai/core/global"
|
import { Global } from "@opencode-ai/core/global"
|
||||||
|
import { SkillPlugin } from "@opencode-ai/core/plugin/skill"
|
||||||
import { Permission } from "@/permission"
|
import { Permission } from "@/permission"
|
||||||
import { FSUtil } from "@opencode-ai/core/fs-util"
|
import { FSUtil } from "@opencode-ai/core/fs-util"
|
||||||
import { Config } from "@/config/config"
|
import { Config } from "@/config/config"
|
||||||
@@ -32,9 +33,7 @@ const SKILL_PATTERN = "**/SKILL.md"
|
|||||||
const CUSTOMIZE_OPENCODE_SKILL_NAME = "customize-opencode"
|
const CUSTOMIZE_OPENCODE_SKILL_NAME = "customize-opencode"
|
||||||
const CUSTOMIZE_OPENCODE_SKILL_DESCRIPTION =
|
const CUSTOMIZE_OPENCODE_SKILL_DESCRIPTION =
|
||||||
"Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself."
|
"Use ONLY when the user is editing or creating opencode's own configuration: opencode.json, opencode.jsonc, files under .opencode/, or files under ~/.config/opencode/. Also use when creating or fixing opencode agents, subagents, skills, plugins, MCP servers, or permission rules. Do not use for the user's own application code, or for any project that is not configuring opencode itself."
|
||||||
const CUSTOMIZE_OPENCODE_SKILL_BODY = await Bun.file(
|
const CUSTOMIZE_OPENCODE_SKILL_BODY = SkillPlugin.CustomizeOpencodeContent
|
||||||
new URL("../../../core/src/plugin/skill/customize-opencode.md", import.meta.url),
|
|
||||||
).text()
|
|
||||||
|
|
||||||
export const Info = Schema.Struct({
|
export const Info = Schema.Struct({
|
||||||
name: Schema.String,
|
name: Schema.String,
|
||||||
|
|||||||
Reference in New Issue
Block a user