Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Search and Codebase Indexing Service Implementation #609

Closed
wants to merge 248 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
0a25a39
Implement semantic search feature: Add new services, update core comp…
daniel-lxs Jan 21, 2025
52ef174
Remove semantic search plan markdown (now local-only)
daniel-lxs Jan 21, 2025
d56794d
Enhance semantic search: Implement tree-sitter multi-language parsing…
daniel-lxs Jan 21, 2025
6db5da6
Refactor semantic search service: Enhance search functionality with i…
daniel-lxs Jan 22, 2025
06c9f5d
Refactor WorkspaceCache and PersistentVectorStore to support workspac…
daniel-lxs Jan 22, 2025
cbc15d5
feat(semantics): add workspace ID support and contextual embeddings t…
daniel-lxs Jan 22, 2025
794ab8a
feat(semantic-search): enhance indexing and configuration management
daniel-lxs Jan 23, 2025
99e9a91
refactor(semantic-search): move semantic search initialization to Cli…
daniel-lxs Jan 25, 2025
a064f62
chore(dependencies): add LanceDB for vector database support
daniel-lxs Jan 25, 2025
e45c523
refactor(semantic-search): simplify file indexing and storage configu…
daniel-lxs Jan 25, 2025
4911aed
feat(file-listing): enhance listFiles with configurable hidden file a…
daniel-lxs Jan 25, 2025
3f9146d
feat(semantic-search): Migrate to LanceDB with enhanced file indexing…
daniel-lxs Jan 25, 2025
37af2c6
feat(semantic-search): Upgrade MiniLM embedding model to larger variant
daniel-lxs Jan 25, 2025
46a7fc6
refactor(semantic-search): Improve TypeScript parsing and code segmen…
daniel-lxs Jan 25, 2025
4190834
refactor(semantic-search): Centralize semantic search initialization …
daniel-lxs Jan 25, 2025
1099c93
refactor(semantic-search): Enhance TypeScript query for more precise …
daniel-lxs Jan 26, 2025
3027ce9
refactor(semantic-search): Simplify code segment parsing and remove u…
daniel-lxs Jan 26, 2025
6dd8d1d
feat(semantic-search): Add JavaScript parsing support and improve var…
daniel-lxs Jan 27, 2025
00e8585
test(semantic-search): Add comprehensive TreeSitterParser test suite …
daniel-lxs Jan 27, 2025
5f77c6a
feat(semantic-search): Add JavaScript query for code segment parsing
daniel-lxs Jan 27, 2025
4fa2c30
refactor(tree-sitter): Enhance language parser with configurable WASM…
daniel-lxs Jan 27, 2025
2665e46
feat(semantic-search): Add workspace indexing status tracking and imp…
daniel-lxs Jan 27, 2025
1431093
refactor(semantic-search): Remove memory monitoring and vector store …
daniel-lxs Jan 27, 2025
dac6148
refactor(semantic-search): Remove semantic search configuration options
daniel-lxs Jan 27, 2025
20599c4
refactor(semantic-search): Optimize result filtering and formatting l…
daniel-lxs Jan 27, 2025
c892dee
refactor(semantic-search): Simplify CodeDefinition and SearchResult t…
daniel-lxs Jan 27, 2025
cae2891
refactor(semantic-search): Streamline LanceDB vector search result ma…
daniel-lxs Jan 27, 2025
cfa7a5d
refactor(semantic-search): Rename SearchResult to VectorSearchResult …
daniel-lxs Jan 27, 2025
46bf1a2
refactor(semantic-search): Remove semantic search memory configuratio…
daniel-lxs Jan 27, 2025
0a79c2d
refactor(semantic-search): Improve semantic search indexing and statu…
daniel-lxs Jan 28, 2025
6cd6476
feat(semantic-search): Initialize semantic search service in extensio…
daniel-lxs Jan 28, 2025
51dfede
refactor(semantic-search): Enhance initialization and status manageme…
daniel-lxs Jan 28, 2025
909125a
refactor(semantic-search): Reduce verbose logging and simplify initia…
daniel-lxs Jan 28, 2025
36ffb49
chore: delete old plan
daniel-lxs Jan 28, 2025
d5c7710
chore: Remove unused ML and runtime dependencies
daniel-lxs Jan 29, 2025
3314660
feat(api): Add text embedding support for OpenAI API handler
daniel-lxs Jan 29, 2025
bb946b8
refactor(semantic-search): Pass openAI native provider to semantic se…
daniel-lxs Jan 29, 2025
a64e8d9
refactor(semantic-search): Migrate to OpenAI embeddings and simplify …
daniel-lxs Jan 29, 2025
9411b2d
refactor(build): Simplify WASM and native module file copying with es…
daniel-lxs Jan 30, 2025
1cb621f
refactor: delete test in the meantime
daniel-lxs Jan 30, 2025
c2a95f3
fix(build): Update native .node module handling in esbuild config to …
daniel-lxs Jan 30, 2025
934d392
refactor(semantic-search): Simplify workspace indexing and improve se…
daniel-lxs Jan 30, 2025
c7dd046
Support AWS profile to configure Bedrock Authentication
Lunchb0ne Jan 16, 2025
322edbb
Remove extra mock from test
Lunchb0ne Jan 18, 2025
e248a65
Clean up the settings page
mrubens Jan 20, 2025
d74c42b
fix: correct X-Glama-Metadata placement
punkpeye Jan 21, 2025
800b5d8
Custom modes
mrubens Jan 18, 2025
6d0394b
changeset version bump
github-actions[bot] Jan 21, 2025
173bd99
Updating CHANGELOG.md format
invalid-email-address Jan 21, 2025
686e02f
Update CHANGELOG.md
mrubens Jan 21, 2025
d507092
Update CHANGELOG.md
mrubens Jan 21, 2025
b3483b8
Fix announcement
mrubens Jan 21, 2025
346e7e6
changeset version bump
github-actions[bot] Jan 21, 2025
5b5cd83
Updating CHANGELOG.md format
invalid-email-address Jan 21, 2025
60f5b71
Update CHANGELOG.md
mrubens Jan 21, 2025
5a658b9
Add diff strategy to system prompt preview
mrubens Jan 21, 2025
bcf70ec
changeset version bump
github-actions[bot] Jan 21, 2025
8c8c97f
Updating CHANGELOG.md format
invalid-email-address Jan 21, 2025
33e2361
Update CHANGELOG.md
mrubens Jan 21, 2025
e01b52b
Update CHANGELOG.md
mrubens Jan 21, 2025
56ff950
feat(openai): add custom model info configuration
samhvw8 Jan 12, 2025
5315f0c
fix ui and some error my has
samhvw8 Jan 18, 2025
dfe0b58
feat(openai-compatible): tune UI UX custom model info
samhvw8 Jan 19, 2025
544bdb3
refactor: rename openAiCusModelInfo to openAiCustomModelInfo for bett…
samhvw8 Jan 21, 2025
29a38f0
update: Improve model configuration UI text and styling
samhvw8 Jan 21, 2025
c329339
Fix language selector
mrubens Jan 21, 2025
1d44295
changeset version bump
github-actions[bot] Jan 21, 2025
9b5cdef
Updating CHANGELOG.md format
invalid-email-address Jan 21, 2025
05db5f2
Only allow usage of diff tool if enabled in settings
mrubens Jan 21, 2025
7cebe63
changeset version bump
github-actions[bot] Jan 21, 2025
a393c9e
Updating CHANGELOG.md format
invalid-email-address Jan 21, 2025
0495f24
Update openrouter.ts
mrubens Jan 22, 2025
e833bbd
Update openrouter.test.ts
mrubens Jan 22, 2025
23e173e
Update README.md
mrubens Jan 22, 2025
e4b5a3c
style: Align text and button in user input box
monotykamary Jan 22, 2025
85b50b6
fix: avoid deleting configs if the currentApiConfigName hasn't been c…
monotykamary Jan 22, 2025
8d935d8
chore: add gemini flash thinking 01-21
monotykamary Jan 22, 2025
05783a7
fix: update output length to 65536
monotykamary Jan 22, 2025
a517918
style: remove double scroll bar through unsetting overflow
monotykamary Jan 22, 2025
c1c5d87
style: align chatrow through padding and keep flex-start for the trash
monotykamary Jan 22, 2025
67403f4
v3.2.5
mrubens Jan 22, 2025
4026a85
Change default
mrubens Jan 22, 2025
1389a49
changeset version bump
github-actions[bot] Jan 22, 2025
5d4a9c5
Updating CHANGELOG.md format
invalid-email-address Jan 22, 2025
5b6d08a
Fix bug with role definition overrides for built-in modes
mrubens Jan 22, 2025
7282fff
changeset version bump
github-actions[bot] Jan 22, 2025
fa6455e
Updating CHANGELOG.md format
invalid-email-address Jan 22, 2025
b9c445f
Revert "fix: avoid deleting configs if the currentApiConfigName hasn'…
mrubens Jan 22, 2025
3749c83
Release
mrubens Jan 22, 2025
3b61ff4
changeset version bump
github-actions[bot] Jan 22, 2025
1b93b66
Updating CHANGELOG.md format
invalid-email-address Jan 22, 2025
16e7296
Fix button to open custom modes settings
mrubens Jan 23, 2025
b779850
feat: add explicit Azure OpenAI flag and setup memory bank docs
samhvw8 Jan 23, 2025
ffa08f0
Revert onChange back to onInput
samhvw8 Jan 23, 2025
4f3fac0
feat: poll usage
punkpeye Jan 22, 2025
e900595
feat(api): add Llama 3.3 70B Instruct to AWS Bedrock model options
Jan 23, 2025
31927b7
v3.2.8
mrubens Jan 24, 2025
e2fe05b
changeset version bump
github-actions[bot] Jan 24, 2025
df13add
Update CHANGELOG.md
mrubens Jan 24, 2025
1585063
feat: add code action prompt handlers for explain, fix and improve code
samhvw8 Jan 12, 2025
9566703
feat: implement code action provider for VS Code integration
samhvw8 Jan 12, 2025
934acf6
feat: register new code action commands in package manifest
samhvw8 Jan 12, 2025
397db74
feat: integrate code actions into extension activation
samhvw8 Jan 12, 2025
197148a
refactor(code-actions): implement parameter object pattern for prompt…
samhvw8 Jan 12, 2025
8a311b6
feat(code-actions): add user input and customizable templates
samhvw8 Jan 12, 2025
873216b
refactor: consolidate prompt functionality into support-prompt module
samhvw8 Jan 22, 2025
af05b3c
refactor: consolidate code action and enhance prompts into unified su…
samhvw8 Jan 23, 2025
4da74e8
fix comment on pr
samhvw8 Jan 23, 2025
04ad485
refactor: generalize prompt enhancement into single completion handler
samhvw8 Jan 23, 2025
8b469ef
refactor: separate mode and support prompts
samhvw8 Jan 23, 2025
afd8840
Review feedback
mrubens Jan 23, 2025
1537c02
feat: user prompt in code action
samhvw8 Jan 24, 2025
ef1fcee
Allow architect mode to write md files
mrubens Jan 24, 2025
1091bc9
Let ask mode write markdown too
mrubens Jan 24, 2025
f1f143e
Add test to confirm this works with custom modes
mrubens Jan 24, 2025
5cce832
Update system prompt
mrubens Jan 24, 2025
c891bf3
Cleanup
mrubens Jan 24, 2025
21f9f7b
Updated role definition for ask
mrubens Jan 24, 2025
caca991
Validation fixes
mrubens Jan 24, 2025
58bb74c
Add a tool to switch modes
mrubens Jan 24, 2025
3600629
fix #524
samhvw8 Jan 24, 2025
7f8ae5b
v3.3 changeset
mrubens Jan 24, 2025
57d2413
Don't allow setting a retry period below 5 seconds, default to 10
mrubens Jan 24, 2025
dfc8ab1
Docs
mrubens Jan 24, 2025
f7d941f
Fix test
mrubens Jan 24, 2025
049bb56
changeset version bump
github-actions[bot] Jan 24, 2025
a0413e8
Update CHANGELOG.md
mrubens Jan 24, 2025
71608f3
Do a more complete mode switch from switch_mode command
mrubens Jan 25, 2025
a827a2f
reuse existing non-busy terminals
celestial-vault Jan 16, 2025
7917c3b
Changeset
mrubens Jan 25, 2025
36057de
changeset version bump
github-actions[bot] Jan 25, 2025
5227450
Update CHANGELOG.md
mrubens Jan 25, 2025
b0ab556
Use deepseek-r1 recommended temperature
Szpadel Jan 25, 2025
06501e2
Add support for displaying reasoning for openrouter models
Szpadel Jan 26, 2025
3433e2c
Hardcode version in announcement
mrubens Jan 26, 2025
0006547
Add configuration picker on the modes page
mrubens Jan 26, 2025
d60c19a
Fix bug where always allow wasn't showing up for MCP tools
mrubens Jan 26, 2025
973efd6
indent collapsed settings
PretzelVector Jan 24, 2025
b67873a
feat: Add openRouterBaseUrl option
dairui1 Jan 25, 2025
881528f
Fix
mrubens Jan 26, 2025
a81cc57
Update bug_report.yml
mrubens Jan 26, 2025
8a355a5
v3.3.2
mrubens Jan 26, 2025
90c1f46
changeset version bump
github-actions[bot] Jan 26, 2025
dd22173
Update CHANGELOG.md
mrubens Jan 26, 2025
845d794
Update CHANGELOG.md
mrubens Jan 26, 2025
4986617
Throw FileRestrictionErrors sooner
mrubens Jan 26, 2025
8574f55
fix:Added correct styling for the select options
psv2522 Jan 26, 2025
8c3074c
fix:Using optionStyle everywhere correctly
psv2522 Jan 26, 2025
aaabb0c
v3.3.3
mrubens Jan 26, 2025
de40d1c
changeset version bump
github-actions[bot] Jan 26, 2025
2cb5fe3
Update CHANGELOG.md
mrubens Jan 26, 2025
a9c495f
Add per-server MCP network timeout configuration
mrubens Jan 26, 2025
5df31d9
Update README.md
mrubens Jan 27, 2025
e487cf0
Update README.md
mrubens Jan 27, 2025
c1b30f1
Speed up diff edits
mrubens Jan 27, 2025
ebf9be2
feat(code-actions): add "Fix Code in Current Task" action
samhvw8 Jan 27, 2025
8f1a9bb
Add new/existing task for all three actions
mrubens Jan 27, 2025
e4d6617
v3.3.4
mrubens Jan 27, 2025
a58ff93
changeset version bump
github-actions[bot] Jan 27, 2025
b50bf68
Update CHANGELOG.md
mrubens Jan 27, 2025
e6d2982
Update CHANGELOG.md
mrubens Jan 27, 2025
46717c5
chore: update CodeBlock.tsx
eltociear Jan 27, 2025
f1cfb42
feat: Add auto-approval for mode switching
MuriloFP Jan 28, 2025
0566574
feat: Add conversation context token counter
MuriloFP Jan 28, 2025
774d5df
fix: Prevent context token counter from resetting on failed API calls
MuriloFP Jan 28, 2025
9c07776
fix: Make context token counter more reliable
MuriloFP Jan 28, 2025
2683fb9
Update webview-ui/src/components/chat/TaskHeader.tsx
MuriloFP Jan 28, 2025
544f032
feat(settings): Add auto-approve mode switching option to Settings UI
MuriloFP Jan 28, 2025
ee58718
Extend deepseek-r1 support
Szpadel Jan 27, 2025
b38d473
Add test
mrubens Jan 28, 2025
c04f87e
fix missing in make input lag
samhvw8 Jan 28, 2025
2e75a9b
Add a delay to allow auto approved mode changes to take effect
mrubens Jan 28, 2025
559cf5d
Checkpoint on insert and search/replace tools
mrubens Jan 22, 2025
6318dbb
feat: implement experimental features system
samhvw8 Jan 26, 2025
fa10246
chore: remove unused
samhvw8 Jan 26, 2025
16ef0a1
refactor(experiments): improve type safety for experiment configuration
samhvw8 Jan 27, 2025
ef83454
chore: update description for exp tool
samhvw8 Jan 27, 2025
0d8852f
refactor: remove redundant experimentConfigs array, use experimentCon…
samhvw8 Jan 27, 2025
2cb9d8f
refactor(experiments): simplify experiment config structure
samhvw8 Jan 27, 2025
bf080ae
chore: remove unused
samhvw8 Jan 27, 2025
db8337c
update with comment in pr
samhvw8 Jan 28, 2025
8c2fb2c
update rule & prompt for insert-code-block
samhvw8 Jan 28, 2025
d7f9191
update prompt for search and replace tool
samhvw8 Jan 28, 2025
6cf7af0
fix error in search and replace, update rule to utilize multiple oper…
samhvw8 Jan 28, 2025
2229241
Update prompts and fix tests
mrubens Jan 28, 2025
7c0514b
fix diffview for search-and-replace tool and insert tool
samhvw8 Jan 28, 2025
9fb2bbd
Sneak in a change to apply_diff error message
mrubens Jan 28, 2025
676b5eb
v3.3.5
mrubens Jan 28, 2025
ecd764f
insert_code_block -> insert_content
mrubens Jan 28, 2025
28c7655
feat: Add context tokens to environment details
MuriloFP Jan 28, 2025
273970b
feat(ui): add context window percentage to task header
MuriloFP Jan 28, 2025
1c485c3
handle other deepseek-r1 variants on openrouter
Szpadel Jan 28, 2025
16022fb
More renaming
mrubens Jan 28, 2025
6392dfa
changeset version bump
github-actions[bot] Jan 28, 2025
9624845
Updating CHANGELOG.md format
invalid-email-address Jan 28, 2025
42ab24e
fix: prevent context token counter flickering during API requests
MuriloFP Jan 29, 2025
a7d6e6e
Update CHANGELOG.md
mrubens Jan 29, 2025
6b59475
Update CHANGELOG.md
mrubens Jan 29, 2025
220487d
fix: Use Dropdown instead of select in settings for more ui consistency
psv2522 Jan 28, 2025
0a150c5
fix: Mock dropdown in tests correctly
psv2522 Jan 29, 2025
6485953
refactor: improve error logging in ClineProvider
samhvw8 Jan 27, 2025
ca05db4
fix pr comment
samhvw8 Jan 27, 2025
c86b19e
Adds unbound provider to roo cline
Jan 22, 2025
b3559f5
Fixed model mismatch
Jan 23, 2025
91cc71d
Removed comments
Jan 23, 2025
c7bcfe5
Handles error messages
Jan 23, 2025
a7d744e
Adds test file
Jan 23, 2025
a940083
Updates test file
Jan 23, 2025
4b95ffe
Changes production url
Jan 23, 2025
3b4abe4
Added mistral and deepseek models
Jan 24, 2025
ef5a1c3
Updates error reading
Jan 27, 2025
141804b
Adds provider names to dropdown
Jan 27, 2025
63933d6
Modifying the usage of unbound.ts in compliance with all providers
vigneshsubbiah16 Jan 28, 2025
08287e7
Yields the usage tokens
vigneshsubbiah16 Jan 28, 2025
f3c68fa
Adds button to get unbound api key
Jan 28, 2025
4238208
fix config-profile-dropdown-zindex
samhvw8 Jan 29, 2025
0fce80c
Add support for perplexity/sonar-reasoning
Szpadel Jan 29, 2025
1f4e5f0
Add a new_task tool
mrubens Jan 29, 2025
0dfc0f2
Fixing anthropic model caching in roo-code
kinandan Jan 29, 2025
d119f77
Refactors the cached token code for all models
vigneshsubbiah16 Jan 29, 2025
1d49697
Add typing for usageData and adds some unit tests
vigneshsubbiah16 Jan 29, 2025
9a39bdd
Fix crash when delta in openai api handling could be empty in some ca…
Szpadel Jan 29, 2025
b67282e
Add keywords for search - roocode, roo code
joemanley201 Jan 29, 2025
827f1a0
Add new changeset
joemanley201 Jan 29, 2025
7b05fcf
Add v3.3.6
mrubens Jan 30, 2025
4239fa5
changeset version bump
github-actions[bot] Jan 30, 2025
a94b7ff
Update CHANGELOG.md
mrubens Jan 30, 2025
59447e6
fix: Move sliders to newline in settings to avoid horizontal scroll a…
psv2522 Jan 29, 2025
106df31
fix:Made the main inputbox focus styling better, added better spacing…
psv2522 Jan 30, 2025
ad25592
fix:padding improved, removed scrollbar in inputbox
psv2522 Jan 30, 2025
c220b7a
refactor: update code to match main
daniel-lxs Jan 30, 2025
e1657ea
fix: ordering of state variables
daniel-lxs Jan 30, 2025
ada21c0
fix: Add code deleted in merge
daniel-lxs Jan 30, 2025
53c3d0b
feat: Enhance semantic search API key handling and initialization
daniel-lxs Jan 31, 2025
d654c36
refactor: Improve semantic search initialization and embedding handle…
daniel-lxs Jan 31, 2025
e15846d
feat: Enhance tree-sitter parser with multi-language support and impr…
daniel-lxs Jan 31, 2025
0113c27
feat: Add Python language support to semantic search parser
daniel-lxs Jan 31, 2025
7f7acf4
feat: Add semantic search API key configuration to settings
daniel-lxs Jan 31, 2025
64eca7f
feat: Improve settings management and semantic search API key handling
daniel-lxs Jan 31, 2025
74db676
refactor: Optimize global state updates in settings management
daniel-lxs Feb 1, 2025
5c7fcd4
feat: Add robust file type detection and validation utilities
daniel-lxs Feb 1, 2025
75643c3
refactor: Improve file processing and indexing in semantic search ser…
daniel-lxs Feb 1, 2025
8845268
feat: Improve semantic search result handling and UI integration
daniel-lxs Feb 3, 2025
bc6b901
Squashed merge from main
daniel-lxs Feb 4, 2025
185a922
feat: Add default tool use description for unhandled tool names
daniel-lxs Feb 4, 2025
3bd596f
feat: Add semantic search block description formatting
daniel-lxs Feb 4, 2025
c8ae3ee
fix: sync with main
daniel-lxs Feb 4, 2025
8a612da
chore: add needed dependencies
daniel-lxs Feb 4, 2025
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
Prev Previous commit
Next Next commit
feat(semantic-search): Add JavaScript parsing support and improve var…
…iable name extraction

