Large language model-based code development method and related device

By using a large language model to assist code development, automatically generating code change snippets and combining them with manual review, the problem of low efficiency for developers in complex coding tasks is solved, and code quality and development efficiency are improved.

WO2026130394A1PCT designated stage Publication Date: 2026-06-25CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
Filing Date
2025-12-17
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

In the software development process, developers face complex coding tasks that take a long time, and the code quality is easily affected by personal factors, resulting in low development efficiency and uncontrolled quality.

Method used

By employing a code development method based on a large language model, a code development agent invokes the large language model to automatically determine code files and generate code change fragments based on the developer's input requirements and context information. This is combined with a manual review mechanism to ensure code quality.

Benefits of technology

It improves the efficiency and quality of code development and is applicable to software engineering of all sizes, especially in the development of large-scale, complex systems, where it has significant application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025143080_25062026_PF_FP_ABST
    Figure CN2025143080_25062026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a large language model-based code development method and a related device. Specifically, the capability of invoking a large language model by a code development agent is used to help a user complete a more complex development task in a coding scenario. During conversational interaction between a developer and the large language model, the large language model automatically determines, on the basis of development requirement information and context information provided by the developer, one or more pre-change code files involved in a current round of conversation, automatically generates a code change fragment for each pre-change code file, and, on the basis of the code change fragment corresponding to each pre-change code file, performs code changes on the pre-change code file, so as to obtain a changed code file. For the changed code file generated by the large language model, a manual review mechanism can further be introduced, thereby comprehensively ensuring the quality and reliability of the code. Thus, a more intelligent and collaborative code development solution is provided for developers, and development efficiency and code quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Code development methods and related equipment based on large language models Technical Field

[0001] This disclosure relates to the field of software development technology, and in particular to a code development method and related equipment based on a large language model. Background Technology

[0002] In the software development process, developers frequently encounter scenarios where they need to code based on new requirements. For example, users may request the addition of a new functional module, which requires creating a new software project from scratch; or, modifying, optimizing, or extending an existing codebase. In either case, this is a frequent and complex development task that requires developers to have a wide range of skills and experience. Developers need to spend a lot of time to complete the development task, resulting in low development efficiency, and the code quality is easily affected by the developer's personal factors, making the code quality uncontrollable. Summary of the Invention

[0003] This disclosure provides a code development method and related equipment based on a large language model to improve code development efficiency and code quality.

[0004] This disclosure provides a code development method based on a large language model, comprising: receiving development requirement information and context description information input by a user in the current round of dialogue in a dialogue interaction interface, and retrieving the context information required for the current round of dialogue in the current software project according to the context description information; calling the large language model through a code development agent to determine at least one pre-modification code file based on the development requirement information and context information, generating code modification fragments corresponding to each pre-modification code file, and applying the code modification fragments of each pre-modification code file to modify the code of the pre-modification code file to obtain the corresponding post-modification code file; responding to a change acceptance operation or change rejection operation triggered by the user in the code change content viewing interface for the post-modification code file, accepting or rejecting the code modification fragments in the post-modification code file, and updating the change status information of the post-modification code file, the change status information including: changed, accepted, or rejected.

[0005] This disclosure also provides an electronic device, including: a memory and a processor; the memory for storing a computer program; and the processor coupled to the memory for executing the computer program to perform steps in a code development method based on a large language model.

[0006] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables the processor to implement steps in a code development method based on a large language model.

[0007] This disclosure also provides a computer program product, including a computer program / instructions that, when executed by a processor, enable the processor to implement steps in a code development method based on a large language model.

[0008] The technical solution provided in this disclosure helps users complete more complex development tasks in coding scenarios by leveraging the capabilities of a large language model through a code development agent. During the dialogue and interaction between the developer and the large language model, the model automatically determines one or more pre-modification code files involved in the current dialogue based on the development requirements and context information provided by the developer. It also automatically generates code modification fragments for each pre-modification code file and modifies the pre-modification code files based on these code modification fragments, resulting in modified code files. Furthermore, a manual review mechanism can be introduced for the modified code files generated by the large language model to comprehensively ensure code quality and reliability. Therefore, this provides developers with a more intelligent and collaborative code development solution, improving development efficiency and code quality. It is applicable to software engineering of various scales, and has significant application value, especially in the development of large-scale, complex systems. Attached Figure Description

[0009] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:

[0010] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this disclosure;

[0011] Figure 2 is a flowchart of a code development method based on a large language model provided in an embodiment of this disclosure;

[0012] Figure 3 is a schematic diagram of an interface provided in an embodiment of this disclosure;

[0013] Figure 4 is a schematic diagram of another interface provided in an embodiment of this disclosure;

[0014] Figure 5 is a schematic diagram of another interface provided in an embodiment of this disclosure;

[0015] Figure 6 is a schematic diagram of another interface provided in an embodiment of this disclosure;

[0016] Figure 7 is a flowchart of another code development method based on a large language model provided in an embodiment of this disclosure;

[0017] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0019] In the embodiments of this disclosure, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the access relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone, where A and B can be singular or plural. In the textual description of this disclosure, the character " / " generally indicates that the preceding and following associated objects have an "or" relationship. Furthermore, in the embodiments of this disclosure, "first," "second," "third," etc., are only used to distinguish the content of different objects and have no other special meaning.

[0020] The following is an explanation of some of the terms used in this disclosure:

[0021] AI Agent: A software or hardware entity that has the ability to autonomously perceive its environment, make decisions, and execute actions, with the aim of completing specific tasks or achieving goals in the simulated or real world.

[0022] Large Language Models (LLMs): LLMs are typically based on deep learning architectures, especially the Transformer architecture. They learn the complex structures and rich contextual information of language through pre-training on massive amounts of text data. LLMs can handle various natural language tasks, such as text classification, question answering, and dialogue, and are an important pathway to artificial intelligence. The Transformer module is a neural network structure based on a self-attention mechanism, which significantly improves model performance through parallel processing and self-attention.

[0023] A software project typically refers to a collection of related code files, library files, and resource files that together constitute a part of a complete software application or system. A software project usually includes: a source code directory, a library file directory, a resource file directory, and a test code directory. The source code directory stores all source code files. The library file directory stores third-party libraries that the project depends on. The resource file directory stores non-code resources such as configuration files and images. The test code directory stores test code files.

[0024] In the software development process, developers frequently encounter scenarios where they need to code based on new requirements. For example, users may request the addition of a new functional module, which requires creating a new software project from scratch; or, modifying, optimizing, or extending an existing codebase. In either case, this is a frequent and complex development task that requires developers to have a wide range of skills and experience. Developers need to spend a lot of time to complete the development task, resulting in low development efficiency, and the code quality is easily affected by the developer's personal factors, making the code quality uncontrollable.

