Skip to content

Commit 90aeae4

Browse files
committed
chore: remove unused code
1 parent 105f366 commit 90aeae4

File tree

2 files changed

+0
-95
lines changed

2 files changed

+0
-95
lines changed

typescript-sdk/apps/dojo/scripts/generate-content-json.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -217,52 +217,6 @@ async function runGenerateContent() {
217217
return result
218218
}
219219

220-
// const result = {};
221-
// const agentDemoBaseDir = path.join(__dirname, "../agent/demo");
222-
//
223-
// for (const demoIdWithFramework in config) {
224-
// const demoFilesConfig = config[demoIdWithFramework];
225-
// const demoDirPath = path.join(agentDemoBaseDir, demoIdWithFramework);
226-
//
227-
// if (!fs.existsSync(demoDirPath)) {
228-
// console.warn(`Directory not found for demo: ${demoIdWithFramework}, skipping.`);
229-
// continue;
230-
// }
231-
//
232-
// result[demoIdWithFramework] = { files: [] };
233-
//
234-
// for (const fileName of demoFilesConfig) {
235-
// const filePath = path.join(demoDirPath, fileName);
236-
// if (!fs.existsSync(filePath)) {
237-
// console.warn(`File not found: ${filePath}, skipping.`);
238-
// continue;
239-
// }
240-
//
241-
// try {
242-
// const content = fs.readFileSync(filePath, "utf8");
243-
// const extension = fileName.split(".").pop();
244-
// let language = extension;
245-
// if (extension === "py") language = "python";
246-
// else if (extension === "css") language = "css";
247-
// else if (extension === "md" || extension === "mdx") language = "markdown";
248-
// else if (extension === "tsx") language = "typescript";
249-
// else if (extension === "js") language = "javascript";
250-
// else if (extension === "json") language = "json";
251-
// else if (extension === "yaml" || extension === "yml") language = "yaml";
252-
// else if (extension === "toml") language = "toml";
253-
//
254-
// result[demoIdWithFramework].files.push({
255-
// name: fileName,
256-
// content,
257-
// path: path.join(demoIdWithFramework, fileName), // Store relative path within agent/demo
258-
// language,
259-
// type: 'file'
260-
// });
261-
// } catch (error) {
262-
// console.error(`Error reading file ${filePath}:`, error);
263-
// }
264-
// }
265-
// }
266220
(async () => {
267221
const result = await runGenerateContent();
268222
fs.writeFileSync(

typescript-sdk/apps/dojo/src/components/file-tree/file-tree.tsx

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,6 @@ import { ChevronDown, ChevronRight, File, Folder } from "lucide-react";
33
import { cn } from "@/lib/utils";
44
import { FeatureFile } from "@/types/feature";
55

6-
// Helper function to convert flat file paths to a hierarchical structure
7-
// function convertToFileTree(files: FeatureFile[]) {
8-
// const root: FeatureFile[] = [];
9-
// const map: Record<string, FeatureFile> = {};
10-
//
11-
// // First pass: create all directories and files
12-
// files.forEach((file) => {
13-
// // Split the path into segments
14-
// const pathParts = file.path.split("/");
15-
// const fileName = pathParts.pop();
16-
//
17-
// let currentPath = "";
18-
// let currentLevel = root;
19-
//
20-
// // Create or navigate the directory structure
21-
// pathParts.forEach((part) => {
22-
// currentPath = currentPath ? `${currentPath}/${part}` : part;
23-
//
24-
// // Check if this directory already exists
25-
// let dir = map[currentPath];
26-
// if (!dir) {
27-
// // Create new directory
28-
// dir = {
29-
// name: part,
30-
// path: currentPath,
31-
// type: "directory",
32-
// content: "",
33-
// children: [],
34-
// };
35-
// map[currentPath] = dir;
36-
// currentLevel.push(dir);
37-
// }
38-
//
39-
// // Navigate to this directory for the next iteration
40-
// currentLevel = dir.children || [];
41-
// });
42-
//
43-
// // Add the file to the last directory level
44-
// currentLevel.push({
45-
// name: fileName || "",
46-
// path: file.path,
47-
// type: "file",
48-
// content: "",
49-
// });
50-
// });
51-
//
52-
// return root;
53-
// }
54-
556
interface FileTreeProps {
567
files: FeatureFile[];
578
onFileSelect: (fileName: string) => void;

0 commit comments

Comments
 (0)