Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): expose Grok skills in provider snapshots #5960

Closedrksfn(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/5960/headopened View on GitHub

Showing 8 changed files with 103 additions and 82 deletions (loading 5).

x
0 of 8 viewed, 8 left
3 additions and 81 deletionsapps/server/src/provider/Drivers/ClaudeSkills.tsModified
View file
@@ -16,44 +16,9 @@
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Path from "effect/Path";
-import { parse as parseYamlDocument } from "yaml";
​
import { expandHomePath } from "../../pathExpansion.ts";
-​
-type ClaudeSkillScope = "user" | "project";
-​
-const FRONTMATTER_PATTERN = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/;
-​
-type SkillFrontmatter =
- | { readonly kind: "missing" }
- | { readonly kind: "malformed" }
- | { readonly kind: "parsed"; readonly name?: string; readonly description?: string };
-​
-function parseSkillFrontmatter(contents: string): SkillFrontmatter {
- const match = FRONTMATTER_PATTERN.exec(contents);
- if (!match) {
- return { kind: "missing" };
- }
-​
- let parsed: unknown;
- try {
- parsed = parseYamlDocument(match[1] ?? "");
- } catch {
- return { kind: "malformed" };
- }
- if (typeof parsed !== "object" || parsed === null) {