mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-26 05:50:56 -07:00
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2026 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import { listAgySessions, loadAgySession } from './discovery.js';
|
|
import { trajectoryToJson } from './teleporter.js';
|
|
import { convertAgyToCliRecord } from './converter.js';
|
|
import type {
|
|
TrajectoryProvider,
|
|
ConversationRecord,
|
|
} from '../config/config.js';
|
|
|
|
/**
|
|
* Trajectory provider for Antigravity (Jetski) sessions.
|
|
*/
|
|
const agyProvider: TrajectoryProvider = {
|
|
prefix: 'agy:',
|
|
displayName: 'Antigravity',
|
|
|
|
async listSessions(workspaceUri?: string) {
|
|
const sessions = await listAgySessions(workspaceUri);
|
|
return sessions.map((s) => ({
|
|
id: s.id,
|
|
mtime: s.mtime,
|
|
displayName: s.displayName,
|
|
messageCount: s.messageCount,
|
|
}));
|
|
},
|
|
|
|
async loadSession(id: string): Promise<ConversationRecord | null> {
|
|
const data = await loadAgySession(id);
|
|
if (!data) return null;
|
|
const json = trajectoryToJson(data);
|
|
return convertAgyToCliRecord(json);
|
|
},
|
|
};
|
|
|
|
// eslint-disable-next-line import/no-default-export
|
|
export default agyProvider;
|