Skip to content

Commit 8d9e8e5

Browse files
committed
Remove intelligent and agentic file search instruction settings
- rename 'commit messages' group to 'commits' - remove settings 'intelligent search instructions' and 'agentic search instructions'
1 parent 9e5202b commit 8d9e8e5

12 files changed

Lines changed: 86 additions & 505 deletions

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-agentic-search-instructions.ts‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-intelligent-search-instructions.ts‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-agentic-search-instructions.ts‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-intelligent-search-instructions.ts‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/index.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
export * from './handle-get-intelligent-search-instructions'
2-
export * from './handle-update-intelligent-search-instructions'
3-
export * from './handle-get-agentic-search-instructions'
4-
export * from './handle-update-agentic-search-instructions'
51
export * from './handle-get-templates'
62
export * from './handle-update-templates'
73
export * from './handle-create-template'

‎apps/editor/src/views/settings/backend/settings-view-provider.ts‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ import {
4848
handle_pick_model_provider,
4949
handle_pick_api_model,
5050
handle_pick_api_reasoning_effort,
51-
handle_get_intelligent_search_instructions,
52-
handle_update_intelligent_search_instructions,
53-
handle_get_agentic_search_instructions,
54-
handle_update_agentic_search_instructions,
5551
handle_get_templates,
5652
handle_update_templates,
5753
handle_create_template,
@@ -162,16 +158,6 @@ export class SettingsViewProvider {
162158
await handle_delete_template(this, message)
163159
} else if (message.command == 'GET_API_CONFIGURATIONS') {
164160
await handle_get_api_configurations(this)
165-
} else if (message.command == 'GET_INTELLIGENT_SEARCH_INSTRUCTIONS') {
166-
await handle_get_intelligent_search_instructions(this)
167-
} else if (
168-
message.command == 'UPDATE_INTELLIGENT_SEARCH_INSTRUCTIONS'
169-
) {
170-
await handle_update_intelligent_search_instructions(message)
171-
} else if (message.command == 'GET_AGENTIC_SEARCH_INSTRUCTIONS') {
172-
await handle_get_agentic_search_instructions(this)
173-
} else if (message.command == 'UPDATE_AGENTIC_SEARCH_INSTRUCTIONS') {
174-
await handle_update_agentic_search_instructions(message)
175161
} else if (message.command == 'SET_DEFAULT_API_CONFIGURATION') {
176162
await handle_set_default_api_configuration(
177163
this,
@@ -282,8 +268,6 @@ export class SettingsViewProvider {
282268
void handle_get_model_providers(this)
283269
void handle_get_api_configurations(this)
284270
void handle_get_edit_files_system_instructions(this)
285-
void handle_get_intelligent_search_instructions(this)
286-
void handle_get_agentic_search_instructions(this)
287271
void handle_get_commit_message_instructions(this)
288272
void handle_get_attach_ascii_tree_of_context(this)
289273
void handle_get_use_context_files_in_commit_message_prompt(this)

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

Lines changed: 4 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@ import { ApiFeature } from '@/views/shared/types/api-features'
1515
import { use_translation, TranslationKey } from '../i18n/use-translation'
1616
import { WebSection } from './sections/WebSection'
1717
import { commit_message_instructions as default_commit_message_instructions } from '@/constants/instructions'
18-
import { intelligent_search_task_instructions as default_intelligent_file_search_instructions } from '@/constants/instructions'
19-
import { agentic_search_task_instructions as default_agentic_file_search_instructions } from '@/constants/instructions'
2018
import { default_system_instructions } from '@shared/constants/default-system-instructions'
2119
import { GROUP_TITLE_HEIGHT, SECTION_HEADER_HEIGHT } from '@ui/constants/sizes'
2220

2321
export type NavItem =
2422
| 'section:general'
2523
| 'section:general:group:open-links'
26-
| 'section:general:group:context'
2724
| 'section:general:group:prompt'
28-
| 'section:general:group:commit-messages'
25+
| 'section:general:group:commits'
2926
| 'section:web'
3027
| 'section:web:group:web-configurations'
3128
| 'section:api'
@@ -51,12 +48,8 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
5148
label: 'general.prompt.title'
5249
},
5350
{
54-
id: 'section:general:group:context',
55-
label: 'general.context.title'
56-
},
57-
{
58-
id: 'section:general:group:commit-messages',
59-
label: 'general.commit-messages.title'
51+
id: 'section:general:group:commits',
52+
label: 'general.commits.title'
6053
},
6154
{
6255
id: 'section:web',
@@ -98,8 +91,6 @@ type Props = {
9891
web_configurations: WebConfiguration[]
9992
defaults: Record<ApiFeature, string | null>
10093
edit_files_system_instructions: string
101-
intelligent_search_instructions: string
102-
agentic_search_instructions: string
10394
commit_message_instructions: string
10495
attach_ascii_tree_of_context: 'ask' | 'always' | 'never'
10596
use_context_files_in_commit_message_prompt: 'ask' | 'always' | 'never'
@@ -130,8 +121,6 @@ type Props = {
130121
enabled: boolean
131122
) => void
132123
on_edit_files_system_instructions_change: (instructions: string) => void
133-
on_intelligent_search_instructions_change: (instructions: string) => void
134-
on_agentic_search_instructions_change: (instructions: string) => void
135124
on_gemini_user_id_change: (id: number | null) => void
136125
on_ai_studio_user_id_change: (id: number | null) => void
137126
on_send_with_shift_enter_change: (enabled: boolean) => void
@@ -180,8 +169,7 @@ export const Home: React.FC<Props> = (props) => {
180169
'section:general': null,
181170
'section:general:group:open-links': null,
182171
'section:general:group:prompt': null,
183-
'section:general:group:context': null,
184-
'section:general:group:commit-messages': null,
172+
'section:general:group:commits': null,
185173
'section:web': null,
186174
'section:web:group:web-configurations': null,
187175
'section:api': null,
@@ -200,10 +188,6 @@ export const Home: React.FC<Props> = (props) => {
200188
)
201189

202190
const [commit_instructions, set_commit_instructions] = useState('')
203-
const [intelligent_search_instructions, set_intelligent_search_instructions] =
204-
useState('')
205-
const [agentic_search_instructions, set_agentic_search_instructions] =
206-
useState('')
207191
const [edit_files_instructions, set_edit_files_instructions] = useState('')
208192

209193
const get_has_warning = (id: NavItem): boolean => {
@@ -355,16 +339,6 @@ export const Home: React.FC<Props> = (props) => {
355339
set_commit_instructions(props.commit_message_instructions || '')
356340
}, [props.commit_message_instructions])
357341

358-
useEffect(() => {
359-
set_intelligent_search_instructions(
360-
props.intelligent_search_instructions || ''
361-
)
362-
}, [props.intelligent_search_instructions])
363-
364-
useEffect(() => {
365-
set_agentic_search_instructions(props.agentic_search_instructions || '')
366-
}, [props.agentic_search_instructions])
367-
368342
useEffect(() => {
369343
set_edit_files_instructions(props.edit_files_system_instructions || '')
370344
}, [props.edit_files_system_instructions])
@@ -527,62 +501,6 @@ export const Home: React.FC<Props> = (props) => {
527501
default_commit_message_instructions
528502
)
529503
}}
530-
intelligent_search_instructions={intelligent_search_instructions}
531-
set_intelligent_search_instructions={
532-
set_intelligent_search_instructions
533-
}
534-
on_intelligent_search_instructions_blur={() => {
535-
props.on_intelligent_search_instructions_change(
536-
intelligent_search_instructions
537-
)
538-
if (
539-
intelligent_search_instructions == '' &&
540-
props.intelligent_search_instructions ==
541-
default_intelligent_file_search_instructions
542-
) {
543-
set_intelligent_search_instructions(
544-
default_intelligent_file_search_instructions
545-
)
546-
}
547-
}}
548-
default_intelligent_search_instructions={
549-
default_intelligent_file_search_instructions
550-
}
551-
on_restore_intelligent_search_instructions={() => {
552-
set_intelligent_search_instructions(
553-
default_intelligent_file_search_instructions
554-
)
555-
props.on_intelligent_search_instructions_change(
556-
default_intelligent_file_search_instructions
557-
)
558-
}}
559-
agentic_search_instructions={agentic_search_instructions}
560-
set_agentic_search_instructions={set_agentic_search_instructions}
561-
on_agentic_search_instructions_blur={() => {
562-
props.on_agentic_search_instructions_change(
563-
agentic_search_instructions
564-
)
565-
if (
566-
agentic_search_instructions == '' &&
567-
props.agentic_search_instructions ==
568-
default_agentic_file_search_instructions
569-
) {
570-
set_agentic_search_instructions(
571-
default_agentic_file_search_instructions
572-
)
573-
}
574-
}}
575-
default_agentic_search_instructions={
576-
default_agentic_file_search_instructions
577-
}
578-
on_restore_agentic_search_instructions={() => {
579-
set_agentic_search_instructions(
580-
default_agentic_file_search_instructions
581-
)
582-
props.on_agentic_search_instructions_change(
583-
default_agentic_file_search_instructions
584-
)
585-
}}
586504
on_open_external_url={props.on_open_external_url}
587505
templates={props.templates}
588506
on_update_templates={props.on_update_templates}

0 commit comments

Comments
 (0)