Skip to content

Commit 7311115

Browse files
ethanyhouCopilot
andcommitted
Address comments.
Co-authored-by: Copilot <copilot@github.com>
1 parent 30f5b41 commit 7311115

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatAssistProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ public ICompletionProposal[] createCopilotCompletionTemplateProposals(String pre
125125
String lowerPrefix = prefix.toLowerCase();
126126

127127
// Sort results by match quality, then build proposals.
128-
return Arrays.stream(templates).map(t -> new SimpleEntry<>(t, getMatchPriority(t, lowerPrefix)))
128+
return Arrays.stream(templates).filter(t -> StringUtils.isNotBlank(t.id()))
129+
.map(t -> new SimpleEntry<>(t, getMatchPriority(t, lowerPrefix)))
129130
.filter(e -> e.getValue() >= 0).sorted(Comparator.comparingInt(Entry::getValue)).map(e -> {
130131
ConversationTemplate t = e.getKey();
131132
boolean isSkill = t.source() == TemplateSource.SKILL;

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/ChatCompletionService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ public void dispose() {
255255
this.authStatusManager.removeCopilotAuthStatusListener(this);
256256
ResourcesPlugin.getWorkspace().removeResourceChangeListener(skillFileListener);
257257
CopilotUi.getPlugin().getLanguageServerSettingManager().unregisterPropertyChangeListener(preferenceListener);
258+
if (this.eventBroker != null && this.customPromptsChangedHandler != null) {
259+
this.eventBroker.unsubscribe(this.customPromptsChangedHandler);
260+
}
258261
}
259262

260263
/**

0 commit comments

Comments
 (0)