[0025] Therefore, this disclosure provides a code development method and related equipment based on a large language model. In the technical solution provided by this disclosure, the code development agent invokes the capabilities of the large language model to help users complete more complex development tasks in coding scenarios. During the dialogue and interaction between the developer and the large language model, the large language model automatically determines one or more pre-modification code files involved in the current dialogue based on the development requirements and context information provided by the developer, and automatically generates code modification fragments for each pre-modification code file. Based on the code modification fragments of each pre-modification code file, the model modifies the pre-modification code files to obtain the modified code files. For the modified code files generated by the large language model, a manual review mechanism can also be introduced to comprehensively ensure the quality and reliability of the code. Thus, a more intelligent and collaborative code development solution is provided for developers, improving development efficiency and code quality. It is applicable to software engineering of various scales, and has significant application value, especially in the development of large-scale, complex systems.

[0026] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this disclosure. Referring to Figure 1, developers open a code editor on various terminal devices such as desktop computers, laptops, or tablets, and perform code development work in the code editor with the support of input devices such as keyboards and mice. During code development, developers often use intelligent programming assistance tools installed on the terminal device to assist in the development work. In intelligent coding scenarios, intelligent programming assistance tools based on large language models can provide capabilities such as line-level / function-level real-time continuation coding, natural language code generation, unit test generation, code optimization, comment generation, code explanation, and exception handling, helping developers code efficiently and fluently.

[0027] In practical applications, intelligent programming aids can deploy code development agents, which can be understood as agents with code development capabilities. These agents can invoke large language models to perform tasks such as code generation, code modification, and code optimization. Of course, they can also perform many more tasks.

[0028] In practical applications, the ability of code-developed intelligent agents to call large language models helps users complete more complex development tasks in coding scenarios, providing developers with a more intelligent and collaborative code development solution, improving development efficiency and code quality. It is applicable to software engineering of all sizes, and has significant application value, especially in the development of large-scale and complex systems.

[0029] It should be noted that the application scenario shown in Figure 1 is merely an exemplary application scenario, and the embodiments of this disclosure do not limit the application scenario. The embodiments of this disclosure do not limit the devices included in Figure 1, nor do they limit the positional relationship between the devices in Figure 1.

[0030] The technical solutions of this disclosure and how they solve the aforementioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The technical solutions provided by each embodiment of this disclosure are described in detail below with reference to the accompanying drawings.

[0031] Figure 2 is a flowchart of a code development method based on a large language model provided in an embodiment of this disclosure. Referring to Figure 2, the code development method based on a large language model may include the following steps:

[0032] 201. Receive the development requirements and context description information input by the user in this round of dialogue in the dialogue interaction interface, and retrieve the context information required for this round of dialogue in the current software project based on the context description information.

[0033] In practical applications, a dialog-based interactive interface can be provided to users, allowing them to interact with the large language model. During this dialogue, users can input development requirements and contextual descriptions. Development requirements reflect the needs of this interaction, such as instructing the creation of new code files or modifications to existing ones. In practice, creating new code files may also involve modifying existing ones. Optionally, development requirements may include, but are not limited to, the file identifier of the new code file or the file identifier of the existing code file to be modified. Contextual descriptions describe the context, including, but not limited to, the filename, file link, and file path.

[0034] Referring to Figure 3, the AI ​​(Artificial Intelligence) dialogue interface can display an information input area, but it is not limited to this. The information input area is primarily used to receive user input; it typically appears as an input box where users can enter plain text, images, links, and other information. The information input area can include a prompt input area and a context introduction area. The prompt input area can be understood as an input box specifically for entering prompts. Users can enter various input content in natural language form (also called natural language text), images, links, etc., without restriction. For example, the development requirement information entered in the prompt input area could be: "Using the datatable.png file, write a program, put it in an HTML file, and convert JSON data into a table."

[0035] The context introduction area can be understood as an input box specifically for entering contextual description information. Users can enter the contextual description information needed for dialogue interaction with the large language model in the context introduction area. The context introduction area allows users to select one or more files at a time as contextual description information for dialogue interaction, reducing the number of user operations and improving the user experience. In practical applications, there are no restrictions on how the file selection operation is triggered in the context introduction area. For example, users can click, double-click, or long-press the context introduction area to trigger the file selection operation; or, as shown in Figure 3, an add control can be displayed in the context introduction area to guide the user to add the control and initiate the file selection operation.

[0036] In practical applications, upon receiving a file selection operation triggered in the context introduction area, available files can be retrieved based on pre-specified folder paths, storage paths, etc., and file identifiers of the available files can be displayed for the user to select. However, this is not limited to these methods. In practical applications, the types of available files may include, but are not limited to, code files, image files, or code change content from the current software engineering project. In practical applications, upon receiving a file selection operation triggered in the context introduction area, a context selection panel can pop up in the AI ​​dialogue interaction interface, displaying multiple available file identifiers for the user to choose from. The form of the context selection panel may include, but is not limited to, an interface, a window, or a card, etc. In some optional embodiments, the context selection panel may also include an input box. After the user enters a file identifier in the input box, the retrieved file identifier is displayed in the context introduction area, thereby enriching the file selection methods.

[0037] Referring to Figure 3, the context selection panel displays multiple optional file types and file identifiers. The user selects context description information from the pop-up context selection panel; the filenames of the selected datatable.png file and contextChatForDevAgent.js file are used as the context description information. When the send button in the prompt input area is clicked, the system receives the development requirements information entered in the prompt input area and the context description information entered in the context import area.

[0038] In this embodiment, after receiving the context description information required for the current round of dialogue, the required context information can be retrieved from the current software project based on the context description information. In practical applications, the current software project can be any existing software project or a newly created software project; there are no restrictions on this.

[0039] 202. By calling the large language model through the code development agent, at least one original code file is determined based on the development requirements information and context information. A code change fragment is generated for each original code file. The code change fragment of each original code file is then applied to modify the code of the original code file to obtain the corresponding modified code file.

[0040] In practical applications, a code development agent can input the development requirements and contextual information needed for the current dialogue into a large language model. The large language model then performs reasoning to determine at least one original code file and generates a corresponding code modification fragment for each original code file. The original code file (i.e., the file to be modified) can be a newly created code file or an existing code file in the current software project.

[0041] Furthermore, in order to accurately understand user needs and improve code quality, large language models can be fine-tuned using specific datasets in the code development domain to improve their adaptability and generalization ability in the code development domain, thereby enabling them to exhibit greater professionalism and practicality in programming and software development.

