Updated on 2026-10-26 GMT+08:00

Browser

CodeArts Agent IDE has a built-in browser that lets you preview how your web application runs and perform the following operations:

  • Instant external URL preview: Enter an external URL in the browser address bar to instantly preview the website.
  • One-click selection import to chat: Select one or multiple elements from the browser and add them to the chat box.
  • Direct element-to-agent interaction: Select any element and send it to a chat with one click to interact directly with the agent.
  • Real-time console log viewing and reuse: Open the console, check the browser's printed logs, then paste them into the chat box.
  • Drag-and-drop element movement: Select an element and intuitively adjust its position using the mouse.
  • Two-way editing: Modify element properties directly in either the design panel or the CSS code.
  • Element-level commenting: Add comments to precisely bind style optimization requirements to specific elements.

Browser Usage

Launch the built-in browser to open HTML files in your project or visit external web pages.

Opening an HTML File in Your Project

  1. In your project folder, locate the target .html file.
  2. Right-click the file and choose Preview in Browser.

    Figure 1 Previewing a local HTML file

Opening an External Web Page

  1. On the top menu bar, choose Help > Show All Commands.
  2. Enter browser and click Browser: Open Integrated Browser.

    Figure 2 Opening the browser

  3. Enter the URL of the external web page you want to open and press Enter.

Visualized Element Editing

After you open a local HTML file in the browser, edit the page elements.

Adding an Element to the Chat Box for Optimization

  1. Click the element selector , select the target element, and click to add the element to the chat box.

    Figure 3 Adding an element to the chat box

  2. Send your request to the AI, for example, "Change the font color of the selected element to blue."

    After the processing is complete, refresh the page. The font of the element you selected turns blue.

    Figure 4 Element color changed to blue

Editing an Element with a Quick Prompt

  1. Click the element selector , select the target element, and click the chat box icon .
  2. Enter optimization keywords, and click . The agent will optimize the element accordingly.

    Figure 5 Sending optimization instructions through a chat box

Optimizing an Element Through Style Settings

  1. Click the element selector , select the target element, and click the style setting icon .
  2. In the displayed style setting area, modify the element style as required.

    Figure 6 Style settings

Optimizing an Element Through the CSS Inspector

  1. In the opened browser, click the CSS inspector icon .
  2. Select the target element and modify it in the component tree and on the design panel.

    • In the component tree, right-click the target element, and you can copy, cut, paste, or delete the element. You can also drag an element to another component tree node.
      Figure 7 Modifying an element in the component tree
    • On the design panel, you can edit an element in a visualized manner, such as adjusting its position, layout, text, background, and border. You can also view or edit style rules in the CSS.
      Figure 8 Modifying an element on the design panel or in CSS

Optimizing Element Card Layout

  1. In the opened browser, click the element selector .
  2. Move the mouse pointer to the target element and click Optimize to optimize its layout.

    Figure 9 One-click element optimization

Batch Optimizing Pages and Commenting on Elements

In addition to editing an individual element, you can batch adjust elements in the HTML.

Optimizing Pages/Projects with One Click

  1. In the opened browser, click the one-click optimization icon .
  2. Choose Optimize Page or Optimize Project to automatically optimize the visual appearance of the current page or of all pages in the project.

    Figure 10 One-click optimization of all pages in the project or the current page

Optimizing a Page by Adding Comments

Add comments to precisely bind style optimization requirements to specific elements. The agent performs partial optimization based on the comments to achieve precise modifications, significantly reducing communication costs and rework rates.

  1. In the opened browser, click the comment icon .
  2. Select the content to which you want to add a comment, enter an optimization prompt, and click Add Comment.

    The system temporarily stores your comments in a bubble. You can hover the mouse pointer over the bubble to view the comment target and content. You can also click Submit. The agent will optimize the page based on your comments.

  3. To add multiple comments, select the content you want to comment on again, enter an optimization prompt, and click Add Comment.

    A maximum of five comments can be added.

  4. After adding a comment, click Submit. The agent will optimize the page accordingly.
  5. To cancel saving your comments in a batch, click Cancel in the upper right corner. To undo the last operation, click .

    Figure 11 Optimizing a page through comments

Previewing Pages on Multiple Devices

After you finish developing a page, you can preview how it looks on multiple devices.

  1. In the opened browser, click to open the device toolbar.
  2. Select a device type and view the page.

    Figure 12 Selecting a device type to preview the effect

Quick Analysis of Console Logs

Click the developer tool icon near the address bar in your browser. The tool shows live updates for info, warning, or error logs in your project. (You can click Custom Levels on the Console tab to view the log type.) Copy and paste these logs into CodeArts Agent to get quick analysis and solutions.