Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alternative analysis logic (#345)
* wip API stuff * WIP examples * Add lsp-analysis * Fix linting issue * Add extra information * Follow imports * Refactor findHono.ts And split into multiple files Also: introduce a SearchContext that contains most important references (like the server, program, etc) * Add collect more references * Add back snapshots * wip * Add support for RouteTreeReferences * Simplify logic & dedupe module dependencies * Move SourceReferenceManager * Undo changes to api * Cleanup * Use relative paths and add in id's Also do a minor refactor * Rename server.test to extract-tree test * remove commented out code * Add analyze function & hono-factory test case * Fix linting for goose-quotes * Add support for createApp/factory pattern * Sort import for goose-quotes * Format api * Format lsp-analysis * Fix biome ci linting complaints * Update data structure And fix app.route() where the route was imported (and aliased) from another module * Fix linting and re-anble tests * quick commit * Add support for rendering route related content * Fix unit test * Move resourceManager to the findHonoRoutes return * Clean up * Generate less code * Use biome ci for linting * Move test cases into src folder * Move lsp-analysis to packages And rename it to @fiberplane/source-analysis Also: add a postinstall script that builds types and source-analysis packages This way people don't have to manually run the build steps of those packageas * Initial version working from api * Add import-as testcase And also: * ensure order of the source references in the generated files * add in imports to local files * change to id's for module imports * Streamline source-analysis api * Fix minor issue and do some cleanup * Improved handling of built-in modules Also: * add support for different methods (in generated hono app) * change RouteEntry.method from string to limited set of values * cleanup barrel test-case * updated multiple test case to include a 'post' and test the generated app for support * add more comments * Simplify code changes * Refactory: extract history -> source serializer * Add comments & add some caching logic * Add support for using `include` option tsconfig * Fix build And prefix private class properties with an underscore * Feature: enabling ai without restart of studio * Code cleanupp * Remove previous implementation of expand-function * Use consola for logging with (prototype) custom formatter * Brett logging * Add a page for inspecting context shipped to AI calls * Remove brett logger * Enable custom logger for source-analysis package * Use logger in more places * Disallow console.log in the api * Add readme and some further tweaks * Format all the things! * Start code analysis after logging user in * Remove aiEnabled from settings * Fix readme typescript example (syntax issue) * Move code analysis setup to code-analysis lib * Modify comment * Update comment about the RoutesResult and possible race conditions * Remove dead code * Remove old vscode links utilities from studio * Remove unused api route for finding source function from error * Remove unused trace summarization utilities * Remove studio api routes for looking up source code of functions * Remove source function finder * Remove acorn * Delete dead file * tweak readme --------- Co-authored-by: Brett Beutell <brbeut@gmail.com>
- Loading branch information