vibe-coding-master 0.6.5 → 0.6.6
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.
|
@@ -1406,7 +1406,8 @@ export function createGatewayService(deps) {
|
|
|
1406
1406
|
repoRoot: failed.repoRoot,
|
|
1407
1407
|
taskSlug: failed.taskSlug,
|
|
1408
1408
|
role: failed.role,
|
|
1409
|
-
text: failed.sourceText
|
|
1409
|
+
text: failed.sourceText,
|
|
1410
|
+
allowCreate: true
|
|
1410
1411
|
});
|
|
1411
1412
|
lastFailedTranslation = null;
|
|
1412
1413
|
return `重新翻译成功:\n\n${text}`;
|
|
@@ -1080,6 +1080,20 @@ export function createTranslationService(deps) {
|
|
|
1080
1080
|
if (reusable) {
|
|
1081
1081
|
return reusable.trim();
|
|
1082
1082
|
}
|
|
1083
|
+
if (input.allowCreate) {
|
|
1084
|
+
const translation = await translateText({
|
|
1085
|
+
repoRoot: input.repoRoot,
|
|
1086
|
+
taskSlug: input.taskSlug,
|
|
1087
|
+
role: input.role,
|
|
1088
|
+
direction: "cc-output-to-user",
|
|
1089
|
+
text: input.text,
|
|
1090
|
+
sourceKind: "prose",
|
|
1091
|
+
sourceLanguage: "en",
|
|
1092
|
+
targetLanguage: config.targetLanguage,
|
|
1093
|
+
config
|
|
1094
|
+
});
|
|
1095
|
+
return translation.text.trim();
|
|
1096
|
+
}
|
|
1083
1097
|
throw new VcmError({
|
|
1084
1098
|
code: "GATEWAY_TRANSLATION_RESULT_MISSING",
|
|
1085
1099
|
message: "Gateway output translation is not available in the current translation panel.",
|