mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-12 19:10:55 -07:00
feat(workspaces): implement Hub auto-cleanup and connection heartbeat
This commit is contained in:
@@ -93,6 +93,21 @@ export class WorkspaceHubClient {
|
||||
return (await response.json()) as WorkspaceHubInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the hub that a user is connecting to a workspace
|
||||
*/
|
||||
async notifyConnect(id: string): Promise<void> {
|
||||
const url = `${this.hubUrl}/workspaces/${id}/connect`;
|
||||
const response = await fetchWithTimeout(url, 5000, {
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorText = await response.text();
|
||||
throw new Error(`Hub API error (${response.status}): ${errorText}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a workspace
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user