[0042] Specifically, first, a suitable base language model is selected. This base language model is one that has been pre-trained on large-scale text data and possesses good general language understanding capabilities. Second, various code development-related files, such as code snippets, comment files, and code files, are collected from open-source projects and added to a specific dataset to ensure that the dataset covers multiple programming languages ​​and different application scenarios. Third, multiple fine-tuning tasks are designed, including but not limited to: code completion, error detection and repair, code translation, code modification, and natural language to code generation. The code completion task trains the large language model to predict missing lines of code or variable names based on a given code context. The error detection and repair task trains the large language model to detect errors in the code and propose correction suggestions. The code translation task trains the large language model to convert code from one programming language to another, requiring the model to understand the syntactic differences between different languages. The code modification task trains the large language model to perform code modifications. The natural language to code generation task trains the large language model to generate corresponding code based on natural language descriptions. Finally, the basic large language model is fine-tuned using a specific dataset and multiple fine-tuning tasks to obtain a large language model better suited for code development scenarios. The fine-tuning training method is not specified. Optionally, Parameter-Efficient Fine-Tuning (PEFT) can be used. PEFT is a method used to efficiently adapt a pre-trained language model to various downstream tasks by training a small number of parameters without fine-tuning all model parameters. The PEFT method only fine-tunes a small number of model parameters, significantly reducing computational and storage costs.

[0043] Optionally, to accurately understand user needs and improve code quality, the large language model combines development requirement information and contextual information to understand user intent and plan an execution plan based on that intent. The execution plan indicates the file identifier and code change suggestions for at least one pre-modification code file requiring code modification. Following the execution plan, at least one pre-modification code file is retrieved from the current software project based on its file identifier. Code change fragments are generated for each pre-modification code file based on its corresponding code change suggestions. Here, code change suggestions refer to recommendations for improvement, optimization, or adjustment of the pre-modification code file.

[0044] In this embodiment, the large language model can combine user intent and code change suggestions for each pre-modification code file to generate code change fragments corresponding to the pre-modification code file; apply the code change fragments of each pre-modification code file to modify the code of that pre-modification code file to obtain the corresponding post-modification code file. For example, code change fragments include, but are not limited to: code added to the pre-modification code file, code that modifies existing code in the pre-modification code file, and code deleted from the pre-modification code file.

[0045] In some optional embodiments, the execution plan or code development progress information can also be displayed on the user interface (UI) to allow users to intuitively understand the code development progress and improve the development experience. In practical applications, the user interface can be an interface area in the dialog interaction interface, or another interface independent of the dialog interaction interface. The user interface can be overlaid on the dialog interaction interface, but is not limited to this. Referring to Figure 4, the execution plan displayed on the user interface is "1. Create an HTML file index.html, wrap JavaScript code to display this JSON data, and create a table to display the statistics of each item; 2. Modify the contextChatForDevAgent.js file to add table data retrieval logic." The progress information of the displayed index.html file is "Generating," that is, the code for the index.html file is being generated. The progress information of the displayed contextChatForDevAgent.js file is "1 / 2, Applied” The icon indicates "Applied," meaning the code changes to the original code file have been implemented using the code change snippet. "1 / 2" indicates that one of the two code change snippets generated by the contextChatForDevAgent.js file has been applied to the original code file, meaning one code change snippet has been used to modify the original code file. In essence, the combination of icons and text to represent the change status of code files provides a clear and intuitive understanding of the changes for users.

[0046] In this embodiment, after generating the code change suggestions corresponding to each code file before the change, the large language model can also apply the code change suggestions of each code file before the change to make code changes to that code file before the change, and obtain the corresponding modified code file.

[0047] In practical applications, by using a code development agent to invoke a large language model, engineering-level multi-file code change generation can be achieved. This means generating complex code change suggestions across multiple code files within a software project (i.e., a software engineering project). Developers only need to provide accurate development requirements and contextual descriptions; the large language model can then autonomously complete the entire process of requirements understanding, planning, code generation, and change generation. Developers do not need to start coding from scratch; instead, they can complete a full coding task based on the code generation results from the large language model, achieving end-to-end completion of a complete coding task.

[0048] 203. In response to the user's acceptance or rejection of the change operation for the modified code file triggered in the code change content viewing interface, accept or reject the code change fragment in the modified code file, and update the change status information of the modified code file, including: changed, accepted or rejected.

[0049] In practical applications, a manual review mechanism can be introduced for the modified code files generated by the large language model to comprehensively ensure code quality and reliability. In practice, each modified code file generated by the large language model can be displayed in a code change view interface. Users can view the modified code files and decide whether to adopt the code changes. The code change view interface can be any type of user interface; it can be a section within a dialog interface or a separate interface. It can be overlaid on top of the dialog interface, but is not limited to this. If the user decides to adopt the code changes, they can trigger an "accept" action in the code change view interface to accept the changes. If the user decides not to adopt the changes, they can trigger a "reject" action in the code change view interface to reject the changes.

[0050] Optionally, before triggering the accept or reject action for the changed code file in the code change viewing interface, users can also modify the code content in the changed code file, especially modifying code snippets. Understandably, in this case, users can accept the modified code snippets or reject the modified code in the changed code file. Introducing a manual modification mechanism to meet diverse user review needs can improve code quality.

[0051] In this embodiment, the change status information of the modified code file is updated according to the change acceptance or change rejection operation for the modified code file. The change status information includes: changed, accepted, or rejected. Specifically, the large language model applies the code change fragments of each original code file to modify the original code file, resulting in the corresponding modified code file. At this time, the change status information of the modified code file is changed (also known as applied). If the user accepts the code change fragments in the modified code file, the change status information of the modified code file is updated to accepted (referred to as Accept); if the user rejects the code change fragments in the modified code file, the change status information of the modified code file is updated to rejected (referred to as Accept).

[0052] Optionally, to allow users to intuitively view the status of the modified code files and improve user experience, different change status information can be presented using different icon styles. Specifically, the icon style for a modified code file that accepts all code change fragments differs from the icon style for a modified code file that accepts only some code change fragments. Alternatively, if the change status information is "changed," the change status information indicates the line number of the corresponding code change fragment and / or the source information of the corresponding modified code file, indicating whether the modified code file is a newly created or existing code file. If the change status information is "change accepted," the icon corresponding to "change accepted" is displayed; if the change status information is "change rejected," the icon corresponding to "change rejected" is displayed.

[0053] Specifically, for accepted changes, this can be further divided into "accepted all changes" or "accepted some changes." "Accepted all changes" means accepting all code changes made to the modified code file. "Accepted some changes" means accepting only a portion of the modified code file, essentially rejecting another portion of the modified code file. For rejected changes, this means rejecting all code changes made to the modified code file in this round of dialogue, i.e., rejecting all code changes made to the modified code file in this round of dialogue.

[0054] For example, "All changes have been accepted" uses... The icon indicates that "Partial changes have been accepted". The icon indicates that "Applied (or changed)" has been adopted. The icon indicates that the change has been rejected. The icon indicates "Generifying". The icon indicates that the newly created code file is being generated.

