WO2024253847A1 - Code editor assisting the developer with context-based chatbot - Google Patents

Code editor assisting the developer with context-based chatbot Download PDF

Info

Publication number
WO2024253847A1
WO2024253847A1 PCT/US2024/030673 US2024030673W WO2024253847A1 WO 2024253847 A1 WO2024253847 A1 WO 2024253847A1 US 2024030673 W US2024030673 W US 2024030673W WO 2024253847 A1 WO2024253847 A1 WO 2024253847A1
Authority
WO
WIPO (PCT)
Prior art keywords
persona
source code
location
context
presenting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/US2024/030673
Other languages
French (fr)
Inventor
Peter Groenewegen
Rohan Jagdish Malpani
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft Technology Licensing LLC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Microsoft Technology Licensing LLC filed Critical Microsoft Technology Licensing LLC
Priority to EP24734609.1A priority Critical patent/EP4724892A1/en
Publication of WO2024253847A1 publication Critical patent/WO2024253847A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/453Help systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • Modem integrated development environments include programmer assistance features that aim to improve the developer experience by providing intelligent code suggestions, auto-completion, and error detection.
  • INTELLISENSE from MICROSOFT CORPORATION is a code completion and suggestion feature found in IDEs like VISUAL STUDIO.
  • INTELLISENSE provides context-aware suggestions based on the programming language being used in a project, the libraries or frameworks integrated into the project, and the variables and functions already defined in the project.
  • INTELLICODE also from MICROSOFT CORPORATION, is an artificial intelligence-powered extension to INTELLISENSE that leverages machine learning models to suggest the most likely code completions based on patterns and practices observed in other software projects.
  • the techniques described herein relate to methods, systems, and computer program products, including providing a first context for a source code document being presented at a code editor user interface (UI) to an artificial intelligence (Al) persona; obtaining, from the Al persona, a first prediction including a first suggested edit at a first location within the source code document; presenting a first chat indicator at the code editor UI at the first location within the source code document; presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving a user response to the first suggested edit; providing an updated first context for the source code document to the Al persona, the updated first context including the first context and the user response; obtaining, from the Al persona, a second prediction including a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response; presenting a second chat indicator at the code editor UI at the second location within the source code document; and presenting the second suggested edit at the code
  • the techniques described herein relate to methods, systems, and computer program products, including providing a first context for a source code document being presented at a code editor UI to an Al persona; obtaining, from the Al persona, a first prediction including a first suggested edit at a first location within the source code document; presenting a first chat indicator at the code editor UI at the first location within the source code document, including presenting an indication of the first Al persona; presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving a user response to the first suggested edit; providing an updated first context for the source code document to the Al persona, the updated first context including the first context and the user response; obtaining, from the Al persona, a second prediction including a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response; and presenting a second chat indicator at the code editor UI at the second location within the source code document, including presenting the indication
  • the techniques described herein relate to methods, systems, and computer program products, including providing a first context for a source code document being presented at a code editor UI to an Al persona; obtaining, from the Al persona, a first prediction including a first suggested edit at a first location within the source code document; presenting a first chat indicator at the code editor UI at the first location within the source code document, the first location being different from a second location within the source code document of a user cursor when presenting the first chat indicator; presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving a user response to the first suggested edit; providing an updated first context for the source code document to the Al persona, the updated first context including the first context and the user response; obtaining, from the Al persona, a second prediction including a second suggested edit at a third location within the source code document, wherein the second suggested edit is based on the user response; presenting a second chat indicator at the code editor
  • Figure 1 illustrates an example of a computer architecture that facilitates inline conversations with an artificial intelligence (Al) within a code editor user interface (UI).
  • Al artificial intelligence
  • UI code editor user interface
  • Figure 2 illustrates an example of an Al pair programming component.
  • Figures 3A-3G illustrates an example of a code editor UIs showing inline conversations with an Al.
  • Figure 4 illustrates a flow chart of an example of a method for presenting inline conversations with an Al within a code editor UI.
  • tools such as INTELLISENSE and INTELLICODE can improve programmer efficiency and accuracy, they are limited to providing suggestions at a current focal point within a source code document. For example, these tools provide inline suggestions at the current location of the user’s cursor within a source code document. To illustrate, while the user is ty ping a method declaration these tools may provide suggested arguments for the method. While these suggestions are timely and contextually relevant, they can be distracting and break a user’s focus.
  • the embodiments herein are directed to providing inline conversations with an artificial intelligence (Al) within a code editor user interface (UI). These embodiments enable the Al to initiate inline conversations with the user at various points in a source code document. In embodiments, these points can be different from the user’s current focal point (e.g., apart from the user’s current cursor location). For example, when the Al has a suggestion for a particular source code location that is different from the user’s current cursor location, embodiments present a chat indicator at that particular source code location. This chat indicator signals that the Al has a suggestion for the user that is relevant to the particular source code location. Using this chat indicator, the user can interact with the Al at this location at the user’s convenience. Thus, rather than presenting the user with information relevant to the user’s current cursor location, which may be distracting, the embodiments herein enable an Al to initiate inline conversations about other locations within a source code document in an unobtrusive way.
  • Al artificial intelligence
  • UI code editor user interface
  • a user’s interaction with the Al helps build context that informs the Al’s future suggestions.
  • the Al learns the user’s preferences and behaviors over time.
  • there are multiple Al personas each focused on a different area of user assistance (e.g., an Al persona for code commenting, an Al persona for code refactoring, an Al persona for code syntax, an Al persona for code style, and so on).
  • each Al persona is associated with its own context.
  • each Al persona focuses on, and learns, a user’s preferences and behaviors for a different area of user assistance.
  • each Al persona is associated with a distinct chat indicator that is visually distinguished from other chat indicators.
  • the chat indicator for each Al persona is a cursor, with each Al persona providing recommendations at each location at which its corresponding cursor is displayed.
  • each Al persona appears to the user to be much like a remote pair programmer who is co-editing and reviewing the source code document as the user edits the source code document.
  • chat indicator e.g., cursor
  • the user has inline conversations with that "Al pair programmer” at relevant points in the source code document.
  • any type of machine learning (ML) or Al may include any type of ML algorithm or device, convolutional neural network(s), multilayer neural network(s), recursive neural network(s), deep neural network(s), decision tree model(s) (e g., decision trees, random forests, and gradient boosted trees) linear regression model(s), logistic regression model(s), support vector machine(s) (“SVM”), Al device(s), or any other type of intelligent computing system. Any amount of training data may be used (and perhaps later refined) to train the ML algorithm to dynamically perform the disclosed operations.
  • FIG. 1 illustrates an example of a computer architecture 100 that facilitates inline conversations with an Al within a code editor UI.
  • computer architecture 100 includes a computer system 101 comprising a processor system 102 (e.g., a single processor or a plurality of processors), a memory 103 (e.g., system or main memory), a storage medium 104 (e.g., a single computer-readable storage medium, or a plurality of computer-readable storage media), all interconnected by a bus 106.
  • a processor system 102 e.g., a single processor or a plurality of processors
  • memory 103 e.g., system or main memory
  • storage medium 104 e.g., a single computer-readable storage medium, or a plurality of computer-readable storage media
  • computer system 101 may also include anetwork interface 105 (e.g., one or more network interface cards) for interconnecting (via a network 107) to a computer system 108 (e.g., a single computer system or a plurality of computer systems).
  • anetwork interface 105 e.g., one or more network interface cards
  • computer system 108 e.g., a single computer system or a plurality of computer systems.
  • storage medium 104 is illustrated as storing computer-executable instructions implementing at least a code editor 109 that includes an inline Al component 110.
  • code editor 109 presents a code editor UI in which a user of computer system 101 can view and edit one or more source code documents, illustrated in Figure 1 as source code 113.
  • code editor 109 interacts with source code stored at computer system 101 (e.g., source code 113a within storage medium 104). at some other computer system (e.g.. computer system 108, which is illustrated as containing source code 113b), or both.
  • inline Al component 110 uses the predictions of one or more AI/ML models (Al model 112) to provide suggestions regarding that source code document.
  • inline Al component 110 interacts with an Al interface 111 to obtain these predictions.
  • inline Al component 110 interacts with an Al at computer system 101 (e.g., Al interface I l la and Al model 112a), interacts with an Al at some other computer system (e.g., computer system 108, which is illustrated as containing Al interface 111b and Al model 112b). or both.
  • inline Al component 110 uses the predictions of one or more Al personas, such as a code commenting Al persona, a code refactoring Al persona, a code syntax Al persona, a code style Al persona, and so on.
  • each Al persona corresponds to a different AI/ML model.
  • a single AI/ML can provide distinct Al personas, such as by being supplied with a different starting prompt for each persona.
  • Figure 2 illustrates an example 200 of inline Al component 110 of Figure 1.
  • Each component of inline Al component 110 depicted in Figure 2 represents various functionalities that inline Al component 110 may implement under the embodiments described herein. These components — including their identity and arrangement — are presented merely as an aid in describing example embodiments of inline Al component 1 10.
  • inline Al component 110 includes a context management component 201 that manages one or more contexts (e.g., context 114 within memory 103) that are used, at least in part, as input to an AI/ML model (e.g., as a prompt).
  • context 114 includes an Al persona configuration, at least a portion of the current content of a source code document being edited within code editor 109, at least a portion of prior content of the source code document being edited within code editor 109, at least a portion of current or prior content of one or more related source code documents (e.g.. documents that are part of the same project within source code 113), information about a user’s prior interactions with an Al (e.g., prior conversations with the Al), and the like.
  • context management component 201 that manages one or more contexts (e.g., context 114 within memory 103) that are used, at least in part, as input to an AI/ML model (e.g., as a prompt).
  • context 114 includes an Al persona configuration, at least
  • context management component 201 manages a different context for each Al persona and updates each context as a user interacts with its corresponding Al persona (e.g., to integrate a user’s responses to suggestions by the Al persona into that context).
  • context management component 201 manages a single context for a plurality of Al personas and updates that context as a user interacts with those Al personas (e.g., to integrate a user’s responses to suggestions by those Al personas into that context).
  • context management component 201 also updates each context as the source code document and/or related source code documents are modified.
  • inline Al component 110 also includes an Al model component 202.
  • Al model component 202 interacts with Al interface 111 to provide Al interface 111 with inputs to an AI/ML model (e g., Al model 112) corresponding to a given Al persona.
  • Al model component 202 also interacts with Al interface 111 to receive predictions from that AI/ML model.
  • Al model component 202 sends context 114 to Al interface 111 and receives a prediction from an Al persona corresponding to context 114.
  • a prediction includes a particular location within a source code document (e.g., a particular character, a particular line) and a suggested edit (e.g.. suggested text to add. suggested text to revise) at that particular location.
  • inline Al component 110 also includes an Al chat component 203.
  • Al chat component 203 presents UI elements that enable a user to interact with an Al persona via a code editor UI presented by code editor 109.
  • Al chat component 203 presents a chat indicator at a location of that suggestion within a source code file.
  • this chat indicator enables user interaction to receive the suggestion and otherwise interact with the Al persona (e.g., via a chat with the Al persona) at this source code location.
  • the chat indicator enables an Al persona to initiate an inline conversation with the user at a location for which the Al persona has identified a suggestion.
  • the chat indicator is a cursor, but a wide variety of indicators are possible (e.g., a light bulb, an arrow, a text highlight, and the like).
  • each Al persona has a visually distinguished chat indicator (e.g., different shapes, different colors, different adornments, and the like).
  • Al chat component 203 removes an Al persona’s chat indicator after user interaction and resolution of the Al persona’s suggestion.
  • Al chat component 203 presents the chat indicator again (e.g., at a different location) when the Al persona has produced a new suggestion.
  • Al chat component 203 retains the chat indicator after the user interaction and resolution of the Al persona’s suggestion. Notably, this enables the user to return to the chat indicator and further interact with the Al persona (e.g., to ask follow-up questions about the suggestion, to provide further instructions about the suggestion, to ask a question about a different source code location).
  • Al chat component 203 visually distinguishes the chat indicator to indicate whether or not a suggestion is available from the Al persona (e.g., using different visual weights, different colors, different associated shapes, and the like).
  • Al chat component 203 removes or retains a chat indicator after the resolution of an Al persona’s suggestion
  • Al chat component 203 provides a capability (e.g., context menu, keystroke, toolbar icon, and the like) for a user to call up an Al persona’s chat indicator at any time to enable the user to interact with the Al personal. For example, a user may call up an Al persona’s chat indicator at a location of interest to the user and use that chat indicator to interact with the Al persona regarding text at that location.
  • Al chat component 203 communicates user interactions to context management component 201, which integrates those user interactions into an appropriate context (e.g., context 114).
  • context management component 201 which integrates those user interactions into an appropriate context (e.g., context 114).
  • Figures 3A-3G illustrate example code editor UIs 300a-300g that demonstrate examples of the operation of inline Al component 110. It is to be appreciated that these examples are nonlimiting and that there are a variety of ways to present an inline Al experience that is consistent with the embodiments described herein.
  • FIG. 3 A shows a code editor UI 300a in which a user has created a source code document 301 that includes a definition of a ‘'Person” class. As indicated by cursor 302, the user is currently working on writing a Main method.
  • code editor UI 300a there are two chat indicators, chat indicator 303 and chat indicator 304.
  • chat indicator 303 corresponds to a codecommenting Al persona
  • chat indicator 304 corresponds to a code-fixing Al persona.
  • Chat indicator 303 and chat indicator 304 are each shown as visually distinguished cursors (e.g., chat indicator 303 is adorned with a half-circle to indicate it corresponds to the code-commenting Al persona, while chat indicator 303 is adorned with a triangle to indicate it corresponds to the codefixing Al persona).
  • code editor UI 300b shows that a user has interacted with each of chat indicator 303 and chat indicator 304.
  • a chat window 306 associated with chat indicator 303 shows that the code-commenting Al persona has initiated a conversation to suggest adding a comment to the Person class, while a chat window 305 associated with chat indicator 304 shows that the code-fixing Al persona has initiated a conversation to suggest a correction to the variable ⁇ ‘Lastname.”
  • code editor UI 300c shows that the user has accepted each suggestion from the corresponding Al persona, resulting in the code-commenting Al persona adding a comment to the Person class and in the code-fixing Al persona fixing the variable “Lastname” to “LastName” (as the variable is used elsewhere). Additionally, code editor UI 300c shows that the user has further interacted with chat indicator 303 to request that the code-commenting Al persona add today’s date to its comments. In Figure 3C, code editor UI 300d reflects the addition of a date by the code-commenting Al persona to the previously added comment on the Person class.
  • code editor UI 300e shows that the user has completed authoring the Main method, with cursor 302 being positioned at the end of the method declaration. Now, chat indicator 303 is presented at the beginning of the Main method.
  • code editor UI 300f shows that the code-commenting Al persona has suggested the addition of a comment to the method.
  • code editor UI 300g illustrates the addition of this comment by the code-commenting Al persona. Notably, here, the code-commenting Al persona has automatically added today’s date to the comment based on the prior feedback/instruction from the user.
  • Figure 4 illustrates a flow chart of an example method 400 for presenting inline conversations wi th an Al within a code editor UI.
  • instructions for implementing method 400 are encoded as computer-executable instructions (e.g., inline Al component 110) stored on a computer storage media (e.g., storage medium 104) that are executable by a processor (e.g., processor system 102) to cause a computer system (e.g., computer system 101) to perform method 400.
  • a processor e.g., processor system 102
  • method 400 comprises an act of providing source code context to an Al (act 401).
  • inline Al component 110 uses context management component 201 to maintain context 114 for a source code document within source code 113 that is being presented within a code editor UI presented by code editor 109.
  • inline Al component 110 uses Al model component 202 to provide context 114 to Al model 112 (e.g., as part of a prompt for Al model 112).
  • Method 400 also comprises an act of obtaining a suggested edit at a source code location (act 402). For example, based on providing provide context 114 to Al model 112, Al model component 202 receives a prediction from Al model 112. In embodiments, this prediction comprises a location within the source code document, as well as a suggested edit for that location. [0038] Method 400 also comprises an act of presenting an Al chat indicator (act 403). For example, Al chat component 203 presents a chat indicator, such as a cursor, at the location indicated by Al model 112. This chat indicator indicates that the Al has a suggested edit at this location.
  • an Al chat indicator such as a cursor
  • Method 400 also comprises an act of providing the suggested edit based on user interaction with the Al chat indicator (act 404). For example, based on user interaction with the chat indicator, Al chat component 203 presents the suggested edit to the user (e.g., within an Al-specific chat window).
  • Method 400 also comprises an act of receiving a user response to the suggested edit (act 405).
  • a user may accept the suggested edit, reject the suggested edit, provide additional instructions, etc.
  • Method 400 also comprises an act of integrating the user response into the source code context (act 406).
  • the context management component 201 integrates the user response into context 114 for use with further predictions from Al model 112.
  • an arrow connecting acts 406 and 401 indicates that method 400 can repeat using this updated context.
  • act 401 comprises providing a first context for a source code document being presented at a code editor UI to an Al persona.
  • Al model component 202 provides context 114 relevant to source code document 301 to Al model 112.
  • this first context comprises a configuration of the Al persona (e.g., as a code-commenting Al persona), the content of source code document 301, prior content of source code document 301, the content of a related source code document, or prior user interaction with the Al persona, and the like.
  • act 402 comprises obtaining, from the Al persona, a first prediction comprising a first suggested edit at a first location within the source code document.
  • Al model component 202 receives, from a code-commenting Al persona, a prediction of a suggested comment to be added prior to the class definition of the Person class within source code document 301.
  • act 403 comprises presenting a first chat indicator at the code editor UI at the first location within the source code document.
  • code editor UI 300a shows that Al chat component 203 has presented chat indicator 303 at line 02, just prior to the class definition of the Person class.
  • act 404 comprises presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator.
  • code editor UI 300b shows that, based on user interaction with chat indicator 303, Al chat component 203 has presented chat window 306 for the code-commenting Al persona, which provides the suggestion to add a comment.
  • act 405 comprises receiving a user response to the first suggested edit. For example, code editor UI 300c shows that the user has accepted the suggestion to add the code-commenting Al persona’s suggested comment. Additionally, code editor UI 300c shows that the user has provided further instruction to add today’s date to the comments.
  • act 406 comprises integrating the user response into the first context to create an updated first context.
  • the context management component 201 integrates the user’s suggestion to add today’s date to comments into context 114.
  • a second instance of act 401 comprises providing the updated first context for the source code document to the Al persona, the updated first context comprising the first context, and the user response.
  • context management component 201 provides context 114 to Al model 112, with context 114 having been updated in act 406 with the user's suggestion to add today’s date to the comments.
  • a second instance of act 402 comprises obtaining, from the Al persona, a second prediction comprising a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response.
  • Al model component 202 receives, from a code-commenting Al persona, a prediction of a suggested comment to be added prior to the Main method definition within source code document 301.
  • a second instance of act 403 comprises presenting a second chat indicator at the code editor UI at the second location within the source code document.
  • code editor UI 300e shows that Al chat component 203 has presented chat indicator 303 at line 30, just prior to the Main method definition.
  • a second instance of act 404 comprises presenting the second suggested edit at the code editor UI based on a second user interaction with the second chat indicator.
  • code editor UI 300f shows that, based on user interaction with chat indicator 303, Al chat component 203 has presented chat window 306 for the code-commenting Al persona, which provides the suggestion to add a comment. As shown in code editor UI 300f. this suggestion has integrated the user’s instruction to include today's date.
  • a chat indicator is a cursor.
  • the first chat indicator e.g., chat indicator 303 as shown in code editor UI 300a
  • the second chat indicator e.g., chat indicator 303 as shown in code editor UI 300e
  • the chat indicators are presented at locations that are different from the user’s cursor.
  • the first location e.g., the location of chat indicator 303 within source code document 301 in code editor UI 300a
  • a third location e.g., the location of cursor 302 within source code document 301 in code editor UI 300a
  • the second location (e.g., the location of chat indicator 303 within source code document 301 in code editor UI 300e) is different from a fourth location (e.g., the location of cursor 302 within source code document 301 in code editor UI 300e) within the source code document of the user cursor when presenting the second chat indicator.
  • a fourth location e.g., the location of cursor 302 within source code document 301 in code editor UI 300e
  • the Al persona is a first Al persona (e.g., a code-commenting persona). Additionally, embodiments include providing a second context for the source code document to a second Al persona (e.g., a code-fixing persona), obtaining, from the second Al persona, a third prediction comprising a third suggested edit at a third location within the source code document (e.g., a suggestion to fix “Lastname” to “LastName”), and presenting a third chat indicator at the code editor UI at the third location within the source code document (e.g., chat indicator 304 within code editor UI 300a).
  • a third prediction comprising a third suggested edit at a third location within the source code document
  • a suggestion to fix “Lastname” to “LastName” e.g., a suggestion to fix “Lastname” to “LastName”
  • presenting the first chat indicator comprises presenting a first indication of the first Al persona
  • presenting the second chat indicator comprises presenting a second indication of the second Al persona
  • the first indication of the first Al persona is visually distinct from the second indication of the second Al persona.
  • chat indicator 303 is a cursor adorned with a half-circle
  • chat indicator 304 is a cursor adorned with a triangle.
  • each Al persona is a different AI/ML model.
  • the first Al persona is a first Al model
  • the second Al persona is a second Al model.
  • a single AI/ML model can be configured as different personals (e.g., based on different initial prompts).
  • the first Al persona is a first configuration of an Al model
  • the second Al persona is a second configuration of the Al model.
  • some embodiments keep different contexts for each persona.
  • the first context is different from the second context.
  • Embodiments of the disclosure comprise or utilize a special-purpose or general-purpose computer system (e.g., computer system 101) that includes computer hardware, such as, for example, a processor system (e.g., processor system 102) and system memory (e.g., memoiy 103), as discussed in greater detail below.
  • Embodiments within the scope of the present disclosure also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures.
  • Such computer-readable media can be any available media accessible by a general-purpose or special-purpose computer system.
  • Computer-readable media that store computer-executable instructions and/or data structures are computer storage media (e.g., storage medium 104).
  • Computer-readable media that carry 7 computer-executable instructions and/or data structures are transmission media.
  • embodiments of the disclosure can comprise at least two distinctly different kinds of computer-readable media: computer storage media and transmission media.
  • Computer storage media are physical storage media that store computer-executable instructions and/or data structures.
  • Physical storage media include computer hardware, such as random access memory (RAM), read-only memory (ROM), electrically erasable programmable ROM (EEPROM), solid state drives (SSDs), flash memoiy, phase-change memory (PCM), optical disk storage, magnetic disk storage or other magnetic storage devices, or any other hardware storage device(s) which store program code in the form of computer-executable instructions or data structures, which can be accessed and executed by a general-purpose or special-purpose computer system to implement the disclosed functionality.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable ROM
  • SSDs solid state drives
  • PCM phase-change memory
  • optical disk storage magnetic disk storage or other magnetic storage devices, or any other hardware storage device(s) which store program code in the form of computer-executable instructions or data structures, which can be accessed and executed by a general-purpose or special-purpose computer system to implement the
  • Transmission media include a network and/or data links that cany program code in the form of computer-executable instructions or data structures that are accessible by a general- purpose or special-purpose computer system.
  • a ‘"network” is defined as a data link that enables the transport of electronic data between computer systems and other electronic devices.
  • program code in the form of computer-executable instructions or data structures can be transferred automatically from transmission media to computer storage media (or vice versa).
  • program code in the form of computer-executable instructions or data structures received over a network or data link can be buffered in RAM within a network interface module (e.g., network interface 105) and eventually transferred to computer system RAM and/or less volatile computer storage media at a computer system.
  • network interface module e.g., network interface 105
  • computer storage media can be included in computer system components that also utilize transmission media.
  • Computer-executable instructions comprise, for example, instructions and data which when executed at a processor system, cause a general-purpose computer system, a special -purpose computer system, or a special-purpose processing device to perform a function or group of functions.
  • computer-executable instructions comprise binaries, intermediate format instructions (e.g., assembly language), or source code.
  • a processor system comprises one or more central processing units (CPUs), one or more graphics processing units (GPUs), one or more neural processing units (NPUs), and the like.
  • the disclosed systems and methods are practiced in network computing environments with many types of computer system configurations, including personal computers, desktop computers, laptop computers, message processors, hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, tablets, pagers, routers, switches, and the like.
  • the disclosed systems and methods are practiced in distributed system environments where different computer systems, which are linked through a network (e.g., by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links), both perform tasks.
  • a computer system may include a plurality 7 of constituent computer systems.
  • Program modules may be located in local and remote memory storage devices in a distributed system environment.
  • the disclosed systems and methods are practiced in a cloud computing environment.
  • cloud computing environments are distributed, although this is not required. When distributed, cloud computing environments may be distributed internationally within an organization and/or have components possessed across multiple organizations.
  • ‘cloud computing’ 7 is a model for enabling on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and sendees).
  • a cloud computing model can be composed of various characteristics, such as on-demand self-service, broad network access, resource pooling, rapid elasticity, measured sendee, and so forth.
  • a cloud computing model may also come in the form of various service models such as Software as a Service (SaaS), Platform as a Sendee (PaaS), Infrastructure as a Service (laaS), etc.
  • SaaS Software as a Service
  • PaaS Platform as a Sendee
  • laaS Infrastructure as a Service
  • the cloud computing model may also be deployed using different deployment models such as private cloud, community cloud, public cloud, hybrid cloud, etc.
  • Some embodiments such as a cloud computing environment, comprise a system with one or more hosts capable of running one or more virtual machines (VMs).
  • VMs emulate an operational computing system, supporting an operating system (OS) and perhaps one or more other applications.
  • each host includes a hypervisor that emulates virtual resources for the VMs using physical resources that are abstracted from the view of the VMs.
  • the hypervisor also provides proper isolation between the VMs.
  • the hypervisor provides the illusion that the VM is interfacing with a physical resource, even though the VM only interfaces with the appearance (e.g., a virtual resource) of a physical resource.
  • physical resources include processing capacity, memory’, disk space, network bandwidth, media drives, and so forth.
  • subset excludes the entirety of its superset (i.e., the superset contains at least one item not included in the subset).
  • a “superset” can include at least one additional element, and a “subset” can exclude at least one element.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Stored Programmes (AREA)
  • Document Processing Apparatus (AREA)

