Skip to content

Commit e4a0df8

Browse files
committed
Prefix relevant files instructions with Task header
1 parent 94a0932 commit e4a0df8

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

apps/editor/src/commands/find-relevant-files-command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ export const find_relevant_files_command = (
450450
find_relevant_files_instructions
451451

452452
const system_instructions_xml = `${find_relevant_files_format}\n${instructions_to_use}`
453-
const part2 = `${system_instructions_xml}\n${instructions}`
453+
const part2 = `${system_instructions_xml}\nTask:\n${instructions}`
454454

455455
const user_content = build_user_content({
456456
provider_name: provider.name,

apps/editor/src/views/panel/backend/message-handlers/handle-copy-prompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const handle_copy_prompt = async (params: {
158158
const instructions_to_use =
159159
config_find_relevant_files_instructions ||
160160
find_relevant_files_instructions
161-
system_instructions_xml = `${find_relevant_files_format_for_panel}\n${instructions_to_use}`
161+
system_instructions_xml = `${find_relevant_files_format_for_panel}\n${instructions_to_use}\nTask:`
162162
}
163163

164164
const text = context_text

apps/editor/src/views/panel/backend/message-handlers/handle-find-relevant-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export const handle_find_relevant_files = async (
365365
const system_instructions_xml = `${find_relevant_files_format_for_panel}\n${instructions_to_use}`
366366

367367
const part1 = `<files>\n${collected.other_files}`
368-
const part2 = `${collected.recent_files}</files>\n${skill_definitions}${system_instructions_xml}\n${processed_instructions}`
368+
const part2 = `${collected.recent_files}</files>\n${skill_definitions}${system_instructions_xml}\nTask:\n${processed_instructions}`
369369

370370
const user_content = build_user_content({
371371
provider_name: provider.name,

apps/editor/src/views/panel/backend/message-handlers/handle-send-to-browser.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const handle_send_to_browser = async (params: {
203203
const instructions_to_use =
204204
config_find_relevant_files_instructions ||
205205
find_relevant_files_instructions
206-
system_instructions_xml = `${find_relevant_files_format_for_panel}\n${instructions_to_use}`
206+
system_instructions_xml = `${find_relevant_files_format_for_panel}\n${instructions_to_use}\nTask:`
207207
}
208208

209209
return {
@@ -249,15 +249,15 @@ export const handle_send_to_browser = async (params: {
249249
}
250250
}
251251

252-
async function show_preset_quick_pick(params: {
252+
const show_preset_quick_pick = async (params: {
253253
presets: ConfigPresetFormat[]
254254
context: vscode.ExtensionContext
255255
prompt_type: WebPromptType
256256
panel_provider: PanelProvider
257257
get_is_preset_disabled: (preset: ConfigPresetFormat) => boolean
258258
is_in_code_completions_mode: boolean
259259
current_instructions: string
260-
}): Promise<{ preset_names: string[] } | null> {
260+
}): Promise<{ preset_names: string[] } | null> => {
261261
const { presets, context, prompt_type, panel_provider } = params
262262

263263
const quick_pick = vscode.window.createQuickPick<
@@ -453,13 +453,13 @@ async function show_preset_quick_pick(params: {
453453
})
454454
}
455455

456-
async function resolve_presets(params: {
456+
const resolve_presets = async (params: {
457457
panel_provider: PanelProvider
458458
preset_name?: string
459459
group_name?: string
460460
show_quick_pick?: boolean
461461
context: vscode.ExtensionContext
462-
}): Promise<{ preset_names: string[] }> {
462+
}): Promise<{ preset_names: string[] }> => {
463463
const recents_key = get_recently_used_presets_or_groups_key(
464464
params.panel_provider.web_prompt_type
465465
)

0 commit comments

Comments
 (0)