[0055] Assume the modified code files involved in this round of dialogue are: index.html, contextChatForDevAgent.js, chatContext.py, chatContext1.go, chatContext2.go, chatContext3.go, and chatContext.java. Referring to Figure 5, users can view the change status information of these code files in the code change viewing interface. For example, index.html is in a modified state; the right side of the index.html file identifier displays "+100A". The "A" in "+100A" indicates that index.html is a newly created code file, and the "+100" in "+100A" indicates that 100 lines of code have been added in this round of dialogue. For example, if contextChatForDevAgent.js is in a modified state, the right side of the file identifier for contextChatForDevAgent.js will display "+8 -2M". The "M" in "+8 -2M" indicates that contextChatForDevAgent.js is an existing code file. The "+8" in "+8 -2M" means that 8 lines of code have been added in this round of dialogue, and the "-2" means that 2 lines of code have been removed in this round of dialogue. For another example, if chatContext.py is in a partially accepted state, that is, in a partially modified state, the right side of chatContext.py will display... Icons. For example, if chatContext1.go is in a state where all changes have been accepted, the right side of chatContext1.go will display... Icons. For example, if chatContext2.go is in a "change rejected" state, the right side of chatContext1.go will display... Icons. For example, if chatContext3.go is in a build process, the right side of chatContext3.go will display... icon.

[0056] Optionally, for a modified code file in the "changed" state, the user can accept or reject all code changes in the modified code file at once on the code change content viewing interface. Alternatively, for a modified code file in the "accepted" state, the user can change the status from "accepted" to "rejected" on the code change content viewing interface. Referring to Figure 5, when chatContext.java is in the "changed" state, after the user selects the file identifier of chatContext.java in the code change content viewing interface, an "Accept" and "Reject" control will be displayed to the right of the chatContext.java file identifier. When the user triggers the "Accept" control on the right side of chatContext.java, the code changes in chatContext.java are accepted, and chatContext.java changes to the "accepted" state. When the user triggers the "Reject" control on the right side of chatContext.java, the code changes in chatContext.java are rejected, and chatContext.java changes to the "rejected" state.

[0057] Further optionally, it can support manual review of code change segments and files by users. That is, users can review individual code change segments and decide whether to accept them, and users can accept the changed code files from the perspective of the whole file, thereby meeting the diverse needs of users and fully ensuring the quality and reliability of the code.

[0058] Based on this, the implementation method for accepting or rejecting code changes in a modified code file triggered by a user in the code change content viewing interface, and for updating the change status information of the modified code file, is as follows: The modified code file list generated in this round of dialogue is displayed on the code change content viewing interface. The modified code file list includes the file identifier and change status information of at least one modified code file. In response to the selection of the file identifier of any modified code file in the modified code file list, the content viewing area of ​​the selected modified code file is displayed on the code change content viewing interface. In response to a change acceptance or rejection operation triggered in the content viewing area for a code change fragment, the modified code fragment in the modified code file is accepted or rejected. In response to a change acceptance or rejection operation triggered in the code change content viewing interface for the selected modified code file, the change status information of the selected modified code file is updated.

[0059] In practical applications, the code change viewing interface can display the file identifiers and change status information of one or more modified code files from the current dialogue interaction in a list format for user viewing. Users can select a modified code file as needed, and the content viewing area of ​​the selected modified code file will be displayed for the user to view the specific code content. The content viewing area of ​​the modified code file can display all the code of the modified code file, which can include: unchanged code and one or more modified code snippets. Unchanged code can be understood as the same code between the modified and original code files, that is, the code in the original code file that has not been modified.

[0060] In practical applications, users can accept or reject any code change snippet displayed in the content viewing area. If the user accepts the code change snippet in the modified code file, the code change snippet takes effect. If the code change snippet includes newly added code, modified code, or code to be deleted, the newly added or modified code will be retained in the modified code file, while the code to be deleted will be removed. If the user rejects the code change snippet in the modified code file, the code change snippet is invalid. If the code change snippet includes newly added code, modified code, or code to be deleted, the newly added code will be deleted from the modified code file, the code to be deleted will be retained, and the corresponding original code from the modified code will be retained in the modified code file.

[0061] It is understandable that if a user accepts the code change fragment in the modified code file, that is, accepts the modified code file obtained by modifying the original code file based on the code change fragment; if a user rejects the code change fragment in the modified code file, that is, rejects the modified code file obtained by modifying the original code file based on the code change fragment.

[0062] In practical applications, there are no restrictions on how users trigger accept or reject change operations for individual code change fragments. Further optionally, to facilitate manual review at the code change fragment level and improve code quality and reliability, the content viewing area includes: at least one highlighted code change fragment in the selected modified code file; accept and reject controls for each code change fragment; the sort order of each code change fragment within the at least one code change fragment; and the total number of code change fragments. Correspondingly, in response to a change accept or reject operation triggered in the content viewing area, the implementation of accepting or rejecting code change fragments in the modified code file includes: accepting the corresponding code change fragment in the modified code file in response to triggering the accept control for any code change fragment; or rejecting the corresponding code change fragment in the modified code file in response to triggering the reject control for any code change fragment.

[0063] Optionally, to facilitate manual review at the file level and improve code quality and reliability, the content viewing area also includes: accept and reject controls for the selected modified code file; correspondingly, in response to the accept or reject operation triggered in the code change content viewing interface for the selected modified code file, the change status information of the selected modified code file is updated as follows: in response to the triggering operation of the accept or reject control for the selected modified code file in the content viewing area, the code change fragment in the selected modified code file is confirmed to be accepted or rejected, and the change status information of the selected modified code file is updated.

[0064] Further optionally, to facilitate manual review by users across file levels and improve code quality and reliability, the content viewing area also includes a file switching control; the above method also includes: in response to triggering the file switching control, using the previous or next modified code file of the selected modified code file as the new selected modified code file, and displaying the content viewing area of ​​the new selected modified code file in the code change content viewing interface.

[0065] For example, referring to Figure 5, when a user selects the contextChatForDevAgent.js file in the AI ​​code change content viewing interface, a content viewing area for that file pops up. This contextChatForDevAgent.js file contains two code change snippets, which are highlighted in the content viewing area using different colors. The red text in the two snippets indicates newly added lines of code, while the green text indicates lines to be deleted. Around the first and second code change snippets, their respective code snippet-level operation areas are displayed, including: the snippet's sort number, the total number of snippets, and a rejection control for each snippet. The accept control for code change snippets is indicated by √. For example, in the snippet-level action area, 1 / 2 indicates that the first code change snippet has a sort number of 1, and the contextChatForDevAgent.js file contains 2 code change snippets. Similarly, in the snippet-level action area, 2 / 2 indicates that the first code change snippet has a sort number of 2, and the contextChatForDevAgent.js file contains 2 code change snippets. When the user clicks the reject control for a code change snippet... Then, the code changes made to the original code file based on the code change snippet are accepted. At this point, the code file after the change has undergone code changes relative to the original code file. When the user clicks the accept control √ for the code change snippet, the code changes made to the original code file based on the code change snippet are rejected, and the code file after the change has not undergone code changes relative to the original code file.

