Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,53 +21,53 @@
"dependencies": {
"@anthropic-ai/sdk": "^0.110.0",
"@base-ui/react": "^1.6.0",
"@google/genai": "^2.6.0",
"@google/genai": "^2.10.0",
"@octokit/rest": "^21.1.1",
"@tanstack/react-query": "^5.67.1",
"@tanstack/react-query": "^5.101.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"d3-force": "^3.0.0",
"dompurify": "^3.4.11",
"framer-motion": "^12.42.0",
"framer-motion": "^12.42.2",
"highlight.js": "^11.11.1",
"html-to-image": "^1.11.13",
"jspdf": "^4.2.1",
"lru-cache": "^11.0.2",
"lru-cache": "^11.5.1",
"lucide-react": "^1.23.0",
"mermaid": "^11.15.0",
"mermaid": "^11.16.0",
"openai": "^6.45.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"react-force-graph-2d": "^1.29.1",
"react-router-dom": "^7.18.0",
"recharts": "^2.15.1",
"react-router-dom": "^7.18.1",
"recharts": "^2.15.4",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0",
"zod": "^4.4.3",
"zustand": "^5.0.3"
"zustand": "^5.0.14"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.61.1",
"@tailwindcss/vite": "^4.3.1",
"@tailwindcss/vite": "^4.3.2",
"@types/bun": "^1.3.14",
"@types/d3-force": "^3.0.10",
"@types/node": "^22.13.9",
"@types/node": "^22.20.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.0.4",
"@vercel/node": "^5.1.8",
"@types/react-dom": "^19.2.3",
"@vercel/node": "^5.8.22",
"@vitejs/plugin-react": "^6.0.3",
"bun-types": "^1.3.14",
"eslint": "^9.21.0",
"eslint": "^9.39.4",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.5.3",
"globals": "^17.7.0",
"rollup-plugin-visualizer": "^7.0.1",
"shadcn": "^4.11.0",
"tailwindcss": "^4.3.1",
"shadcn": "^4.13.0",
"tailwindcss": "^4.3.2",
"typescript": "^6.0.3",
"typescript-eslint": "^8.26.0",
"vite": "^8.1.0"
"typescript-eslint": "^8.62.1",
"vite": "^8.1.3"
},
"packageManager": "bun@1.3.14",
"trustedDependencies": [
Expand Down
1 change: 0 additions & 1 deletion server/parser/manifest-parsers/npm-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export function parsePnpmWorkspace(path: string, content: string): WorkspaceMani
// Stop parsing if we hit another top-level key or invalid formatting
if (inPackages) {
if (!line.startsWith(' ') && !line.startsWith('-')) {
inPackages = false;
break;
}
// If we are inside the packages block, lines should start with "- "
Expand Down
2 changes: 1 addition & 1 deletion server/search/indexing-pipeline.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function setupModuleMocks() {
mock.module('../github/fetch-tree', () => ({ fetchRepoInfo, fetchFlatTree, fetchFileContents }));
mock.module('./embedding-provider', () => ({
createEmbeddingProvider: async () => ({
embed: async (text: string) => ({ vector: new Float32Array([1, 0]), tokenCount: 1 }),
embed: async (_text: string) => ({ vector: new Float32Array([1, 0]), tokenCount: 1 }),
embedBatch,
}),
}));
Expand Down
3 changes: 1 addition & 2 deletions server/search/indexing-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ async function runIndexing(options: IndexingOptions, ctx: RequestContext, key: s

// 4. Determine files to process (incremental: only changed files)
let filesToProcess = sourceFiles;
let filesToDelete: string[] = [];

if (previousSha && vectorStore.hasIndex(key)) {
const { items: prevItems } = await fetchFlatTree(owner, repo, previousSha, ctx);
Expand All @@ -96,7 +95,7 @@ async function runIndexing(options: IndexingOptions, ctx: RequestContext, key: s

// Files in current but not prev, or SHA changed → treat as modified
// Files in prev but not current → delete
filesToDelete = [...prevFiles].filter((f) => !currFiles.has(f));
const filesToDelete = [...prevFiles].filter((f) => !currFiles.has(f));
const modifiedOrAdded = sourceFiles.filter((item) => {
const prevItem = prevItems.find((p) => p.path === item.path);
return !prevItem || prevItem.sha !== item.sha; // SHA changed or new file
Expand Down
2 changes: 1 addition & 1 deletion server/services/get-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function getRepoFileContent(
throw new Error('File is not a regular file or too large to display.');
} catch (error) {
if (error && typeof error === 'object' && 'status' in error && (error as { status: number }).status === 404) {
throw new Error(`File not found: ${path}`);
throw new Error(`File not found: ${path}`, { cause: error });
}
handleOctokitError(error);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/viz/ai-sidebar/Markdownish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function Markdownish({ text }: { text: string }) {

if (insideCodeBlock && codeBlockContent.length > 0) {
renderedElements.push(
<pre key={`code-${codeBlockKey++}`} className="my-2.5 max-w-full overflow-x-auto rounded-lg bg-zinc-900/80 p-3 text-[10px] font-mono text-zinc-300 border border-white/5 scrollbar-thin">
<pre key={`code-${renderedElements.length}`} className="my-2.5 max-w-full overflow-x-auto rounded-lg bg-zinc-900/80 p-3 text-[10px] font-mono text-zinc-300 border border-white/5 scrollbar-thin">
<code className="block w-max min-w-full whitespace-pre">{codeBlockContent.join('\n')}</code>
</pre>
);
Expand Down
21 changes: 9 additions & 12 deletions src/components/viz/architecture/hooks/useArchitectureState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ export function useArchitectureState(
}, [mode, owner, repo, generate]);

useEffect(() => {
let code = '';
if (mode === 'code') {
if (!analysis) return;
code = generateProgrammaticMermaid(analysis);
} else {
if (!data?.diagram) {
setSvg('');
setRenderError(null);
return;
}
code = stripMermaidFences(data.diagram);
if (mode === 'code' && !analysis) return;
if (mode === 'ai' && !data?.diagram) {
setSvg('');
setRenderError(null);
return;
}
const code = mode === 'code'
? generateProgrammaticMermaid(analysis)
: stripMermaidFences(data?.diagram ?? '');

if (!code) return;

Expand Down Expand Up @@ -75,7 +72,7 @@ export function useArchitectureState(
return () => {
active = false;
};
}, [mode, data, analysis]);
}, [mode, data, analysis, resetView]);

return {
generate,
Expand Down
Loading