We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 148247f commit 98ad880Copy full SHA for 98ad880
src/tools/get-dsl.ts
@@ -49,13 +49,13 @@ export class GetDslTool extends BaseTool {
49
);
50
}
51
52
- let finalFileId = fileId;
+ let finalFileId = this.normalizeFileId(fileId);
53
let finalLayerId = layerId;
54
55
// If URL is provided, extract fileId and layerId from it
56
if (shortLink) {
57
const ids = await httpUtilInstance.extractIdsFromUrl(shortLink);
58
- finalFileId = ids.fileId;
+ finalFileId = this.normalizeFileId(ids.fileId);
59
finalLayerId = ids.layerId;
60
61
@@ -85,4 +85,10 @@ export class GetDslTool extends BaseTool {
85
};
86
87
88
+
89
+ private normalizeFileId(fileId?: string) {
90
+ if (!fileId) return fileId;
91
+ return fileId.replace(/^file\//, "");
92
+ }
93
94
0 commit comments