[0066] Referring to Figure 5, the content viewing area of ​​the contextChatForDevAgent.js file can also display a file-level operation area. This area includes a Reject control for modified code files, an Accept control for modified code files, a toggle control ← to switch to the previous code file, and a toggle control → to switch to the next code file. When the user clicks the Reject control in the file-level operation area, all code changes in the contextChatForDevAgent.js file are rejected. When the user clicks the Accept control in the file-level operation area, all or part of the code changes in the contextChatForDevAgent.js file are accepted. In other words, if the user accepts one of two code changes in the code snippet-level operation area, clicking the Accept control in the file-level operation area indicates acceptance of a partial code change in the contextChatForDevAgent.js file; if the user accepts two code changes in the code snippet-level operation area, clicking the Accept control in the file-level operation area indicates acceptance of all code changes in the contextChatForDevAgent.js file. When a user triggers a rejection or acceptance of a change operation in the file-level operation area, the change status information of the contextChatForDevAgent.js file is updated and displayed.

[0067] In practical applications, users can click the left-click (←) switch to go to the previous code file or the right-click (→) switch to go to the next code file to switch to the modified code file selected in the code change view interface. Multiple modified code files are arranged sequentially in the code change view interface. The left-click switch selects the previous code file, index.html, which is the previous code file of contextChatForDevAgent.js; the right-click switch selects the next code file, chatContext.py. After the user selects a modified code file, the content viewing area of ​​the selected modified code file is displayed for manual review, meeting the user's need for reviewing multiple files.

[0068] Understandably, highlighting code change snippets, their sort order, and the total number of code change snippets in the content viewing area helps users quickly locate them and solves the problem that "when viewing code changes within a code file, if the code file is long and there are many code change snippets, it is difficult to locate and find them, and users also have difficulty knowing how many code change snippets there are, resulting in a poor review experience."

[0069] In practical applications, users can accept or reject individual code change snippets, entire changed code files, or lists of changed code files generated from a single round of dialogue. When a user chooses to accept the list of changed code files generated from a single round of dialogue, this list is saved in the current software project; when a user chooses to reject the list, it is not saved. Optionally, to facilitate user operation and improve user experience, accept and reject controls for the current round of dialogue are displayed on the code change content viewing interface. The accept control for the current round of dialogue triggers acceptance of the changed code file list generated in that round; the reject control triggers rejection of the changed code file list generated in that round of dialogue.

[0070] Optionally, a comparison analysis control can be displayed on the code change viewing interface. This control triggers the display of a comparison analysis of the code files before and after the changes in this round of discussions. Understandably, by performing a differential analysis on the code files before and after the changes in this round of discussions, comparison analysis results can be obtained, allowing users to understand the overall code changes in this round of discussions.

[0071] For example, the navigation area of ​​the code change viewing interface shown in Figure 5 includes, from left to right: a list display control, a snapshot entry control, an applied control, a comparison analysis control, a reject control, and an accept control. The "Working Space" indicator in the list display control indicates that the control can trigger the display of a list of changed code files. When the user triggers the "∨" control in the list display control, the list of changed code files is displayed for viewing; triggering the "∨" control again exits the display of the changed code file list. When the snapshot entry control in the navigation area of ​​the code change viewing interface in Figure 5 displays the text "Latest," "Latest" indicates the status information of the current dialogue. The list of changed code files displayed when the user triggers the "∨" control in the list display control represents the list of changed code files generated in this dialogue session. The "Applied" control indicates that the list of changed code files generated in this round of dialogue is in an "Applied" state (i.e., "Changed" state). Clicking the "Reject" control in the navigation area changes the list to a "Rejected" state, meaning the changed code files cannot be added to the current project. Clicking the "Accept" control changes the list to an "Accepted" state, adding the changed code files to the current project. Clicking the "Diff" control in the navigation area displays the comparison results of the current dialogue.

[0072] In practical applications, when users collaborate with a large language model to complete development tasks, they may need to communicate and make code changes multiple times through multi-round dialogues to gradually complete the entire code change process. To facilitate users in reviewing or reverting to historical versions of code files, a snapshot management function is also supported to manage code changes made during the dialogue process. Based on this, in some optional embodiments, the method further includes: in response to the end of the current dialogue round, obtaining the version snapshot information corresponding to the current dialogue round and adding it to the version snapshot information list. The version snapshot information corresponding to the current dialogue round includes at least the change status information of at least one modified code file generated during the current dialogue round, and the version snapshot information list has already added version snapshot information from at least one previous dialogue round. A previous dialogue round refers to a dialogue prior to the current dialogue round.

[0073] In practical applications, the end of a conversation can be flexibly determined. For example, after the large language model responds to the development requirements submitted by the user in this conversation, it can wait a specified time before confirming the end of the conversation. Alternatively, the conversation can end once the next conversation begins.

[0074] Specifically, after this round of dialogue concludes, a snapshot of all relevant information generated during this round can be processed to obtain version snapshot information corresponding to this round of dialogue. This version snapshot information includes, but is not limited to: change status information of at least one modified code file generated during this round of dialogue; information of at least one unmodified code file corresponding to this round of dialogue; the status and content of the code change fragments in each modified code file generated during this round of dialogue; and the code change time, etc.

[0075] In some optional embodiments, to facilitate users in reviewing or reverting to historical versions of code files, a snapshot entry control can be displayed in the code change viewing interface. Users can interact with the snapshot entry control to view a list of version snapshot information, or select version snapshot information from a previous dialogue session in the list to perform a version rollback. Based on this, the method further includes: in response to triggering the snapshot entry control in the code change viewing interface, displaying a list of version snapshot information so that users can perform a version rollback of the modified code files in the current software project based on the version snapshot information from previous dialogue sessions in the list.

[0076] For example, when a user triggers the "∨" control in the snapshot entry control in the navigation area shown in Figure 5, a card is displayed. This card can also display the current conversation status information (Latest) and a list of version snapshot information. The current conversation status information (Latest) is displayed on the left. This indicates that the current conversation is in progress and no version snapshot information has been generated yet. The version snapshot information list includes multiple version snapshots such as Snapshot1, Snapshot2, and Snapshot3. Snapshot3 is displayed on the left. This indicates that the historical dialogue for Snapshot3 underwent some code changes, meaning it incorporated some of the modified code files from the previous dialogue's changes; the left side of Snapshot2 shows... This indicates that code changes for the historical dialogue rounds corresponding to Snapshot2 have been rejected, meaning all modified code files from the historical dialogue rounds will not be accepted; the left side of Snapshot1 displays... This indicates that the code file for all changes made to the historical dialogue rounds corresponding to Snapshot2 has neither been accepted nor rejected, and is in an applied state.

