PROMPT.md-based skill injection, scroll-on-image-load fix, skill availability UI

- SkillService: read PROMPT.md instead of SKILL.md for system prompt injection
- SkillInfo: add HasPromptMd field, skills without PROMPT.md are not injectable
- Agent form: disable checkbox + warning for skills missing PROMPT.md
- Thumbnail size: 320px (was 300px)
- Chat: _scrollOnImages() re-scrolls after lazy-loaded images finish loading
- CSS: skill-unavailable/warning styling, adjusted thumb dimensions
This commit is contained in:
Meleki committed 2026-03-01 20:38:18 +01:00
1 parent 8d86406037
commit 40e56acc30
6 files changed
+46 -15

No files matched your search

+10 -5
View File
@@ -46,13 +46,14 @@ public class SkillService
}
/// <summary>
/// Liest die SKILL.md eines Skills. Gibt null zurück wenn nicht vorhanden.
/// Liest die PROMPT.md eines Skills. Gibt null zurück wenn nicht vorhanden.
/// Nur Skills mit PROMPT.md können im System-Prompt verwendet werden.
/// </summary>
public string GetSkillPrompt(string slug)
{
var skillMd = Path.Combine(_skillsDir, slug, "SKILL.md");
if (!File.Exists(skillMd)) return null;
return File.ReadAllText(skillMd);
var promptMd = Path.Combine(_skillsDir, slug, "PROMPT.md");
if (!File.Exists(promptMd)) return null;
return File.ReadAllText(promptMd);
}
private SkillInfo LoadSkill(string dir)
@@ -61,11 +62,14 @@ public class SkillService
var metaFile = Path.Combine(dir, "_meta.json");
var skillMd = Path.Combine(dir, "SKILL.md");
var promptMd = Path.Combine(dir, "PROMPT.md");
var info = new SkillInfo
{
Slug = slug,
Path = Path.GetFullPath(dir),
HasSkillMd = File.Exists(skillMd)
HasSkillMd = File.Exists(skillMd),
HasPromptMd = File.Exists(promptMd)
};
// Name/Description aus SKILL.md Frontmatter lesen
@@ -135,4 +139,5 @@ public class SkillInfo
public string Version { get; set; }
public string Path { get; set; }
public bool HasSkillMd { get; set; }
public bool HasPromptMd { get; set; }
}