Repository Analysis

lukilabs/craft-agents-oss

3.1 Likely human-written View on GitHub
3.1
Adjusted Score
3.1
Raw Score
100%
Time Factor
2026-05-26
Last Push
6,180
Stars
TypeScript
Language
375,497
Lines of Code
1608
Files
787
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 2HIGH 7MEDIUM 128LOW 650

Pattern Findings

787 matches across 17 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers458 hits · 461 pts
SeverityFileLineSnippet
LOWscripts/electron-dev.ts53async function ensureBundledUvForCurrentPlatform(): Promise<void> {
LOWpackages/ui/src/components/ui/StyledDropdown.tsx29export function mirrorHoverToOpenStateClasses(className?: string): string | undefined {
LOW…ges/ui/src/components/ui/IslandFollowUpContentView.tsx44export function IslandFollowUpContentView({
LOWpackages/ui/src/components/ui/Island.tsx158function installGlobalScrollBlockers(): () => void {
LOWpackages/ui/src/components/chat/turn-utils.ts183export function shouldShowThinkingIndicator(phase: TurnPhase, isBuffering: boolean): boolean {
LOWpackages/ui/src/components/chat/turn-utils.ts297function extractTodosFromActivities(activities: ActivityItem[]): TodoItem[] | undefined {
LOWpackages/ui/src/components/chat/follow-up-helpers.ts12export function extractAnnotationSelectedText(annotation: AnnotationV1, messageContent: string): string {
LOWpackages/ui/src/components/chat/TurnCard.tsx140function computeEditWriteDiffStats(
LOWpackages/ui/src/components/chat/TurnCard.tsx624function extractActionFromDisplayName(iconName: string, llmName: string): string {
LOWpackages/ui/src/components/chat/TurnCard.tsx1500function createAnnotationIndexBadge(index: number): HTMLSpanElement {
LOWpackages/ui/src/components/markdown/diff-normalize.ts51function containsUnifiedFileBreakCandidate(lines: string[]): boolean {
LOW…ages/ui/src/components/markdown/annotation-resolver.ts32function normalizeWhitespaceWithMap(input: string): NormalizedText {
LOW…es/ui/src/components/markdown/TiptapMarkdownEditor.tsx69export function preprocessMarkdownForOfficial(markdown: string): string {
LOW…es/ui/src/components/markdown/TiptapMarkdownEditor.tsx96export function postprocessMarkdownFromOfficial(markdown: string): string {
LOW…es/ui/src/components/markdown/TiptapMarkdownEditor.tsx175async function handleDroppedOrPastedFiles(
LOWpackages/ui/src/components/markdown/link-target.ts39export function resolveMarkdownLinkTarget(target: string): ResolvedMarkdownLinkTarget {
LOWpackages/ui/src/components/markdown/link-target.ts57export function classifyMarkdownLinkTarget(target: string): 'file' | 'url' {
LOW…/ui/src/components/markdown/MarkdownDatatableBlock.tsx161function computeNumericGranularities(values: number[], type: 'number' | 'currency' | 'percent'): GranularityOption[] {
LOW…/ui/src/components/markdown/MarkdownDatatableBlock.tsx211function computeGranularityOptions(data: DatatableData): Map<string, GranularityOption[]> {
LOW…ages/ui/src/components/markdown/CollapsibleSection.tsx9function AnimatedCollapsibleContent({ isOpen, children }: { isOpen: boolean; children: React.ReactNode }) {
LOWpackages/ui/src/components/markdown/mermaid-source.ts51export function getFirstMermaidDiagramLine(code: string): string | null {
LOWpackages/ui/src/components/markdown/TiptapSlashMenu.ts148function insertRichBlockAndOpenEditor(
LOWpackages/ui/src/components/markdown/TiptapSlashMenu.ts168function findLastCodeLanguageInDoc(editor: Editor): string | null {
LOWpackages/ui/src/components/markdown/TiptapSlashMenu.ts182function resolvePreferredCodeLanguage(editor: Editor): string {
LOWpackages/ui/src/components/markdown/TiptapSlashMenu.ts203function insertCodeBlockWithPlaceholder(editor: Editor, insertPos?: number) {
LOW…src/components/markdown/CollapsibleMarkdownContext.tsx32export function CollapsibleMarkdownProvider({ children }: CollapsibleMarkdownProviderProps) {
LOW…ui/src/components/annotations/interaction-selectors.ts3export function getAnnotationInteractionSourceKey(state: AnnotationInteractionState, messageId?: string): string {
LOW…ui/src/components/annotations/interaction-selectors.ts17export function getAnnotationInteractionAnchor(state: AnnotationInteractionState): { x: number; y: number } | null {
LOW…ents/annotations/use-annotation-island-presentation.ts33export function decideAnnotationIslandPresentation(
LOW…ents/annotations/use-annotation-island-presentation.ts44export function useAnnotationIslandPresentation({
LOW…i/src/components/annotations/annotation-host-config.ts21export function shouldRenderAnnotationIslandInPortal(host: AnnotationHost): boolean {
LOWpackages/ui/src/components/annotations/island-motion.ts31export function getDefaultIslandWidthEstimate(): number {
LOWpackages/ui/src/components/annotations/island-motion.ts35export function buildSelectionEntryTransition(from: PointerSnapshot | null, to: PointerSnapshot | null): IslandTransitio
LOWpackages/ui/src/components/annotations/island-motion.ts64export function buildAnnotationChipEntryTransition(): IslandTransitionConfig {
LOW…s/annotations/use-annotation-interaction-controller.ts21export function useAnnotationInteractionController() {
LOWpackages/ui/src/components/annotations/block-markers.ts4export function clearBlockAnnotationMarkers(root: HTMLElement): void {
LOWpackages/ui/src/components/annotations/block-markers.ts13export function applyBlockAnnotationMarker(root: HTMLElement, annotation: AnnotationV1): void {
LOW…es/ui/src/components/annotations/interaction-policy.ts16export function getAnnotationChipInteraction(annotation?: AnnotationV1 | null): AnnotationChipInteraction {
LOW…es/ui/src/components/annotations/interaction-policy.ts28export function isAnnotationChipClickable(annotation?: AnnotationV1 | null): boolean {
LOW…es/ui/src/components/annotations/interaction-policy.ts32export function getAnnotationChipOpenMode(): 'view' {
LOW…es/ui/src/components/annotations/interaction-policy.ts41export function shouldIgnoreSelectionMouseUpTarget(target: EventTarget | null): boolean {
LOW…kages/ui/src/components/annotations/annotation-core.ts18export function hasExistingTextRangeAnnotation(
LOW…kages/ui/src/components/annotations/annotation-core.ts32export function createSelectionPreviewAnnotation(
LOW…kages/ui/src/components/annotations/annotation-core.ts66export function createTextSelectionAnnotation(
LOW…ui/src/components/annotations/island-dismiss-policy.ts9export function resolveIslandOutsideDismissAction({
LOW…rc/components/annotations/interaction-state-machine.ts47export function annotationInteractionReducer(
LOW…/components/annotations/annotation-overlay-geometry.ts31export function computeAnnotationOverlayGeometry({
LOW…ges/ui/src/components/annotations/selection-restore.ts8export function restoreDomSelectionFromOffsets(
LOW…ges/ui/src/components/annotations/selection-restore.ts37export function scheduleDomSelectionRestore(
LOW…kages/ui/src/components/annotations/follow-up-state.ts25export function getAnnotationFollowUpState(annotation: AnnotationV1): AnnotationFollowUpState {
LOW…kages/ui/src/components/annotations/follow-up-state.ts50export function formatAnnotationFollowUpTooltipText(annotation: AnnotationV1, maxLength = 180): string {
LOW…components/annotations/use-annotation-island-events.ts41export function useAnnotationIslandEvents({
LOW…src/components/overlay/AnnotatableMarkdownDocument.tsx63export function AnnotatableMarkdownDocument({
LOW…src/components/overlay/FullscreenOverlayBaseHeader.tsx195export function FullscreenOverlayBaseHeader({
LOW…omponents/overlay/DocumentFormattedMarkdownOverlay.tsx61export function DocumentFormattedMarkdownOverlay({
LOW…es/ui/src/components/overlay/FullscreenOverlayBase.tsx88export function handleFullscreenEscapeWithStack(): boolean {
LOWpackages/ui/src/lib/dismissible-layer-bridge.ts37export function setDismissibleLayerBridge(bridge: DismissibleLayerBridge | null): void {
LOWpackages/ui/src/lib/dismissible-layer-bridge.ts41export function getDismissibleLayerBridge(): DismissibleLayerBridge | null {
LOWpackages/session-tools-core/src/validation.ts121export function validateJsonFileHasFields(
LOWpackages/session-tools-core/src/validation.ts307function getFirstMermaidDiagramLine(code: string): string {
398 more matches not shown…
Decorative Section Separators124 hits · 400 pts
SeverityFileLineSnippet
MEDIUMscripts/install-server.sh25# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh27# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh38# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh40# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh50# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh52# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh64# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh66# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh71# ---------------------------------------------------------------------------
MEDIUMscripts/install-server.sh73# ---------------------------------------------------------------------------
MEDIUMscripts/docker-smoke-test.sh2# =============================================================================
MEDIUMscripts/docker-smoke-test.sh15# =============================================================================
MEDIUMpackages/ui/src/components/ui/StyledDropdown.tsx97// ── Content ──────────────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/ui/StyledDropdown.tsx135// ── Item ─────────────────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/ui/StyledDropdown.tsx164// ── Separator ────────────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/ui/StyledDropdown.tsx178// ── Sub-menu trigger ─────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/ui/StyledDropdown.tsx201// ── Sub-menu content ─────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/ui/StyledDropdown.tsx231// ── Shortcut ─────────────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownJsonBlock.tsx23// ── Themes (same as JSONPreviewOverlay) ────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownJsonBlock.tsx39// ── Deep parse helper (same as JSONPreviewOverlay) ─────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownJsonBlock.tsx76// ── Error boundary ────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownJsonBlock.tsx106// ── Helpers ────────────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownJsonBlock.tsx113// ── Main component ────────────────────────────────────────────────────────
MEDIUM…/ui/src/components/markdown/MarkdownDatatableBlock.tsx50// ── Types ────────────────────────────────────────────────────────────────────
MEDIUM…/ui/src/components/markdown/MarkdownDatatableBlock.tsx74// ── Cell formatting ──────────────────────────────────────────────────────────
MEDIUM…/ui/src/components/markdown/MarkdownDatatableBlock.tsx118// ── Sort icon ────────────────────────────────────────────────────────────────
MEDIUM…/ui/src/components/markdown/MarkdownDatatableBlock.tsx137// ── Grouping granularity ─────────────────────────────────────────────────
MEDIUM…/ui/src/components/markdown/MarkdownDatatableBlock.tsx272// ── Error boundary ───────────────────────────────────────────────────────────
MEDIUM…/ui/src/components/markdown/MarkdownDatatableBlock.tsx289// ── Main component ───────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownDiffBlock.tsx25// ── Custom element + theme registration (same as ShikiDiffViewer) ──────────
MEDIUM…kages/ui/src/components/markdown/MarkdownDiffBlock.tsx42// ── Helpers ────────────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownDiffBlock.tsx53// ── Error boundary ────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownDiffBlock.tsx83// ── Main component ────────────────────────────────────────────────────────
MEDIUM…i/src/components/markdown/MarkdownSpreadsheetBlock.tsx35// ── Types ────────────────────────────────────────────────────────────────────
MEDIUM…i/src/components/markdown/MarkdownSpreadsheetBlock.tsx58// ── Cell formatting ──────────────────────────────────────────────────────────
MEDIUM…i/src/components/markdown/MarkdownSpreadsheetBlock.tsx96// ── Error boundary ───────────────────────────────────────────────────────────
MEDIUM…i/src/components/markdown/MarkdownSpreadsheetBlock.tsx113// ── Main component ───────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownHtmlBlock.tsx40// ── Types ────────────────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownHtmlBlock.tsx53// ── Error boundary ───────────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownHtmlBlock.tsx70// ── HTML preprocessing ───────────────────────────────────────────────────────
MEDIUM…kages/ui/src/components/markdown/MarkdownHtmlBlock.tsx89// ── Main component ───────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/markdown/table-export.ts10// ── Types ────────────────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/markdown/table-export.ts18// ── Markdown ─────────────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/markdown/table-export.ts35// ── CSV (RFC 4180) ───────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/markdown/table-export.ts55// ── XLSX ─────────────────────────────────────────────────────────────────────
MEDIUMpackages/ui/src/components/markdown/table-export.ts101// ── XLSX Styles ──────────────────────────────────────────────────────────────
MEDIUM…ckages/ui/src/components/markdown/MarkdownPdfBlock.tsx46// ── Types ────────────────────────────────────────────────────────────────────
MEDIUM…ckages/ui/src/components/markdown/MarkdownPdfBlock.tsx59// ── Error boundary ───────────────────────────────────────────────────────────
MEDIUM…ckages/ui/src/components/markdown/MarkdownPdfBlock.tsx76// ── Main component ───────────────────────────────────────────────────────────
MEDIUM…/ui/src/components/overlay/MultiDiffPreviewOverlay.tsx164 // ── Fade-in reveal ──────────────────────────────────────────────────
MEDIUMpackages/shared/src/agent/claude-agent.ts1290 // ═══════════════════════════════════════════════════════════════════════════
MEDIUMpackages/shared/src/agent/claude-agent.ts1292 // ═══════════════════════════════════════════════════════════════════════════
MEDIUMpackages/shared/src/agent/claude-agent.ts1891 // ─────────────────────────────────────────────────────────────────
MEDIUMpackages/shared/src/agent/claude-agent.ts1898 // ─────────────────────────────────────────────────────────────────
MEDIUM…ckages/shared/src/agent/backend/internal/drivers/pi.ts6// ── Copilot model types ────────────────────────────────────────────────
MEDIUM…ckages/shared/src/agent/backend/internal/drivers/pi.ts15// ── Direct HTTP approach ─────────────────────────────────────────────
MEDIUM…ckages/shared/src/agent/backend/internal/drivers/pi.ts155 // ── Tier 1: Direct HTTP API ──────────────────────────────────────
MEDIUM…ckages/shared/src/agent/backend/internal/drivers/pi.ts172 // ── Tier 2: Pi SDK static catalog (last resort) ──────────────────
MEDIUMpackages/shared/src/prompts/system.ts74// ── Context file cache ──────────────────────────────────────────────────
MEDIUMpackages/shared/src/skills/storage.ts192// ── Skills cache ────────────────────────────────────────────────────────
64 more matches not shown…
Verbosity Indicators47 hits · 88 pts
SeverityFileLineSnippet
LOWscripts/build-server.ts830 // Step 1: Clean
LOWscripts/build-server.ts837 // Step 2: Download Bun runtime
LOWscripts/build-server.ts841 // Step 3: Download uv
LOWscripts/build-server.ts845 // Step 4: Build MCP servers
LOWscripts/build-server.ts864 // Step 5: Assemble resources
LOWscripts/build-server.ts868 // Step 6: Copy production node_modules
LOWscripts/build-server.ts872 // Step 7: Copy workspace packages
LOWscripts/build-server.ts877 // Step 8: Create entry scripts + Docker files
LOWpackages/shared/src/utils/logo.ts351 // Step 1: Try full domain first (e.g., mail.google.com)
LOWpackages/shared/src/utils/logo.ts359 // Step 2: Try root domain (e.g., google.com)
LOWpackages/shared/src/utils/logo.ts365 // Step 3: Fall back to Google Favicon V2 API (uses full domain for better results)
LOWpackages/shared/src/utils/binary-detection.ts227 // Step 1: Strip only CR/LF (standard base64 line wrapping per RFC 2045).
LOWpackages/shared/src/utils/binary-detection.ts231 // Step 2: Strict charset — detect alphabet variant.
LOWpackages/shared/src/utils/binary-detection.ts238 // Step 3: Normalize to standard alphabet for decoding
LOWpackages/shared/src/utils/binary-detection.ts243 // Step 4: Auto-pad to make length divisible by 4
LOWpackages/shared/src/utils/binary-detection.ts248 // Step 5: Decode
LOWpackages/shared/src/utils/binary-detection.ts257 // Step 6: Canonical roundtrip — re-encode and compare to padded input.
LOWpackages/shared/src/utils/binary-detection.ts261 // Step 7: Binary-likeness check (unchanged)
LOWpackages/shared/src/agent/mode-manager.ts1086 // Step 1: Check for dangerous control characters (before parsing)
LOWpackages/shared/src/agent/mode-manager.ts1098 // Step 2: Determine if this is a PowerShell command
LOWpackages/shared/src/agent/mode-manager.ts1128 // Step 3: Use bash AST-based validation
LOWpackages/shared/src/agent/mode-manager.ts1137 // Step 3: Convert AST rejection reason to BashRejectionReason
LOW…c/agent/core/__tests__/pre-tool-use-checks.isolated.ts173 // Step 1: Permission mode check
LOW…c/agent/core/__tests__/pre-tool-use-checks.isolated.ts250 // Step 2: Source blocking
LOW…c/agent/core/__tests__/pre-tool-use-checks.isolated.ts328 // Step 3: Prerequisite check
LOW…c/agent/core/__tests__/pre-tool-use-checks.isolated.ts384 // Step 4: call_llm interception
LOW…c/agent/core/__tests__/pre-tool-use-checks.isolated.ts412 // Step 5: Input transforms
LOW…c/agent/core/__tests__/pre-tool-use-checks.isolated.ts682 // Step 6: Ask-mode prompt decision
LOW…ckages/shared/src/agent/backend/internal/drivers/pi.ts48 // Step 1: Exchange GitHub OAuth token → Copilot API token
LOW…ckages/shared/src/agent/backend/internal/drivers/pi.ts52 // Step 2: Extract base URL from token
LOW…ckages/shared/src/agent/backend/internal/drivers/pi.ts60 // Step 3: GET /models
LOW…hared/src/agent/__tests__/claude-event-adapter.test.ts763 // Step 1: tool_start via stream event
LOW…hared/src/agent/__tests__/claude-event-adapter.test.ts774 // Step 2: assistant message confirms tool (deduped)
LOW…hared/src/agent/__tests__/claude-event-adapter.test.ts786 // Step 3: user message with tool result
LOW…ed/src/sources/__tests__/token-refresh-manager.test.ts569 // Step 1: getSourcesNeedingRefresh includes the expired source
LOW…ed/src/sources/__tests__/token-refresh-manager.test.ts573 // Step 2: refreshSources refreshes and restores auth state
LOW…ed/src/sources/__tests__/token-refresh-manager.test.ts578 // Step 3: Verify auth state is restored
LOWpackages/server-core/src/services/image-utils.ts128 // Step 1: Compute target dimensions if resize needed
LOWpackages/server-core/src/services/image-utils.ts140 // Step 2: Encode — try preferred format first
LOWpackages/server-core/src/services/image-utils.ts176 // Step 5: Give up
LOWapps/electron/src/renderer/App.tsx1204 // Step 1: Store attachments and get persistent metadata
LOWapps/electron/src/renderer/App.tsx1246 // Step 2: Create processed attachments for Claude
LOWapps/electron/src/renderer/App.tsx1272 // Step 3: Extract badges from mentions (sources/skills) with embedded icons
LOWapps/electron/src/renderer/App.tsx1314 // Step 5: Create user message with StoredAttachments (for UI display)
LOWapps/electron/src/renderer/App.tsx1340 // Step 6: Send to Claude with processed attachments + stored attachments for persistence
LOW…/electron/src/main/__tests__/sessions-sanitize.test.ts176 // Step 1: badge substitution (as done in sessions.ts)
LOW…/electron/src/main/__tests__/sessions-sanitize.test.ts183 // Step 2: sanitize remaining mentions
Excessive Try-Catch Wrapping54 hits · 50 pts
SeverityFileLineSnippet
LOWapps/electron/resources/scripts/xlsx_tool.py177 except Exception as e:
LOWapps/electron/resources/scripts/xlsx_tool.py232 except Exception as e:
LOWapps/electron/resources/scripts/xlsx_tool.py250 except Exception:
LOWapps/electron/resources/scripts/xlsx_tool.py272 except Exception as e:
LOWapps/electron/resources/scripts/xlsx_tool.py309 except Exception as e:
LOWapps/electron/resources/scripts/xlsx_tool.py369 except Exception as e:
LOWapps/electron/resources/scripts/docx_tool.py152 except Exception as e:
LOWapps/electron/resources/scripts/docx_tool.py204 except Exception as e:
LOWapps/electron/resources/scripts/docx_tool.py284 except Exception as e:
LOWapps/electron/resources/scripts/docx_tool.py322 except Exception as e:
LOWapps/electron/resources/scripts/docx_tool.py384 except Exception as e:
LOWapps/electron/resources/scripts/markitdown_cli.py116 except Exception:
LOWapps/electron/resources/scripts/markitdown_cli.py126 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py698 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py969 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1175 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py452 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py493 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py549 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py580 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py614 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py637 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py674 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py739 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py781 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py810 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py842 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py871 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py913 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py992 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1012 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1131 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1212 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1235 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1266 except Exception as e:
LOWapps/electron/resources/scripts/pdf_tool.py1315 except Exception as e:
LOWapps/electron/resources/scripts/doc_diff.py66 except Exception as e:
LOWapps/electron/resources/scripts/doc_diff.py227 except Exception as e:
LOWapps/electron/resources/scripts/ical_tool.py167 except Exception as e:
LOWapps/electron/resources/scripts/ical_tool.py275 except Exception as e:
LOWapps/electron/resources/scripts/ical_tool.py366 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py119 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py149 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py166 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py200 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py237 except Exception:
LOWapps/electron/resources/scripts/img_tool.py239 except Exception:
LOWapps/electron/resources/scripts/img_tool.py251 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py307 except Exception:
LOWapps/electron/resources/scripts/img_tool.py321 except Exception as e:
LOWapps/electron/resources/scripts/img_tool.py364 except Exception as e:
LOWapps/electron/resources/scripts/pptx_tool.py109 except Exception as e:
LOWapps/electron/resources/scripts/pptx_tool.py295 except Exception as e:
LOWapps/electron/resources/scripts/pptx_tool.py358 except Exception as e:
Synthetic Comment Markers4 hits · 30 pts
SeverityFileLineSnippet
HIGHpackages/ui/src/components/markdown/linkify.ts230 // (e.g., AI-generated `[commit](https://github.com/...)` → `\`commit\``)
HIGHpackages/server-core/src/sessions/SessionManager.ts778 // Session name (user-defined or AI-generated)
HIGHapps/electron/src/renderer/atoms/sessions.ts86 // Include plan messages as final responses (they're AI-generated content)
HIGHapps/electron/src/renderer/utils/session.ts123 // Include plan messages as final responses (they're AI-generated content)
Over-Commented Block29 hits · 28 pts
SeverityFileLineSnippet
LOWbunfig.toml1preload = ["./packages/shared/src/unified-network-interceptor.ts"]
LOWscripts/install-server.sh1#!/usr/bin/env bash
LOWscripts/docker-smoke-test.sh1#!/usr/bin/env bash
LOW…es/ui/src/components/markdown/MarkdownMermaidBlock.tsx21//
LOWpackages/ui/src/components/markdown/Markdown.tsx181 )
LOWpackages/ui/src/components/markdown/table-export.ts101// ── XLSX Styles ──────────────────────────────────────────────────────────────
LOWpackages/shared/src/unified-network-interceptor.ts981 }> | undefined;
LOWpackages/shared/src/agent/mode-manager.ts1001 // Double-quoted string: fix the critical \" issue for Windows paths.
LOWpackages/shared/src/agent/base-agent.ts201
LOWpackages/shared/src/agent/tool-matching.ts261 parentToolUseId: sdkParentToolUseId ?? undefined,
LOWpackages/shared/src/agent/claude-agent.ts1341 // All permission logic is handled via the PreToolUse hook instead (see hooks.PreToolUse above).
LOWpackages/shared/src/agent/backend/pi/event-adapter.ts81 // Mini model ID for call_llm display default (#596).
LOWpackages/pi-agent-server/src/index.ts1121 // Log API errors for debugging and attach provider-native turn anchor for branch cutoffs.
LOW…er-core/src/sessions/sendmessage-oauth-refresh.test.ts1import { afterEach, beforeEach, describe, expect, it } from 'bun:test'
LOW…r-core/src/sessions/refresh-connection-runtime.test.ts1import { afterEach, beforeEach, describe, expect, it, jest } from 'bun:test'
LOWpackages/server-core/src/sessions/SessionManager.ts401 return createTokenGetter(manager, source)
LOWpackages/server-core/src/sessions/SessionManager.ts841 // Role/type of the last message (for badge display without loading messages)
LOWpackages/server-core/src/sessions/SessionManager.ts901 // Parent session's sdkCwd — needed so the fork subprocess uses the correct
LOWpackages/server-core/src/sessions/SessionManager.ts5461 await this.ensureMessagesLoaded(managed)
LOWpackages/server-core/src/handlers/rpc/sessions.ts201 //
LOWapps/webui/src/adapter/web-api.ts241 // The OAuth provider redirects through the relay to our server's /api/oauth/callback,
LOWapps/electron/electron-builder.yml61# and a per-platform optional dependency (`-darwin-arm64`, `-darwin-x64`, etc.)
LOWapps/electron/resources/scripts/pdf_tool.py1# /// script
LOWapps/electron/scripts/build-dmg.sh121cp "$TEMP_DIR/${BUN_DOWNLOAD}/bun" "$ELECTRON_DIR/vendor/bun/"
LOWapps/electron/src/renderer/App.tsx761 useEffect(() => {
LOW…lectron/src/renderer/components/app-shell/AppShell.tsx1741 // State to control which EditPopover is open (triggered from context menus).
LOW…ctron/src/renderer/event-processor/handlers/session.ts541 // Update existing message — clear isPending, set isQueued based on status.
LOWapps/electron/src/main/index.ts1// Load user's shell environment first (before other imports that may use env)
LOWapps/electron/src/main/handlers/browser.ts181 }
Deep Nesting26 hits · 23 pts
SeverityFileLineSnippet
LOWapps/electron/resources/scripts/xlsx_tool.py69
LOWapps/electron/resources/scripts/xlsx_tool.py124
LOWapps/electron/resources/scripts/xlsx_tool.py188
LOWapps/electron/resources/scripts/xlsx_tool.py320
LOWapps/electron/resources/scripts/docx_tool.py88
LOWapps/electron/resources/scripts/docx_tool.py161
LOWapps/electron/resources/scripts/docx_tool.py295
LOWapps/electron/resources/scripts/docx_tool.py358
LOWapps/electron/resources/scripts/pdf_tool.py71
LOWapps/electron/resources/scripts/pdf_tool.py465
LOWapps/electron/resources/scripts/pdf_tool.py647
LOWapps/electron/resources/scripts/pdf_tool.py684
LOWapps/electron/resources/scripts/pdf_tool.py1022
LOWapps/electron/resources/scripts/pdf_tool.py1244
LOWapps/electron/resources/scripts/doc_diff.py86
LOWapps/electron/resources/scripts/doc_diff.py125
LOWapps/electron/resources/scripts/ical_tool.py123
LOWapps/electron/resources/scripts/ical_tool.py176
LOWapps/electron/resources/scripts/ical_tool.py286
LOWapps/electron/resources/scripts/img_tool.py76
LOWapps/electron/resources/scripts/img_tool.py208
LOWapps/electron/resources/scripts/img_tool.py264
LOWapps/electron/resources/scripts/pptx_tool.py44
LOWapps/electron/resources/scripts/pptx_tool.py165
LOWapps/electron/resources/scripts/pptx_tool.py251
LOWapps/electron/resources/scripts/pptx_tool.py305
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippet
CRITICAL…ectron/src/main/__tests__/browser-pane-manager.test.ts776 const sendCallsAfterShow = instance.window.webContents.send.mock.calls.slice(sendsBeforeShow)
CRITICAL…ectron/src/main/__tests__/browser-pane-manager.test.ts807 const sendCallsAfterFinishLoad = instance.window.webContents.send.mock.calls.slice(sendsBeforeFinishLoad)
Fake / Example Data16 hits · 16 pts
SeverityFileLineSnippet
LOW…ages/shared/src/utils/__tests__/large-response.test.ts72 const eightKTokenText = ('lorem ipsum dolor sit amet ').repeat(1185).slice(0, 32_000);
LOW…ages/shared/src/utils/__tests__/large-response.test.ts72 const eightKTokenText = ('lorem ipsum dolor sit amet ').repeat(1185).slice(0, 32_000);
LOW…ages/shared/src/utils/__tests__/large-response.test.ts138 const eightKTokenText = ('lorem ipsum dolor sit amet ').repeat(1185).slice(0, 32_000);
LOW…ages/shared/src/utils/__tests__/large-response.test.ts138 const eightKTokenText = ('lorem ipsum dolor sit amet ').repeat(1185).slice(0, 32_000);
LOW…ages/shared/src/utils/__tests__/large-response.test.ts239 ('Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
LOW…ages/shared/src/utils/__tests__/large-response.test.ts239 ('Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
LOW…/shared/src/sources/__tests__/multi-header-e2e.test.ts235 'X-Auth-Email': 'user@example.com',
LOW…/shared/src/sources/__tests__/multi-header-e2e.test.ts242 expect(headers['X-Auth-Email']).toBe('user@example.com');
LOW…shared/src/sources/__tests__/multi-header-auth.test.ts192 'X-Auth-Email': 'user@example.com',
LOW…shared/src/sources/__tests__/multi-header-auth.test.ts203 expect(headers['X-Auth-Email']).toBe('user@example.com');
LOWapps/electron/resources/docs/data-tables.md35 { "name": "Acme Corp", "revenue": 4200000, "growth": 0.152, "active": true, "tier": "Enterprise" },
LOWapps/electron/resources/docs/data-tables.md65| `text` | Any string | Plain text | `"John Doe"` | John Doe |
LOW…lectron/src/renderer/playground/registry/turn-card.tsx1678 name: 'Acme Corp',
LOW…electron/src/renderer/playground/registry/messages.tsx473 email: 'user@example.com',
LOW…electron/src/renderer/playground/registry/messages.tsx860 email: 'user@example.com',
LOW…n/src/renderer/utils/__tests__/auth-validation.test.ts229 expect(validateBasicAuthCredentials('user@example.com', 'pass', true)).toBe(true)
Magic Placeholder Names2 hits · 10 pts
SeverityFileLineSnippet
HIGHapps/electron/resources/docs/sources.md393 "BRAVE_API_KEY": "your-api-key"
HIGH…lectron/src/renderer/playground/registry/turn-card.tsx1747Authorization: Bearer YOUR_API_KEY
Unused Imports10 hits · 10 pts
SeverityFileLineSnippet
LOW…ectron/resources/scripts/tests/test_pptx_tool_smoke.py1
LOW…electron/resources/scripts/tests/_tool_test_harness.py1
LOW…ectron/resources/scripts/tests/test_docx_tool_smoke.py1
LOW…lectron/resources/scripts/tests/test_doc_diff_smoke.py1
LOW…ctron/resources/scripts/tests/test_markitdown_smoke.py1
LOW…lectron/resources/scripts/tests/test_pdf_tool_smoke.py8
LOW…lectron/resources/scripts/tests/test_pdf_tool_smoke.py15
LOW…ectron/resources/scripts/tests/test_xlsx_tool_smoke.py1
LOW…ectron/resources/scripts/tests/test_ical_tool_smoke.py1
LOW…lectron/resources/scripts/tests/test_img_tool_smoke.py1
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMpackages/shared/src/agent/mode-manager.ts1877 // Check plans folder with robust path containment (prevents sibling-prefix bypasses)
MEDIUMpackages/shared/src/agent/mode-manager.ts1883 // Check data folder with robust path containment
MEDIUMapps/electron/src/renderer/App.tsx776 // This is simpler and more robust than checking event types - we just ask
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippet
LOWscripts/docker-smoke-test.sh53 # Check if container is still running
LOWscripts/install-app.sh39# Check if yq is available (optional, for YAML parsing)
LOWscripts/install-app.sh88 # Check if we're entering a new file entry
LOWscripts/install-app.sh118 # Check if we're entering a new file entry
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippet
HIGH…lectron/src/renderer/playground/registry/turn-card.tsx1340 elif model_type == "gradient_boosting":
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippet
LOW…ed/src/utils/__tests__/binary-detection-base64.test.ts26 function processData(items: string[]): Map<string, number> {
LOWpackages/server-core/src/webui/node-adapter.ts33async function handleRequest(
LOWapps/electron/resources/bridge-mcp-server/index.js2721 function getData($data, { dataLevel, dataNames, dataPathArr }) {
LOWapps/electron/resources/bridge-mcp-server/index.js9034 function getData($data, { dataLevel, dataNames, dataPathArr }) {
Example Usage Blocks2 hits · 4 pts
SeverityFileLineSnippet
LOWscripts/install-server.sh4# Usage:
LOWscripts/docker-smoke-test.sh8# Usage:
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMapps/electron/resources/scripts/pdf_tool.py897 # Create a single-page image PDF and merge into output