Files
chatgpt-on-wechat/docs/extensions/custom-menu.mdx
T
zhayujieandcowagent 260b67cbda feat: complete the OpenAI-compatible chat API
- Select the agent with agent_id and the model with model (defaults to the
  agent's own model); add GET /v1/models
- Stateless requests by default, server-side history with conversation_id
- Report usage (with cached tokens), reasoning_content and tool_trace /
  cow_event for tool and teammate activity
- Add the external_api_enabled switch; turning the API off keeps its key
- Web and desktop settings card with key management and request examples;
  show a copyable agent ID on the agents page
- Docs for the chat API and the custom menu under Extensions

Co-authored-by: cowagent <cow@cowagent.ai>
2026-10-13 16:46:19 +08:00

87 lines
3.8 KiB
Plaintext

---
title: Custom Menu
description: Reorder and group the sidebar menu, and put the artifacts and web pages you use often in it
---
The sidebar menu can be arranged the way you work: reorder and group it, hide the pages you rarely use, and add web pages and documents the Agent created, or any URL, so they open in one click like a built-in page. The Web Console and the desktop client share one menu.
{/* TODO: screenshot - a customized sidebar */}
## Open the menu editor
There are three ways in:
- Hover over a group title in the sidebar and click the edit icon that appears on its right
- Click the version number at the bottom left of the sidebar (Web Console) or the "More" button (desktop client), then choose "Customize menu"
- While previewing a web page or Markdown document on the Artifacts page, click "Add to menu"
{/* TODO: screenshot - the menu editor */}
Changes take effect once you click Save in the editor.
## Order and groups
- Hold the drag handle on the left of an entry to move it, within its group or into another one
- Click "Add group" to create a group; its title can be edited in place
- Before removing a group, move the built-in pages it holds to another group
## Built-in pages
Built-in pages such as Chat, Agents, Config and Capabilities can be:
- **Renamed and given another icon**: an empty name falls back to the default one
- **Hidden**: click the eye icon to hide or show the page. Chat and Config cannot be hidden, so the settings are always within reach
- **Added back**: a removed built-in page can be restored from "Add → Built-in page"
The Artifacts page starts hidden; show it in the editor when you need it.
## Add an artifact
Use "Add → Artifact (HTML / Markdown)" to search the web pages and Markdown documents the Agent created and put one in the menu. Clicking the entry opens it right inside the console, always at its latest version, which suits reports, dashboards and notes the Agent keeps up to date.
If the file is deleted, the entry says so, and you can remove it in the editor.
## Add a web link
Use "Add → Web link", enter a name and a URL starting with `http://` or `https://`, and choose how it opens:
- **Embed**: inside the console, which suits internal tools and dashboards
- **New tab**: in a new browser tab
<Tip>
Some sites refuse to be embedded in other pages and show up blank. Switch the entry to "New tab" instead. An embedded page also has an "Open in new tab" button at its top right.
</Tip>
## Restore default
Click "Restore default" in the editor to go back to the built-in menu. The artifacts and links you added are removed.
## Menu file
The menu is saved in `system/menu.json` under the default Agent's workspace (`~/cow/system/menu.json` for a source deployment), and both the Web Console and the desktop client read it. A page one client does not have is skipped there and kept in the menu for the other.
The file can also be edited by hand in the format below. A file that cannot be parsed is ignored and the built-in menu is used.
```json
{
"version": 1,
"groups": [
{
"id": "chat",
"title": "",
"items": [
{ "id": "chat", "type": "builtin", "view": "chat", "title": "", "icon": "", "hidden": false },
{ "id": "m_report", "type": "artifact", "title": "Weekly report", "icon": "chart", "path": "/Users/me/cow/websites/report.html" },
{ "id": "m_board", "type": "url", "title": "Dashboard", "icon": "gauge", "url": "https://example.com/board", "open": "embed" }
]
}
]
}
```
| Type | Description | Fields |
| --- | --- | --- |
| `builtin` | A built-in page | `view`: the page name; `hidden`: whether it is hidden |
| `artifact` | An artifact | `path`: absolute path of the file, HTML or Markdown only |
| `url` | A web link | `url`: the address; `open`: `embed` or `tab` |