Skip to content

Commit 69ea344

Browse files
committed
may as well return full sessions, idk
1 parent cc5cd52 commit 69ea344

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/positron-dts/positron.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ declare module 'positron' {
18291829
/**
18301830
* List all active sessions.
18311831
*/
1832-
export function getActiveSessions(): Thenable<ActiveRuntimeSessionMetadata[]>;
1832+
export function getActiveSessions(): Thenable<BaseLanguageRuntimeSession[]>;
18331833

18341834
/**
18351835
* Get a specific session by its ID.

src/vs/workbench/api/common/positron/extHost.positron.api.impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function createPositronApiFactoryAndRegisterActors(accessor: ServicesAcce
103103
getPreferredRuntime(languageId: string): Thenable<positron.LanguageRuntimeMetadata | undefined> {
104104
return extHostLanguageRuntime.getPreferredRuntime(languageId);
105105
},
106-
getActiveSessions(): Thenable<positron.ActiveRuntimeSessionMetadata[]> {
106+
getActiveSessions(): Thenable<positron.BaseLanguageRuntimeSession[]> {
107107
return extHostLanguageRuntime.getActiveSessions();
108108
},
109109
getSession(sessionId: string): Thenable<positron.BaseLanguageRuntimeSession | undefined> {

src/vs/workbench/api/common/positron/extHostLanguageRuntime.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,9 @@ export class ExtHostLanguageRuntime implements extHostProtocol.ExtHostLanguageRu
10621062
return this._proxy.$getPreferredRuntime(languageId);
10631063
}
10641064

1065-
public async getActiveSessions(): Promise<positron.ActiveRuntimeSessionMetadata[]> {
1066-
return this._proxy.$getActiveSessions();
1065+
public async getActiveSessions(): Promise<positron.BaseLanguageRuntimeSession[]> {
1066+
return (await this._proxy.$getActiveSessions())
1067+
.map(session => this.getRuntimeSessionInterface(session)!);
10671068
}
10681069

10691070
public async getSession(sessionId: string): Promise<positron.BaseLanguageRuntimeSession | undefined> {

0 commit comments

Comments
 (0)