Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
--repo $env:GITHUB_REPOSITORY `
--verify-tag `
--title "Codex CLI Ultra $tag" `
--notes "自包含 Windows 安装包:内置已验证的 CCU i18n fork、1396 条简体中文 FTL 和 Hermes 状态栏;新版管理器支持后台任务进度、本地 fork Release 安装与二次确认卸载,并同步显示 CCU、CCU-I18N 和 OpenAI Codex 三路版本。安装器在网络失败时提供直接下载指引。" `
--notes "自包含 Windows 安装包:内置已验证的 CCU i18n fork、1396 条简体中文 FTL 和 rainbow_color 主题;新版管理器支持后台任务进度、本地 fork Release 安装与二次确认卸载,并同步显示 CCU、CCU-I18N 和 OpenAI Codex 三路版本。安装器在网络失败时提供直接下载指引。" `
--latest
}

Expand Down
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ codex-cli-ultra/
├── docs/ # Design, release contracts, and progress documents
├── packages/
│ ├── languages/zh-CN/ # Simplified Chinese language pack
│ └── themes/ccu-hermes/ # Hermes status-line theme
│ └── themes/ # rainbow_color default and legacy Hermes themes
├── release-channels/
│ └── stable.json # Current stable fork Release metadata
├── research/ # Visible-text catalogs and version research
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ codex-cli-ultra/
├── docs/ # 设计、发布合同和项目进度文档
├── packages/
│ ├── languages/zh-CN/ # 简体中文语言包
│ └── themes/ccu-hermes/ # Hermes 状态栏主题
│ └── themes/ # rainbow_color 默认主题与 Hermes 旧主题
├── release-channels/
│ └── stable.json # 当前稳定 fork Release 元数据
├── research/ # Codex 可见文本目录与版本调查结果
Expand Down
5 changes: 3 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ elseif ($DisableStatusLine) {
}
elseif (-not $NonInteractive -and [Environment]::UserInteractive -and -not $existingCcuState) {
Write-Host ''
Write-Host 'Hermes 彩色状态栏(全新安装默认启用):🦊 gpt-5.6-sol[xhigh] │ 42.7K/353K │ [█░░░░░░░░░] 9% │ ⏱ 1s ⚡0s │'
Write-Host 'Rainbow Color 彩色状态栏(全新安装默认启用):🦊 gpt-5.6-sol[xhigh] │ 42.7K/353K │ [█░░░░░░░░░] 9% │ ⏱ 1s ⚡0s │'
while ($true) {
$answer = Read-Host '是否启用 CCU Hermes 四段式状态栏?[Y/n]'
$answer = Read-Host '是否启用 CCU Rainbow Color 四段式状态栏?[Y/n]'
if ([string]::IsNullOrWhiteSpace($answer) -or $answer -match '^(?i:y|yes|是)$') {
$true
break
Expand Down Expand Up @@ -279,6 +279,7 @@ else {
New-Item -ItemType Directory -Path (Join-Path $temporaryContent 'themes') -Force | Out-Null
New-Item -ItemType Directory -Path (Join-Path $temporaryContent 'catalog') -Force | Out-Null
Copy-Item -LiteralPath (Join-Path $sourceRoot 'packages\languages\zh-CN') -Destination (Join-Path $temporaryContent 'languages\zh-CN') -Recurse
Copy-Item -LiteralPath (Join-Path $sourceRoot 'packages\themes\rainbow_color') -Destination (Join-Path $temporaryContent 'themes\rainbow_color') -Recurse
Copy-Item -LiteralPath (Join-Path $sourceRoot 'packages\themes\ccu-hermes') -Destination (Join-Path $temporaryContent 'themes\ccu-hermes') -Recurse
Copy-Item -LiteralPath (Join-Path $sourceRoot 'research\codex-0.144.5\tui-messages.jsonl') -Destination (Join-Path $temporaryContent 'catalog\tui-messages.jsonl')
Copy-Item -LiteralPath (Join-Path $sourceRoot 'templates\languages\messages.en-US.ftl') -Destination (Join-Path $temporaryContent 'catalog\messages.en-US.ftl')
Expand Down
93 changes: 93 additions & 0 deletions packages/themes/rainbow_color/theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"schemaVersion": 1,
"type": "theme",
"id": "rainbow_color",
"displayName": "Rainbow Color",
"version": "1.0.0",
"statusLine": {
"separator": " │ ",
"progressWidth": 10,
"filled": "█",
"empty": "░",
"modelEmojis": [
"🦊",
"🐱",
"🐶",
"🐼",
"🐨",
"🐰",
"🦁",
"🐯",
"🐸",
"🐵",
"🦄",
"🐙",
"🦋",
"🌟",
"🔥",
"💎",
"🎯",
"🚀",
"⚡",
"🌈"
],
"palette": [
"#F5E0DC",
"#F2CDCD",
"#F5C2E7",
"#CBA6F7",
"#FAB387",
"#F9E2AF",
"#A6E3A1",
"#94E2D5",
"#89DCEB",
"#74C7EC",
"#CDD6F4",
"#6C7086"
],
"randomizePalette": false,
"softenColors": false,
"modelReasoningStyle": "bracketed",
"colors": {
"model": "#F5E0DC",
"usage": "#F5C2E7",
"progress": "#A6E3A1",
"time": "#F9E2AF",
"quota": "#FAB387",
"separator": "#CBA6F7"
}
},
"welcome": {
"title": "#89DCEB",
"version": "#F5E0DC",
"label": "#89DCEB",
"model": "#F2CDCD",
"path": "#A6E3A1",
"permissions": "#FAB387",
"border": "#89DCEB",
"command": "#89DCEB",
"badge": "#F5C2E7"
},
"statusCard": {
"border": "#89DCEB",
"title": "#89DCEB",
"version": "#F5E0DC",
"label": "#89DCEB",
"model": "#F2CDCD",
"path": "#A6E3A1",
"permissions": "#FAB387",
"usage": "#89DCEB",
"progress": "#A6E3A1",
"percent": "#74C7EC",
"limits": "#F9E2AF",
"link": "#89DCEB",
"value": "#CDD6F4"
},
"dialog": {
"selection": "#89DCEB",
"background": null
},
"composer": {
"background": null
}
}
1 change: 1 addition & 0 deletions scripts/package-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Copy-Item -LiteralPath (Join-Path $root 'dist\codex-ultra.mjs') -Destination (Jo
Copy-Item -LiteralPath (Join-Path $root 'dist\launcher.mjs') -Destination (Join-Path $stage 'bin')
Copy-Item -LiteralPath (Join-Path $root 'tui\target\release\ccu-manager.exe') -Destination (Join-Path $stage 'bin')
Copy-Item -LiteralPath (Join-Path $root 'packages\languages\zh-CN') -Destination (Join-Path $stage 'content\languages\zh-CN') -Recurse
Copy-Item -LiteralPath (Join-Path $root 'packages\themes\rainbow_color') -Destination (Join-Path $stage 'content\themes\rainbow_color') -Recurse
Copy-Item -LiteralPath (Join-Path $root 'packages\themes\ccu-hermes') -Destination (Join-Path $stage 'content\themes\ccu-hermes') -Recurse
Copy-Item -LiteralPath (Join-Path $root 'research\codex-0.144.5\tui-messages.jsonl') -Destination (Join-Path $stage 'content\catalog\tui-messages.jsonl')
Copy-Item -LiteralPath (Join-Path $root 'templates\languages\messages.en-US.ftl') -Destination (Join-Path $stage 'content\catalog\messages.en-US.ftl')
Expand Down
59 changes: 38 additions & 21 deletions src/content/sync.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ import {
enableHermesStatusLineConfig
} from "./statusline-config.mjs";

const PRIMARY_THEME_ID = "rainbow_color";
const PRIMARY_THEME_DIRECTORY = "rainbow_color";
const HERMES_THEME_ID = "ccu.hermes";
const HERMES_THEME_DIRECTORY = "ccu-hermes";
const LEGACY_THEME_ID = "ccu.deepseek";
const PREVIOUS_THEME_IDS = new Set([HERMES_THEME_ID, LEGACY_THEME_ID]);
const OWNED_THEME_IDS = new Set([PRIMARY_THEME_ID, HERMES_THEME_ID, LEGACY_THEME_ID]);

async function exists(path, lstatImpl = lstat) {
try {
Expand Down Expand Up @@ -104,15 +109,19 @@ async function resolveContentLayout(contentRoot) {
language: repoLanguage,
catalog: join(contentRoot, "research", "codex-0.144.5", "tui-messages.jsonl"),
template: join(contentRoot, "templates", "languages", "messages.en-US.ftl"),
theme: join(contentRoot, "packages", "themes", HERMES_THEME_DIRECTORY),
themes: [PRIMARY_THEME_DIRECTORY, HERMES_THEME_DIRECTORY].map((directory) =>
join(contentRoot, "packages", "themes", directory)
),
quota: join(contentRoot, "packages", "quota.example.json")
};
}
return {
language: packagedLanguage,
catalog: join(contentRoot, "catalog", "tui-messages.jsonl"),
template: join(contentRoot, "catalog", "messages.en-US.ftl"),
theme: join(contentRoot, "themes", HERMES_THEME_DIRECTORY),
themes: [PRIMARY_THEME_DIRECTORY, HERMES_THEME_DIRECTORY].map((directory) =>
join(contentRoot, "themes", directory)
),
quota: join(contentRoot, "quota.example.json")
};
}
Expand All @@ -122,7 +131,7 @@ async function cacheBundledContent({
installRoot,
layout,
language,
theme,
themes,
fsOps
}) {
const cacheRoot = join(installRoot, "content");
Expand All @@ -134,11 +143,13 @@ async function cacheBundledContent({
join(cacheRoot, "languages", language.locale),
fsOps
);
await replaceDirectoryAtomic(
layout.theme,
join(cacheRoot, "themes", basename(layout.theme)),
fsOps
);
for (const themePath of themes) {
await replaceDirectoryAtomic(
themePath,
join(cacheRoot, "themes", basename(themePath)),
fsOps
);
}
await replaceFileAtomic(
layout.catalog,
join(cacheRoot, "catalog", "tui-messages.jsonl"),
Expand Down Expand Up @@ -178,15 +189,19 @@ export async function syncBundledContent(options) {
catalogPath: layout.catalog,
templatePath: layout.template
});
const theme = validateThemePack(
JSON.parse(await (options.readFile ?? readFile)(join(layout.theme, "theme.json"), "utf8"))
);
const themes = await Promise.all(layout.themes.map(async (themePath) =>
validateThemePack(
JSON.parse(await (options.readFile ?? readFile)(join(themePath, "theme.json"), "utf8"))
)
));
const theme = themes.find(({ id }) => id === PRIMARY_THEME_ID);
if (theme === undefined) throw new Error(`missing primary theme: ${PRIMARY_THEME_ID}`);
const cachedContentRoot = await cacheBundledContent({
contentRoot,
installRoot,
layout,
language,
theme,
themes: layout.themes,
fsOps: options.fsOps
});

Expand All @@ -195,11 +210,13 @@ export async function syncBundledContent(options) {
join(installRoot, "languages", language.locale),
options.fsOps
);
await replaceDirectoryAtomic(
layout.theme,
join(installRoot, "themes", theme.id),
options.fsOps
);
for (let index = 0; index < themes.length; index += 1) {
await replaceDirectoryAtomic(
layout.themes[index],
join(installRoot, "themes", themes[index].id),
options.fsOps
);
}

const makeDirectory = options.fsOps?.mkdir ?? mkdir;
const read = options.readFile ?? readFile;
Expand All @@ -221,11 +238,11 @@ export async function syncBundledContent(options) {
const currentTheme = themePreferenceExists
? (await read(themePreference, "utf8")).trim()
: null;
if (!themePreferenceExists || currentTheme === LEGACY_THEME_ID) {
if (!themePreferenceExists || PREVIOUS_THEME_IDS.has(currentTheme)) {
await write(themePreference, `${theme.id}\n`, "utf8");
}
const requestedStatusLinePreset =
options.statusLinePreset === LEGACY_THEME_ID
PREVIOUS_THEME_IDS.has(options.statusLinePreset)
? theme.id
: options.statusLinePreset;
if (
Expand All @@ -245,12 +262,12 @@ export async function syncBundledContent(options) {
requestedStatusLinePreset === null &&
statusLinePreferenceExists
) {
if ([theme.id, LEGACY_THEME_ID].includes(currentStatusLinePreset)) {
if (OWNED_THEME_IDS.has(currentStatusLinePreset)) {
await remove(statusLinePreference, { force: true });
}
} else if (
requestedStatusLinePreset === undefined &&
currentStatusLinePreset === LEGACY_THEME_ID
PREVIOUS_THEME_IDS.has(currentStatusLinePreset)
) {
await write(statusLinePreference, `${theme.id}\n`, "utf8");
}
Expand Down
4 changes: 2 additions & 2 deletions src/installer/uninstall.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export async function uninstallCcu(options = {}) {
const removedPreferences = [];
for (const [name, expected] of [
["ui-language", "zh-CN"],
["ui-theme", ["ccu.hermes", "ccu.deepseek"]],
["ui-statusline-preset", ["ccu.hermes", "ccu.deepseek"]]
["ui-theme", ["rainbow_color", "ccu.hermes", "ccu.deepseek"]],
["ui-statusline-preset", ["rainbow_color", "ccu.hermes", "ccu.deepseek"]]
]) {
if (
await removeManagedPreference(join(codexHome, name), expected, options)
Expand Down
4 changes: 2 additions & 2 deletions src/manage-main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function resolveStatusLinePreset(args) {
if (enable && disable) {
throw new Error("choose only one of --enable-statusline and --disable-statusline");
}
if (enable) return "ccu.hermes";
if (enable) return "rainbow_color";
if (disable) return null;
return undefined;
}
Expand Down Expand Up @@ -731,7 +731,7 @@ export async function manageMain(options = {}) {
const requestedStatusLinePreset = resolveStatusLinePreset(args.slice(1));
const statusLinePreset =
requestedStatusLinePreset === undefined && current.installedManifest === null
? "ccu.hermes"
? "rainbow_color"
: requestedStatusLinePreset;
if (
current.installedManifest !== null &&
Expand Down
Loading
Loading