R40 - Code Review Agent Official Release

Release Date: 2024.11.1
This update includes all changes from R28 to R40, totaling 10 major updates and 31 other updates. The following notes explain the included changes. For major features, we provide detailed explanations and manuals, while other updates are listed as change items.

Major Features and Improvements

1. Code Review Agent Official Release

The Code Review Agent is an automated code review feature powered by generative AI technology. It can automatically scan code changes submitted by users, generate summary descriptions or review comments, and answer user questions based on code changes. The Code Review Agent aims to improve efficiency for team members involved in code reviews, especially when dealing with large review tasks. It can significantly reduce the time reviewers spend reading and understanding code, while also providing potential fix suggestions to reviewees. Based on our tests, most team code review tasks involve modifications to about 10 files and dozens of code changes. Such review tasks typically require reviewers to spend at least 30 minutes reading and understanding the code, followed by 30 minutes to 1 hour providing review comments. The Code Review Agent can provide summary descriptions (using the summary command) and review comments (using the review command) within 5 minutes, which reviewers can then read. This single step saves team members over 15-20 minutes per review task, improving efficiency by more than 3 times (from 30 minutes manual understanding to 10 minutes with AI assistance). The Code Review Agent supports integration with common DevOps platforms through Web Hooks, automatically initiating the agent during Git pull requests (Pull Request or Merge Request), or can be triggered independently via commands.

  • Environment Configuration

    Before using Code Review Agent, you need to configure the corresponding Web Hooks in the Azure DevOps team project. Two main Web Hooks need to be configured: Pull Request created: Triggered when a PR is created Pull request commented on: Triggered when new comments are added to a PR

    Reference: Product Manual | Code Review Agent | Setup and Configuration | Configuring Service Hook

  • Basic Usage Scenarios of Code Review Agent

    Configuring and using Code Review Agent in DevOps environments. Includes the complete process from deploying the agent, configuring the large model, setting model access parameters, adding Webhooks, enabling the agent, and testing verification.

    Reference: Quick Start | Code Review Agent

  • Supported Command List

    Code Review Agent provides a series of commands to assist development teams in code reviews, helping teams understand code changes faster and improve code merge efficiency

    Reference: Product Manual | Code Review Agent | Command Reference

2. SmartChat Web Supports Image Recognition

Upload images in SmartChat to understand, parse and generate content based on image content.

Reference: Product Manual | SmartChat | Image Recognition

3. SmartChat Web Supports Chart Generation

Mermaid Markdown is a tool that uses Markdown syntax to create diagrams and flowcharts. Mermaid is a JavaScript-based diagramming tool that allows users to generate complex diagrams through simple text descriptions.

Reference: Product Manual | SmartChat | Chart Generation

4. AI Base Data Dashboard Update

Users with admin permissions can click Team Dashboard to view graphical data statistics. This update includes three data dashboards: Conversation, Prompt, and Code Generation.

Dashboard

  1. On the Team Dashboard page, you can click Department, Statistical Unit, Time Period to filter the displayed data.

    Filter

  2. Click View Detailed Data on the Conversation card, or click Conversation in the left navigation bar to enter the Conversation Details page. Conversation Details

  3. On the Conversation Details page, you can also filter the displayed data by Department, Statistical Unit, Time Period; three pie charts: Terminal is counted by terminal dimension; Prompt is counted by 5 fixed prompts (code explanation, code review, test generation, comment generation, code inspection); Editor is counted by IDE terminal dimension, excluding chatui data. Added 3 trend charts corresponding to the pie charts, counted by day. Details Page

  4. Added a prompt card, the first number on this card shows the total prompt usage, and another value shows the number of prompts. Click View Detailed Data on the prompt card to enter the Prompt Details page.

    Prompt

  5. On the Prompt Details page, you can also filter the displayed data by Department, Statistical Unit, Time Period. Two pie charts: Prompt Type is the distribution of system built-in prompts, system basic prompts, and user prompts; Prompt Usage shows the distribution of usage count for each prompt, only showing the top 10, other prompts are grouped into others. Prompt Usage trend chart shows the top 10 most used prompts, if more than ten, other prompts are merged into others.

    Prompt Details

  6. Added a list showing all prompts, including: Prompt Name, Owner (Creator), Usage Count, Last Used Time, Shared Count, Last Used User.

    All Prompts

  7. Click View Detailed Data on the Code Generation card, or click Code Generation in the left navigation bar to enter the Code Generation Details page.

    Code Generation

  8. On the Code Generation Details page, you can also filter the displayed data by Department, Statistical Unit, Time Period. Two pie charts: Editor pie chart: counted by IDE terminal dimension, clicking the editor pie chart, the existing trend chart and list are re-filtered according to the clicked IDE type, clicking blank and reset removes the filter. Language pie chart: counted by language dimension, clicking the language pie chart, the existing trend chart and list are re-filtered according to the clicked language type, clicking blank and reset removes the filter. Two trend charts: IDE trend chart and language trend chart, showing daily changes.

    Code Generation Details

5. SmartCode Input Box Supports Shortcuts

  1. Prompt

    • Open SmartCode, click “/” or type “/” in the input box to bring up Prompt

      Bring up Prompt

  2. #Variable

    • Open SmartCode, click “#” or type “#” in the input box to bring up #Variable

      Bring up #Variable

  3. Model Switching

    • Open SmartCode, click “Chat Model” to bring up Model List

      Bring up Model List

