File tree Expand file tree Collapse file tree
packages/vscode/src/view/backend/message-handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ import { chat_code_completion_instructions } from '@/constants/instructions'
1414import { ConfigPresetFormat } from '../helpers/preset-format-converters'
1515import { CHATBOTS } from '@shared/constants/chatbots'
1616
17+ /**
18+ * When preset_names is an emtpy stirng - show quick pick,
19+ * if undefiend - use recently used preset/group.
20+ */
1721export const handle_send_prompt = async ( params : {
1822 provider : ViewProvider
1923 preset_names ?: string [ ]
@@ -278,7 +282,10 @@ async function resolve_presets(params: {
278282 const last_preset = params . context . workspaceState . get < string > (
279283 LAST_SELECTED_PRESET_KEY
280284 )
281- if ( last_preset && available_preset_names . includes ( last_preset ) ) {
285+ if (
286+ last_preset !== undefined &&
287+ available_preset_names . includes ( last_preset )
288+ ) {
282289 return [ last_preset ]
283290 }
284291 } else if ( last_choice == GROUP ) {
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ export const handle_show_history_quick_pick = async (
8080 total_pinned ?: number ,
8181 is_searching ?: boolean
8282 ) : vscode . QuickPickItem => ( {
83- label : dayjs ( entry . createdAt ) . fromNow ( ) ,
83+ label : '$(history)' ,
84+ description : dayjs ( entry . createdAt ) . fromNow ( ) ,
8485 detail : entry . text ,
8586 buttons : [
8687 ...( list == 'pinned' &&
@@ -112,16 +113,13 @@ export const handle_show_history_quick_pick = async (
112113 ? [
113114 {
114115 iconPath : new vscode . ThemeIcon ( 'pinned' ) ,
115- tooltip : 'Add to Pinned Prompts '
116+ tooltip : 'Add to pinned '
116117 }
117118 ]
118119 : [ ] ) ,
119120 {
120121 iconPath : new vscode . ThemeIcon ( 'close' ) ,
121- tooltip :
122- list == 'pinned'
123- ? 'Remove from Pinned Prompts'
124- : 'Remove from Recent Prompts'
122+ tooltip : list == 'pinned' ? 'Remove from pinned' : 'Remove from recent'
125123 }
126124 ]
127125 } )
You can’t perform that action at this time.
0 commit comments