Elffuss BraidHub

kikocis/continue public

Merge pull request #7723 from uinstinct/tilde-uses-block

feat: support `~` when resolving uses block
Changesetf98b68abc084aeb5757eb7572d87e4ce840a328161446ff478ad14ea468c3099
AuthorDallin Romney <dallinromney@gmail.com> · 2025-09-17 15:35 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-17 15:35 -07:00
Parentsc44e8ca3a7d4, d0ef8f54cf49

Browse the files at this changeset

1 file changed

modified packages/config-yaml/src/interfaces/slugs.ts +11 −4
@@ -1,3 +1,5 @@
1+import os from "node:os";
2+
13 export interface PackageSlug {
24 ownerSlug: string;
35 packageSlug: string;
@@ -61,13 +63,18 @@
6163 fileUri: identifier.substring(7),
6264 };
6365 }
64- // Otherwise, it's a slug
65- else {
66+ // support ~ by replacing with home directory
67+ else if (identifier.startsWith("~")) {
6668 return {
67- uriType: "slug",
68- fullSlug: decodeFullSlug(identifier),
69+ uriType: "file",
70+ fileUri: identifier.replace("~", os.homedir()),
6971 };
7072 }
73+ // Otherwise, it's a slug
74+ return {
75+ uriType: "slug",
76+ fullSlug: decodeFullSlug(identifier),
77+ };
7178 }
7279
7380 export enum VirtualTags {