mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
feat(core): define TrajectoryProvider interface
This commit is contained in:
@@ -9,6 +9,8 @@ import * as path from 'node:path';
|
|||||||
import { inspect } from 'node:util';
|
import { inspect } from 'node:util';
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
import type { ConversationRecord } from '../services/chatRecordingService.js';
|
||||||
|
export type { ConversationRecord };
|
||||||
import {
|
import {
|
||||||
AuthType,
|
AuthType,
|
||||||
createContentGenerator,
|
createContentGenerator,
|
||||||
@@ -228,6 +230,25 @@ export interface ResolvedExtensionSetting {
|
|||||||
source?: string;
|
source?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TrajectoryProvider {
|
||||||
|
/** Prefix used to identify sessions from this provider (e.g., 'ext:') */
|
||||||
|
prefix: string;
|
||||||
|
/** Optional display name for UI Tabs */
|
||||||
|
displayName?: string;
|
||||||
|
/** Return an array of conversational tags/ids */
|
||||||
|
listSessions(workspaceUri?: string): Promise<
|
||||||
|
Array<{
|
||||||
|
id: string;
|
||||||
|
mtime: string;
|
||||||
|
name?: string;
|
||||||
|
displayName?: string;
|
||||||
|
messageCount?: number;
|
||||||
|
}>
|
||||||
|
>;
|
||||||
|
/** Load a single conversation payload */
|
||||||
|
loadSession(id: string): Promise<ConversationRecord | null>;
|
||||||
|
}
|
||||||
|
|
||||||
export interface AgentRunConfig {
|
export interface AgentRunConfig {
|
||||||
maxTimeMinutes?: number;
|
maxTimeMinutes?: number;
|
||||||
maxTurns?: number;
|
maxTurns?: number;
|
||||||
@@ -377,6 +398,8 @@ export interface GeminiCLIExtension {
|
|||||||
* Used to migrate an extension to a new repository source.
|
* Used to migrate an extension to a new repository source.
|
||||||
*/
|
*/
|
||||||
migratedTo?: string;
|
migratedTo?: string;
|
||||||
|
/** Loaded JS module for trajectory decoding */
|
||||||
|
trajectoryProviderModule?: TrajectoryProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtensionInstallMetadata {
|
export interface ExtensionInstallMetadata {
|
||||||
|
|||||||
Reference in New Issue
Block a user