SPIKE - [LS] ImportContextProvider - Resolve ECMAScript (JavaScript, TypeScript, etc) Imports
Overview
Create a new context provider in the LS that analyzes import statements to provide additional context for Code Suggestions. Code Suggestions currently uses open files and cursor context to show suggestions. Adding import statement analysis will provide better context about related files and dependencies.
Proposal
Enhance Duo by implementing an Import Context Provider that:
- Successfully parse ECMAScript import statements
- both ES6 imports and CommonJS Requires
- Handle relative and absolute imports
- Respect byte size limits
- Need to respect token limits for both code generation and code creation
- Integrates with the existing Advanced Context Resolver
- Provider needs to be added to our telemetry
- Implementation must be behind the context feature flags, following the existing pattern.
Scope
This will now serve as the issue for capturing the scope of work involved in making this happen.
Edited by Michael Angelo Rivera