Abstract

A computer system provides a context for a source code document to an artificial intelligence (AI) model and obtains a first suggested edit at a first source code location. At a code editor user interface (UI), the computer system presents a first chat indicator at the first source code location. Based on user interaction with the first chat indicator, the computer system presents the first suggested edit and receives a user response. The computer system provides an updated context to the AI model. The updated context comprises the context and the user response. The computer system obtains a second suggested edit at a second source code location. At the code editor UI, the computer system presents a second chat indicator at the second source code location. Based on user interaction with the second chat indicator, the computer system presents the second suggested edit.

Description

CODE EDITOR ASSISTING THE DEVELOPER WITH CONTEXT-BASED CHATBOT
BACKGROUND
[0001] Modem integrated development environments (IDEs) include programmer assistance features that aim to improve the developer experience by providing intelligent code suggestions, auto-completion, and error detection. For example, INTELLISENSE from MICROSOFT CORPORATION is a code completion and suggestion feature found in IDEs like VISUAL STUDIO. INTELLISENSE provides context-aware suggestions based on the programming language being used in a project, the libraries or frameworks integrated into the project, and the variables and functions already defined in the project. INTELLICODE, also from MICROSOFT CORPORATION, is an artificial intelligence-powered extension to INTELLISENSE that leverages machine learning models to suggest the most likely code completions based on patterns and practices observed in other software projects.
[0002] The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described supra. Instead, this background is only provided to illustrate one example technology area where some embodiments described herein may be practiced.
SUMMARY
[0003] In some aspects, the techniques described herein relate to methods, systems, and computer program products, including providing a first context for a source code document being presented at a code editor user interface (UI) to an artificial intelligence (Al) persona; obtaining, from the Al persona, a first prediction including a first suggested edit at a first location within the source code document; presenting a first chat indicator at the code editor UI at the first location within the source code document; presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving a user response to the first suggested edit; providing an updated first context for the source code document to the Al persona, the updated first context including the first context and the user response; obtaining, from the Al persona, a second prediction including a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response; presenting a second chat indicator at the code editor UI at the second location within the source code document; and presenting the second suggested edit at the code editor UI based on a second user interaction with the second chat indicator.
[0004] In some aspects, the techniques described herein relate to methods, systems, and computer program products, including providing a first context for a source code document being presented at a code editor UI to an Al persona; obtaining, from the Al persona, a first prediction including a first suggested edit at a first location within the source code document; presenting a first chat indicator at the code editor UI at the first location within the source code document, including presenting an indication of the first Al persona; presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving a user response to the first suggested edit; providing an updated first context for the source code document to the Al persona, the updated first context including the first context and the user response; obtaining, from the Al persona, a second prediction including a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response; and presenting a second chat indicator at the code editor UI at the second location within the source code document, including presenting the indication of the first Al persona.
[0005] In some aspects, the techniques described herein relate to methods, systems, and computer program products, including providing a first context for a source code document being presented at a code editor UI to an Al persona; obtaining, from the Al persona, a first prediction including a first suggested edit at a first location within the source code document; presenting a first chat indicator at the code editor UI at the first location within the source code document, the first location being different from a second location within the source code document of a user cursor when presenting the first chat indicator; presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving a user response to the first suggested edit; providing an updated first context for the source code document to the Al persona, the updated first context including the first context and the user response; obtaining, from the Al persona, a second prediction including a second suggested edit at a third location within the source code document, wherein the second suggested edit is based on the user response; presenting a second chat indicator at the code editor UI at the third location within the source code document, the third location being different from a fourth location within the source code document of the user cursor when presenting the second chat indicator; and presenting the second suggested edit at the code editor UI based on a second user interaction with the second chat indicator.
[0006] This Summary introduces a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to determine the scope of the claimed subject matter.
BRIEF DESCRIPTION OF THE DRAWINGS
[0007] To describe how- the advantages of the systems and methods described herein can be obtained, a more particular description of the embodiments briefly described supra is rendered by reference to specific embodiments thereof, which are illustrated in the appended drawings. These drawings depict only typical embodiments of the systems and methods described herein and are not, therefore, to be considered to be limiting in their scope. Systems and methods are described and explained with additional specificity7 and detail through the use of the accompanying drawings, in which:
[0008] Figure 1 illustrates an example of a computer architecture that facilitates inline conversations with an artificial intelligence (Al) within a code editor user interface (UI).
[0009] Figure 2 illustrates an example of an Al pair programming component.
[0010] Figures 3A-3G illustrates an example of a code editor UIs showing inline conversations with an Al.
[0011] Figure 4 illustrates a flow chart of an example of a method for presenting inline conversations with an Al within a code editor UI.
DETAILED DESCRIPTION
[0012] While tools such as INTELLISENSE and INTELLICODE can improve programmer efficiency and accuracy, they are limited to providing suggestions at a current focal point within a source code document. For example, these tools provide inline suggestions at the current location of the user’s cursor within a source code document. To illustrate, while the user is ty ping a method declaration these tools may provide suggested arguments for the method. While these suggestions are timely and contextually relevant, they can be distracting and break a user’s focus.
[0013] The embodiments herein are directed to providing inline conversations with an artificial intelligence (Al) within a code editor user interface (UI). These embodiments enable the Al to initiate inline conversations with the user at various points in a source code document. In embodiments, these points can be different from the user’s current focal point (e.g., apart from the user’s current cursor location). For example, when the Al has a suggestion for a particular source code location that is different from the user’s current cursor location, embodiments present a chat indicator at that particular source code location. This chat indicator signals that the Al has a suggestion for the user that is relevant to the particular source code location. Using this chat indicator, the user can interact with the Al at this location at the user’s convenience. Thus, rather than presenting the user with information relevant to the user’s current cursor location, which may be distracting, the embodiments herein enable an Al to initiate inline conversations about other locations within a source code document in an unobtrusive way.
[0014] In embodiments, a user’s interaction with the Al helps build context that informs the Al’s future suggestions. Thus, the Al learns the user’s preferences and behaviors over time. In embodiments, there are multiple Al personas, each focused on a different area of user assistance (e.g., an Al persona for code commenting, an Al persona for code refactoring, an Al persona for code syntax, an Al persona for code style, and so on). In embodiments, each Al persona is associated with its own context. Thus, each Al persona focuses on, and learns, a user’s preferences and behaviors for a different area of user assistance.
[0015] In embodiments, each Al persona is associated with a distinct chat indicator that is visually distinguished from other chat indicators. In some examples, the chat indicator for each Al persona is a cursor, with each Al persona providing recommendations at each location at which its corresponding cursor is displayed. Thus, in embodiments, each Al persona appears to the user to be much like a remote pair programmer who is co-editing and reviewing the source code document as the user edits the source code document. Through each Al persona’s chat indicator (e.g., cursor), the user has inline conversations with that "Al pair programmer” at relevant points in the source code document.
[0016] As used herein, reference to any type of machine learning (ML) or Al may include any type of ML algorithm or device, convolutional neural network(s), multilayer neural network(s), recursive neural network(s), deep neural network(s), decision tree model(s) (e g., decision trees, random forests, and gradient boosted trees) linear regression model(s), logistic regression model(s), support vector machine(s) (“SVM”), Al device(s), or any other type of intelligent computing system. Any amount of training data may be used (and perhaps later refined) to train the ML algorithm to dynamically perform the disclosed operations.
[0017] Figure 1 illustrates an example of a computer architecture 100 that facilitates inline conversations with an Al within a code editor UI. As shown, computer architecture 100 includes a computer system 101 comprising a processor system 102 (e.g., a single processor or a plurality of processors), a memory 103 (e.g., system or main memory), a storage medium 104 (e.g., a single computer-readable storage medium, or a plurality of computer-readable storage media), all interconnected by a bus 106. As shown, computer system 101 may also include anetwork interface 105 (e.g., one or more network interface cards) for interconnecting (via a network 107) to a computer system 108 (e.g., a single computer system or a plurality of computer systems).
[0018] In Figure 1. storage medium 104 is illustrated as storing computer-executable instructions implementing at least a code editor 109 that includes an inline Al component 110. In embodiments, code editor 109 presents a code editor UI in which a user of computer system 101 can view and edit one or more source code documents, illustrated in Figure 1 as source code 113. In embodiments, code editor 109 interacts with source code stored at computer system 101 (e.g., source code 113a within storage medium 104). at some other computer system (e.g.. computer system 108, which is illustrated as containing source code 113b), or both.
[0019] In embodiments, in connection with code editor 109 presenting a source code document of source code 113 at a code editor UI, inline Al component 110 uses the predictions of one or more AI/ML models (Al model 112) to provide suggestions regarding that source code document. In embodiments, inline Al component 110 interacts with an Al interface 111 to obtain these predictions. In embodiments, inline Al component 110 interacts with an Al at computer system 101 (e.g., Al interface I l la and Al model 112a), interacts with an Al at some other computer system (e.g., computer system 108, which is illustrated as containing Al interface 111b and Al model 112b). or both.
[0020] In embodiments, inline Al component 110 uses the predictions of one or more Al personas, such as a code commenting Al persona, a code refactoring Al persona, a code syntax Al persona, a code style Al persona, and so on. In some embodiments, each Al persona corresponds to a different AI/ML model. In some embodiments, a single AI/ML can provide distinct Al personas, such as by being supplied with a different starting prompt for each persona.
[0021] Figure 2 illustrates an example 200 of inline Al component 110 of Figure 1. Each component of inline Al component 110 depicted in Figure 2 represents various functionalities that inline Al component 110 may implement under the embodiments described herein. These components — including their identity and arrangement — are presented merely as an aid in describing example embodiments of inline Al component 1 10.
[0022] In example 200, inline Al component 110 includes a context management component 201 that manages one or more contexts (e.g., context 114 within memory 103) that are used, at least in part, as input to an AI/ML model (e.g., as a prompt). In embodiments, context 114 includes an Al persona configuration, at least a portion of the current content of a source code document being edited within code editor 109, at least a portion of prior content of the source code document being edited within code editor 109, at least a portion of current or prior content of one or more related source code documents (e.g.. documents that are part of the same project within source code 113), information about a user’s prior interactions with an Al (e.g., prior conversations with the Al), and the like.
[0023] In some embodiments, context management component 201 manages a different context for each Al persona and updates each context as a user interacts with its corresponding Al persona (e.g., to integrate a user’s responses to suggestions by the Al persona into that context). In other embodiments, context management component 201 manages a single context for a plurality of Al personas and updates that context as a user interacts with those Al personas (e.g., to integrate a user’s responses to suggestions by those Al personas into that context). Either way, in embodiments, context management component 201 also updates each context as the source code document and/or related source code documents are modified.
[0024] In example 200, inline Al component 110 also includes an Al model component 202. In embodiments, Al model component 202 interacts with Al interface 111 to provide Al interface 111 with inputs to an AI/ML model (e g., Al model 112) corresponding to a given Al persona. In embodiments, Al model component 202 also interacts with Al interface 111 to receive predictions from that AI/ML model. For example, Al model component 202 sends context 114 to Al interface 111 and receives a prediction from an Al persona corresponding to context 114. In embodiments, a prediction includes a particular location within a source code document (e.g., a particular character, a particular line) and a suggested edit (e.g.. suggested text to add. suggested text to revise) at that particular location.
[0025] In example 200, inline Al component 110 also includes an Al chat component 203. In embodiments, Al chat component 203 presents UI elements that enable a user to interact with an Al persona via a code editor UI presented by code editor 109. In embodiments, when inline Al component 1 10 has received a suggestion from an Al persona (e.g., based on Al model component 202), Al chat component 203 presents a chat indicator at a location of that suggestion within a source code file. In embodiments, this chat indicator enables user interaction to receive the suggestion and otherwise interact with the Al persona (e.g., via a chat with the Al persona) at this source code location. Thus, the chat indicator enables an Al persona to initiate an inline conversation with the user at a location for which the Al persona has identified a suggestion. In one example, the chat indicator is a cursor, but a wide variety of indicators are possible (e.g., a light bulb, an arrow, a text highlight, and the like). In embodiments, when multiple Al personas are available, each Al persona has a visually distinguished chat indicator (e.g., different shapes, different colors, different adornments, and the like).
[0026] In some embodiments, Al chat component 203 removes an Al persona’s chat indicator after user interaction and resolution of the Al persona’s suggestion. In these embodiments, Al chat component 203 presents the chat indicator again (e.g., at a different location) when the Al persona has produced a new suggestion. In other embodiments. Al chat component 203 retains the chat indicator after the user interaction and resolution of the Al persona’s suggestion. Notably, this enables the user to return to the chat indicator and further interact with the Al persona (e.g., to ask follow-up questions about the suggestion, to provide further instructions about the suggestion, to ask a question about a different source code location). In these embodiments. Al chat component 203 visually distinguishes the chat indicator to indicate whether or not a suggestion is available from the Al persona (e.g., using different visual weights, different colors, different associated shapes, and the like).
[0027] Whether or not Al chat component 203 removes or retains a chat indicator after the resolution of an Al persona’s suggestion, in embodiments, Al chat component 203 provides a capability (e.g., context menu, keystroke, toolbar icon, and the like) for a user to call up an Al persona’s chat indicator at any time to enable the user to interact with the Al personal. For example, a user may call up an Al persona’s chat indicator at a location of interest to the user and use that chat indicator to interact with the Al persona regarding text at that location.
[0028] In embodiments, Al chat component 203 communicates user interactions to context management component 201, which integrates those user interactions into an appropriate context (e.g., context 114).
[0029] Figures 3A-3G illustrate example code editor UIs 300a-300g that demonstrate examples of the operation of inline Al component 110. It is to be appreciated that these examples are nonlimiting and that there are a variety of ways to present an inline Al experience that is consistent with the embodiments described herein.
[0030] Figure 3 A shows a code editor UI 300a in which a user has created a source code document 301 that includes a definition of a ‘'Person” class. As indicated by cursor 302, the user is currently working on writing a Main method. In code editor UI 300a, there are two chat indicators, chat indicator 303 and chat indicator 304. In this example, chat indicator 303 corresponds to a codecommenting Al persona, and chat indicator 304 corresponds to a code-fixing Al persona. Chat indicator 303 and chat indicator 304 are each shown as visually distinguished cursors (e.g., chat indicator 303 is adorned with a half-circle to indicate it corresponds to the code-commenting Al persona, while chat indicator 303 is adorned with a triangle to indicate it corresponds to the codefixing Al persona).
[0031] In Figure 3B, code editor UI 300b shows that a user has interacted with each of chat indicator 303 and chat indicator 304. A chat window 306 associated with chat indicator 303 shows that the code-commenting Al persona has initiated a conversation to suggest adding a comment to the Person class, while a chat window 305 associated with chat indicator 304 shows that the code-fixing Al persona has initiated a conversation to suggest a correction to the variable ■‘Lastname.”
[0032] In Figure 3C, code editor UI 300c shows that the user has accepted each suggestion from the corresponding Al persona, resulting in the code-commenting Al persona adding a comment to the Person class and in the code-fixing Al persona fixing the variable “Lastname” to “LastName” (as the variable is used elsewhere). Additionally, code editor UI 300c shows that the user has further interacted with chat indicator 303 to request that the code-commenting Al persona add today’s date to its comments. In Figure 3C, code editor UI 300d reflects the addition of a date by the code-commenting Al persona to the previously added comment on the Person class.
[0033] In Figure 3E. code editor UI 300e shows that the user has completed authoring the Main method, with cursor 302 being positioned at the end of the method declaration. Now, chat indicator 303 is presented at the beginning of the Main method. In Figure 3F, code editor UI 300f shows that the code-commenting Al persona has suggested the addition of a comment to the method. In Figure 3G, code editor UI 300g illustrates the addition of this comment by the code-commenting Al persona. Notably, here, the code-commenting Al persona has automatically added today’s date to the comment based on the prior feedback/instruction from the user.
[0034] Embodiments are now described in connection with Figure 4, which illustrates a flow chart of an example method 400 for presenting inline conversations wi th an Al within a code editor UI. In embodiments, instructions for implementing method 400 are encoded as computer-executable instructions (e.g., inline Al component 110) stored on a computer storage media (e.g., storage medium 104) that are executable by a processor (e.g., processor system 102) to cause a computer system (e.g., computer system 101) to perform method 400.
[0035] The following discussion now refers to a method and method acts. Although the method acts are discussed in specific orders or are illustrated in a flow chart as occurring in a particular order, no order is required unless expressly stated or required because an act is dependent on another act being completed prior to the act being performed.
[0036] Referring to Figure 4, in embodiments, method 400 comprises an act of providing source code context to an Al (act 401). For example, inline Al component 110 uses context management component 201 to maintain context 114 for a source code document within source code 113 that is being presented within a code editor UI presented by code editor 109. Then, inline Al component 110 uses Al model component 202 to provide context 114 to Al model 112 (e.g., as part of a prompt for Al model 112).
[0037] Method 400 also comprises an act of obtaining a suggested edit at a source code location (act 402). For example, based on providing provide context 114 to Al model 112, Al model component 202 receives a prediction from Al model 112. In embodiments, this prediction comprises a location within the source code document, as well as a suggested edit for that location. [0038] Method 400 also comprises an act of presenting an Al chat indicator (act 403). For example, Al chat component 203 presents a chat indicator, such as a cursor, at the location indicated by Al model 112. This chat indicator indicates that the Al has a suggested edit at this location.
[0039] Method 400 also comprises an act of providing the suggested edit based on user interaction with the Al chat indicator (act 404). For example, based on user interaction with the chat indicator, Al chat component 203 presents the suggested edit to the user (e.g., within an Al-specific chat window).
[0040] Method 400 also comprises an act of receiving a user response to the suggested edit (act 405). For example, a user may accept the suggested edit, reject the suggested edit, provide additional instructions, etc.
[0041] Method 400 also comprises an act of integrating the user response into the source code context (act 406). For example, the context management component 201 integrates the user response into context 114 for use with further predictions from Al model 112. In method 400, an arrow connecting acts 406 and 401 indicates that method 400 can repeat using this updated context.
[0042] An example application of method 400 is now provided in connection with example code editor UIs 300a-300g. Referring first to act 401, in embodiments, act 401 comprises providing a first context for a source code document being presented at a code editor UI to an Al persona. For example, Al model component 202 provides context 114 relevant to source code document 301 to Al model 112. In embodiments, this first context comprises a configuration of the Al persona (e.g., as a code-commenting Al persona), the content of source code document 301, prior content of source code document 301, the content of a related source code document, or prior user interaction with the Al persona, and the like.
[0043] Referring to act 402, in embodiments, act 402 comprises obtaining, from the Al persona, a first prediction comprising a first suggested edit at a first location within the source code document. For example, Al model component 202 receives, from a code-commenting Al persona, a prediction of a suggested comment to be added prior to the class definition of the Person class within source code document 301.
[0044] Referring to act 403, in embodiments, act 403 comprises presenting a first chat indicator at the code editor UI at the first location within the source code document. For example, code editor UI 300a shows that Al chat component 203 has presented chat indicator 303 at line 02, just prior to the class definition of the Person class.
[0045] Referring to act 404, in embodiments, act 404 comprises presenting the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator. For example, code editor UI 300b shows that, based on user interaction with chat indicator 303, Al chat component 203 has presented chat window 306 for the code-commenting Al persona, which provides the suggestion to add a comment.
[0046] Referring to act 405, in embodiments, act 405 comprises receiving a user response to the first suggested edit. For example, code editor UI 300c shows that the user has accepted the suggestion to add the code-commenting Al persona’s suggested comment. Additionally, code editor UI 300c shows that the user has provided further instruction to add today’s date to the comments.
[0047] Referring to act 406, in embodiments, act 406 comprises integrating the user response into the first context to create an updated first context. For example, the context management component 201 integrates the user’s suggestion to add today’s date to comments into context 114. [0048] Following the arrow from act 406 to act 401, in embodiments, a second instance of act 401 comprises providing the updated first context for the source code document to the Al persona, the updated first context comprising the first context, and the user response. For example, context management component 201 provides context 114 to Al model 112, with context 114 having been updated in act 406 with the user's suggestion to add today’s date to the comments.
[0049] In embodiments, a second instance of act 402 comprises obtaining, from the Al persona, a second prediction comprising a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response. For example, Al model component 202 receives, from a code-commenting Al persona, a prediction of a suggested comment to be added prior to the Main method definition within source code document 301.
[0050] In embodiments, a second instance of act 403 comprises presenting a second chat indicator at the code editor UI at the second location within the source code document. For example, code editor UI 300e shows that Al chat component 203 has presented chat indicator 303 at line 30, just prior to the Main method definition.
[0051] In embodiments, a second instance of act 404 comprises presenting the second suggested edit at the code editor UI based on a second user interaction with the second chat indicator. For example, code editor UI 300f shows that, based on user interaction with chat indicator 303, Al chat component 203 has presented chat window 306 for the code-commenting Al persona, which provides the suggestion to add a comment. As shown in code editor UI 300f. this suggestion has integrated the user’s instruction to include today's date.
[0052] As discussed, in embodiments, a chat indicator is a cursor. Thus, in some embodiments, the first chat indicator (e.g., chat indicator 303 as shown in code editor UI 300a) and the second chat indicator (e.g., chat indicator 303 as shown in code editor UI 300e) is a cursor corresponding to the Al persona.
[0053] As shown in these examples, the chat indicators are presented at locations that are different from the user’s cursor. Thus, in some embodiments, the first location (e.g., the location of chat indicator 303 within source code document 301 in code editor UI 300a) is different from a third location (e.g., the location of cursor 302 within source code document 301 in code editor UI 300a) within the source code document of a user cursor when presenting the first chat indicator. Additionally, in some embodiments, the second location (e.g., the location of chat indicator 303 within source code document 301 in code editor UI 300e) is different from a fourth location (e.g., the location of cursor 302 within source code document 301 in code editor UI 300e) within the source code document of the user cursor when presenting the second chat indicator.
[0054] As discussed, in embodiments, there are plural Al personas. Thus, in embodiments, the Al persona is a first Al persona (e.g., a code-commenting persona). Additionally, embodiments include providing a second context for the source code document to a second Al persona (e.g., a code-fixing persona), obtaining, from the second Al persona, a third prediction comprising a third suggested edit at a third location within the source code document (e.g., a suggestion to fix “Lastname” to “LastName”), and presenting a third chat indicator at the code editor UI at the third location within the source code document (e.g., chat indicator 304 within code editor UI 300a). [0055] In embodiments, presenting the first chat indicator comprises presenting a first indication of the first Al persona, and presenting the second chat indicator comprises presenting a second indication of the second Al persona. In embodiments, the first indication of the first Al persona is visually distinct from the second indication of the second Al persona. For example, in code editor UIs 300a-300g, chat indicator 303 is a cursor adorned with a half-circle, and chat indicator 304 is a cursor adorned with a triangle.
[0056] In some embodiments, each Al persona is a different AI/ML model. Thus, in embodiments, the first Al persona is a first Al model, and the second Al persona is a second Al model. In other embodiments, a single AI/ML model can be configured as different personals (e.g., based on different initial prompts). Thus, in embodiments, the first Al persona is a first configuration of an Al model, and the second Al persona is a second configuration of the Al model. When using different Al personas, some embodiments keep different contexts for each persona. Thus, in embodiment, the first context is different from the second context.
[0057] Embodiments of the disclosure comprise or utilize a special-purpose or general-purpose computer system (e.g., computer system 101) that includes computer hardware, such as, for example, a processor system (e.g., processor system 102) and system memory (e.g., memoiy 103), as discussed in greater detail below. Embodiments within the scope of the present disclosure also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures. Such computer-readable media can be any available media accessible by a general-purpose or special-purpose computer system. Computer-readable media that store computer-executable instructions and/or data structures are computer storage media (e.g., storage medium 104). Computer-readable media that carry7 computer-executable instructions and/or data structures are transmission media. Thus, embodiments of the disclosure can comprise at least two distinctly different kinds of computer-readable media: computer storage media and transmission media.
[0058] Computer storage media are physical storage media that store computer-executable instructions and/or data structures. Physical storage media include computer hardware, such as random access memory (RAM), read-only memory (ROM), electrically erasable programmable ROM (EEPROM), solid state drives (SSDs), flash memoiy, phase-change memory (PCM), optical disk storage, magnetic disk storage or other magnetic storage devices, or any other hardware storage device(s) which store program code in the form of computer-executable instructions or data structures, which can be accessed and executed by a general-purpose or special-purpose computer system to implement the disclosed functionality.
[0059] Transmission media include a network and/or data links that cany program code in the form of computer-executable instructions or data structures that are accessible by a general- purpose or special-purpose computer system. A ‘"network” is defined as a data link that enables the transport of electronic data between computer systems and other electronic devices. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination thereof) to a computer system, the computer system may view the connection as transmission media. The scope of computer-readable media includes combinations thereof.
[0060] Upon reaching various computer system components, program code in the form of computer-executable instructions or data structures can be transferred automatically from transmission media to computer storage media (or vice versa). For example, computer-executable instructions or data structures received over a network or data link can be buffered in RAM within a network interface module (e.g., network interface 105) and eventually transferred to computer system RAM and/or less volatile computer storage media at a computer system. Thus, computer storage media can be included in computer system components that also utilize transmission media.
[0061] Computer-executable instructions comprise, for example, instructions and data which when executed at a processor system, cause a general-purpose computer system, a special -purpose computer system, or a special-purpose processing device to perform a function or group of functions. In embodiments, computer-executable instructions comprise binaries, intermediate format instructions (e.g., assembly language), or source code. In embodiments, a processor system comprises one or more central processing units (CPUs), one or more graphics processing units (GPUs), one or more neural processing units (NPUs), and the like.
[0062] In some embodiments, the disclosed systems and methods are practiced in network computing environments with many types of computer system configurations, including personal computers, desktop computers, laptop computers, message processors, hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, tablets, pagers, routers, switches, and the like. In some embodiments, the disclosed systems and methods are practiced in distributed system environments where different computer systems, which are linked through a network (e.g., by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links), both perform tasks. As such, in a distributed system environment, a computer system may include a plurality7 of constituent computer systems. Program modules may be located in local and remote memory storage devices in a distributed system environment. [0063] In some embodiments, the disclosed systems and methods are practiced in a cloud computing environment. In some embodiments, cloud computing environments are distributed, although this is not required. When distributed, cloud computing environments may be distributed internationally within an organization and/or have components possessed across multiple organizations. In this description and the following claims, "‘cloud computing’7 is a model for enabling on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and sendees). A cloud computing model can be composed of various characteristics, such as on-demand self-service, broad network access, resource pooling, rapid elasticity, measured sendee, and so forth. A cloud computing model may also come in the form of various service models such as Software as a Service (SaaS), Platform as a Sendee (PaaS), Infrastructure as a Service (laaS), etc. The cloud computing model may also be deployed using different deployment models such as private cloud, community cloud, public cloud, hybrid cloud, etc.
[0064] Some embodiments, such as a cloud computing environment, comprise a system with one or more hosts capable of running one or more virtual machines (VMs). During operation, VMs emulate an operational computing system, supporting an operating system (OS) and perhaps one or more other applications. In some embodiments, each host includes a hypervisor that emulates virtual resources for the VMs using physical resources that are abstracted from the view of the VMs. The hypervisor also provides proper isolation between the VMs. Thus, from the perspective of any given VM, the hypervisor provides the illusion that the VM is interfacing with a physical resource, even though the VM only interfaces with the appearance (e.g., a virtual resource) of a physical resource. Examples of physical resources include processing capacity, memory’, disk space, network bandwidth, media drives, and so forth.
[0065] Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the described features or acts described supra or the order of the acts described supra. Rather, the described features and acts are disclosed as example forms of implementing the claims.
[0066] The present disclosure may be embodied in other specific forms without departing from its essential characteristics. The described embodiments are only as illustrative and not restrictive. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.
[0067] When introducing elements in the appended claims, the articles “a,” "an." “the,” and “said” are intended to mean there are one or more of the elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that there may be additional elements other than the listed elements. Unless otherwise specified, the terms “set,’’ “superset,” and “subset” are intended to exclude an empty set, and thus “set” is defined as a non-empty set, “superset” is defined as anon-empty superset, and “subset” is defined as anon-empty subset. Unless otherwise specified, the term “subset” excludes the entirety of its superset (i.e., the superset contains at least one item not included in the subset). Unless otherwise specified, a “superset” can include at least one additional element, and a “subset” can exclude at least one element.