[0077] In practical applications, users can choose to view the version snapshot information of any historical round of dialogue in the version snapshot information list, and view the change status information of the modified code files generated by the historical round of dialogue based on the version snapshot information of the selected historical round of dialogue. Users can also revert the version of the modified code files in the current software project based on the version snapshot information of the selected historical round of dialogue, that is, revert the version of the modified code files in the current software project to the historical version.

[0078] The technical solution provided in this disclosure helps users complete more complex development tasks in coding scenarios by leveraging the capabilities of a large language model through a code development intelligence agent. During the dialogue and interaction between the developer and the large language model, the model automatically determines one or more pre-modification code files involved in the current dialogue based on the development requirements and context information provided by the developer, and automatically generates code modification fragments for each pre-modification code file. Based on the corresponding code modification fragments, the model modifies the pre-modification code files to obtain the modified code files. Furthermore, a manual review mechanism can be introduced for the modified code files generated by the large language model to comprehensively ensure code quality and reliability. Therefore, this provides developers with a more intelligent and collaborative code development solution, improving development efficiency and code quality. It is applicable to software engineering of various scales, and has significant application value, especially in the development of large-scale, complex systems.

[0079] To better understand the technical solution of this disclosure, a specific scenario embodiment is described below with reference to Figure 7. By leveraging an intelligent agent based on a large language model, developers can complete complex coding tasks, such as adding new requirements and fixing online defects. It can generate code changes for multiple code files within a project at once and automatically merge the changed code, facilitating code change review for users. Simultaneously, it can generate multiple version code change snapshots for multiple iterations of user requests and provide a user-friendly management and viewing interface, enabling developers to efficiently and smoothly complete development tasks with the help of AI capabilities, improving development efficiency and code quality.

[0080] Referring to Figure 7, the software development process using an agent based on a large language model can be divided into the following four stages:

[0081] Phase 1:

[0082] Obtaining User Requirements: Users can enter their requirements descriptions in the information input area provided on the interface shown in Figure 3. The requirements descriptions include, but are not limited to, text-based development requirements, contextual descriptions, and relevant specifications. Users can also select image files, code files, enterprise specification documents, code commit records, etc., as contextual information.

[0083] Retrieve relevant code files: Search for the necessary code files from the software project. You can also retrieve other relevant context information requested by the user, and sort the relevant context files. If the context information is an image file, you need to parse the image file to extract the information as context.

[0084] Phase Two:

[0085] Understanding user needs: User needs and context information are transmitted to an intelligent agent based on a large language model after being encrypted. The intelligent agent analyzes and understands the user's intent.

[0086] Generate execution plan: The agent based on the large language model plans the execution plan according to the user's intent and displays the execution plan on an interface such as Figure 4 for the user to view.

[0087] Phase Three:

[0088] Identify files to be modified: The agent based on the large language model retrieves the files to be modified in the current software project and displays the files to be modified and their code development progress information on an interface such as Figure 4.

[0089] Generate code change snippets: An agent based on a large language model generates code change snippets for each file to be modified.

[0090] Phase Four:

[0091] Application code change snippets: The intelligent agent based on the large language model applies the code change snippets of each file to be changed to change the code of each file, and obtain the changed code file.

[0092] Code review and adoption: On an interface such as Figure 5, users can review the modified code files of the agent based on the large language model and decide whether to accept and adopt the modified code files.

[0093] In practical applications, users may request changes multiple times throughout the development process. After each round of dialogue, a snapshot of the relevant information from that round is taken to obtain version snapshot information for that round. Based on this version snapshot information, users can view previous versions or revert to previous versions. For example, users can view version snapshot information on the interface shown in Figure 6.

[0094] The software development solution based on large language models is applicable to software engineering development of various scales, and its specific characteristics are as follows:

[0095] 1. For engineering-level multi-file code change generation, it can understand user intent and break down requirements and tasks by combining user development needs information, project structure, and related code files within the project, and leveraging the capabilities of a large language model, to generate complex code change suggestions across multiple files within the software project.

[0096] 2. For end-to-end completion of a complete coding task, developers only need to input accurate development requirements and contextual descriptions. The intelligent agent, based on a large language model, can autonomously complete the entire process from requirements understanding, execution plan planning, code generation, and change generation. Developers do not need to start coding from scratch; the code generated by the intelligent agent based on the large language model is sufficient to complete the development task.

[0097] 3. Multi-version snapshot management facilitates users' ability to review and revert to previous versions of code files. When users collaborate with the large language model to complete development tasks, they may need to communicate and make code changes multiple times through multiple rounds of dialogue to gradually complete the entire code change process. The system can capture snapshots of the multiple code change files generated during the dialogue process, supporting operations such as reviewing and reverting to previous versions, making searching and reverting more convenient.

[0098] 4. Review of code changes in multiple files: Supports users to review code changes in multiple files within a software project generated by an agent, and provides an interface for users to modify, adopt or reject changes.

[0099] 5. Conversational Collaborative Interaction Mode: Utilizing natural language processing technology, this mode enables conversational interaction with users. Users can describe development tasks using natural language and ask follow-up questions based on the large language model's responses. The large language model will respond according to the user's input, providing real-time feedback and guidance in a manner consistent with the developer's intent. The entire process involves communication with the large language model through natural language dialogue. Users and the intelligent agent based on the large language model collaborate to complete development tasks. Throughout the process, the intelligent agent based on the large language model helps users quickly complete development tasks, greatly improving development efficiency and user experience.

[0100] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 203 can be device A; or, for example, the execution subject of steps 201 and 202 can be device A, and the execution subject of step 203 can be device B.

[0101] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 201, 202, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0102] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0103] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. As shown in Figure 8, the electronic device includes: a memory 81 and a processor 82;

[0104] Memory 81 is used to store computer programs and can be configured to store various other data to support operation on the computing platform. Examples of this data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.

[0105] The memory 81 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0106] The processor 82, coupled to the memory 81, is used to execute the computer program in the memory 81 for: receiving development requirement information and context description information input by the user in the current round of dialogue in the dialogue interface, and retrieving the context information required for the current round of dialogue in the current software project based on the context description information; calling the large language model through the code development agent to determine at least one pre-modification code file based on the development requirement information and context information, and generating code modification fragments corresponding to each pre-modification code file, and applying the code modification fragments of each pre-modification code file to modify the code of the pre-modification code file to obtain the corresponding post-modification code file; and accepting or rejecting the code modification fragments in the post-modification code file in response to the user's change acceptance or rejection operation triggered in the code change content viewing interface, and updating the change status information of the post-modification code file, including: changed, accepted, or rejected.

