Skip to content

Commit d7168b0

Browse files
committed
Add a notice to the CLI section and rename the agent translation file to cli
- in cli add notice 'CWC-prompted agents are read-only.' - translate [Fragment] └── apps └── editor └── src └── views └── settings └── frontend ├── Home │ ├── Home.tsx │ └── sections │ ├── ApiSection.tsx │ ├── CliSection.tsx │ ├── GeneralSection.tsx │ └── WebSection.tsx └── i18n └── translations ├── api.ts ├── cli.ts └── web.ts
1 parent fbd2cf6 commit d7168b0

3 files changed

Lines changed: 34 additions & 11 deletions

File tree

‎apps/editor/src/views/settings/frontend/Home/sections/CliSection.tsx‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { forwardRef } from 'react'
22
import { Section as UiSection } from '@ui/components/editor/settings/Section'
33
import { Group as UiGroup } from '@ui/components/editor/settings/Group/Group'
4+
import { Notice as UiNotice } from '@ui/components/editor/settings/Notice'
45
import { SortableList } from '@ui/components/editor/settings/SortableList'
56
import { IconButton } from '@ui/components/editor/common/IconButton'
67
import { DefaultConfigurationSelector } from '@ui/components/editor/settings/DefaultConfigurationSelector'
@@ -12,7 +13,10 @@ type Props = {
1213
cli_configurations: CliConfiguration[]
1314
set_cli_configurations: (configurations: CliConfiguration[]) => void
1415
agent_defaults: Record<string, string | null>
15-
on_set_default_cli_configuration: (cli_feature: string, name: string | null) => void
16+
on_set_default_cli_configuration: (
17+
cli_feature: string,
18+
name: string | null
19+
) => void
1620
on_select_default_cli_configuration: (cli_feature: string) => void
1721
on_reorder_cli_configurations: (reordered: CliConfiguration[]) => void
1822
on_add_cli_configuration: (params?: {
@@ -30,9 +34,8 @@ export const CliSection = forwardRef<HTMLDivElement, Props>((props, ref) => {
3034

3135
return (
3236
<UiSection ref={ref} title={t('cli.title')} subtitle={t('cli.subtitle')}>
33-
<div
34-
ref={(el) => props.set_section_ref('section:cli:group:agents', el)}
35-
>
37+
<UiNotice type="info">{t('cli.notice')}</UiNotice>
38+
<div ref={(el) => props.set_section_ref('section:cli:group:agents', el)}>
3639
<UiGroup title={t('agents.configurations.title')}>
3740
<SortableList
3841
items={props.cli_configurations.map((c) => ({
@@ -134,7 +137,9 @@ export const CliSection = forwardRef<HTMLDivElement, Props>((props, ref) => {
134137
</UiGroup>
135138
</div>
136139
<div
137-
ref={(el) => props.set_section_ref('section:cli:group:agent-defaults', el)}
140+
ref={(el) =>
141+
props.set_section_ref('section:cli:group:agent-defaults', el)
142+
}
138143
>
139144
<UiGroup
140145
title={t('cli.default-configurations.title')}
@@ -172,4 +177,4 @@ export const CliSection = forwardRef<HTMLDivElement, Props>((props, ref) => {
172177
)
173178
})
174179

175-
CliSection.displayName = 'CliSection'
180+
CliSection.displayName = 'CliSection'

apps/editor/src/views/settings/frontend/i18n/translations/agent.ts renamed to apps/editor/src/views/settings/frontend/i18n/translations/cli.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const translations = {
2525
'zh-tw': '智能搜尋',
2626
de: 'Agenten-Suche',
2727
es: 'Búsqueda de agente',
28-
fr: 'Recherche d\'agent',
28+
fr: "Recherche d'agent",
2929
'pt-br': 'Busca por Agente',
3030
ru: 'Агентный поиск',
3131
ko: '에이전트 검색',
@@ -43,7 +43,7 @@ export const translations = {
4343
'zh-tw': '選擇預設智能體',
4444
de: 'Standardagenten auswählen',
4545
es: 'Seleccionar agente predeterminado',
46-
fr: 'Sélectionner l\'agent par défaut',
46+
fr: "Sélectionner l'agent par défaut",
4747
'pt-br': 'Selecionar agente padrão',
4848
ru: 'Выбрать агента по умолчанию',
4949
ko: '기본 에이전트 선택',
@@ -107,6 +107,24 @@ export const translations = {
107107
hu: 'Ügynökhívások engedélyezése.',
108108
bg: 'Активиране на агентни извиквания.'
109109
},
110+
'cli.notice': {
111+
en: 'Agents prompted by CWC are read-only.',
112+
pl: 'Agenci wywoływani przez CWC są tylko do odczytu.',
113+
'zh-cn': '由 CWC 调用的智能体是只读的。',
114+
ja: 'CWCによって呼び出されたエージェントは読み取り専用です。',
115+
'zh-tw': '由 CWC 呼叫的智能體是唯讀的。',
116+
de: 'Von CWC aufgerufene Agenten sind schreibgeschützt.',
117+
es: 'Los agentes invocados por CWC son de solo lectura.',
118+
fr: 'Les agents invoqués par CWC sont en lecture seule.',
119+
'pt-br': 'Os agentes invocados pelo CWC são somente leitura.',
120+
ru: 'Агенты, вызываемые CWC, доступны только для чтения.',
121+
ko: 'CWC에 의해 호출된 에이전트는 읽기 전용입니다.',
122+
it: 'Gli agenti invocati da CWC sono di sola lettura.',
123+
tr: 'CWC tarafından çağrılan aracılar salt okunurdur.',
124+
cs: 'Agenti vyvolaní CWC jsou pouze pro čtení.',
125+
hu: 'A CWC által meghívott ügynökök csak olvashatók.',
126+
bg: 'Агентите, извикани от CWC, са само за четене.'
127+
},
110128
'agents.configurations.title': {
111129
en: 'Agents',
112130
pl: 'Agenci',
@@ -215,4 +233,4 @@ export const translations = {
215233
hu: 'ügynökök',
216234
bg: 'агенти'
217235
}
218-
} as const
236+
} as const

‎apps/editor/src/views/settings/frontend/i18n/translations/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { translations as general } from './general'
44
import { translations as sections } from './sections'
55
import { translations as api } from './api'
66
import { translations as web } from './web'
7-
import { translations as agent } from './agent'
7+
import { translations as cli } from './cli'
88
import { translations as edit_provider_form } from './edit-provider-form'
99
import { translations as edit_template_form } from './edit-template-form'
1010

@@ -15,7 +15,7 @@ export const translations = {
1515
...general,
1616
...api,
1717
...web,
18-
...agent,
18+
...cli,
1919
...edit_provider_form,
2020
...edit_template_form
2121
}

0 commit comments

Comments
 (0)