git-ai-project/git-ai

VS Code remote/devcontainer/codespaces support for prompt and model data

开放

#237 创建于 2025年11月24日

 (0 条评论) (0 个反应) (0 位负责人)Rust (231 个派生)auto 404
enhancementhelp wanted

仓库指标

星标
 (2,272 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Since the copilot agent chat session data is stored in the workspace storage, we need to build special support for remote VSC and codespaces

In codespaces, these chat JSON logs are only available in the browser in the indexed DB-based virtual filesystem. In the remote VSC/local devcontainer environment, the files are stored on the host, but there's no way (as far as I know) to access the host filesystem from the extension. Needs more research to figure out how we could pass this data across all of the environments to the git-ai CLI at checkpoint time.

This is the snippet of code where VS Code stores the chat session:

vscode/src/vs/workbench/contrib/chat/common /chatSessionStore.ts

private async writeSession(session: ChatModel | ISerializableChatData): Promise<void> { try { const index = this.internalGetIndex(); const storageLocation = this.getStorageLocation(session.sessionId); const content = JSON.stringify(session, undefined, 2); await this.fileService.writeFile(storageLocation, VSBuffer.fromString(content)); // Write succeeded, update index index.entries[session.sessionId] = getSessionMetadata(session); } catch (e) { this.reportError('sessionWrite', 'Error writing chat session', e); } } I found the code that's responsible for storing this file.

贡献者指南