vibe-coding-master 0.4.8 → 0.4.10
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.
- package/dist/backend/api/task-routes.js +18 -0
- package/dist/backend/gateway/gateway-service.js +18 -0
- package/dist/backend/services/translation-worker-service.js +4 -2
- package/dist-frontend/assets/index-C3HtJs-w.js +95 -0
- package/dist-frontend/index.html +1 -1
- package/package.json +1 -1
- package/dist-frontend/assets/index-Dotd9y8G.js +0 -95
|
@@ -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"}.`;
|
|
@@ -18,6 +18,7 @@ const DEFAULT_PROFILE = "default";
|
|
|
18
18
|
const DEFAULT_CHUNK_SOURCE_TOKEN_TARGET = 80000;
|
|
19
19
|
const BOOTSTRAP_DEFAULT_LIMIT = 12;
|
|
20
20
|
const MEMORY_TOTAL_LIMIT_BYTES = 80 * 1024;
|
|
21
|
+
const MEMORY_INITIALIZED_MIN_FILES = 2;
|
|
21
22
|
const MEMORY_FILE_NAMES = ["glossary.md", "style-guide.md", "project-context.md", "decisions.md"];
|
|
22
23
|
const TRANSLATOR_ROLE = "translator";
|
|
23
24
|
const FILE_BROWSER_DEFAULT_LIMIT = 200;
|
|
@@ -1552,14 +1553,15 @@ function isFileTranslationChunk(value) {
|
|
|
1552
1553
|
typeof candidate.sourceLineEnd === "number";
|
|
1553
1554
|
}
|
|
1554
1555
|
async function isMemoryInitialized(repoRoot, fs) {
|
|
1556
|
+
let initializedFiles = 0;
|
|
1555
1557
|
for (const file of MEMORY_FILE_NAMES) {
|
|
1556
1558
|
const content = await fs.readText(resolveRepoPath(repoRoot, `${MEMORY_DIR}/${file}`));
|
|
1557
1559
|
const meaningfulLines = content.split("\n").filter((line) => line.trim() && !line.trim().startsWith("#"));
|
|
1558
1560
|
if (meaningfulLines.length > 0) {
|
|
1559
|
-
|
|
1561
|
+
initializedFiles += 1;
|
|
1560
1562
|
}
|
|
1561
1563
|
}
|
|
1562
|
-
return
|
|
1564
|
+
return initializedFiles >= MEMORY_INITIALIZED_MIN_FILES;
|
|
1563
1565
|
}
|
|
1564
1566
|
async function getMemoryUsage(repoRoot, fs) {
|
|
1565
1567
|
let totalBytes = 0;
|