feat: implement unified session bundle format (v2.0) and history reconstruction

This commit is contained in:
Aishanee Shah
2026-05-13 15:16:59 +00:00
parent 91c592f0c0
commit ccee31d133
14 changed files with 249 additions and 79 deletions
@@ -549,7 +549,16 @@ export const useSlashCommandProcessor = (
}
}
case 'load_history': {
config?.getGeminiClient()?.setHistory(result.clientHistory);
const client = config?.getGeminiClient();
if (result.version === '2.0' && client) {
await client.resumeChat(
[...result.clientHistory],
undefined,
result.messages,
);
} else {
client?.setHistory(result.clientHistory);
}
fullCommandContext.ui.clear();
result.history.forEach((item, index) => {
fullCommandContext.ui.addItem(item, index);