merge: integrate origin/dev (5th merge) — resolve @path skill references in split file structure
This commit is contained in:
@@ -3,6 +3,7 @@ import { join } from "path"
|
||||
import { parseFrontmatter } from "../../shared/frontmatter"
|
||||
import { resolveSymlink } from "../../shared/file-utils"
|
||||
import { sanitizeModelField } from "../../shared/model-sanitizer"
|
||||
import { resolveSkillPathReferences } from "../../shared/skill-path-resolver"
|
||||
import { log } from "../../shared/logger"
|
||||
import type { CommandDefinition } from "../claude-code-command-loader/types"
|
||||
import type { SkillMetadata } from "../opencode-skill-loader/types"
|
||||
@@ -37,7 +38,8 @@ export function loadPluginSkillsAsCommands(
|
||||
const originalDescription = data.description || ""
|
||||
const formattedDescription = `(plugin: ${plugin.name} - Skill) ${originalDescription}`
|
||||
|
||||
const wrappedTemplate = `<skill-instruction>\nBase directory for this skill: ${resolvedPath}/\nFile references (@path) in this skill are relative to this directory.\n\n${body.trim()}\n</skill-instruction>\n\n<user-request>\n$ARGUMENTS\n</user-request>`
|
||||
const resolvedBody = resolveSkillPathReferences(body.trim(), resolvedPath)
|
||||
const wrappedTemplate = `<skill-instruction>\nBase directory for this skill: ${resolvedPath}/\nFile references (@path) in this skill are relative to this directory.\n\n${resolvedBody}\n</skill-instruction>\n\n<user-request>\n$ARGUMENTS\n</user-request>`
|
||||
|
||||
const definition = {
|
||||
name: namespacedName,
|
||||
|
||||
Reference in New Issue
Block a user