fix(skill): emit base directory as filesystem path, not file:// URL (#33580)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
Chris Yuan 2026-06-24 13:08:22 +08:00 committed by GitHub
commit 246d40db73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 8 deletions

View file

@ -4,7 +4,6 @@ import { Ripgrep } from "@opencode-ai/core/ripgrep"
import { Cause, Effect, Exit, Layer } from "effect"
import { afterEach, describe, expect } from "bun:test"
import path from "path"
import { pathToFileURL } from "url"
import type { Permission } from "../../src/permission"
import type { Tool } from "@/tool/tool"
import { SkillTool } from "../../src/tool/skill"
@ -90,7 +89,7 @@ Use this skill.
expect(requests[0].always).toContain("tool-skill")
expect(result.metadata.dir).toBe(skill)
expect(result.output).toContain(`<skill_content name="tool-skill">`)
expect(result.output).toContain(`Base directory for this skill: ${pathToFileURL(skill).href}`)
expect(result.output).toContain(`Base directory for this skill: ${skill}`)
expect(result.output).toContain(`<file>${file}</file>`)
}),
)