返回 CodeWhale
app-page.ts
根目录 / web / lib / content / app-page.ts
1 /**
2 * app-page.ts — the copy for /app, the page about the desktop app and the
3 * hosted browser app.
4 *
5 * TRUTH CONTRACT: the desktop app is released for macOS, and its download is
6 * rendered from data/desktop-published-release.json, never typed here. The
7 * hosted browser app is not open yet. The terminal and the local browser
8 * client (codewhale web) are released and need no account. Nothing here names
9 * prices, plans, hours, dates or an auth vendor, and the page never links to
10 * the hosted app itself.
11 */
12
13 import type { DesktopShotId } from "@/components/desktop-shot";
14 import { DESKTOP_RELEASE, linuxDownloads, type DesktopReleaseFact } from "../desktop-release";
15 import { pickText } from "../i18n/dictionaries";
16 import { surfaceCapabilities } from "../surface-states";
17 import type { LocalizedText } from "./vocabulary";
18
19 export interface AppShot {
20 file: DesktopShotId;
21 alt: LocalizedText;
22 caption: LocalizedText;
23 }
24
25 export interface AppRow {
26 title: LocalizedText;
27 body: LocalizedText;
28 }
29
30 export const APP_COPY = {
31 metadata: {
32 title: { en: "Desktop and browser apps · Codewhale", zh: "桌面与浏览器应用 · Codewhale" },
33 description: {
34 en: "The Codewhale desktop app is built on the same agent you can read, and it is available for macOS. The terminal and the local browser client are released too.",
35 zh: "Codewhale 桌面应用基于同一个可读智能体构建,现已提供 macOS 版。终端与本地浏览器客户端也已发布。",
36 },
37 },
38 metadataWithLinux: {
39 description: {
40 en: "The Codewhale desktop app is built on the same agent you can read, and it is available for macOS and Linux. The terminal and the local browser client are released too.",
41 zh: "Codewhale 桌面应用基于同一个可读智能体构建,现已提供 macOS 和 Linux 版。终端与本地浏览器客户端也已发布。",
42 },
43 },
44 ledeWithLinux: {
45 en: "It runs the same engine as the terminal, so the app and the terminal share one agent. The macOS and Linux apps are available to download below, and the browser app is not open yet.",
46 zh: "它与终端运行同一个引擎,因此应用与终端共用同一个智能体。macOS 和 Linux 版可在下方下载,浏览器应用尚未开放。",
47 },
48 title: {
49 en: "The desktop app is built on the same agent you can read.",
50 zh: "桌面应用基于同一个可读智能体构建。",
51 },
52 lede: {
53 en: "It runs the same engine as the terminal, so the app and the terminal share one agent. The macOS app is available to download below, and the browser app is not open yet.",
54 zh: "它与终端运行同一个引擎,因此应用与终端共用同一个智能体。macOS 版可在下方下载,浏览器应用尚未开放。",
55 },
56 surfaces: {
57 desktop: { en: "Desktop", zh: "桌面端" },
58 browser: { en: "Browser app", zh: "浏览器应用" },
59 },
60 actions: {
61 install: { en: "Install the terminal", zh: "安装终端版" },
62 guide: { en: "Use codewhale web today", zh: "现在就用 codewhale web" },
63 signIn: { en: "How sign-in works", zh: "登录方式" },
64 },
65 guidePath: "/docs/web",
66
67 shotsHeading: { en: "What the desktop app looks like", zh: "桌面应用长什么样" },
68 shotsScope: {
69 en: "These screens come from a development build of the desktop app running the published 0.10.4 engine and a real model, DeepSeek V4.1 Flash. The released app can differ in detail.",
70 zh: "以下画面来自桌面应用的开发版本,运行的是已发布的 0.10.4 引擎和真实模型 DeepSeek V4.1 Flash。正式发布的应用在细节上可能有所不同。",
71 },
72 shots: [
73 {
74 file: "review",
75 alt: {
76 en: "The desktop app with the session list on the left, a finished task in the middle that explains the cause and the fix and reports 3 passed, and on the right the review panel showing the change to core.py with Mark this diff reviewed and Commit and history.",
77 zh: "桌面应用:左侧是会话列表,中间是一项已完成的任务,说明了原因和修复并报告 3 个测试通过;右侧审阅面板显示对 core.py 的修改,以及“标记此差异已审阅”和“提交与历史”。",
78 },
79 caption: {
80 en: "A finished task with its change open in the review panel. You can mark the diff reviewed and commit from the same panel.",
81 zh: "一项已完成的任务,修改在审阅面板中打开。你可以在同一面板中标记差异已审阅并提交。",
82 },
83 },
84 {
85 file: "approval",
86 alt: {
87 en: "The desktop app asking to run python3 -m pytest on tests/test_core.py, with Allow and Deny, while a task to fix a failing test in tally/core.py works in Accept Edits.",
88 zh: "桌面应用请求运行针对 tests/test_core.py 的 python3 -m pytest,提供 Allow 和 Deny 按钮;一项修复 tally/core.py 中失败测试的任务正在 Accept Edits 模式下进行。",
89 },
90 caption: {
91 en: "Accept Edits lets most file edits through without asking; the test command waits for your answer with the exact command in view.",
92 zh: "Accept Edits 模式会直接放行大多数文件修改;测试命令则等待你的回答,并展示完整命令。",
93 },
94 },
95 {
96 file: "permissions",
97 alt: {
98 en: "The Permissions menu open above the composer, listing Ask, Accept Edits (selected), Plan, Auto-Review and Full Access, each with a one-line description.",
99 zh: "输入框上方打开的 Permissions 菜单,列出 Ask、Accept Edits(已选中)、Plan、Auto-Review 和 Full Access,每项都有一行说明。",
100 },
101 caption: {
102 en: "The Permissions menu sets what the agent may do without asking, with one line on what each mode allows.",
103 zh: "Permissions 菜单决定智能体无需询问即可做什么,每种模式都有一行说明。",
104 },
105 },
106 {
107 file: "sessions",
108 alt: {
109 en: "The desktop app with four sessions in the tally folder, two marked Needs you, and the open session showing its finished three-point explanation of the project.",
110 zh: "桌面应用中 tally 文件夹下的四个会话,其中两个标记为 Needs you;打开的会话显示它已完成的三点项目说明。",
111 },
112 caption: {
113 en: "Several sessions work in the same folder, and the list shows which ones need you.",
114 zh: "多个会话在同一个文件夹中工作,列表会显示哪些需要你处理。",
115 },
116 },
117 ] satisfies AppShot[],
118
119 accountHeading: { en: "What works without an account, and what an account adds", zh: "无需账号可用的功能,以及账号能带来什么" },
120 accountScope: {
121 en: "The app does not ask you to sign in up front. Where a control needs an account, it says so beside that control. Sign-in is not available in every build yet.",
122 zh: "应用不会一开始就要求你登录。需要账号的控件会在旁边说明。并非所有版本都已提供登录。",
123 },
124 withoutTitle: { en: "Works without an account", zh: "无需账号" },
125 without: [
126 {
127 title: { en: "Your folders and conversations", zh: "你的文件夹与对话" },
128 body: { en: "They stay on this computer, and signing out leaves them in place.", zh: "它们保存在这台电脑上,退出登录后仍然保留。" },
129 },
130 {
131 title: { en: "Your own models", zh: "你自己的模型" },
132 body: { en: "Use your own model keys or a local model.", zh: "使用你自己的模型密钥或本地模型。" },
133 },
134 {
135 title: { en: "Plugins", zh: "插件" },
136 body: { en: "Skills, connectors, hooks and the plugin bundles that carry them run on this computer with no sign-in.", zh: "技能、连接器、钩子以及携带它们的插件包都在这台电脑上运行,无需登录。" },
137 },
138 {
139 title: { en: "The terminal and the local browser", zh: "终端与本地浏览器" },
140 body: { en: "Both are released and need no account.", zh: "两者均已发布,无需账号。" },
141 },
142 ] satisfies AppRow[],
143 withTitle: { en: "What an account adds", zh: "账号能带来什么" },
144 with: [
145 {
146 title: { en: "Shared conversations", zh: "共享对话" },
147 body: { en: "Share a conversation with other people.", zh: "与其他人共享对话。" },
148 },
149 {
150 title: { en: "Projects in your account", zh: "账号中的项目" },
151 body: { en: "A project lives in your account instead of on one computer.", zh: "项目保存在你的账号中,而不是某一台电脑上。" },
152 },
153 {
154 title: { en: "Cloud computers", zh: "云端计算机" },
155 body: { en: "Send work to a cloud computer. Cloud computers are invite-only.", zh: "把任务交给云端计算机。云端计算机仅限受邀使用。" },
156 },
157 {
158 title: { en: "Agents that keep going", zh: "持续工作的智能体" },
159 body: { en: "Let an agent look after a repository on GitHub while you are away.", zh: "让智能体在你离开时照看 GitHub 上的仓库。" },
160 },
161 ] satisfies AppRow[],
162 signInNote: {
163 en: "When sign-in is available and you have an account, the app opens your browser to finish signing in and then returns you to the app. Signing out leaves your folders, conversations and model keys in place.",
164 zh: "当登录可用且你已有账号时,应用会打开浏览器完成登录,然后带你回到应用。退出登录后,你的文件夹、对话和模型密钥仍会保留。",
165 },
166
167 runsHeading: { en: "Where Codewhale runs today", zh: "Codewhale 目前在哪里运行" },
168 runsSurface: { en: "Surface", zh: "平台" },
169 runsState: { en: "State", zh: "状态" },
170 runsDetail: { en: "What it means", zh: "说明" },
171
172 closingTitle: { en: "Start with the terminal today.", zh: "今天就从终端开始。" },
173 closingBody: {
174 en: "The terminal and codewhale web run the same agent the desktop app is built on. The sign-in guide explains how accounts work.",
175 zh: "终端和 codewhale web 运行的,正是桌面应用所基于的智能体。登录指南会说明账户如何使用。",
176 },
177 } as const;
178
179 export function appHeaderCopy(locale: string, release: DesktopReleaseFact | null = DESKTOP_RELEASE) {
180 const linux = surfaceCapabilities("desktop", { desktopRelease: release }).download && linuxDownloads(release) !== null;
181 return {
182 description: pickText(linux ? APP_COPY.metadataWithLinux.description : APP_COPY.metadata.description, locale),
183 lede: pickText(linux ? APP_COPY.ledeWithLinux : APP_COPY.lede, locale),
184 };
185 }
186
186 lines TYPESCRIPT