Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

chore(knip): drop dead exports + run knip in pre-commit

Generb28ae6dccf2e
diff --git a/package.json b/package.json
index 1443998cf..9cd2d5397 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"reinstall": "pnpm run clean && pnpm install",
"typecheck": "turbo run typecheck",
"lint": "turbo run lint",
+ "knip": "turbo run knip",
"dev:web": "pnpm --filter @alook/web dev",
"dev:cli": "ALOOK_SERVER_URL=http://localhost:3000 ALOOK_PROJECT_ROOT=$PWD/.alook ALOOK_HEALTH_PORT=19515 pnpm --filter @alook/cli dev",
"daemon": "pnpm --filter @alook/daemon exec tsx src/cli/index.ts daemon",
@@ -42,7 +43,7 @@
"prepare": "simple-git-hooks"
},
"simple-git-hooks": {
- "pre-commit": "pnpm typecheck && pnpm lint && pnpm test && pnpm typegrep:ws"
+ "pre-commit": "pnpm typecheck && pnpm lint && pnpm test && pnpm typegrep:ws && pnpm knip"
},
"devDependencies": {
"@vitest/coverage-v8": "^4.1.10",
diff --git a/src/web/src/components/community/channel-header.tsx b/src/web/src/components/community/channel-header.tsx
index 0fdab1e74..6f55a52be 100644
--- a/src/web/src/components/community/channel-header.tsx
+++ b/src/web/src/components/community/channel-header.tsx
@@ -158,12 +158,11 @@ function ChannelOverflowMenu({
}
// Server identity chip — icon (or initial-letter fallback) in a rounded
-// square. Originally just the mobile breadcrumb's leading segment (the
-// channel segment that follows leads with its own "/" or forum icon, which
-// serves as the separator), now also reused by `ChannelSidebar`'s header at
-// the larger `size={7}`. Tailwind only picks up complete literal class names
-// at build time, so `size` can't be interpolated — it's an explicit ternary.
-export function ServerCrumb({ id, name, icon, size = 5, className = "" }: { id: string; name: string; icon: string | null; size?: 5 | 6 | 7; className?: string }) {
+// square. The mobile breadcrumb's leading segment (the channel segment that
+// follows leads with its own "/" or forum icon, which serves as the
+// separator). Tailwind only picks up complete literal class names at build
+// time, so `size` can't be interpolated — it's an explicit ternary.
+function ServerCrumb({ id, name, icon, size = 5, className = "" }: { id: string; name: string; icon: string | null; size?: 5 | 6 | 7; className?: string }) {
const sizeCls = size === 7 ? "size-7" : size === 6 ? "size-6" : "size-5"
const iconTextCls = size === 7 ? "text-xs" : size === 6 ? "text-[0.6875rem]" : "text-[0.625rem]"
const initialTextCls = size === 7 ? "text-base" : size === 6 ? "text-sm" : "text-xs"
diff --git a/src/web/src/lib/db.ts b/src/web/src/lib/db.ts
index fe8045fdd..67f9f9f51 100644
--- a/src/web/src/lib/db.ts
+++ b/src/web/src/lib/db.ts
@@ -1,7 +1,6 @@
import { createDb, type Database } from "@alook/shared"
-export { withD1Retry, readOrStale } from "@alook/shared"
-export type { RetryOpts } from "@alook/shared"
+export { withD1Retry } from "@alook/shared"
export function getDb(d1: D1Database): Database {
const session = d1.withSession("first-unconstrained")
diff --git a/turbo.json b/turbo.json
index c21d1792d..2f613f504 100644
--- a/turbo.json
+++ b/turbo.json
@@ -5,6 +5,7 @@
"test": { "dependsOn": ["^build"] },
"typecheck": { "dependsOn": ["^build"] },
"lint": {},
+ "knip": {},
"dev": { "cache": false, "persistent": true }
}
}