Skip to content

Experiment with threading AI into extraction refactorings #182779

@DanielRosenwasser

Description

@DanielRosenwasser

Today, TSServer provides several actions for "extract to function" and "extract to local" for both TypeScript and JavaScript. Currently, TSServer just creates a pre-generated name like newLocal or newFunction that's sufficiently unique. While this is fine, it would be interesting if we could use a language model to come up with a useful name and calculate a better name while TypeScript itself calculates the refactoring.

In cases where a language model can "confidently" calculate a new name, that name can replace the contents of the automatically-invoked rename for the refactor.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions