Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(config): add @ path alias for imports

Steven Enamakel7f488c021df9
diff --git a/app/components.json b/app/components.json
new file mode 100644
index 0000000000..327c7a6d27
--- /dev/null
+++ b/app/components.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://ui.shadcn.com/schema.json",
+ "style": "base",
+ "tsx": true,
+ "tailwind": {
+ "config": "../tailwind.config.js",
+ "css": "src/index.css",
+ "baseColor": "neutral",
+ "cssVariables": true
+ },
+ "aliases": {
+ "components": "@/components",
+ "ui": "@/components/ui",
+ "lib": "@/lib",
+ "hooks": "@/hooks",
+ "utils": "@/lib/utils"
+ }
+}
diff --git a/app/tsconfig.json b/app/tsconfig.json
index e172705b65..d7f1575fd9 100644
--- a/app/tsconfig.json
+++ b/app/tsconfig.json
@@ -23,6 +23,7 @@
/* Path aliases */
"baseUrl": ".",
"paths": {
+ "@/*": ["src/*"],
"@openhuman/skill-types": ["src/lib/skills/types.ts"],
"tauri-plugin-ptt-api": ["../packages/tauri-plugin-ptt/guest-js/index.ts"]
},
diff --git a/app/vite.config.ts b/app/vite.config.ts
index 829ef63ead..851a4ca130 100644
--- a/app/vite.config.ts
+++ b/app/vite.config.ts
@@ -106,6 +106,11 @@ const isWebTarget = buildTarget === "web";
// https://vite.dev/config/
export default defineConfig(async () => ({
root: "src",
+ resolve: {
+ alias: {
+ "@": resolve(__dirname, "src"),
+ },
+ },
publicDir: "../public",
// Read env files from the repo root (not `app/src/`, which is the vite
// `root` and would be the default `envDir`). Lets `pnpm dev:app` pick up