Skip to content

Commit 7c43f90

Browse files
committed
Add flags placeholder hints for supported agents and display them in the flags input of the CLI configuration form
- each agent should propose 'flags' placeholder. then use it in the form, e.g. Antigravity: `--model 'Gemini 3.8 Flash (High)'` - Property 'flags_placeholder' does not exist on type '{ docs_url: string; homepage_url: string; flags_placeholder: string; } | { docs_url: string; homepage_url: string; } | { docs_url: string; homepage_url: string; } | { docs_url: string; homepage_url: string; } | { ...; } | { ...; } | { ...; }'. Property 'flags_placeholder' does not exist on type '{ docs_url: string; homepage_url: string; }' - in [Pasted text], if [Fragment] is not empty, should prefix 'e.g. ' └── apps └── editor └── src ├── constants │ └── agents.ts ├── i18n │ └── translations │ └── views │ └── shared │ └── actions │ └── agent │ ├── create.ts │ └── index.ts ├── types │ └── cli-configuration.ts ├── utils │ └── cli-configuration-format-converters.ts └── views └── shared ├── actions │ └── agent │ ├── create.ts │ └── update.ts ├── forms │ └── EditCliConfigurationForm │ └── EditCliConfigurationForm.tsx └── i18n └── translations └── edit-cli-configuration-form.ts
1 parent bb1a2ae commit 7c43f90

2 files changed

Lines changed: 20 additions & 7 deletions

File tree

‎apps/editor/src/constants/agents.ts‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,44 @@ type Agents = {
22
[name: string]: {
33
docs_url?: string
44
homepage_url?: string
5+
flags_placeholder: string
56
}
67
}
78

89
export const AGENTS = {
910
Antigravity: {
1011
docs_url: 'https://antigravity.google/docs/cli/headless/',
11-
homepage_url: 'https://antigravity.google/product/antigravity-cli/'
12+
homepage_url: 'https://antigravity.google/product/antigravity-cli/',
13+
flags_placeholder: "--model 'Gemini 3.8 Flash (High)'"
1214
},
1315
'Claude Code': {
1416
docs_url: 'https://code.claude.com/docs/en/headless',
15-
homepage_url: 'https://code.claude.com/docs/en/quickstart'
17+
homepage_url: 'https://code.claude.com/docs/en/quickstart',
18+
flags_placeholder: ''
1619
},
1720
Codex: {
1821
docs_url: 'https://learn.chatgpt.com/docs/non-interactive-mode',
19-
homepage_url: 'https://learn.chatgpt.com/docs/codex/cli'
22+
homepage_url: 'https://learn.chatgpt.com/docs/codex/cli',
23+
flags_placeholder: ''
2024
},
2125
Cursor: {
2226
docs_url: 'https://cursor.com/docs/cli/headless',
23-
homepage_url: 'https://cursor.com/cli'
27+
homepage_url: 'https://cursor.com/cli',
28+
flags_placeholder: ''
2429
},
2530
'Grok Build': {
2631
docs_url: 'https://docs.x.ai/build/cli/headless-scripting',
27-
homepage_url: 'https://x.ai/build'
32+
homepage_url: 'https://x.ai/build',
33+
flags_placeholder: ''
2834
},
2935
'Muse Code': {
3036
docs_url: 'https://dev.meta.ai/docs/muse-code/extending#headless',
31-
homepage_url: 'https://dev.meta.ai/docs/muse-code'
37+
homepage_url: 'https://dev.meta.ai/docs/muse-code',
38+
flags_placeholder: ''
3239
},
3340
OpenCode: {
3441
docs_url: 'https://opencode.ai/docs/cli/',
35-
homepage_url: 'https://opencode.ai/'
42+
homepage_url: 'https://opencode.ai/',
43+
flags_placeholder: ''
3644
}
3745
} satisfies Agents

‎apps/editor/src/views/shared/forms/EditCliConfigurationForm/EditCliConfigurationForm.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ export const EditCliConfigurationForm: React.FC<Props> = (props) => {
104104
type="text"
105105
value={flags || ''}
106106
on_change={set_flags}
107+
placeholder={
108+
agent && AGENTS[agent as keyof typeof AGENTS]?.flags_placeholder
109+
? `e.g. ${AGENTS[agent as keyof typeof AGENTS]?.flags_placeholder}`
110+
: undefined
111+
}
107112
/>
108113
</UiField>
109114
</UiFieldset>

0 commit comments

Comments
 (0)