6. SmartCode Supports Using #Variables to Flexibly Introduce Code Context in Conversations

SmartCode has added support for conversation variables, which are used to reference code content in the IDE during conversations, providing users with more flexible prompt organization. This update provides 3 conversation variables:

  • #selection: Used to reference currently selected code in the active editor
  • #editor: Used to reference any code block in the active editor
  • #file: Used to select files

Reference: Product Manual | SmartCode | Using #Variables

7. SmartCode JetBrains Auto Update Improvement

The SmartCode JetBrains plugin now automatically downloads new versions in the background and completes updates, no longer relying on JetBrains’ built-in plugin market mechanism for downloads and updates, simplifying and reducing user operations.

Reference: Quick Start | SmartCode | smartcode-jetbrains | Auto Update

  1. Users with admin permissions can click System Monitoring - Service Detection to enter the Service Detection page, which shows the startup status of container services and automatically performs system detection every 5 minutes

    Bring up Model List

  2. You can search for containers by Container Name; filter container status by Status, click Search to filter and view.

    Bring up Model List

  3. For services that have had exceptions, click Details on the right to view historical exception records.

    Bring up Model List Bring up Model List

9. SmartCode Jetbrains Supports AI-Generated Commit Messages

SmartCode already provides AI-generated commit message capability in VSCode. This update brings the same capability to JetBrains.

  • Users can click the SmartCode icon in the JetBrains IDE commit message window to trigger this feature

    Bring up Model List

  • After generation, the automatically written commit message will appear in the input box

    Bring up Model List

10. SmartCode Jetbrains Codelens Supports Two Activation Methods

Codelens in JetBrains now supports two activation methods, users can configure according to their preferences

  • Function - Floating display on method header (default)

    Bring up Model List

  • Left Sidebar - Floating display on the left tool sidebar of the editor

    Bring up Model List

  • Users can choose the display method in the Configuration Page

    Bring up Model List

Other Updates

AI Base Update List

  • Added Added plugin upload button to App Market Management
  • Added Added “Documentation” jump link to all pages
  • Improved Prompt setting sub-instance model type range can be multi-selected
  • Improved Added hover content display to conversation session management
  • Added Deepseek API FIM adaptation

SmartChat Update List

  • Improved Allow users to archive all conversation history with one click
  • Fixed Code explanation prompt stops output when processing long functions, stop button also doesn’t work, can only refresh chat window causing data loss, session information not saved
  • Fixed If Ruoyi backend app market jumps to chatui, if chatui is not logged in, need to log in again

SmartChat Update List

  • Improved Codelens trigger optimization: Allow users to trigger code intelligence tasks directly without opening chat window
  • Improved Optimized plugin version information display interface, unified information display format
  • Fixed Error prompt when users trigger code intelligence tasks without logging in
  • Improved Optimized codelens code block selection method to ensure method body indentation is fully selected for better model response
  • Improved Improved chat window content loading when users reopen IDE, ensuring last conversation history is loaded based on workspace
  • Improved JetBrains dynamic analysis of model generated code, only showing complete code block content, truncating subsequent content
  • Improved Code review prompt optimization: Ensure model’s reasonable response to problem-free code, 1) optimize output message format, use clearer numbering and bold display; 2) fix infinite loop issue of repeatedly outputting same error message
  • Improved Context hover menu display form. smartcode jetbrains and vscoder plugins. According to user selection, use two forms: one using codelens, one using foldable display
  • Fixed Improved plugin compatibility, 2024.2.1 installation no longer reports exception: Class initialization must not depend on services. Consider using instance of the service on-demand instead
  • Fixed Code completion, after disconnection, frequent notifications of code generation exception handling, set plugin logout
  • Improved Jetbrain plugin end Solved the issue of duplicate display of custom actions in bottom right notifications during concurrency. Now only displays once during concurrency
  • Improved VScode plugin end Corrected variable support Internationalization using new loading method & unified with chat app Code lens internationalization support Corrected #file list showing deleted files Code lens header added logo including oem processing
  • Improved smartcode Jetbrain(2.24.19606) User login regardless of function switch = True or False goes to Login page
  • Improved Vs coder plugin end Reduced interaction count variable file optimization Optimized variable prompt display
  • Fixed jetbrains plugin 2.33.21062 version, modifying code completion model to invalid, plugin cannot login.
  • Fixed Opening multiple Idea windows, smartcode plugin cannot upgrade. Clicking upgrade prompts to close other projects. Only jumps to plugin upgrade page when only one ide is open.
  • Fixed Jetbrains plugin Class initialization must not depend on services. Consider using instance of the service on-demand instead exception error.
  • Fixed Jetbrains plugin end Solved treesitter parsing causing memory overflow issue.
  • Improved When configuring an invalid address in JetBrains plugin, plugin will try to connect to server and report error. Need to provide friendly error message, prompting users to check configuration.
  • Fixed Not logged in smartcode for code completion will prompt once not logged in, restart idea then code completion won’t prompt not logged in bug fixed
  • Improved Modified upgrade method
  • Improved Codelens left menu display: In JetBrains IDE, codelens left menu display, currently only supports .java files
  • Improved Android Studio not set JCEF, added JCEF setting detection function