CodeInsight Main Window

From InterBase

Go Up to CodeInsight


Before you begin, ensure that Smart CodeInsight is enabled with at least one engine configured and you have enough permissions to query databases.

Accessing the Smart CodeInsight Main Window

You can access the Smart CodeInsight main window in two ways:

From the Server Tree

  1. Logging to a InterBase 15 database or higher.
  2. Right click on the database you are logged in.
  3. Select CodeInsight Window.
    EnablemainCI.png

From the Multi-Purpose Section

  1. Logging to a InterBase 15 database or higher.
  2. Select the database you are logged in.
  3. On the Multi-Purpose Section, double click CodeInsight Window.
    Enablefrom multi.png.png

Smart CodeInsight Main Window Sections

The Smart CodeInsight Main Window is divided in three parts:

  • Response section
  • Command Prompt section
  • Tools section

Mainciwindow.png

Response Section

This section displays the response from an AI agent rendered as HTML. Right click on this section to access additional options. The available options for this section are:

Copy to clipboard
Copies the entire contents to the clipboard. The content is sent as plain text to clipboard.
Copy selected to clipboard
Copies the selected text to the clipboard. The content is sent as plain text to clipboard.
Copy selected to editor
This option is available only when an editor is associated with the window. For example, in the Interactive SQL window
Text view/Markdown view
Toggles between the default Markdown view and a plain text view that shows the original markdown.

Command Prompt Section

In this section you can type prompts for the AI engine. Depending on the context this section offers:

  • Full syntax highlighting
  • Support for macros, refer to the macros section for more information.
  • Code completion for macros
  • Drag and drop entities for building queries

Tools Section

Depending on the current text of the window the following options can be available:

Engine.pngEngine selection
A combo box to set the engine used for prompts. When the Smart CodeInsight window is created, it uses the default engine set in the Smart CodeInsight options. The window will use the default engine unless this value is changed here.
Note:
Changing the Default AI engine in the Smart CodeInsight options, does not propagate to active windows and you have to change it here.
Clearci.pngClear
clears the command prompt
Generateci.pngStart Generating
Sends the prompt to the AI engine.
Cancelci.pngCancel
Cancels a running prompt.

CodeInsight History

Ai history.png

The History tab is available from the Interactive SQL window or the in the “CI for <database>” tab on the Multi-Purpose Section section.

All the prompts sent to the AI engine while using a database get logged on the History tab during the current run of IBConsole. If you are connected to two different databases, the history logs get partitioned by database. For example, Database A will only see its prompts and Database B its own.

On the left panel of the History tab, you can see basic information like QueryTime, when the prompt was done, and Question the original prompt sent to the AI engine. By default, only two columns are visible.

To enable additional columns:

  1. If needed, resize columns to make room for the new column.
  2. Right click on a column header and click Field Chooser.
  3. From the field chooser dialog, drag a column name and place it next to a column header.
  4. Close the Field Chooser dialog

Add column ai history.gif

Tip:
To change the order of columns just drag a column header to place you want

The following additional columns are available:

Answer
The raw response sent by the AI engine.
Engine Used 
The engine used for the prompt, usually a single engine is used for all prompts. This column is only useful when sending the same prompt to multiple engines and comparing their responses. This way it's easier to see which response belongs to which engine.
Prepared Question
This has all the macro expansions in it. It is what was actually sent to the engine.

When you click on a history entry, you can see the rendered response on the right panel of the History tab. This panel has the same features described in the Response Section, but no editor features are available.

Advance To: