Release v2.2.1: Autonomous Task Resumption & Engine Resilience

This commit is contained in:
g1nation
2026-05-14 23:27:51 +09:00
parent e86e3177c7
commit cd22da8735
21 changed files with 848 additions and 126 deletions
+27
View File
@@ -174,6 +174,33 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
case 'getCompanyAgents':
await provider._sendCompanyAgents();
return true;
case 'getCompanyResumable':
await provider._sendCompanyResumable();
return true;
case 'resumeCompanyTurn': {
// 사용자가 "이어서 진행" 칩을 눌렀을 때. timestamp만 받아서 디스크의
// _resume.json을 읽고 그 다음 stage부터 dispatch가 이어진다.
const ts = typeof data.timestamp === 'string' ? data.timestamp : '';
if (!ts) return true;
// userPrompt 인자는 resume 경로에서 무시되지만(plan은 디스크에서 복원)
// 시그니처 일관성을 위해 dummy 값을 전달.
void provider._runCompanyTurn('', ts);
return true;
}
case 'discardResumableSession': {
// 사용자가 명시적으로 재개 항목을 버리고 싶을 때 — resume 파일을 'failed'로
// 마킹해서 listResumable에서 자동 제외. markResumeStatus가 안전한 idempotent
// 작업이라 별도 검증 불필요.
const ts = typeof data.timestamp === 'string' ? data.timestamp : '';
if (!ts) return true;
try {
const { resolveSessionDir } = await import('../features/company');
const { markResumeStatus } = await import('../features/company/resumeStore');
markResumeStatus(resolveSessionDir(provider._context, ts), 'failed', 'discarded-by-user');
} catch { /* 무시 — 다음 푸시에서 자연 복구 */ }
await provider._sendCompanyResumable();
return true;
}
case 'setCompanyEnabled': {
const { setCompanyEnabled } = await import('../features/company');
await setCompanyEnabled(provider._context, !!data.value);