vibe-coding-master 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,6 +32,7 @@ export function registerTaskRoutes(app, deps) {
|
|
|
32
32
|
const project = await requireCurrentProject(deps.projectService);
|
|
33
33
|
const task = await deps.taskService.loadTask(project.repoRoot, request.params.taskSlug);
|
|
34
34
|
await stopRunningRoleSessions(deps, project.repoRoot, request.params.taskSlug);
|
|
35
|
+
await stopProjectToolSessions(deps, project.repoRoot);
|
|
35
36
|
await deps.translationService.stopTask(getTaskRuntimeRepoRoot(task), request.params.taskSlug, { clearCache: true });
|
|
36
37
|
deps.roundService.stopTask(request.params.taskSlug);
|
|
37
38
|
return deps.taskService.cleanupTask(project.repoRoot, request.params.taskSlug, request.body ?? {});
|
|
@@ -45,6 +46,23 @@ async function stopRunningRoleSessions(deps, repoRoot, taskSlug) {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
}
|
|
49
|
+
async function stopProjectToolSessions(deps, repoRoot) {
|
|
50
|
+
await Promise.all([
|
|
51
|
+
ignoreMissingSession(deps.sessionService.stopProjectTranslatorSession(repoRoot)),
|
|
52
|
+
ignoreMissingSession(deps.sessionService.stopProjectHarnessEngineerSession(repoRoot))
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
async function ignoreMissingSession(operation) {
|
|
56
|
+
try {
|
|
57
|
+
await operation;
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (error instanceof VcmError && error.code === "SESSION_MISSING") {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
48
66
|
async function requireCurrentProject(projectService) {
|
|
49
67
|
const project = await projectService.getCurrentProject();
|
|
50
68
|
if (!project) {
|
|
@@ -526,6 +526,7 @@ export function createGatewayService(deps) {
|
|
|
526
526
|
}
|
|
527
527
|
const task = await deps.taskService.loadTask(project.repoRoot, taskSlug);
|
|
528
528
|
await stopRunningRoleSessions(project.repoRoot, taskSlug);
|
|
529
|
+
await stopProjectToolSessions(project.repoRoot);
|
|
529
530
|
await deps.translationService.stopTask(getTaskRuntimeRepoRoot(task), taskSlug, { clearCache: true });
|
|
530
531
|
deps.roundService.stopTask(taskSlug);
|
|
531
532
|
const result = await deps.taskService.cleanupTask(project.repoRoot, taskSlug, {
|
|
@@ -560,6 +561,23 @@ export function createGatewayService(deps) {
|
|
|
560
561
|
}
|
|
561
562
|
}
|
|
562
563
|
}
|
|
564
|
+
async function stopProjectToolSessions(repoRoot) {
|
|
565
|
+
await Promise.all([
|
|
566
|
+
ignoreMissingSession(deps.sessionService.stopProjectTranslatorSession(repoRoot)),
|
|
567
|
+
ignoreMissingSession(deps.sessionService.stopProjectHarnessEngineerSession(repoRoot))
|
|
568
|
+
]);
|
|
569
|
+
}
|
|
570
|
+
async function ignoreMissingSession(operation) {
|
|
571
|
+
try {
|
|
572
|
+
await operation;
|
|
573
|
+
}
|
|
574
|
+
catch (error) {
|
|
575
|
+
if (error instanceof VcmError && error.code === "SESSION_MISSING") {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
throw error;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
563
581
|
async function setGatewayTranslation(enabled) {
|
|
564
582
|
const settings = await deps.settings.updateSettings({ translationEnabled: enabled });
|
|
565
583
|
return `Gateway translation ${settings.translationEnabled ? "on" : "off"}.`;
|