Claims

1. A method (400) implemented in a computer system (101) that includes a processor system (102) comprising: providing (202) a first context (114) for a source code document (113) being presented (109) at a code editor user interface (UI) to an artificial intelligence (Al) persona (112); obtaining (202), from the Al persona, a first prediction comprising a first suggested edit at a first location within the source code document; presenting (203) a first chat indicator (303) at the code editor UI at the first location within the source code document; presenting (203) the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receiving (203) a user response to the first suggested edit; providing (202) an updated first context (114) for the source code document to the Al persona, the updated first context comprising the first context and the user response; obtaining (202), from the Al persona, a second prediction comprising a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response; presenting (203) a second chat indicator (303) at the code editor UI at the second location within the source code document; and presenting (203) the second suggested edit at the code editor UI based on a second user interaction with the second chat indicator.
2. The method of claim 1. wherein, the first location is different from a third location within the source code document of a user cursor when presenting the first chat indicator; and the second location is different from a fourth location within the source code document of the user cursor when presenting the second chat indicator.
3. The method of claim 1 or claim 2, wherein the first context comprises one or more of, a configuration of the Al persona, content of the source code document, prior content of the source code document, content of a related source code document, or a prior user interaction w ith the Al persona.
4. The method of claim 1 or claim 3, wherein, the Al persona is a first Al persona; presenting the first chat indicator comprises presenting a first indication of the first Al persona; and the method further comprises: providing a second context for the source code document to a second Al persona; obtaining, from the second Al persona, a third prediction comprising a third suggested edit at a third location within the source code document; and presenting a third chat indicator at the code editor UI at the third location within the source code document, including presenting a second indication of the second Al persona.
5. The method of claim 4, wherein the first Al persona is a first Al model, and the second Al persona is a second Al model.
6. The method of claim 4, wherein the first Al persona is a first configuration of an Al model, and the second Al persona is a second configuration of the Al model.
7. The method of claim 4 to claim 6. wherein the first context is different from the second context.
8. The method of claim 4 to claim 7, wherein the first indication of the first Al persona is visually distinct from the second indication of the second Al persona.
9. The method of claim 1 to claim 8, wherein the first chat indicator and the second chat indicator are a cursor corresponding to the Al persona.
10. A computer system comprising: a processor system; and a computer storage media that stores computer-executable instructions that are executable by the processor system to at least: provide a first context for a source code document being presented at a code editor user interface (UI) to an artificial intelligence (Al) persona; obtain, from the Al persona, a first prediction comprising a first suggested edit at a first location within the source code document; present a first chat indicator at the code editor UI at the first location within the source code document, including presenting an indication of the first Al persona; present the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receive a user response to the first suggested edit; provide an updated first context for the source code document to the Al persona, the updated first context comprising the first context and the user response; obtain, from the Al persona, a second prediction comprising a second suggested edit at a second location within the source code document, wherein the second suggested edit is based on the user response; and present a second chat indicator at the code editor UI at the second location within the source code document, including presenting the indication of the first Al persona.
11. The computer system of claim 10, wherein, the first location is different from a third location within the source code document of a user cursor when presenting the first chat indicator; and the second location is different from a fourth location within the source code document of the user cursor when presenting the second chat indicator.
12. The computer system of claim 10 or claim 11, wherein the first context comprises one or more of, a configuration of the Al persona, content of the source code document, prior content of the source code document, content of a related source code document, or a prior user interaction with the Al persona.
13. The computer system of claim 10 or claim 12, wherein, the Al persona is a first Al persona; presenting the indication of the Al persona comprises presenting a first indication of the first Al persona; and the computer-executable instructions that are also executable by the processor system to at least: providing a second context for the source code document to a second Al persona; obtaining, from the second Al persona, a third prediction comprising a third suggested edit at a third location within the source code document; and presenting a third chat indicator at the code editor UI at the third location within the source code document, including presenting a second indication of the second Al persona.
14. The computer system of claim 13, wherein the first Al persona is a first Al model, and the second Al persona is a second Al model.
15. The computer system of claim 13, wherein the first Al persona is a first configuration of an Al model, and the second Al persona is a second configuration of the Al model.
16. The computer system of claim 13 to claim 15, wherein the first context is different from the second context.
17. The computer system of claim 13 to claim 16, wherein the first indication of the first Al persona is visually distinct from the second indication of the second Al persona.
18. The computer system of claim 10 to claim 17, wherein the first chat indicator and the second chat indicator are a cursor corresponding to the Al persona.
19. A computer program product comprising a hardware storage device that stores computer-executable instructions that are executable by a processor system at least: provide a first context for a source code document being presented at a code editor user interface (UI) to an artificial intelligence (Al) persona; obtain, from the Al persona, a first prediction comprising a first suggested edit at a first location within the source code document; present a first chat indicator at the code editor UI at the first location within the source code document, the first location being different from a second location within the source code document of a user cursor when presenting the first chat indicator; present the first suggested edit at the code editor UI based on a first user interaction with the first chat indicator; receive a user response to the first suggested edit; provide an updated first context for the source code document to the Al persona, the updated first context comprising the first context and the user response; obtain, from the Al persona, a second prediction comprising a second suggested edit at a third location within the source code document, wherein the second suggested edit is based on the user response; present a second chat indicator at the code editor UI at the third location within the source code document, the third location being different from a fourth location within the source code document of the user cursor when presenting the second chat indicator; and present the second suggested edit at the code editor UI based on a second user interaction with the second chat indicator.
20. The computer program product of claim 19, wherein, the Al persona is a first Al persona; presenting the first chat indicator comprises presenting a first indication of the first Al persona; and the computer-executable instructions also executable by the processor system to at least: provide a second context for the source code document to a second Al persona; obtain, from the second Al persona, a third prediction comprising a third suggested edit at a fifth location within the source code document; and present a third chat indicator at the code editor UI at the fifth location within the source code document, including presenting a second indication of the second Al persona.
PCT/US2024/030673 2023-06-09 2024-05-23 Code editor assisting the developer with context-based chatbot Ceased WO2024253847A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP24734609.1A EP4724892A1 (en) 2023-06-09 2024-05-23 Code editor assisting the developer with context-based chatbot

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US18/332,138 US12498906B2 (en) 2023-06-09 2023-06-09 Inline conversation with artificial intelligence within code editor user interface
US18/332,138 2023-06-09

