feat(ai): run agent sessions as background tasks
This commit is contained in:
1 parent
b37a1f8538
commit
eeeb4e5011
34 files changed
+3440
-184
No files matched your search
@@ -6,12 +6,16 @@ import { dirname, join, resolve } from "node:path";
|
||||
|
||||
const LOCALES_DIR = "apps/desktop/src/i18n/locales";
|
||||
const SOURCE_LOCALE = "zh-CN";
|
||||
const TARGET_LOCALES = ["en", "es", "it", "ja", "pt-BR", "zh-TW"];
|
||||
const TARGET_LOCALES = ["en", "es", "it", "ja", "ko", "pt-BR", "zh-TW"];
|
||||
// `git show <ref>:<path>` needs forward slashes even on Windows, where
|
||||
// `path.join()` yields backslashes. Allow an override (CI keeps the default).
|
||||
const refPath = (path) => path.replaceAll("\\", "/");
|
||||
const TARGET_LABELS = {
|
||||
en: "English",
|
||||
es: "Spanish",
|
||||
it: "Italian",
|
||||
ja: "Japanese",
|
||||
ko: "Korean",
|
||||
"pt-BR": "Brazilian Portuguese",
|
||||
"zh-TW": "Traditional Chinese used in Taiwan",
|
||||
};
|
||||
@@ -106,7 +110,7 @@ function localePath(locale) {
|
||||
|
||||
function readBaseFile(path) {
|
||||
try {
|
||||
return execFileSync("git", ["show", `${baseRef}:${path}`], { encoding: "utf8", maxBuffer: 16 * 1024 * 1024 });
|
||||
return execFileSync("git", ["show", `${baseRef}:${refPath(path)}`], { encoding: "utf8", maxBuffer: 16 * 1024 * 1024 });
|
||||
} catch (error) {
|
||||
throw new Error(`Unable to read ${path} from ${baseRef}: ${error.message}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user