Gemini CLI Core - Core functionality library for the open-source AI agent that brings the power of Gemini directly into your terminal.
Overall
score
87%
Evaluation — 87%
↑ 1.01xAgent success when using this tile
Build a utility that exports conversation sessions from an AI assistant to different formats for archival and analysis purposes.
Create functionality to export a specific chat session by its session ID. Support both JSON and Markdown export formats:
Create functionality to export all available sessions at once in a chosen format. The output should organize sessions clearly with appropriate separators.
Create functionality to retrieve and display all session IDs that have been recorded. This helps users identify which sessions are available for export.
Create functionality to retrieve the full conversation history for a specific session, returning all recorded messages, tool calls, and system messages in chronological order.
Create functionality to remove a specific session by its ID, returning confirmation of successful deletion.
@generates
/**
* ChatSessionExporter - Exports and manages conversation sessions
*/
class ChatSessionExporter {
/**
* Initialize a new ChatSessionExporter
* @param {ChatRecordingService} chatRecordingService - Instance of ChatRecordingService
*/
constructor(chatRecordingService);
/**
* Export a single session to a specified format
* @param {string} sessionId - ID of the session to export
* @param {string} format - Export format ('json' or 'markdown')
* @returns {Promise<string>} Exported session content
*/
async exportSession(sessionId, format);
/**
* Export all available sessions to a specified format
* @param {string} format - Export format ('json' or 'markdown')
* @returns {Promise<string>} Exported content for all sessions
*/
async exportAllSessions(format);
/**
* Get list of all available session IDs
* @returns {Promise<Array<string>>} Array of session IDs
*/
async listSessions();
/**
* Get the conversation history for a specific session
* @param {string} sessionId - ID of the session
* @returns {Promise<Array<ChatRecord>>} Array of chat records
*/
async getSessionHistory(sessionId);
/**
* Delete a specific session
* @param {string} sessionId - ID of the session to delete
* @returns {Promise<boolean>} True if deletion was successful
*/
async deleteSession(sessionId);
}
module.exports = { ChatSessionExporter };Provides the ChatRecordingService for managing conversation sessions and history.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-google--gemini-cli-coredocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10