import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { ModifiedFileEntryState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService"; import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries"; import { IChatWidgetHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service"; import { ChatAgentLocation, ChatModeKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants"; export interface IChatHistoryEntry { text: string; state?: IChatInputState; } /** The collected input state of ChatWidget contribs + attachments */ export interface IChatInputState { [key: string]: any; chatContextAttachments?: ReadonlyArray; chatWorkingSet?: ReadonlyArray<{ uri: URI; state: ModifiedFileEntryState; }>; /** * This should be a mode id (ChatMode | string). * { id: string } is the old IChatMode. This is deprecated but may still be in persisted data. */ chatMode?: ChatModeKind | string | { id: string; }; } export declare const ChatInputHistoryMaxEntries = 40; export declare class ChatWidgetHistoryService implements IChatWidgetHistoryService { _serviceBrand: undefined; private memento; private viewState; private readonly _onDidClearHistory; readonly onDidClearHistory: Event; constructor(storageService: IStorageService); getHistory(location: ChatAgentLocation): IChatHistoryEntry[]; private getKey; saveHistory(location: ChatAgentLocation, history: IChatHistoryEntry[]): void; clearHistory(): void; }