3 views
JetBrains/thinkrail
Vibe code with pi in a lightweight, real IDE that customises itself around the way you work — The Vibe You Need
TypeScript★ 6,657+722 that day#6 on trending
C69.6/100
Duplication80
2.7% in typescript, tsx, bash, astro, powershell, javascript, sqlDead code96
0.4%Complexity44
60.1% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
0.69%duplicated code · 1,213 of 175,854 lines
107clones in code
998code files of 2,085 scanned
2.63%duplicated over all files · 1,082 clones
Most complex files
- apps/web/src/store/appStore.ts1630 cx
- packages/server/src/agent/agentSessionManager.ts827 cx
- packages/server/src/agent/agentSessionManager.test.ts757 cx
- apps/web/src/shell/layout/model.ts528 cx
- apps/web/src/store/appStore.test.ts517 cx
- packages/pi-dag/runtime/service.ts508 cx
- packages/server/src/host/handlers.ts452 cx
- apps/web/src/chat/useChatScroll.ts432 cx
- thinkrail-extensions/ask-user-question/web/AskUserQuestionCard.tsx416 cx
- packages/pi-delegation/src/service.ts407 cx
Dead code 0.38% unused · 46 findings
- apps/desktop/src/preload.tsunused-file
- apps/desktop/preBuild.tsunused-file
- design-audit/tooling/build-buttons.tsunused-file
- scripts/pi-package-parity.node.mjsunused-file
- design-audit/tooling/verify-buttons.tsunused-file
- packages/pi-dag/runtime/recovery.fixture.tsunused-file
- packages/server/src/subprocess/windowsConsole.fixture.tsunused-file
- apps/desktop/src/pageZoom.ts:installPageZoomGesturesunused-export
- packages/pi-dag/persistence/fixtures.tsunused-file
- packages/pi-dag/runtime/provider.fixture.tsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: apps/web/src/chat/generated/providerGlyphs.ts.
Largest clones in the code
- 36 lines in 3 placeshtml200 tokensapps/website/src/pages/agentic-development/index.astro:1–36apps/website/src/pages/agentic-ide/index.astro:1–38apps/website/src/pages/vibecoding/index.astro:1–36
1--- 2import Analytics from "../../components/Analytics.astro"; 3import { Landing, siteMetadata } from "../../vibecoding"; 4 5const canonicalUrl = new URL(siteMetadata.path, siteMetadata.origin); 6const ogImageUrl = new URL(siteMetadata.openGraphImagePath, siteMetadata.origin); 7--- 8 9<!doctype html> 10<html lang="en">First 10 of 36 lines.
- 34 lines in 2 placestypescript346 tokensapps/website/src/attribution/protocol.ts:60–93packages/server/src/persistence/attributionProtocol.ts:54–87
60export function normalizeCampaignValue(value: string, limit: number): string | undefined { 61 const withoutControls = Array.from(value) 62 .filter((character) => { 63 const codePoint = character.codePointAt(0) ?? 0; 64 return codePoint > 31 && (codePoint < 127 || codePoint > 159); 65 }) 66 .join(""); 67 const normalized = Array.from(withoutControls.trim()).slice(0, limit).join(""); 68 return normalized.length > 0 ? normalized : undefined; 69}First 10 of 34 lines.
- 26 lines in 2 placestypescript193 tokens
42 "Full output unavailable: temporary-file capture failed. Read the current plan with todo_list; do not repeat a mutation to retrieve its output."; 43} 44const footer = `\n\n[Output truncated: ${preview.totalLines} lines, ${preview.totalBytes} bytes total. ${notice}]${continuation ? `\n${continuation}` : ""}`; 45const bounded = truncateHead(text, { 46 maxBytes: Math.max(0, DEFAULT_MAX_BYTES - Buffer.byteLength(footer)), 47 maxLines: DEFAULT_MAX_LINES - footer.split("\n").length, 48}); 49return { 50 content: [{ type: "text", text: `${bounded.content}${footer}` }], 51 details: {First 10 of 26 lines.
7 more
- 10 lines in 4 placeshtml57 tokens
- 27 lines in 2 placestsx167 tokens
- 10 lines in 3 placestsx75 tokens
- 20 lines in 2 placestsx138 tokens
- 19 lines in 2 placestsx137 tokens
- 6 lines in 3 placeshtml65 tokens
- 9 lines in 2 placestypescript113 tokens
Largest clones over all files, tests and data included
- 6 lines in 19 placestypescripttests62 tokenspackages/server/src/todos/artifacts.test.ts:152–157packages/server/src/todos/artifacts.test.ts:188–193packages/server/src/todos/artifacts.test.ts:258–267packages/server/src/todos/artifacts.test.ts:306–311packages/server/src/todos/artifacts.test.ts:336–341and 14 more
152test("done attaches the delta of changes since the in_progress baseline", async () => { 153 const { store, root } = tempStore(); 154 try { 155 const todo = store.add({ title: "step" }); 156 store.update(todo.id, { status: "in_progress" }); 157 await reconcileChangeArtifacts(store, root, SESSION, async () => ["a.ts"]);188test("a done reconcile cannot commit an item reopened during its git read", async () => { 189 const { store, root } = tempStore(); 190 try { 191 const todo = store.add({ title: "step" }); 192 store.update(todo.id, { status: "in_progress" }); 193 await reconcileChangeArtifacts(store, root, SESSION, async () => []); - 9 lines in 11 placestypescripttests67 tokenspackages/server/src/agent/extensions.test.ts:180–188packages/server/src/agent/extensions.test.ts:228–235packages/server/src/agent/extensions.test.ts:353–360packages/server/src/agent/extensions.test.ts:390–397packages/server/src/agent/extensions.test.ts:424–431and 6 more
180const root = mkdtempSync(join(tmpdir(), "thinkrail-skill-trust-")); 181const project = join(root, "project"); 182const home = join(root, "home"); 183const agentDir = join(root, "pi-agent"); 184mkdirSync(project, { recursive: true }); 185mkdirSync(home, { recursive: true }); 186mkdirSync(agentDir, { recursive: true }); 187 188const original = Object.fromEntries(228const root = mkdtempSync(join(tmpdir(), "thinkrail-skill-groups-")); 229const project = join(root, "project"); 230const home = join(root, "home"); 231const agentDir = join(root, "pi-agent"); 232mkdirSync(project, { recursive: true }); 233mkdirSync(home, { recursive: true }); 234mkdirSync(agentDir, { recursive: true }); 235const restore = stubSkillEnv(home, agentDir); - 9 lines in 6 placescssgenerated85 tokensapps/web/src/styles/generated/typography.css:175–183apps/web/src/styles/generated/typography.css:256–264apps/web/src/styles/generated/typography.css:327–335apps/web/src/styles/generated/typography.css:410–418apps/web/src/styles/generated/typography.css:419–427and 1 more
175 font-family: var(--tr-font-family-interface); 176 font-size: var(--tr-font-size-s14); 177 font-weight: var(--tr-font-weight-light); 178 line-height: var(--tr-line-height-reading); 179 letter-spacing: var(--tr-letter-spacing-normal); 180 text-transform: none; 181 font-style: normal; 182} 183.tr-text-ui {256 font-family: var(--tr-font-family-interface); 257 font-size: var(--tr-font-size-s14); 258 font-weight: var(--tr-font-weight-light); 259 line-height: var(--tr-line-height-reading); 260 letter-spacing: var(--tr-letter-spacing-normal); 261 text-transform: none; 262 font-style: normal; 263} 264.tr-code-text { - 10 lines in 5 placescssgenerated104 tokens
- 10 lines in 5 placescssgenerated102 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| tsx | 298 | 61,981 | 54 | 607 | 0.98% |
| typescript | 662 | 111,043 | 45 | 507 | 0.46% |
| html | 15 | 1,090 | 8 | 99 | 9.08% |
| bash | 3 | 710 | 0 | 0 | 0% |
| astro | 15 | 501 | 0 | 0 | 0% |
| powershell | 1 | 361 | 0 | 0 | 0% |
| javascript | 4 | 168 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 1,379 | 277,476 | 914 | 8,823 | 3.18% |
| css | 10 | 4,977 | 75 | 595 | 11.95% |
| tsx | 347 | 68,165 | 57 | 641 | 0.94% |
| yaml | 69 | 1,420 | 13 | 138 | 9.72% |
| json | 54 | 17,083 | 9 | 236 | 1.38% |
| html | 15 | 1,090 | 8 | 99 | 9.08% |
| markdown | 163 | 30,912 | 5 | 65 | 0.21% |
| diff | 2 | 151 | 1 | 6 | 3.97% |
| bash | 8 | 909 | 0 | 0 | 0% |
| astro | 15 | 501 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 31, 2026 | #6 | 6,657 (+722) | 2,085 | 403,458 | 1,082 | 2.63% | 0.69% | C 69.6 | ec2f2db |
| Oct 30, 2026 | #2 | 6,138 (+1,117) | 1,997 | 382,268 | 1,050 | 2.69% | 0.74% | C 69.4 | df7cb6d |
| Oct 29, 2026 | #1 | 5,293 (+1,068) | 1,987 | 376,138 | 1,047 | 2.73% | 0.75% | C 69.5 | 940d15c |
| Oct 28, 2026 | #5 | 4,244 (+1,204) | 1,964 | 371,842 | 1,042 | 2.75% | 0.76% | C 69.4 | ef3d5b6 |
| Oct 27, 2026 | #3 | 3,165 (+1,173) | 1,876 | 349,929 | 1,014 | 2.84% | 0.75% | C 69.7 | 8e7ced3 |
| Oct 26, 2026 | #5 | 2,012 (+51) | 1,848 | 340,904 | 988 | 2.84% | 0.74% | C 69.9 | d299f20 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.