Publications (1)

Publication Number Publication Date
WO2024253847A1 true WO2024253847A1 (en) 2024-12-12

Family

ID=91586191

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2024/030673 Ceased WO2024253847A1 (en) 2023-06-09 2024-05-23 Code editor assisting the developer with context-based chatbot

Country Status (3)

Country Link
US (1) US12498906B2 (en)
EP (1) EP4724892A1 (en)
WO (1) WO2024253847A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20250117195A1 (en) * 2023-10-06 2025-04-10 Microsoft Technology Licensing, Llc Ai-modified code recommendation in context of a developer tool

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190303107A1 (en) * 2018-03-30 2019-10-03 Ca, Inc. Automated software programming guidance
US20200097261A1 (en) * 2018-09-22 2020-03-26 Manhattan Engineering Incorporated Code completion
US20200167134A1 (en) * 2018-11-28 2020-05-28 International Business Machines Corporation Programming Environment Augment with Automated Dialog System Assistance

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9170782B2 (en) * 2012-03-27 2015-10-27 Microsoft Technology Licensing, Llc Extensible mechanism for providing suggestions in a source code editor
US11029926B2 (en) * 2018-11-21 2021-06-08 Kony, Inc. System and method for delivering autonomous advice and guidance

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190303107A1 (en) * 2018-03-30 2019-10-03 Ca, Inc. Automated software programming guidance
US20200097261A1 (en) * 2018-09-22 2020-03-26 Manhattan Engineering Incorporated Code completion
US20200167134A1 (en) * 2018-11-28 2020-05-28 International Business Machines Corporation Programming Environment Augment with Automated Dialog System Assistance

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ROSS STEVEN I ET AL: "The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Development", PROCEEDINGS OF THE 32ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, ACMPUB27, NEW YORK, NY, USA, 27 March 2023 (2023-03-27), pages 491 - 514, XP059003458, ISBN: 979-8-4007-0106-1, DOI: 10.1145/3581641.3584037 *

