With AI Developer, you can write code, debug, generate test cases, and batch modify code.
Maximize AI Developer's effectiveness with these guidelines:
Clarify your requirements: First, clarify what you want the AI Developer to accomplish. Include a clear goal and provide a structured, step-by-step description of the development task.
Provide context: Provide the AI Developer with context (such as code files, images, codebases, code changes, and detailed execution steps) to help clarify your requirements.
Clarify generation requirements: Give AI Developer the guidelines to follow when generating suggestions, such as the programming language, specifications, format, and change objectives. For example, you can ask it to include comments for each method when changing the code.
Use the snapshot feature to revert changes: When the AI-generated content does not meet your expectations, or your requirements change, you can use the snapshot feature to roll back the changes, and ask questions again.
Review and modify changes: After AI Developer completes code changes across multiple files, you can review the changes in the Diff View and accept, reject, or modify specific code snippets to ensure that the final code changes meet your expectations.
Lingma is constantly evolving to better help developers with programming tasks.
Summon your AI Developer
To use the AI Developer, follow the steps below:
Go to the IDE.
Open the Lingma plugin
Open the AI Developer panel.
Use the following shortcuts to launch the Developer:
Command
macOS
Windows
Open / Close AI Developer
⌘
⇧
I
Ctrl
Shift
I
Coding with AI Developer
Clearly describe your requirements to the AI Developer. It will modify multiple files in your project, then you can review and accept or reject the changes.
Lingma provides an interactive interface, as shown in the following figure:
New Task: When you are in a conversation with AI Developer and file changes occur, a secondary confirmation appears upon selection. After confirmation, the changes in the file are canceled or terminated, and a new session is initiated.
Chat in AI Developer: Displays the question and answer conversation between you and AI Developer. File changes or plan confirmations are also displayed in the conversation section in the form of cards.
Working Space: Displays modified files and snapshots of the changes generated from the multi-turn conversation in the current session. You can view, reject, or accept code changes.
Input box: The area where you can enter prompts to describe your requirements. You can select context and write the prompts in natural language, then AI Developer will assemble them.
Editor: The area where you can view the differences between the files in the current snapshot and the corresponding local files. You can modify, reject, or accept code changes, and accept file-level changes.
User Input
Enter your requirements at the bottom of the AI Developer window. Click ➕ in the input box or type #
to select the relevant context. AI Developer will retrieve relevant information, break down the tasks, and provide code suggestions.
Multi-file Edits
How it works
You can track files of the following statuses:
Generating: The process of generating modification suggestions for code snippets in each file.
Applying: After the modification suggestions for a code snippet are generated, a related modified file (independent of the original one) is automatically created.
Applied: The modified file is generated.
Use the comparison (Diff) view to see the generation process between the original and modified files.
Review, accept, and reject code changes
Click Diff in the Working Space or click a file from the file list to view the code before and after the modification. In the Diff view, you can perform the following operations:
Navigate changes with arrow keys
Accept or reject snippets and files
Make manual edits
The following figure shows the AI Developer interface of a JetBrains IDE.
The following figure shows the views and operation locations of Visual Studio Code.
When you modify the change files, the current snapshot is updated, and is respectively applied or discarded when you accept or reject the snapshot.
When you click to accept the code changes of a snippet or a file, the changes are merged into the original file.
After all modified files are rejected or accepted, the status of the current snapshot changes to Accepted, Partially Accepted, or Rejected. The following section lists the definitions of each state:
Accepted: If there are code changes accepted in a file, the file enters the Accepted state. If all files are in the Accepted state, the current snapshot enters the Accepted state.
Partially Accepted: If there are code changes accepted in a file, the file enters the Accepted state. If some files are in the Accepted state, the current snapshot enters the Partially Accepted state.
Rejected: If all code changes in a file are rejected, the file enters the Rejected state. If all files are in the Rejected state, the current snapshot enters the Rejected state.
Multi-turns & Snapshots
Refine Requirements in Multiple Turns
After receiving initial code changes from AI Developer, you can continue the conversation within the same chat flow to:
Clarify new requirements
Request additional modifications
AI Developer analyzes both your latest input and prior code changes, then delivers updated suggestions as new file revisions.
Review & Restore Previous Versions
To access historical changes:
Click the snapshot dropdown in the workspace header
Select any version to:
Review modifications (code diffs, timestamps)
Roll back to that state
Changes persist until you close the session or accept the final revisions.
If you want to view or revert changes from previous turns, click the drop-down arrow to view all the snapshots generated in the current session. After you select a snapshot, you can view the related changes or perform switch operations.
Automatically identify the response card that generated the snapshot modified file within the conversation flow.
Automatically update the file list under the snapshot to display the modified files associated with the selected snapshot. Click to view detailed information about the code changes.
Click Switch to revert the current code changes back to the code change state of the selected snapshot.
UnitTest Agent
UnitTest Agent automates the unit test generation for code changes (#codeChanges) across single or multiple files. After you input the tested content and generation requirements, AI Developer automatically generates test plans and test cases, compiles and runs the cases, and performs automatic fixes based on error messages. This leads to wider test coverage, higher test quality, and reduced human effort for creating the test cases.
UnitTest Agent is now available in the Lingma plugin for IntelliJ IDEA. It offers automated functions for compiling, running, and bug fixing. Support for additional IDEs is coming soon. You can use AI Developer to generate corresponding unit test case files in other IDEs.
Select the code snippet to be tested and input the test requirements
After you launch AI Developer, click ➕ in the input box or type #
to select the context. Then, enter the instructions. We recommend including the content related to the generation of unit test requirements. Submit your requirements to trigger automatic unit test generation.
Select and confirm environmental information
After AI Developer receives the test request, it automatically detects information about the local environment, such as Java Version, Build System, Testing Framework, and Mocking Framework. If multiple versions are detected, choose the required one. If AI Developer cannot identify the version, an error message is displayed. Click "How to Fix" to learn how to configure the relevant components.
Confirm the method to be tested
After the environment check is passed, AI Developer automatically analyzes the files to be tested, and generates a test plan. Select the methods that you want to test, and click Confirm to finalize the test scope. AI Developer then generates unit test cases for each selected method.
Select at least 1 and no more than 20 methods for a single test case generation operation.
After you select a method, you can refer to the estimated time required for the overall build process.
View the generation progress
After you confirm the method to be tested, AI Developer automatically generates unit test cases based on your selected method, then compiles, runs, and fixes the generated results. The final result is displayed in the interface. The following table describes the statuses given in the final result.
Status | Description |
Indicates passed test cases | |
Indicates test cases that passed compilation but failed at runtime | |
Indicates test cases that failed to compile |
When the test cases of all methods are generated, AI Developer automatically merges the test cases that passed compilation and execution into a final test case file, and names the file accordingly. For test case code that failed to compile, you can choose whether to keep the code. After all the test case code is confirmed, click Confirm. Then, the test case file is automatically compared with the original one.
Review and accept the code of a test case file
After you confirm, the test case file appears in the Working Space. Click Diff in the Working Space or click a file from the file list to view the differences in the Diff View. You can then review, modify, accept, or reject the code. After you confirm all code changes, click Accept. The modified code in the test case file is integrated into the current code project.
View chat history
All your conversations with AI Developer are tagged with @AI Developer
. Click the tag to view the relevant chat history.