Commands
A command is a prompt with a name that you can use again. Use commands for frequently used tasks. You can run a command in Zide Assist, or on an item in its Ask Zide panel. Use the Commands activity to browse, create, and change commands.
Navigate the Commands activity
In the Commands activity, New Command, the filter icon, and More actions share the title row.
To open Commands, click Assist > Commands.
The list has the following sections, in this order.
- This Project: Your commands for the current project.
- All Projects: Your commands for every project.
- Built-in: Commands included with Zide.
- Assist with This: The commands that the Ask Zide panel offers for each type of item, such as commits or issues.
- Zide Assist Actions and Ask Zide Actions: The actions built into Zide Assist and Ask Zide, such as
/planand/clear. These sections are only for reference.
Hold the pointer over a section title to see which commands it holds. Click a section title to collapse or expand the section. The last three sections are collapsed until you expand them. Zide remembers which sections are collapsed.
Each command shows its command name, such as /review-code, and its description. Hold the pointer over a command to see its full name and description.
Click a command to open it in a tab. The tab shows the following information.
- Display Name: The name of the command.
- Command Name: The command to run in Zide Assist. The command name is based on the display name.
- Description: A brief description of what the command does.
- Inputs: Parameters the command accepts.
- Prompt: The instructions sent to Zide Assist when the command runs.
To open a command in a separate tab, right-click the command and click Open in New Tab.
To show each command on one line in the activity panel, open More actions and select Compact Mode under View. Clear the check mark to show descriptions on their own line. In a separate tab, use the Toggle compact mode icon.
To move through the list with the keyboard, click a command, then press the Up and Down arrow keys. Press Enter to open the selected command. The selected command shows its full name.
Search commands
Click the Show filters icon to open the filter panel. Enter text in Search commands to show only the commands whose command name, display name, or description contains that text. Press Ctrl+F (Cmd+F on macOS) to open the panel and focus the search field.
While a search is set, a line above the list shows the number of matches, and the search shows as a chip above it. Click the chip to change the search, or click its x or Clear filters to show all commands again.
This Project
Commands in this section are stored in the .zide/shared/commands/ folder of the repository. Other members of the repository can use them.
All Projects
Commands in this section are stored in the commands folder of your Zide application data directory. You can use them in every project.
To see where a command is stored, open the command and hold the pointer over the badge beside its name.
Built-in
Built-in commands are included with Zide. You cannot edit or delete them, but you can copy them.
Assist with This
Each type of item has its own commands in its Ask Zide panel, for example Review Commit for a commit. This section shows them in groups by type, such as Commits and Issues. Click a group to expand or collapse it. Zide remembers which groups are expanded.
These commands are available only in the Ask Zide panel of the item. You cannot type them in a Zide Assist message box, and you cannot edit them. To make a variation of one, make a copy. The copy keeps the command name, so give it a new name before you use it for the same type of item. For more information, see Use commands with an item.
Zide Assist Actions and Ask Zide Actions
Actions are built into Zide Assist and Ask Zide, such as /plan in Zide Assist and /clear in both. You type them in the message box. You cannot copy or change them. A command cannot use the name of an action.
Create commands in Zide
To create a new command, complete the following steps.
- In the Commands activity, click New Command.
- Under Save in, click All Projects or This Project. You can change this choice until you save the command for the first time.
- Enter the name of the command in the Display Name field. Zide makes the Command Name from it, in lowercase with hyphens. For example,
Fix Issuebecomes/fix-issue. Use the command name to run the command in Zide Assist. - Optional: Enter the description of the command in the Description field.
- Optional: To add an input to the command, click Add Input. Input types are text, textarea, bool, and enum.
- Enter the instructions Zide Assist should follow in the Prompt field.
- Optional: Click Enable multi-step processing to make the command a multi-step prompt. For more information, see Multi-step commands.
- Click Save.
Click Save to save the changes you made to a command. Click Revert to remove all unsaved changes to a command.
Copy, move, and delete commands
Use More actions (the three dots in the command’s tab) or right-click the command in the Commands activity.
- Make Copy: Click Copy to All Projects or Copy to This Project. The copy opens in a tab, so you can rename it. When a command with the same name is already there, the copy is named
<name> (Copy). You can copy built-in commands and Assist with This commands. - Move to All Projects or Move to This Project: Moves your command to the other section.
- Delete…: Deletes your command.
Overridden commands
The same command name can be used in more than one section. A command in This Project takes priority over a command in All Projects or Built-in with the same name. A command in All Projects takes priority over a built-in command with the same name. When you enter the command name in Zide Assist, the command with priority runs.
A command with a lower priority shows an Overridden badge in the Commands activity. Hold the pointer over the badge to see which command takes priority. When you open the command, a banner shows which command overrides it. To open that command, click Open Overriding Command in the banner. You can also right-click the overridden command in the list and click the same item.
Actions, such as /plan, take priority over commands with the same name. A command with the name of an action shows a Name taken badge and does not run. Give it a different name.
Inputs
Inputs let a command collect values when it runs. When you run a command that has inputs, Zide displays a dialog that collects each value before the prompt is sent. To add an input to the command, click Add Input.
Each input has one of the following types.
- text: A single-line value.
- textarea: A multi-line value.
- bool: A checkbox that resolves to
trueorfalse. - enum: A dropdown restricted to a fixed set of choices.
Reference an input in the prompt with a {{name}} placeholder, where name matches the input name. When the command runs, Zide replaces each placeholder with the value collected from the input dialog.
While editing a command, the editor lists the command inputs as clickable icons. Click an icon to insert the placeholder at the cursor.
If you create an input field but do not reference the input in the prompt using a {{name}} placeholder, Zide adds those values before the prompt in a Parameters section. Multi-step commands do not get this section: reference each input in the steps that use it. For more information, see Multi-step commands.
Run a command
To run a command, type a forward slash, /, followed by the command name into the Zide Assist message box and then click Send.
A message that starts with / and a command name is never sent to Zide Assist as a question. If there is no command with that name, or the command cannot run there, Zide shows the reason and keeps your text in the message box. Text that starts with a path, such as /src/app.js is broken, is sent as usual.
You can also send a file to Zide Assist from the Files activity:
- Right-click a file and click Assist with This > Send As Prompt to put its text in the message box of a new Zide Assist tab. Zide does not send it: review the text, and then click Send.
- Drag a file into a Zide Assist tab to use the file as an attachment.
Use commands with an item
You can run a command on an item, such as a commit, a file, or an issue, in the item’s Ask Zide panel. Right-click the item and point to Assist with This. For a tab, you can also right-click its content header or ordinary background, or click More actions in the header. Under Ask Zide, click Open Ask Zide. The panel opens beside the item and lists its commands. Click a command to run it in the panel. See Ask Zide beside a tab.
The list shows the Assist with This commands of that type of item, then the commands of your own that you add. A command with inputs shows ... after its name, and Zide asks for the values first. Unavailable commands stay in the list; point to one to see why.
To work on the item in Zide Assist instead, click Add to Conversation under Zide Assist. Zide attaches the item to a message, and you can then type a prompt or a / command.
To choose which of your commands show for a type of item, click Manage Command List… below the commands in the Ask Zide panel. After you ask a question, it is also in the panel’s More actions menu. Select the commands under This Project and All Projects, and then click Save. The Assist with This commands of the type always show. Your choices are personal and apply in every project. They are not shared with the repository. A command in This Project shows only in projects that have it.
Some of your commands cannot be added. Ask Zide runs one prompt, so a multi-step command, or a command with a /plan or /model line, cannot be added. A command with the same name as an Assist with This command of the type cannot be added either. Manage Command List shows the reason beside the command.
In the Ask Zide panel, type / to see the commands for the item. You can also type the name of any command of your own, even if it is not in the list.
Discuss a command with Zide Assist
Assist actions belong to individual commands. Right-clicking the list background opens list options without choosing a command.
To ask Zide Assist about a command, for example to improve its prompt, attach the command to a message. In the Commands activity, right-click the command, point to Assist with This, and click Add to Conversation. You can also drag the command onto the Zide Assist message box. Zide Assist gets the name, description, inputs, and prompt of the command. The command does not run.
For a quick question, under Ask Zide in the same menu, click Open Ask Zide. Zide opens the command with an Ask Zide panel beside it. In the panel, click Explain Command or Review Command. The command does not run.
Create and edit command files manually
Commands in This Project and All Projects can be created and edited as Markdown files.
The following is an example of a Markdown file for a Fix Issue command.
---name: Fix Issuedescription: Investigate and fix a GitHub issueinputs: - name: issue label: Issue number type: text default: "#42" - name: scope label: Scope type: enum options: - backend - frontend---
Investigate issue {{issue}} in the {{scope}} code and propose a fix.A command does not choose its model. To use another model, choose it in the Zide Assist tab before you run the command, for example with the /model action. A command whose prompt starts with a /model line does not run, and Zide shows a message.