Also Published As

Publication number Publication date
EP4724892A1 (en) 2026-04-15
US20240411527A1 (en) 2024-12-12
US12498906B2 (en) 2025-12-16

Similar Documents

Publication Publication Date Title
US10776082B2 (en) Programming environment augment with automated dialog system assistance
Komatineni et al. Pro Android 4
US7917888B2 (en) System and method for building multi-modal and multi-channel applications
JP7810738B2 (en) State Management Persistence
US8527939B2 (en) GUI modeling of knowledge base in a modeling environment
US9524279B2 (en) Help document animated visualization
US20230359458A1 (en) Machine learning model management and software development integration
US20120166977A1 (en) User programming access to data model in user interface design
WO2017213846A1 (en) Automating feature graduation
JP2006228200A (en) Relationship modelling
CN114327464B (en) Component construction method and device and storage medium
WO2024253847A1 (en) Code editor assisting the developer with context-based chatbot
US10013259B2 (en) User initiated data rollback using operating system partitions
CN113608726B (en) Code generation method, device, electronic equipment and storage medium
Nag et al. Blood in need: An application for blood management
CN119861906A (en) Cross-platform application development method, device, terminal and storage medium
CN111290757B (en) Weex-based online code compiling method, device and equipment
Bendinelli Comparative analysis of scalable mobile app implementations: a case study with Flutter and Jetpack Compose
Zhang et al. Modeling of web service development process based on MDA and procedure blueprint
Yberg Native-like performance and user experience with Progressive Web Apps
CN114968931B (en) A configuration file generation method and related device
Böhm AI-Assisted coding and comparative performance analysis of cross-platform mobile applications: kotlin multiplatform Vs. react native
US20230229434A1 (en) Super-app extension discovery and configuration via source code management platform comments
Caminero et al. The SERENOA Project: Multidimensional Context-Aware Adaptation of Service Front-Ends.
Himschoot Introduction to Blazor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24734609

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2024734609

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2024734609

Country of ref document: EP

Effective date: 20260109

ENP Entry into the national phase

Ref document number: 2024734609

Country of ref document: EP

Effective date: 20260109

ENP Entry into the national phase

Ref document number: 2024734609

Country of ref document: EP

Effective date: 20260109

ENP Entry into the national phase

Ref document number: 2024734609

Country of ref document: EP

Effective date: 20260109

ENP Entry into the national phase

Ref document number: 2024734609

Country of ref document: EP

Effective date: 20260109

WWP Wipo information: published in national office

Ref document number: 2024734609

Country of ref document: EP