Skip to content

Commit 22e861a

Browse files
committed
Move agentic search settings from General to CLI section
- in settings, place 'agentic search' below CLI > agents
1 parent 573b0f9 commit 22e861a

5 files changed

Lines changed: 172 additions & 172 deletions

File tree

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

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export type NavItem =
2525
| 'section:general:group:prompt'
2626
| 'section:general:group:commits'
2727
| 'section:general:group:voice-input'
28-
| 'section:general:group:agentic-search'
2928
| 'section:web'
3029
| 'section:web:group:chatbots'
3130
| 'section:web:group:browser'
@@ -38,6 +37,7 @@ export type NavItem =
3837
| 'section:api:group:system-instructions'
3938
| 'section:cli'
4039
| 'section:cli:group:agents'
40+
| 'section:cli:group:agentic-search'
4141
| 'section:cli:group:agent-defaults'
4242

4343
export type NavConfigItem = { id: NavItem; label: TranslationKey }
@@ -67,10 +67,6 @@ export const NAV_ITEMS_CONFIG: NavConfigItem[] = [
6767
id: 'section:general:group:voice-input',
6868
label: 'general.voice-input.title'
6969
},
70-
{
71-
id: 'section:general:group:agentic-search',
72-
label: 'general.agentic-search.title'
73-
},
7470
{
7571
id: 'section:web',
7672
label: 'web.title'
@@ -119,6 +115,10 @@ export const NAV_ITEMS_CONFIG: NavConfigItem[] = [
119115
id: 'section:cli:group:agents',
120116
label: 'agents.configurations.title'
121117
},
118+
{
119+
id: 'section:cli:group:agentic-search',
120+
label: 'cli.agentic-search.title'
121+
},
122122
{
123123
id: 'section:cli:group:agent-defaults',
124124
label: 'common.defaults'
@@ -422,39 +422,6 @@ export const Home: React.FC<Props> = (props) => {
422422
props.default_voice_input_instructions
423423
)
424424
}}
425-
agentic_search_instructions={agentic_search_instructions}
426-
set_agentic_search_instructions={set_agentic_search_instructions}
427-
on_agentic_search_instructions_blur={() => {
428-
props.on_agentic_search_instructions_change(
429-
agentic_search_instructions
430-
)
431-
if (
432-
agentic_search_instructions === '' &&
433-
props.agentic_search_instructions ==
434-
props.default_agentic_search_instructions
435-
) {
436-
set_agentic_search_instructions(
437-
props.default_agentic_search_instructions
438-
)
439-
}
440-
}}
441-
default_agentic_search_instructions={
442-
props.default_agentic_search_instructions
443-
}
444-
on_restore_agentic_search_instructions={() => {
445-
set_agentic_search_instructions(
446-
props.default_agentic_search_instructions
447-
)
448-
props.on_agentic_search_instructions_change(
449-
props.default_agentic_search_instructions
450-
)
451-
}}
452-
agentic_search_invocation_count={
453-
props.agentic_search_invocation_count
454-
}
455-
on_agentic_search_invocation_count_change={
456-
props.on_agentic_search_invocation_count_change
457-
}
458425
commit_instructions={commit_instructions}
459426
set_commit_instructions={set_commit_instructions}
460427
on_commit_instructions_blur={() => {
@@ -585,6 +552,39 @@ export const Home: React.FC<Props> = (props) => {
585552
on_select_default_cli_configuration={
586553
props.on_select_default_cli_configuration
587554
}
555+
agentic_search_instructions={agentic_search_instructions}
556+
set_agentic_search_instructions={set_agentic_search_instructions}
557+
on_agentic_search_instructions_blur={() => {
558+
props.on_agentic_search_instructions_change(
559+
agentic_search_instructions
560+
)
561+
if (
562+
agentic_search_instructions === '' &&
563+
props.agentic_search_instructions ==
564+
props.default_agentic_search_instructions
565+
) {
566+
set_agentic_search_instructions(
567+
props.default_agentic_search_instructions
568+
)
569+
}
570+
}}
571+
default_agentic_search_instructions={
572+
props.default_agentic_search_instructions
573+
}
574+
on_restore_agentic_search_instructions={() => {
575+
set_agentic_search_instructions(
576+
props.default_agentic_search_instructions
577+
)
578+
props.on_agentic_search_instructions_change(
579+
props.default_agentic_search_instructions
580+
)
581+
}}
582+
agentic_search_invocation_count={
583+
props.agentic_search_invocation_count
584+
}
585+
on_agentic_search_invocation_count_change={
586+
props.on_agentic_search_invocation_count_change
587+
}
588588
/>
589589
</UiLayout>
590590
</div>

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

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { forwardRef } from 'react'
22
import { Section as UiSection } from '@ui/components/editor/settings-view/Section'
33
import { Group as UiGroup } from '@ui/components/editor/settings-view/Group/Group'
4+
import { Item as UiItem } from '@ui/components/editor/settings-view/Item'
45
import { Notices as UiNotices } from '@ui/components/editor/settings-view/Notices'
56
import { SortableList } from '@ui/components/editor/settings-view/SortableList'
67
import { IconButton } from '@ui/components/editor/common/IconButton'
8+
import { Dropdown as UiDropdown } from '@ui/components/editor/common/Dropdown'
9+
import { Textarea as UiTextarea } from '@ui/components/editor/common/Textarea'
710
import { DefaultConfigurationSelector } from '@ui/components/editor/settings-view/DefaultConfigurationSelector'
811
import { CliConfiguration } from '@/types/cli-configuration'
912
import { use_translation } from '../../i18n/use-translation'
@@ -26,6 +29,13 @@ type Props = {
2629
on_edit_cli_configuration: (id: string) => void
2730
on_delete_cli_configuration: (name: string) => void
2831
on_toggle_pinned_cli_configuration: (config: CliConfiguration) => void
32+
agentic_search_instructions: string
33+
set_agentic_search_instructions: (instructions: string) => void
34+
on_agentic_search_instructions_blur: () => void
35+
default_agentic_search_instructions: string
36+
on_restore_agentic_search_instructions: () => void
37+
agentic_search_invocation_count: 1 | 2 | 3
38+
on_agentic_search_invocation_count_change: (count: 1 | 2 | 3) => void
2939
set_section_ref: (id: NavItem, el: HTMLDivElement | null) => void
3040
}
3141

@@ -169,6 +179,57 @@ export const CliSection = forwardRef<HTMLDivElement, Props>((props, ref) => {
169179
/>
170180
</UiGroup>
171181
</div>
182+
<div
183+
ref={(el) =>
184+
props.set_section_ref('section:cli:group:agentic-search', el)
185+
}
186+
>
187+
<UiGroup title={t('cli.agentic-search.title')}>
188+
<UiItem
189+
title={t('common.instructions')}
190+
description={t('cli.agentic-search.instructions.description')}
191+
is_toggleable
192+
translations={{
193+
expand: t('common.expand'),
194+
collapse: t('common.collapse')
195+
}}
196+
>
197+
<UiTextarea
198+
value={props.agentic_search_instructions}
199+
min_rows={3}
200+
on_change={props.set_agentic_search_instructions}
201+
on_blur={props.on_agentic_search_instructions_blur}
202+
action_icon={
203+
props.agentic_search_instructions !=
204+
props.default_agentic_search_instructions
205+
? 'discard'
206+
: undefined
207+
}
208+
action_title={t('general.action.restore-default')}
209+
on_action_click={props.on_restore_agentic_search_instructions}
210+
/>
211+
</UiItem>
212+
<UiItem
213+
title={t('cli.agentic-search.invocation-count.title')}
214+
description={t('cli.agentic-search.invocation-count.description')}
215+
slot_right={
216+
<UiDropdown
217+
options={[
218+
{ value: '1', label: '1' },
219+
{ value: '2', label: '2' },
220+
{ value: '3', label: '3' }
221+
]}
222+
value={props.agentic_search_invocation_count.toString()}
223+
onChange={(val) =>
224+
props.on_agentic_search_invocation_count_change(
225+
parseInt(val, 10) as 1 | 2 | 3
226+
)
227+
}
228+
/>
229+
}
230+
/>
231+
</UiGroup>
232+
</div>
172233
<div
173234
ref={(el) =>
174235
props.set_section_ref('section:cli:group:agent-defaults', el)

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

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ type Props = {
5252
on_voice_instructions_blur: () => void
5353
default_voice_instructions: string
5454
on_restore_voice_instructions: () => void
55-
agentic_search_instructions: string
56-
set_agentic_search_instructions: (instructions: string) => void
57-
on_agentic_search_instructions_blur: () => void
58-
default_agentic_search_instructions: string
59-
on_restore_agentic_search_instructions: () => void
60-
agentic_search_invocation_count: 1 | 2 | 3
61-
on_agentic_search_invocation_count_change: (count: 1 | 2 | 3) => void
6255
commit_instructions: string
6356
set_commit_instructions: (instructions: string) => void
6457
on_commit_instructions_blur: () => void
@@ -454,60 +447,6 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
454447
/>
455448
</UiGroup>
456449
</div>
457-
458-
<div
459-
ref={(el) =>
460-
props.set_section_ref('section:general:group:agentic-search', el)
461-
}
462-
>
463-
<UiGroup title={t('general.agentic-search.title')}>
464-
<UiItem
465-
title={t('common.instructions')}
466-
description={t('general.agentic-search.instructions.description')}
467-
is_toggleable
468-
translations={{
469-
expand: t('common.expand'),
470-
collapse: t('common.collapse')
471-
}}
472-
>
473-
<UiTextarea
474-
value={props.agentic_search_instructions}
475-
min_rows={3}
476-
on_change={props.set_agentic_search_instructions}
477-
on_blur={props.on_agentic_search_instructions_blur}
478-
action_icon={
479-
props.agentic_search_instructions !=
480-
props.default_agentic_search_instructions
481-
? 'discard'
482-
: undefined
483-
}
484-
action_title={t('general.action.restore-default')}
485-
on_action_click={props.on_restore_agentic_search_instructions}
486-
/>
487-
</UiItem>
488-
<UiItem
489-
title={t('general.agentic-search.invocation-count.title')}
490-
description={t(
491-
'general.agentic-search.invocation-count.description'
492-
)}
493-
slot_right={
494-
<UiDropdown
495-
options={[
496-
{ value: '1', label: '1' },
497-
{ value: '2', label: '2' },
498-
{ value: '3', label: '3' }
499-
]}
500-
value={props.agentic_search_invocation_count.toString()}
501-
onChange={(val) =>
502-
props.on_agentic_search_invocation_count_change(
503-
parseInt(val, 10) as 1 | 2 | 3
504-
)
505-
}
506-
/>
507-
}
508-
/>
509-
</UiGroup>
510-
</div>
511450
</UiSection>
512451
)
513452
}

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

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,5 +179,78 @@ export const translations = {
179179
cs: 'agentů',
180180
hu: 'ügynökök',
181181
bg: 'агенти'
182+
},
183+
'cli.agentic-search.title': {
184+
en: 'Agentic Search',
185+
pl: 'Szukaj agentem',
186+
'zh-cn': '代理搜索',
187+
ja: 'エージェント検索',
188+
'zh-tw': '代理搜尋',
189+
de: 'Agentische Suche',
190+
es: 'Búsqueda agéntica',
191+
fr: 'Recherche agentique',
192+
'pt-br': 'Busca agêntica',
193+
ru: 'Агентный поиск',
194+
ko: '에이전트 검색',
195+
it: 'Ricerca agentica',
196+
tr: 'Aracı Arama',
197+
cs: 'Agentní vyhledávání',
198+
hu: 'Ügynökös keresés',
199+
bg: 'Агентско търсене'
200+
},
201+
'cli.agentic-search.instructions.description': {
202+
en: 'Instructions used to direct the agentic search behavior.',
203+
pl: 'Instrukcje używane do kierowania zachowaniem wyszukiwania agentowego.',
204+
'zh-cn': '用于指导代理搜索行为的说明。',
205+
ja: 'エージェント検索の動作を指示するために使用される命令。',
206+
'zh-tw': '用於指導代理搜尋行為的說明。',
207+
de: 'Anweisungen zur Steuerung des agentischen Suchverhaltens.',
208+
es: 'Instrucciones utilizadas para dirigir el comportamiento de búsqueda agéntica.',
209+
fr: 'Instructions utilisées pour diriger le comportement de recherche agentique.',
210+
'pt-br':
211+
'Instruções usadas para direcionar o comportamento de busca agêntica.',
212+
ru: 'Инструкции, используемые для направления поведения агентного поиска.',
213+
ko: '에이전트 검색 동작을 지시하는 데 사용되는 지침입니다.',
214+
it: 'Istruzioni utilizzate per dirigere il comportamento di ricerca agentica.',
215+
tr: 'Aracı arama davranışını yönlendirmek için kullanılan talimatlar.',
216+
cs: 'Pokyny používané k řízení chování agentního vyhledávání.',
217+
hu: 'Az ügynökös keresés viselkedésének irányítására használt utasítások.',
218+
bg: 'Инструкции, използвани за насочване на поведението при агентско търсене.'
219+
},
220+
'cli.agentic-search.invocation-count.title': {
221+
en: 'Invocation count',
222+
pl: 'Liczba wywołań',
223+
'zh-cn': '调用次数',
224+
ja: '呼び出し回数',
225+
'zh-tw': '調用次數',
226+
de: 'Aufrufanzahl',
227+
es: 'Recuento de invocaciones',
228+
fr: "Nombre d'invocations",
229+
'pt-br': 'Contagem de invocações',
230+
ru: 'Количество вызовов',
231+
ko: '호출 횟수',
232+
it: 'Conteggio invocazioni',
233+
tr: 'Çağırma sayısı',
234+
cs: 'Počet vyvolání',
235+
hu: 'Meghívások száma',
236+
bg: 'Брой извиквания'
237+
},
238+
'cli.agentic-search.invocation-count.description': {
239+
en: 'Number of times the agent is invoked during a search.',
240+
pl: 'Liczba wywołań agenta podczas wyszukiwania.',
241+
'zh-cn': '搜索期间调用代理的次数。',
242+
ja: '検索中にエージェントが呼び出される回数。',
243+
'zh-tw': '搜尋期間調用代理的次數。',
244+
de: 'Anzahl der Aufrufe des Agenten während einer Suche.',
245+
es: 'Número de veces que se invoca al agente durante una búsqueda.',
246+
fr: "Nombre de fois que l'agent est invoqué lors d'une recherche.",
247+
'pt-br': 'Número de vezes que o agente é invocado durante uma busca.',
248+
ru: 'Количество вызовов агента во время поиска.',
249+
ko: '검색 중 에이전트가 호출되는 횟수입니다.',
250+
it: "Numero di volte in cui l'agente viene invocato durante una ricerca.",
251+
tr: 'Bir arama sırasında aracının çağrılma sayısı.',
252+
cs: 'Počet vyvolání agenta během vyhledávání.',
253+
hu: 'Az ügynök meghívásainak száma keresés során.',
254+
bg: 'Брой пъти, когато агентът се извиква по време на търсене.'
182255
}
183256
} as const

0 commit comments

Comments
 (0)