[0107] Optionally, when the processor 82 calls the large language model through the code development agent to determine at least one pre-modification code file based on development requirement information and context information, and generates code change fragments corresponding to each pre-modification code file, it is specifically used for: determining user intent through the code development agent calling the large language model based on development requirement information and context information; planning an execution plan according to the user intent, the execution plan indicating the file identifier and code change suggestion of at least one pre-modification code file that needs code change; retrieving at least one pre-modification code file in the current software project according to the file identifier of at least one pre-modification code file according to the execution plan; and generating code change fragments corresponding to each pre-modification code file according to the code change suggestion corresponding to each pre-modification code file.

[0108] Optionally, when the processor 82 responds to a user's acceptance or rejection operation for a modified code file triggered in the code change content viewing interface, accepts or rejects a code change fragment in the modified code file, and updates the change status information of the modified code file, it is specifically used to: display a list of modified code files generated in this round of dialogue on the code change content viewing interface, the list of modified code files including at least one file identifier and change status information of a modified code file; in response to the selection of the file identifier of any modified code file in the list of modified code files, display a content viewing area of ​​the selected modified code file in the code change content viewing interface; and in response to a change acceptance or rejection operation for a code change fragment triggered in the content viewing area, accept or reject the code change fragment in the modified code file; and in response to a change acceptance or rejection operation for the selected modified code file triggered in the code change content viewing interface, update the change status information of the selected modified code file.

[0109] Optionally, the content viewing area includes: at least one code change segment highlighted in the selected modified code file, accept and reject controls for each code change segment, and the sort number of each code change segment in the at least one code change segment;

[0110] Accordingly, when the processor 82 accepts or rejects a code change fragment in the later code file in response to a change acceptance or rejection operation triggered on the content viewing area, it is specifically used to: accept the corresponding code change fragment in the later code file in response to a trigger operation of the accept control for any code change fragment; or reject the corresponding code change fragment in the later code file in response to a trigger operation of the reject control for any code change fragment.

[0111] Optionally, the content viewing area may also include: accept and reject controls for the selected modified code file;

[0112] Accordingly, when the processor 82 updates the change status information of the selected modified code file in response to a change acceptance or rejection operation triggered in the code change content viewing interface, it is specifically used to: confirm the acceptance or rejection of the code change fragment in the selected modified code file in response to the triggering operation of the accept or reject control in the content viewing area for the selected modified code file, and update the change status information of the selected modified code file.

[0113] Optionally, the content viewing area also includes: a file switching control, and the processor 82 is also used for:

[0114] In response to the triggering of the file switching control, the previous or next modified code file of the selected modified code file is used as the new selected modified code file, and the content viewing area of ​​the new selected modified code file is displayed in the code change content viewing interface.

[0115] Optionally, different change status information can be presented using different icon styles. Specifically, the icon style for the modified code file that accepts all code changes differs from the icon style for the modified code file that accepts only some code changes; or...

[0116] If the change status information is "changed", the change status information indicates the line number of the corresponding code segment that was changed and / or the source information of the corresponding changed code file. The source information indicates whether the corresponding changed code file is a newly created code file or an existing code file. If the change status information is "change accepted", the icon corresponding to the accepted change is displayed. If the change status information is "change rejected", the icon corresponding to the rejected change is displayed.

[0117] Optionally, the processor 82 is further configured to: in response to the end of the current dialogue, obtain the version snapshot information corresponding to the current dialogue and add the version snapshot information corresponding to the current dialogue to the version snapshot information list, wherein the version snapshot information corresponding to the current dialogue includes at least the change status information of at least one modified code file generated by the current dialogue, and the version snapshot information list has already added version snapshot information of at least one historical dialogue; in response to triggering the snapshot entry control in the code change content viewing interface, display the version snapshot information list so that the user can perform version rollback of the modified code file in the current software project according to the version snapshot information of the historical dialogue in the version snapshot information list.

[0118] Optionally, the code change viewing interface can display a comparison analysis control, an accept control, and a reject control for the version snapshot information corresponding to the current dialogue. The comparison analysis control is used to trigger the display of the comparison analysis results of the code files before and after the changes in the current dialogue. The accept control for the current dialogue is used to trigger the acceptance of the list of changed code files generated in the current dialogue. The reject control for the current dialogue is used to trigger the rejection of the list of changed code files generated in the current dialogue.

[0119] Furthermore, as shown in Figure 8, the electronic device also includes other components such as a communication component 83, a display 84, a power supply component 85, and an audio component 86. Figure 8 only schematically shows some components and does not imply that the electronic device only includes the components shown in Figure 8. Additionally, the components within the dashed boxes in Figure 8 are optional, not mandatory, and their specific inclusion depends on the product form of the electronic device. The electronic device of this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT (Internet of Things) device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device of this embodiment is a terminal device such as a desktop computer, laptop computer, or smartphone, it may include the components within the dashed boxes in Figure 8; if the electronic device of this embodiment is a server-side device such as a conventional server, cloud server, or server array, it may not include the components within the dashed boxes in Figure 8.

[0120] For a detailed description of the implementation process of each action by the processor, please refer to the relevant descriptions in the foregoing method embodiments or device embodiments, which will not be repeated here.

[0121] Accordingly, this disclosure also provides a computer-readable storage medium storing a computer program, which, when executed, can perform the steps that can be executed by an electronic device in the above method embodiments.

[0122] Accordingly, this disclosure also provides a computer program product, including a computer program / instructions, which, when executed by a processor, enable the processor to perform the steps that can be executed by an electronic device in the above method embodiments.

