feat: add .skill file preview support

Enable previewing .skill files (ZIP archives) by extracting and displaying
their SKILL.md content. Add caching to avoid repeated ZIP extraction.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hetaoBackend
2026-01-31 22:27:06 +08:00
parent a9e11f6341
commit 06511f38e1
4 changed files with 79 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ export async function loadArtifactContent({
}) {
let enhancedFilepath = filepath;
if (filepath.endsWith(".skill")) {
enhancedFilepath = filepath.replace(".md", ".skill/SKILL.md");
enhancedFilepath = filepath + "/SKILL.md";
}
const url = urlOfArtifact({ filepath: enhancedFilepath, threadId });
const response = await fetch(url);