feat(vscode): Move Navigation into the title bar (#88)
* Move Navigation into the title bar * Fix spacing * Update Changelog * Remove unused function
This commit is contained in:
@@ -116,6 +116,30 @@ export class ChatViewProvider implements vscode.WebviewViewProvider {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public createNewSession() {
|
||||
if (this._view) {
|
||||
// Reveal the webview panel
|
||||
this._view.show(true);
|
||||
|
||||
this._view.webview.postMessage({
|
||||
type: 'command',
|
||||
command: 'newSession'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public showSettings() {
|
||||
if (this._view) {
|
||||
// Reveal the webview panel
|
||||
this._view.show(true);
|
||||
|
||||
this._view.webview.postMessage({
|
||||
type: 'command',
|
||||
command: 'showSettings'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private _sendCachedState() {
|
||||
if (!this._view) {
|
||||
|
||||
@@ -296,6 +296,18 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
})
|
||||
);
|
||||
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('openchamber.newSession', () => {
|
||||
chatViewProvider?.createNewSession();
|
||||
})
|
||||
);
|
||||
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('openchamber.showSettings', () => {
|
||||
chatViewProvider?.showSettings();
|
||||
})
|
||||
);
|
||||
|
||||
context.subscriptions.push(
|
||||
vscode.commands.registerCommand('openchamber.showOpenCodeStatus', async () => {
|
||||
const config = vscode.workspace.getConfiguration('openchamber');
|
||||
|
||||
Reference in New Issue
Block a user