Step 1: Open the Diagram Interface
1. Navigate to the Copilot4DevOps main page or open Copilot4DevOps from Queries or Backlogs.

2. Click on the Diagram tile to access the Diagram interface.

Step 2: Access the "Prompt" Tab
1. Upon opening the Diagram interface, you will see two tabs: 'Prompt' and 'Diagram'. By default, the interface opens to the Prompt tab.

Step 3: Select a Diagram Type
1. In the Prompt tab, clicking on Select Diagram Type will open a new window.


3. Choose a diagram type from the window.
Note: By default, the selection is set to flowchart, which generates diagrams based on the provided prompt or selected Work Item (WI) context or both.

The following Diagram Types are available for the user to generate a diagram.
• Flowchart
• Sequence Diagram
• Entity Relationship Diagram
• Class Diagram
• State Diagram
• Mindmap
• Journey Diagram
• Context Diagram
Step 4: Provide Context for the Diagram
You can generate a diagram by either entering a prompt, selecting a Work Item (WI) for context, or both:

Option 1: Enter a Prompt
• In the left panel of the Prompt tab, type a description or instructions for the diagram.
Example: "Create a flowchart for a CI/CD pipeline."

• A Default prompt for each diagram type will be shown.

• Users can rewrite their prompt using the Rewrite Prompt option in the Diagram function with a single click, producing structured, complete, and accurate prompt—using the AI model selected from the "AI Model Auto Selection and Ranking" section for “Rewrite Prompt” under the General tab in Admin panel.

Upload File(s)
The "Upload File(s)" feature has been introduced and is now seamlessly integrated into the Diagram. This capability allows users to attach relevant files that serve as contextual reference material to generate more accurate and tailored diagram outputs.

• The "Upload File(s)" option is located next to the "Rewrite Prompt" button.

Steps to Upload a File
• Click on the "Upload File(s)" option, found next to the "Rewrite Prompt" button

• A popup window will appear titled Upload File.

• Browse and select the desired file(s) from your device (only supported file types are allowed).
• Once uploaded, the file name will appear in the list within the popup.


• After uploading your file(s), click the "Upload" button to close the popup.

• All uploaded files will now be visibly listed below the "Rewrite Prompt" and "Upload File(s)" buttons, clearly indicating the files attached to the current session.

Note: supported file types, ".xls",".xlsx",".csv",".docx",".xml",".json",".pdf",".txt",".png",".jpg",".webp",".gif",".CSS",".HTML","JS".
• If a file was uploaded by mistake, it can be removed by clicking the "X" (cross) icon next to the file name.

Option 2: Select a Work Item (WI)
1. From the right panel, search for and select a Work Item by ID or title. By Default, the work item from which the Copilot4DevOps feature has been invoked will be shown pre-selected.


2. Select one or multiple work items for context and click on the "OK" button.



3. The work item(s) have been selected for context.

4. Once selected, you can specify fields from the Work Item to include in the diagram.
Note: The Fields in the bottom of the right panel will selected by default in accordance to the work item type. However, ID, Title, and Work Item Type are pre-selected fields which cannot be removed.

Step 5: Generate the Diagram
1. Ensure that either a prompt is entered, a Work Item is selected, or both.

Note: Diagram generation is disabled if no prompt is provided and no Work Item is selected.

2. Click the Generate button.

Note: Ranked AI model is configured in the Admin Panel for the Diagram, and this will be used for generating the diagram.

Step 6: View the Diagram
1. After generation, the interface will automatically switch to the Diagram tab.



2. Interact with the diagram using the available options:
• Zoom In/Out: Adjust the diagram's view.

To navigate diagrams more easily, you can now use mouse-based controls. Hold Ctrl and scroll the mouse wheel over the diagram to zoom in or out.

To move around the diagram, click and hold on the canvas, then drag to pan the view, helping you move smoothly without affecting diagram elements.

• Copy Diagram: Copy the diagram to the clipboard.

• Open in a New Window: Open the diagram in a larger view.


Step 7: Save and Publish the Diagram
Saving the Diagram
1. After generating or modifying a diagram, click on the Save As option in the interface.

2. Choose the desired format for saving the diagram:
• Word File (.docx): Includes the Diagram, Explanation, and Diagram Markdown.
• PDF File (.pdf): Includes the Diagram, Explanation, and Diagram Markdown.
• Image File (.svg): Saves the Diagram as a standalone image.

3. Once the format has been selected the file is downloaded. Click on the downloaded file.

4. Users can view the downloaded file.

Publishing the Diagram
The user can publish diagrams to Work Items (WIs) either by updating an existing WI or creating a new one:


Option 1: Publish to an Existing Work Item
1. Choose the option to publish the diagram to Existing Work Item.
Note: If the diagram was generated using only a prompt and not a work item, the 'Existing Work Item' option will be disabled.

2. Select an existing WI from the provided list and choose the work item field. Only those work items will be shown in this dropdown that have been selected for the context. If no work item has been selected for the context of the diagram user won't be able to publish the diagram to Existing Work Item and the option will be shown disabled.


3. Decide whether to include the explanation and diagram Markdown in the Work Item (WI).
Note: If the 'Include Explanation' checkbox is not enabled, it indicates that the diagram's explanation has not been generated yet. Should the user click the checkbox, the explanation will be generated in real time. If the explanation has already been generated, the checkbox will be selected by default.

4. Select if you want to replace the selected information in the field and then click on the Publish button.

5. The existing work item has been updated successfully.


Option 2: Publish to a New Work Item
1. Choose the option to create a New Work Item during publishing.

2. A default title for the new WI will be auto-generated. You can edit the title before completing the publishing process.
Note: The title will include a CpD postfix (e.g., "New Workflow Diagram [CpD]").

3. Select the Work item type.

4. Select the Work item field.

Mandatory Fields Scenario
• Mandatory fields for a work item appear within a light gray box labeled Mandatory Fields.
Note: Mandatory fields only appear when the user configures specific fields as mandatory. If no mandatory fields are configured, the mandatory fields option does not display. When mandatory fields are configured and the user does not provide values for them, the 'Publish' button remains disabled until the user enters the mandatory information. If no mandatory fields are configured by the user, the button remains enabled by default.

• A red icon marks required fields, clearly showing that they must be filled in.

• Add the required field info in the fields mentioned in the ‘Mandatory Field' box.

• Once you enter information in the field, the red label beside it is removed.

• The Publish button becomes enabled only after you complete all required fields for the work item type selected in the Create Work Item window.

5. Decide whether to include the explanation and diagram Markdown in the new WI.

6. Click on the "Publish" button.

7. The new work item with diagram has been published successfully.


Entering Diagram Markdown to Generate a Diagram
1. If you have a Diagram Markdown you can directly go to the Diagram tab and enter the Diagram Markdown directly to generate a diagram.

2. Directly go to the Diagram tab.

3. Paste / Type the Diagram Markdown.

4. The diagram has been generated directly using the Diagram Markdown.

Rough UI Functionality
A Rough UI feature enables users to create diagrams with a deliberately hand-drawn, sketch-like aesthetic. This approach is particularly valuable in the early stages of design or ideation, as it prioritizes concept exploration over detailed styling or refined visuals. By simulating the appearance of rough sketches, the feature fosters rapid prototyping and encourages iterative feedback, allowing users to focus on functionality, structure, and user flow rather than visual precision. This informal yet effective presentation style supports collaboration by making it clear that the design is still in a conceptual phase, inviting constructive input and facilitating innovation.

Comments
0 comments
Please sign in to leave a comment.