Skip to content

Commit b4ae7bd

Browse files
Merge master into feature/amazonq
2 parents 15598dc + 7f22a99 commit b4ae7bd

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "codecatalyst: fix extension activation in new dev environments"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "codecatalyst: fix heartbeat activity registration"
4+
}

packages/core/src/codecatalyst/auth.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,17 +371,22 @@ export class CodeCatalystAuthenticationProvider {
371371
}
372372
}
373373

374-
private getState(): Record<string, ConnectionState> {
374+
private getStates(): Record<string, ConnectionState> {
375375
return this.memento.get(this.mementoKey, {} as Record<string, ConnectionState>)
376376
}
377377

378378
public getConnectionState(conn: SsoConnection): ConnectionState {
379-
return this.getState()[conn.id]
379+
return (
380+
this.getStates()[conn.id] ?? {
381+
onboarded: false,
382+
scopeExpired: false,
383+
}
384+
)
380385
}
381386

382387
private async setConnectionState(conn: SsoConnection, state: ConnectionState) {
383388
await this.memento.update(this.mementoKey, {
384-
...this.getState(),
389+
...this.getStates(),
385390
[conn.id]: state,
386391
})
387392
}

0 commit comments

Comments
 (0)