- Introduce JavaScript tree-sitter query for code segment parsing
- Enhance variable name extraction with fallback to identifier nodes
- Update WASM directory resolution to use current module directory
- Implement import extraction for JavaScript files
- Simplify import and export segment collection
daniel-lxs committed Jan 27, 2025
commit 6dd8d1d8755c56ff6769f2e5958a031f338414e4
15 changes: 10 additions & 5 deletions src/services/semantic-search/parser/tree-sitter.ts
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import { loadRequiredLanguageParsers } from "../../tree-sitter/languageParser"
import type Parser from "web-tree-sitter"
import { CodeSegment, ParsedFile, SemanticParser, IMPORTANCE_WEIGHTS, CodeSegmentType } from "./types"
import typescript from "./queries/typescript"
import javascript from "./queries/javascript"
import crypto from "crypto"

export class TreeSitterParser implements SemanticParser {
@@ -13,7 +14,7 @@ export class TreeSitterParser implements SemanticParser {

constructor(wasmDir?: string) {
// In tests, use the provided wasmDir, otherwise use the default
this.wasmDir = wasmDir || path.join(process.cwd(), "src/services/tree-sitter")
this.wasmDir = wasmDir || __dirname
}

private async initialize(filePath: string) {
@@ -25,6 +26,7 @@ export class TreeSitterParser implements SemanticParser {
[filePath, ...dummyFiles],
{
ts: typescript,
js: javascript,
},
this.wasmDir,
) // Pass wasmDir to loadRequiredLanguageParsers
@@ -72,7 +74,8 @@ export class TreeSitterParser implements SemanticParser {
case CodeSegmentType.METHOD:
return node.childForFieldName("name")?.text || ""
case CodeSegmentType.VARIABLE:
return node.childForFieldName("name")?.text || ""
// First try direct name field, then look for identifier in descendants
return node.childForFieldName("name")?.text || node.descendantsOfType("identifier")[0]?.text || ""
case CodeSegmentType.IMPORT:
return node
.descendantsOfType("string")
@@ -216,9 +219,11 @@ export class TreeSitterParser implements SemanticParser {
const segments = await this.parseSegments(tree, fileContent, language)
console.log(`Found ${segments.length} segments`)

// TODO: Implement import/export extraction based on language
const imports: string[] = []
const exports: string[] = []
// Extract imports and exports from segments
const imports = segments
.filter((s) => s.type === CodeSegmentType.IMPORT)
.map((s) => s.name)
.filter(Boolean)

// Generate a basic summary
const summary = `${segments.length} code segments found: ${segments.map((s) => s.type).join(", ")}`