This PR mainly includes the function updates to support the use case of asking for code refinements, together with well designed LLM prompts to incorporate user input and clear contextual bar UI to enable a smooth interaction and correct functionality.
Several quality updates are also made, such as fixing indentation and variable names problems, replacing the openSurfaceView logics with updateSurfaceView to ensure proper render when two contextual bars open simultaneously.
Issue(s)
This PR's function updates closed #15 #16 #17 #18 and #19 .
Acceptance Criteria fulfillment
[x] Moved 'regeneration' button under the generated code output to ensure a more intuitive interface and smoother user interaction.
[x] Created a new contextual bar for the code refinement function, users can type in the hopeful refinement requirements in the contextual bar and ask the LLM to regenerate.
[x] Add code generation input box in the main contextual bar interface, users can now type in the description for code generation task in the UI directly to invoke code generation.
[x] Calling /ai-programmer will directly pop out the UI for main contextual bar as default method, making the app easier to access.
[x] When a new contextual bar opens, it will automatically update the original contextual bar if there's opened one.
Proposed Changes
This PR completed the functions to support the use case for asking for code refinements. Users can now ask the LLM to generate a variation of the code to satisfy their specific needs based on the previous generated code version. To support the function of making code refinements, we also designed a new LLM prompt such that to tell the LLM to make refinements on the previous code generation results according to the requirements input by the user.
To enable the smooth user interaction, the app now splits the function of generate code and refine code into two contextual bars. Users can now type in their requirements in the generate code input box and press 'generate' button to generate code. Users can also type in the refinement need in the regeneration code input box and press 'regenerate' button to ask for a refinement over the code results.
Meanwhile, considering the case when app opens a new surface view, there's already other surface view opened, we will choose to update the surface view on the existed surface view to resolve the conflicts. Besides, several minor issues have also been resolved, such as indentation fix and variable names.
This PR mainly includes the function updates to support the use case of asking for code refinements, together with well designed LLM prompts to incorporate user input and clear contextual bar UI to enable a smooth interaction and correct functionality.
Several quality updates are also made, such as fixing indentation and variable names problems, replacing the openSurfaceView logics with updateSurfaceView to ensure proper render when two contextual bars open simultaneously.
Issue(s)
This PR's function updates closed #15 #16 #17 #18 and #19 .
Acceptance Criteria fulfillment
Proposed Changes
This PR completed the functions to support the use case for asking for code refinements. Users can now ask the LLM to generate a variation of the code to satisfy their specific needs based on the previous generated code version. To support the function of making code refinements, we also designed a new LLM prompt such that to tell the LLM to make refinements on the previous code generation results according to the requirements input by the user.
To enable the smooth user interaction, the app now splits the function of generate code and refine code into two contextual bars. Users can now type in their requirements in the generate code input box and press 'generate' button to generate code. Users can also type in the refinement need in the regeneration code input box and press 'regenerate' button to ask for a refinement over the code results.
Meanwhile, considering the case when app opens a new surface view, there's already other surface view opened, we will choose to update the surface view on the existed surface view to resolve the conflicts. Besides, several minor issues have also been resolved, such as indentation fix and variable names.
Results