Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

docs(agent): the settings shot showed a provider slot that no longer exists

yhh75edb11fe0c7
diff --git a/desktop/src/components/SettingsDialog.tsx b/desktop/src/components/SettingsDialog.tsx
index 35b75ac49..2c82b8d28 100644
--- a/desktop/src/components/SettingsDialog.tsx
+++ b/desktop/src/components/SettingsDialog.tsx
@@ -495,7 +495,7 @@ function ObjectListField({
}
return (
<input
- className="set-str"
+ className={`set-str${col.mono === false ? ' prose' : ''}`}
type={col.type === 'number' ? 'number' : 'text'}
min={col.min}
spellCheck={false}
diff --git a/desktop/src/settings/editorSettings.ts b/desktop/src/settings/editorSettings.ts
index b98e7a7ef..3ae8e9f78 100644
--- a/desktop/src/settings/editorSettings.ts
+++ b/desktop/src/settings/editorSettings.ts
@@ -318,7 +318,7 @@ settingsRegistry.register({
layout: 'block',
default: [],
columns: [
- { key: 'label', label: t('set.agents.col.label'), type: 'text', width: '0.9fr', placeholder: 'Local llama' },
+ { key: 'label', label: t('set.agents.col.label'), type: 'text', width: '0.9fr', mono: false, placeholder: 'Local llama' },
{
key: 'protocol',
label: t('set.agents.col.protocol'),
diff --git a/desktop/src/settings/types.ts b/desktop/src/settings/types.ts
index 923341581..27b276771 100644
--- a/desktop/src/settings/types.ts
+++ b/desktop/src/settings/types.ts
@@ -189,6 +189,14 @@ export interface ObjectListColumn {
min?: number;
/** Choices for an `enum` cell. */
options?: { value: string; label: string }[];
+ /**
+ * Set false for a column holding PROSE rather than an identifier.
+ *
+ * A table cell is narrow, and monospace costs about a fifth of its characters
+ * — worth paying where the value is a path, an id or a number a reader scans
+ * for shape, and not worth it for a name someone chose.
+ */
+ mono?: boolean;
/**
* Which credential a `secret` cell holds, derived from the row it sits in.
*
diff --git a/desktop/src/theme/settings.css b/desktop/src/theme/settings.css
index cd39840a7..0e3a3f19c 100644
--- a/desktop/src/theme/settings.css
+++ b/desktop/src/theme/settings.css
@@ -314,6 +314,7 @@
.set-objlist-fields { display: grid; gap: 6px; align-items: center; }
.set-objlist-head { font-size: var(--fs-2xs); color: var(--text-mute); padding: 0 2px; }
.set-objlist .set-str { width: 100%; font-family: var(--mono); }
+.set-objlist .set-str.prose { font-family: var(--font-ui); }
.set-objlist-row.invalid .set-str { border-color: var(--error); }
.set-objlist-err { color: var(--error); font-size: var(--fs-2xs); padding: 2px 2px 0; }
.set-objlist-del,
diff --git a/docs/astro/src/assets/guides/en/agent-settings.png b/docs/astro/src/assets/guides/en/agent-settings.png
index 0a25dfdb6..b78e3059c 100644
Binary files a/docs/astro/src/assets/guides/en/agent-settings.png and b/docs/astro/src/assets/guides/en/agent-settings.png differ
diff --git a/docs/astro/src/assets/guides/zh/agent-settings.png b/docs/astro/src/assets/guides/zh/agent-settings.png
index 6655f7444..50827c49b 100644
Binary files a/docs/astro/src/assets/guides/zh/agent-settings.png and b/docs/astro/src/assets/guides/zh/agent-settings.png differ
diff --git a/docs/astro/src/content/docs/extending/built-in-agent.mdx b/docs/astro/src/content/docs/extending/built-in-agent.mdx
index 15beadf22..1c6803e16 100644
--- a/docs/astro/src/content/docs/extending/built-in-agent.mdx
+++ b/docs/astro/src/content/docs/extending/built-in-agent.mdx
@@ -21,7 +21,7 @@ your Undo takes them back, and you can take the mouse at any moment.
The editor ships no key and calls nothing on its own. Open **Settings ▸ AI Agents**
and configure one provider — that is the whole setup.
-![Settings ▸ AI Agents — a key per provider, the model names a provider does not ship, and the protocol a custom endpoint speaks](@/assets/guides/en/agent-settings.png)
+![Settings ▸ AI Agents — the table of your own providers: a name, a protocol, an address, model names and a key each, with one row expanded to show what that endpoint accepts](@/assets/guides/en/agent-settings.png)
<Steps>
diff --git a/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx b/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx
index abddd4093..90d36fb3e 100644
--- a/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx
+++ b/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx
@@ -20,7 +20,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';
编辑器不附带任何密钥,也不会自己发起任何调用。打开**设置 ▸ AI 代理**,
配好一个提供方,配置就算做完了。
-![设置 ▸ AI 代理——每个提供方一个密钥,需要自己填的模型名,以及自定义接口所讲的协议](@/assets/guides/zh/agent-settings.png)
+![设置 ▸ AI 代理——你自己的提供方表:每一行有名称、协议、地址、模型名和各自的密钥,其中一行展开显示这个接口能接受什么](@/assets/guides/zh/agent-settings.png)
<Steps>