[0123] The aforementioned communication components are configured to facilitate wired or wireless communication between the device containing the communication components and other devices. The device containing the communication components can access wireless networks based on communication standards, such as WiFi (Wireless Fidelity), 2G (2nd Generation), 3G (3rd Generation), 4G (4th Generation) / LTE (long Term Evolution), 5G (5th Generation), or combinations thereof. In one exemplary embodiment, the communication components receive broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication components also include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth, and other technologies. The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen can be implemented as a touchscreen to receive input signals from a user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. The aforementioned power supply component provides power to various components of the device in which the power supply component resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component resides. The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device in which the audio component resides is in an operating mode, such as a call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0124] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0125] In a typical configuration, a computing device includes one or more processors (Central Processing Units, CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent storage in computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media. Computer-readable media includes both permanent and non-persistent, removable and non-removable media; information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transient media, such as modulated data signals and carrier waves.

[0126] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. The above are merely embodiments of this disclosure and are not intended to limit this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.

Claims

1. A code development method based on a large language model, comprising: The system receives development requirements and context description information input by the user in this round of dialogue in the dialogue interface, and retrieves the context information required for this round of dialogue in the current software project based on the context description information. The code development agent calls the large language model to determine at least one original code file based on the development requirements information and the context information, generates a code change fragment corresponding to each original code file, and applies the code change fragment of each original code file to change the code of the original code file to obtain the corresponding modified code file. In response to the user's acceptance or rejection of a change operation for the modified code file triggered in the code change content viewing interface, the code change fragment in the modified code file is accepted or rejected, and the change status information of the modified code file is updated. The change status information includes: changed, accepted, or rejected.

2. The method of claim 1, wherein, The code development agent invokes a large language model to determine at least one original code file based on the development requirements and context information, and generates code change fragments corresponding to each original code file, including: The code development agent invokes a large language model to determine the user intent based on the development requirements information and the context information; an execution plan is planned according to the user intent, the execution plan indicating the file identifier and code change suggestion of at least one pre-modification code file that needs to be modified; at least one pre-modification code file is retrieved in the current software project according to the file identifier of at least one pre-modification code file according to the execution plan; and a code change fragment corresponding to each pre-modification code file is generated according to the code change suggestion corresponding to each pre-modification code file.

3. The method of claim 1, wherein, In response to the user's action of accepting or rejecting a change to the modified code file triggered in the code change viewing interface, the system accepts or rejects the code change fragment in the modified code file and updates the change status information of the modified code file, including: The code change content viewing interface displays a list of modified code files generated in this round of dialogue. The list of modified code files includes the file identifier and change status information of at least one modified code file. In response to the selection of the file identifier of any modified code file in the list of modified code files, the content viewing area of ​​the selected modified code file is displayed in the code change content viewing interface; and in response to the change acceptance or change rejection operation triggered on the content viewing area for the code change fragment, the code change fragment in the modified code file is accepted or rejected. In response to a change acceptance or rejection operation triggered during the viewing of the code change content for the selected modified code file, update the change status information of the selected modified code file.

4. The method of claim 3, wherein, The content viewing area includes: at least one code change segment highlighted in the selected modified code file, accept and reject controls for each code change segment, and the sorting number of each code change segment in at least one code change segment; Accordingly, in response to a change acceptance or change rejection operation triggered on the content viewing area, accepting or rejecting the code change fragment in the later code file includes: In response to a trigger operation on the accept control for any code change fragment, accept the corresponding code change fragment in the later code file; or, In response to the triggering of the rejection control for any code change fragment, the corresponding code change fragment in the later code file is rejected.

5. The method of claim 3, wherein, The content viewing area also includes: accept and reject controls corresponding to the selected modified code file; Accordingly, in response to a change acceptance or rejection operation triggered in the code change content viewing interface for the selected modified code file, updating the change status information of the selected modified code file includes: In response to the triggering operation of the accept or reject control for the selected modified code file in the content viewing area, the system confirms acceptance or rejection of the code modification fragment in the selected modified code file and updates the modification status information of the selected modified code file.

6. The method of claim 5, wherein, The content viewing area also includes: a file switching control; the above method also includes: In response to triggering the file switching control, the previous or next modified code file of the selected modified code file is used as the new selected modified code file, and the content viewing area of ​​the new selected modified code file is displayed in the code change content viewing interface.

7. The method of claim 1, wherein, Different change status messages are represented by different icon styles. Specifically, the icon style for a modified code file that accepts all code changes differs from the icon style for a modified code file that accepts only some code changes; or... If the change status information is changed, the change status information indicates the line number of the corresponding code segment and / or the source information of the corresponding changed code file, and the source information indicates whether the corresponding changed code file is a newly created code file or an existing code file; If the change status information is "Change accepted", the icon corresponding to the accepted change will be displayed; if the change status information is "Change rejected", the icon corresponding to the rejected change will be displayed.

8. The method of claim 1, wherein, Also includes: In response to the end of the current dialogue, obtain the version snapshot information corresponding to the current dialogue and add the version snapshot information corresponding to the current dialogue to the version snapshot information list. The version snapshot information corresponding to the current dialogue includes at least the change status information of at least one modified code file generated by the current dialogue. The version snapshot information list has at least one version snapshot information of a historical dialogue. In response to the operation of triggering the snapshot entry control in the dialogue interaction interface, the version snapshot information list is displayed so that the user can revert the changed code files in the current software project according to the version snapshot information of the historical dialogue in the version snapshot information list.

9. The method according to any one of claims 1 to 8, wherein, The code change viewing interface displays a comparison analysis control, an accept control, and a reject control for the current round of dialogue. The comparison analysis control is used to trigger the display of the comparison analysis results of the code files before and after the changes in the current round of dialogue. The accept control for the current round of dialogue is used to trigger the acceptance of the list of changed code files generated in this round of dialogue. The reject control for the current round of dialogue is used to trigger the rejection of the list of changed code files generated in this round of dialogue.

10. The method according to any one of claims 1 to 8, wherein, The method for obtaining the large language model is as follows: By using a specific dataset related to code development and multiple fine-tuning tasks, a basic large language model is trained using parameter-based efficient fine-tuning to obtain a large language model suitable for code development scenarios; the multiple fine-tuning tasks include at least two of the following: code completion task, error detection and repair task, code translation task, code modification task, and natural language to code generation task.

11. The method of claim 1, wherein, The development requirement information includes: the file identifier of the code file to be created or the file identifier of the existing code file to be modified, and the context description information includes: the file name, file link, file path, etc. of the context information.

12. The method of claim 1, wherein, The code change fragment includes at least one of the following: code added to the code file before the change, code that modifies existing code in the code file before the change, and code deleted from the code file before the change.

13. The method of claim 1, wherein, The status change information is represented using a combination of images and text.

14. The method of claim 1, wherein, The change status information also includes: all changes have been accepted or some changes have been accepted.

15. The method of claim 2, wherein, The code change suggestion is used to express the proposed improvement, optimization or adjustment information for the code file before the change.

16. The method of claim 8, wherein, Also includes: After the large language model responds based on the development requirements submitted in this round of dialogue, it waits for a specified period of time before determining the end of this round of dialogue.

17. The method of claim 8, wherein, Also includes: The current round of dialogue ends once the next round of dialogue begins.

18. The method according to claim 10, wherein, The code completion task is used to train the large language model to predict missing lines of code or variable names based on a given code context; the error detection and repair task is used to train the large language model to detect errors in the code and propose correction suggestions. The code translation task is used to train the large language model to perform programming language conversion; the code modification task is used to train the large language model to perform code modification. The natural language to code generation task is used to train the large language model to generate corresponding code based on natural language descriptions.

19. An electronic device comprising: Memory and processor; The memory is used to store computer programs; The processor is coupled to the memory for executing the computer program to perform the steps of the method according to any one of claims 1-18.

20. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1-18.