Skip to content

Commit

Permalink
/clear command
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Oct 1, 2024
1 parent 72ee953 commit f75228b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/chat-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ function SidebarComponent(props: any) {
];
setChatMessages(newList);

if (prompt.startsWith('/clear')) {
setChatMessages([]);
setPrompt('');
event.stopPropagation();
event.preventDefault();
return;
}

setCopilotRequestInProgress(true);

const activeDocInfo: IActiveDocumentInfo = props.getActiveDocumentInfo();
Expand Down Expand Up @@ -284,7 +292,7 @@ function SidebarComponent(props: any) {
</div>
{
(ghLoginStatus === GitHubCopilotLoginStatus.ActivatingDevice && deviceActivationURL && deviceActivationCode) &&
(<div className='copilot-activation-message'>Please visit <a href={deviceActivationURL} target='_blank'>{deviceActivationURL}</a> and use code <b>{deviceActivationCode}</b> to allow access from this device.</div>)
(<div className='copilot-activation-message'>Please visit <a href={deviceActivationURL} target='_blank'>{deviceActivationURL}</a> and use code <b>{deviceActivationCode}</b> to allow access to GitHub Copilot from this app.</div>)
}
{ghLoginStatus === GitHubCopilotLoginStatus.LoggedIn && (
<div className="sidebar-messages">
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class GitHubInlineCompletionProvider implements IInlineCompletionProvider<IInlin
activeDocumentInfo.language,
activeDocumentInfo.filename
).then(response => {
console.log(`INLINE COMPLETIONS RESPONSE\n${response}`);
items.push({
insertText: response.data
});
Expand Down

0 comments on commit f75228b

Please sign in to comment.