mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Add command for toggling chat view
This commit is contained in:
parent
dde86e2f62
commit
b22cefb0d4
1 changed files with 8 additions and 1 deletions
|
|
@ -29,8 +29,15 @@ export default class CopilotPlugin extends Plugin {
|
|||
(leaf: WorkspaceLeaf) => new CopilotView(leaf, this)
|
||||
);
|
||||
|
||||
this.addCommand({
|
||||
id: 'copilot-chat-toggle-window',
|
||||
name: 'Toggle Copilot Chat Window',
|
||||
callback: () => {
|
||||
this.toggleView();
|
||||
}
|
||||
});
|
||||
|
||||
this.addRibbonIcon('message-square', 'Copilot Chat', (evt: MouseEvent) => {
|
||||
// open or close the chatgpt view
|
||||
this.toggleView();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue