feat(electrobun): load full session history from JSONL when resuming — conversation stays visible

This commit is contained in:
Hibryda 2026-03-27 04:09:00 +01:00
parent 1afbe66fd7
commit cb7fba6130
5 changed files with 190 additions and 5 deletions

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from 'svelte';
import type { ClaudeSessionInfo } from './agent-store.svelte.ts';
import { listProjectSessions, setPendingResume, getPendingResume, clearPendingResume } from './agent-store.svelte.ts';
import { listProjectSessions, setPendingResume, getPendingResume, clearPendingResume, loadSessionHistory } from './agent-store.svelte.ts';
import { t } from './i18n.svelte.ts';
interface Props {
@ -72,16 +72,20 @@
return s.length > max ? s.slice(0, max - 3) + '...' : s;
}
function handleContinue() {
async function handleContinue() {
open = false;
setPendingResume(projectId, 'continue');
// User types their next prompt and hits Send — startAgent reads the pending resume
// Load the most recent session's messages for display
if (sessions.length > 0) {
await loadSessionHistory(projectId, sessions[0].sessionId, cwd);
}
}
function handleResume(sdkSessionId: string) {
async function handleResume(sdkSessionId: string) {
open = false;
setPendingResume(projectId, 'resume', sdkSessionId);
// User types their next prompt and hits Send — startAgent reads the pending resume
// Load the selected session's messages for display
await loadSessionHistory(projectId, sdkSessionId, cwd);
}
function handleNew() {