Skip to content

Commit 060f72a

Browse files
authored
alter placeholder when no variables to list (microsoft#253119)
1 parent 22ad867 commit 060f72a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ export class SelectAndInsertKernelVariableAction extends Action2 {
206206
});
207207
}
208208

209-
const pickedVariable = await quickInputService.pick(quickPickItems, { placeHolder: localize('selectKernelVariablePlaceholder', "Select a kernel variable") });
209+
const placeHolder = quickPickItems.length > 0
210+
? localize('selectKernelVariablePlaceholder', "Select a kernel variable")
211+
: localize('noKernelVariables', "No kernel variables found");
212+
213+
const pickedVariable = await quickInputService.pick(quickPickItems, { placeHolder });
210214
if (!pickedVariable) {
211215
return;
212216
}

0 commit comments

Comments
 (0)