Skip to content

Commit

Permalink
Merge branch 'raoul/saas' of github.com:runtimeverification/simbolik-…
Browse files Browse the repository at this point in the history
…vscode into raoul/saas
  • Loading branch information
RaoulSchaffranek committed May 25, 2024
2 parents 02eeee2 + 3e38817 commit e78f998
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/DebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class WebsocketDebugAdapter implements vscode.DebugAdapter {
onDidSendMessage = this._onDidSendMessage.event;

handleMessage(message: vscode.DebugProtocolMessage): void {
const apiKey = getConfigValue('apiKey', '');
const apiKey = getConfigValue('api-key', '');
const clientVersion = vscode.extensions.getExtension('simbolik.simbolik')?.packageJSON.version;
const messageWithApiKey : DebugProtocolMessage = Object.assign({}, message, {apiKey, clientVersion});
this.websocket.send(JSON.stringify(messageWithApiKey));
Expand Down
13 changes: 9 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export function activate(context: vscode.ExtensionContext) {

vscode.debug.onDidReceiveDebugSessionCustomEvent(async event => {
if (event.event === 'api-key-validation-failed') {

const action = await vscode.window.showErrorMessage(
'API key validation failed',
'Open Settings',
Expand All @@ -78,13 +77,19 @@ export function activate(context: vscode.ExtensionContext) {
if (action === 'Open Settings') {
vscode.commands.executeCommand(
'workbench.action.openSettings',
'simbolik.apiKey'
'simbolik.api-key'
);
}
if (action === 'Learn More') {
vscode.env.openExternal(vscode.Uri.parse('https://simbolik.runtimeverification.com'));
vscode.env.openExternal(
vscode.Uri.parse('https://simbolik.runtimeverification.com')
);
}

}
if (event.event === 'api-key-sessions-limit-exceeded') {
const action = await vscode.window.showErrorMessage(
'Too many debugging sessions running in parallel'
);
}
console.log(event);
});
Expand Down

0 comments on commit e78f998

Please sign in to comment.