Skip to content

Commit 5339fa1

Browse files
committed
Consolidate mode-specific chat preset configurations into a unified setting and implement a migration script
1 parent ee13191 commit 5339fa1

9 files changed

Lines changed: 158 additions & 428 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 1 addition & 307 deletions
Original file line numberDiff line numberDiff line change
@@ -884,225 +884,7 @@
884884
"scope": "resource",
885885
"default": false
886886
},
887-
"codeWebChat.chatPresetsForAskAboutContext": {
888-
"type": "array",
889-
"scope": "resource",
890-
"items": {
891-
"type": "object",
892-
"properties": {
893-
"name": {
894-
"type": "string"
895-
},
896-
"chatbot": {
897-
"type": "string"
898-
},
899-
"promptPrefix": {
900-
"type": "string",
901-
"examples": [
902-
"Outline the steps needed to achieve:",
903-
"Draft a roadmap for accomplishing:",
904-
"Propose various approaches for addressing:",
905-
"Identify potential challenges in developing:",
906-
"Describe the purpose of this code:",
907-
"I need assistance troubleshooting this issue:",
908-
"Help diagnose this error:",
909-
"Generate commit message based on changes:",
910-
"Write tests for:"
911-
]
912-
},
913-
"promptSuffix": {
914-
"type": "string",
915-
"examples": [
916-
"Keep your response concise.",
917-
"Think step by step.",
918-
"Show only changed fragments.",
919-
"Summarize your understanding of the problem.",
920-
"Highlight what needs to change.",
921-
"Detail the key considerations.",
922-
"Suggest any alternative approaches.",
923-
"Identify potential drawbacks.",
924-
"Ask for clarifications if needed before proceeding."
925-
]
926-
},
927-
"model": {
928-
"type": "string"
929-
},
930-
"options": {
931-
"type": "array",
932-
"items": {
933-
"type": "string"
934-
}
935-
},
936-
"temperature": {
937-
"type": "number"
938-
},
939-
"topP": {
940-
"type": "number"
941-
},
942-
"systemInstructions": {
943-
"type": "string"
944-
},
945-
"port": {
946-
"type": "number"
947-
},
948-
"newUrl": {
949-
"type": "string"
950-
},
951-
"thinkingBudget": {
952-
"type": "number"
953-
},
954-
"reasoningEffort": {
955-
"type": "string"
956-
},
957-
"isSelected": {
958-
"type": "boolean"
959-
},
960-
"isCollapsed": {
961-
"type": "boolean"
962-
},
963-
"isPinned": {
964-
"type": "boolean"
965-
}
966-
}
967-
}
968-
},
969-
"codeWebChat.chatPresetsForEditContext": {
970-
"type": "array",
971-
"scope": "resource",
972-
"items": {
973-
"type": "object",
974-
"properties": {
975-
"name": {
976-
"type": "string"
977-
},
978-
"chatbot": {
979-
"type": "string"
980-
},
981-
"promptPrefix": {
982-
"type": "string",
983-
"examples": [
984-
"Outline the steps needed to achieve:",
985-
"Draft a roadmap for accomplishing:",
986-
"Propose various approaches for addressing:",
987-
"Identify potential challenges in developing:",
988-
"Describe the purpose of this code:",
989-
"I need assistance troubleshooting this issue:",
990-
"Help diagnose this error:",
991-
"Generate commit message based on changes:",
992-
"Write tests for:"
993-
]
994-
},
995-
"promptSuffix": {
996-
"type": "string",
997-
"examples": [
998-
"Keep your response concise.",
999-
"Think step by step.",
1000-
"Show only changed fragments.",
1001-
"Summarize your understanding of the problem.",
1002-
"Highlight what needs to change.",
1003-
"Detail the key considerations.",
1004-
"Suggest any alternative approaches.",
1005-
"Identify potential drawbacks.",
1006-
"Ask for clarifications if needed before proceeding."
1007-
]
1008-
},
1009-
"model": {
1010-
"type": "string"
1011-
},
1012-
"options": {
1013-
"type": "array",
1014-
"items": {
1015-
"type": "string"
1016-
}
1017-
},
1018-
"temperature": {
1019-
"type": "number"
1020-
},
1021-
"topP": {
1022-
"type": "number"
1023-
},
1024-
"systemInstructions": {
1025-
"type": "string"
1026-
},
1027-
"port": {
1028-
"type": "number"
1029-
},
1030-
"newUrl": {
1031-
"type": "string"
1032-
},
1033-
"thinkingBudget": {
1034-
"type": "number"
1035-
},
1036-
"reasoningEffort": {
1037-
"type": "string"
1038-
},
1039-
"isSelected": {
1040-
"type": "boolean"
1041-
},
1042-
"isCollapsed": {
1043-
"type": "boolean"
1044-
},
1045-
"isPinned": {
1046-
"type": "boolean"
1047-
}
1048-
}
1049-
}
1050-
},
1051-
"codeWebChat.chatPresetsForCodeAtCursor": {
1052-
"type": "array",
1053-
"scope": "resource",
1054-
"items": {
1055-
"type": "object",
1056-
"properties": {
1057-
"name": {
1058-
"type": "string"
1059-
},
1060-
"chatbot": {
1061-
"type": "string"
1062-
},
1063-
"model": {
1064-
"type": "string"
1065-
},
1066-
"options": {
1067-
"type": "array",
1068-
"items": {
1069-
"type": "string"
1070-
}
1071-
},
1072-
"temperature": {
1073-
"type": "number"
1074-
},
1075-
"topP": {
1076-
"type": "number"
1077-
},
1078-
"systemInstructions": {
1079-
"type": "string"
1080-
},
1081-
"port": {
1082-
"type": "number"
1083-
},
1084-
"newUrl": {
1085-
"type": "string"
1086-
},
1087-
"thinkingBudget": {
1088-
"type": "number"
1089-
},
1090-
"reasoningEffort": {
1091-
"type": "string"
1092-
},
1093-
"isSelected": {
1094-
"type": "boolean"
1095-
},
1096-
"isCollapsed": {
1097-
"type": "boolean"
1098-
},
1099-
"isPinned": {
1100-
"type": "boolean"
1101-
}
1102-
}
1103-
}
1104-
},
1105-
"codeWebChat.chatPresetsForFindRelevantFiles": {
887+
"codeWebChat.chatPresets": {
1106888
"type": "array",
1107889
"scope": "resource",
1108890
"items": {
@@ -1144,94 +926,6 @@
1144926
"reasoningEffort": {
1145927
"type": "string"
1146928
},
1147-
"isSelected": {
1148-
"type": "boolean"
1149-
},
1150-
"isCollapsed": {
1151-
"type": "boolean"
1152-
},
1153-
"isPinned": {
1154-
"type": "boolean"
1155-
}
1156-
}
1157-
}
1158-
},
1159-
"codeWebChat.chatPresetsForNoContext": {
1160-
"type": "array",
1161-
"scope": "resource",
1162-
"items": {
1163-
"type": "object",
1164-
"properties": {
1165-
"name": {
1166-
"type": "string"
1167-
},
1168-
"chatbot": {
1169-
"type": "string"
1170-
},
1171-
"promptPrefix": {
1172-
"type": "string",
1173-
"examples": [
1174-
"Outline the steps needed to achieve:",
1175-
"Draft a roadmap for accomplishing:",
1176-
"Propose various approaches for addressing:",
1177-
"Identify potential challenges in developing:",
1178-
"Describe the purpose of this code:",
1179-
"I need assistance troubleshooting this issue:",
1180-
"Help diagnose this error:",
1181-
"Generate commit message based on changes:",
1182-
"Write tests for:"
1183-
]
1184-
},
1185-
"promptSuffix": {
1186-
"type": "string",
1187-
"examples": [
1188-
"Keep your response concise.",
1189-
"Think step by step.",
1190-
"Show only changed fragments.",
1191-
"Summarize your understanding of the problem.",
1192-
"Highlight what needs to change.",
1193-
"Detail the key considerations.",
1194-
"Suggest any alternative approaches.",
1195-
"Identify potential drawbacks.",
1196-
"Ask for clarifications if needed before proceeding."
1197-
]
1198-
},
1199-
"model": {
1200-
"type": "string"
1201-
},
1202-
"options": {
1203-
"type": "array",
1204-
"items": {
1205-
"type": "string"
1206-
}
1207-
},
1208-
"temperature": {
1209-
"type": "number"
1210-
},
1211-
"topP": {
1212-
"type": "number"
1213-
},
1214-
"systemInstructions": {
1215-
"type": "string"
1216-
},
1217-
"port": {
1218-
"type": "number"
1219-
},
1220-
"newUrl": {
1221-
"type": "string"
1222-
},
1223-
"thinkingBudget": {
1224-
"type": "number"
1225-
},
1226-
"reasoningEffort": {
1227-
"type": "string"
1228-
},
1229-
"isSelected": {
1230-
"type": "boolean"
1231-
},
1232-
"isCollapsed": {
1233-
"type": "boolean"
1234-
},
1235929
"isPinned": {
1236930
"type": "boolean"
1237931
}

‎apps/editor/src/extension.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import {
1212
migrate_prune_context_to_find_relevant_files,
1313
migrate_merge_configurations,
1414
migrate_preset_affix_to_prompt_template,
15-
migrate_remove_preset_groups_and_separators
15+
migrate_remove_preset_groups_and_separators,
16+
migrate_merge_chat_presets
1617
} from './migrations'
1718
import {
1819
apply_chat_response_command,
@@ -72,6 +73,8 @@ export const activate = async (context: vscode.ExtensionContext) => {
7273
await migrate_preset_affix_to_prompt_template(context)
7374
// 8 June 2026
7475
await migrate_remove_preset_groups_and_separators(context)
76+
// 9 June 2026
77+
await migrate_merge_chat_presets(context)
7578
}
7679

7780
await migrations()

‎apps/editor/src/migrations/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ export * from './migrate-prune-context-to-find-relevant-files'
77
export * from './migrate-merge-configurations'
88
export * from './migrate-preset-affix-to-prompt-template'
99
export * from './migrate-remove-preset-groups-and-separators'
10+
export * from './migrate-merge-chat-presets'
11+

0 commit comments

Comments
 (0)