mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 10:59:32 +01:00
chore: replace the em-dashes this release added with plain punctuation
The merged PRs (mostly #714's git fetch) added about 120 em-dashes in comments, docs, test names and three settings strings. Each one is now a comma, colon, semicolon or parentheses. The English settings strings in index.html and their i18n.js keys change together, and the zh-CN value for the fetch interval uses full-width parentheses instead of a double dash. The one left is the regex in constants.js that matches a dash typed as a word, which is behaviour, not punctuation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
de1aab9b86
commit
c04fa97f78
28 files changed
+91
-91
No files matched your search
@@ -13,8 +13,8 @@
|
||||
* repository, so the "behind" number reflects the last `git fetch`, which the panel footer says. Fetching
|
||||
* happens when the user clicks Fetch in that window's header (`POST /api/sessions/:id/git-fetch`,
|
||||
* src/git-fetch.ts), or on the interval when the session is on: this is the only git command the Git panel
|
||||
* runs that writes, and the only one Codeman runs on a timer — cloning and worktree management write too,
|
||||
* but only when the user asked for them at that moment. Remote (SSH)
|
||||
* runs that writes, and the only one Codeman runs on a timer (cloning and worktree management write too,
|
||||
* but only when the user asked for them at that moment). Remote (SSH)
|
||||
* and Docker sessions answer `unsupported`, show no indicator, and cannot be fetched.
|
||||
*
|
||||
* Everything that comes from git (file names, commit subjects, author names) is untrusted text: it is
|
||||
@@ -273,7 +273,7 @@ Object.assign(CodemanApp.prototype, {
|
||||
* Fetch, on this click only: one `git fetch --quiet` per repository the panel shows
|
||||
* (`POST /api/sessions/:id/git-fetch`). It is the only git command the Git panel runs that writes, and the
|
||||
* only one Codeman runs on a timer, and it updates remote-tracking refs only: nothing here commits or
|
||||
* touches the working tree, so an agent's own work is left alone — though a fetch does hold git's ref lock,
|
||||
* touches the working tree, so an agent's own work is left alone, though a fetch does hold git's ref lock,
|
||||
* so an agent's `git pull` in the same repository can hit the same `cannot lock ref` while it runs. One
|
||||
* click means one fetch per repository: the button is busy and a second click is ignored while it runs, and
|
||||
* a click that joins a fetch already running reports that run, not itself. The panel then re-reads, so the
|
||||
@@ -532,7 +532,7 @@ Object.assign(CodemanApp.prototype, {
|
||||
if (data.behind) {
|
||||
const behind = el('span', 'git-status-chip', `↓ ${data.behind} behind`);
|
||||
behind.title =
|
||||
'As of the last git fetch — click Fetch in this window, or turn on the fetch interval in Settings, to bring it current.';
|
||||
'As of the last git fetch. Click Fetch in this window, or turn on the fetch interval in Settings, to bring it current.';
|
||||
line.append(behind);
|
||||
}
|
||||
} else if (data.hasRemote) {
|
||||
|
||||
@@ -533,7 +533,7 @@
|
||||
// scope tag. The Session Options → Git strings are in that group's own block further down.
|
||||
'Bottom bar': '底部栏',
|
||||
'Git status': 'Git 状态',
|
||||
"Shows, at the right of the bottom bar, when the active session's repository (or each repository inside its folder, up to two levels down) has uncommitted files or commits that are not pushed. Click it for the list. Read-only apart from Fetch: Codeman never commits or changes the repository, and `git fetch` — the only git command the Git window runs that writes, and the only one Codeman runs on a timer (cloning and worktree management write too, but only when you asked for them at the moment you asked) — runs when you click Fetch in that window, or on the interval below if you turned it on. Not shown for Docker or remote sessions. Off by default.":
|
||||
"Shows, at the right of the bottom bar, when the active session's repository (or each repository inside its folder, up to two levels down) has uncommitted files or commits that are not pushed. Click it for the list. Read-only apart from Fetch: Codeman never commits or changes the repository, and `git fetch` runs only when you click Fetch in that window, or on the interval below if you turned it on. It is the only git command the Git window runs that writes, and the only one Codeman runs on a timer (cloning and worktree management write too, but only when you asked for them at the moment you asked). Not shown for Docker or remote sessions. Off by default.":
|
||||
'在底部栏右侧显示当前会话的仓库(或其文件夹内向下两层以内的每个仓库)是否有未提交的文件或未推送的提交。点击可查看列表。除拉取外只读:{name} 从不提交或更改仓库,而拉取是 Git 窗口运行的唯一会写入的 git 命令,也是 {name} 唯一会按间隔自行运行的命令(克隆和工作树管理也会写入,但只在您当时要求时才运行),它只在您点击该窗口中的拉取按钮时运行,或在您开启了下方的定时后按间隔运行。Docker 和远程会话不显示。默认关闭。',
|
||||
'Git status: group files by folder': 'Git 状态:按文件夹分组显示文件',
|
||||
'In the Git window, show changed files under their folders, collapsed until you click a folder. Off lists every file by its full path. On by default.':
|
||||
@@ -548,8 +548,8 @@
|
||||
'Runs `git fetch` for the repositories the Git window lists on a timer, so the "behind" number is current without a click. Off by default: this is the only git command the Git panel runs that writes, and the only one Codeman runs on a timer (cloning and worktree management write too, but only when you asked for them at the moment you asked), so nothing runs until you turn it on. A session can override both the switch and the interval in Session Options → Git.':
|
||||
'按间隔为 Git 窗口列出的仓库运行拉取,这样“落后”的数字无需点击就是最新的。默认关闭:这是 Git 窗口运行的唯一会写入的 git 命令,也是 {name} 唯一会按间隔自行运行的命令(克隆和工作树管理也会写入,但只在您当时要求时才运行),所以在您开启之前不会有任何运行。会话可以在“会话选项 → Git”中同时覆盖开关和间隔。',
|
||||
'Git fetch: how often': 'Git 定时拉取:多久一次',
|
||||
'Seconds between runs for a session that has no override of its own (30 to 3600, default 300). Only a session that is on — here, or in Session Options → Git — is fetched, and sessions sharing one folder are fetched by one run.':
|
||||
'没有自己覆盖设置的会话,两次运行之间的秒数(30 到 3600,默认 300)。只有已开启的会话——这里,或在“会话选项 → Git”——才会被拉取,共用一个文件夹的会话由一次运行拉取。',
|
||||
'Seconds between runs for a session that has no override of its own (30 to 3600, default 300). Only a session that is on (here, or in Session Options → Git) is fetched, and sessions sharing one folder are fetched by one run.':
|
||||
'没有自己覆盖设置的会话,两次运行之间的秒数(30 到 3600,默认 300)。只有已开启的会话(这里,或在“会话选项 → Git”)才会被拉取,共用一个文件夹的会话由一次运行拉取。',
|
||||
'Fetch git status': '拉取 Git 状态',
|
||||
'Refresh git status': '刷新 Git 状态',
|
||||
'Close git status': '关闭 Git 状态',
|
||||
@@ -860,7 +860,7 @@
|
||||
// by updateGitFetchStatus, and 'Git' stays a technical name.
|
||||
"Whether Codeman fetches this session's repositories on a timer.": '{name} 是否按间隔拉取此会话的仓库。',
|
||||
'Fetch on an interval': '按间隔拉取',
|
||||
"Fetching is the only git command the Git panel runs that writes, and the only one Codeman runs on a timer, so nothing runs until you turn it on — here, or in App Settings → Bottom bar. Cloning and worktree management write too, but only when you asked for them at the moment you asked. The panel's Fetch button is always just a click.":
|
||||
"Fetching is the only git command the Git panel runs that writes, and the only one Codeman runs on a timer, so nothing runs until you turn it on (here, or in App Settings → Bottom bar). Cloning and worktree management write too, but only when you asked for them at the moment you asked. The panel's Fetch button is always just a click.":
|
||||
'拉取是 Git 窗口运行的唯一会写入的 git 命令,也是 {name} 唯一会按间隔自行运行的命令,所以在您开启之前(这里,或“应用设置 → 底部栏”)不会有任何运行。克隆和工作树管理也会写入,但只在您当时要求时才运行。该窗口中的拉取按钮始终只是一次点击。',
|
||||
'Follow the app setting': '跟随应用设置',
|
||||
'Uses the app-wide switch and interval for this session. Switch it off to pick your own.':
|
||||
|
||||
@@ -1738,7 +1738,7 @@
|
||||
|
||||
<div class="set-group">
|
||||
<div class="set-group-head"><h4>Fetch on an interval</h4></div>
|
||||
<p class="set-group-hint">Fetching is the only git command the Git panel runs that writes, and the only one Codeman runs on a timer, so nothing runs until you turn it on — here, or in App Settings → Bottom bar. Cloning and worktree management write too, but only when you asked for them at the moment you asked. The panel's Fetch button is always just a click.</p>
|
||||
<p class="set-group-hint">Fetching is the only git command the Git panel runs that writes, and the only one Codeman runs on a timer, so nothing runs until you turn it on (here, or in App Settings → Bottom bar). Cloning and worktree management write too, but only when you asked for them at the moment you asked. The panel's Fetch button is always just a click.</p>
|
||||
<div class="set-group-body">
|
||||
<!-- Live from the session's own last run (session-ui.js: updateGitFetchStatus), which is the
|
||||
run its folder got: several sessions on one folder share one run and read the same row. -->
|
||||
@@ -2266,7 +2266,7 @@
|
||||
<div class="set-row" data-search="git status uncommitted unpushed commit push indicator bottom bar toolbar">
|
||||
<div class="set-row-text">
|
||||
<span class="set-row-label">Git status <span class="set-scope">device</span></span>
|
||||
<span class="set-row-desc">Shows, at the right of the bottom bar, when the active session's repository (or each repository inside its folder, up to two levels down) has uncommitted files or commits that are not pushed. Click it for the list. Read-only apart from Fetch: Codeman never commits or changes the repository, and `git fetch` — the only git command the Git window runs that writes, and the only one Codeman runs on a timer (cloning and worktree management write too, but only when you asked for them at the moment you asked) — runs when you click Fetch in that window, or on the interval below if you turned it on. Not shown for Docker or remote sessions. Off by default.</span>
|
||||
<span class="set-row-desc">Shows, at the right of the bottom bar, when the active session's repository (or each repository inside its folder, up to two levels down) has uncommitted files or commits that are not pushed. Click it for the list. Read-only apart from Fetch: Codeman never commits or changes the repository, and `git fetch` runs only when you click Fetch in that window, or on the interval below if you turned it on. It is the only git command the Git window runs that writes, and the only one Codeman runs on a timer (cloning and worktree management write too, but only when you asked for them at the moment you asked). Not shown for Docker or remote sessions. Off by default.</span>
|
||||
</div>
|
||||
<label class="switch switch-sm"><input type="checkbox" id="appSettingsShowGitStatus"><span class="slider"></span></label>
|
||||
</div>
|
||||
@@ -2301,7 +2301,7 @@
|
||||
<div class="set-row" data-search="git fetch how often seconds between runs interval case override session options">
|
||||
<div class="set-row-text">
|
||||
<span class="set-row-label">Git fetch: how often <span class="set-scope">synced</span></span>
|
||||
<span class="set-row-desc">Seconds between runs for a session that has no override of its own (30 to 3600, default 300). Only a session that is on — here, or in Session Options → Git — is fetched, and sessions sharing one folder are fetched by one run.</span>
|
||||
<span class="set-row-desc">Seconds between runs for a session that has no override of its own (30 to 3600, default 300). Only a session that is on (here, or in Session Options → Git) is fetched, and sessions sharing one folder are fetched by one run.</span>
|
||||
</div>
|
||||
<input type="number" id="appSettingsGitFetchIntervalSeconds" class="set-num" value="300" min="30" max="3600" step="1">
|
||||
</div>
|
||||
|
||||
@@ -3101,7 +3101,7 @@ Object.assign(CodemanApp.prototype, {
|
||||
statusEl.hidden = false;
|
||||
},
|
||||
|
||||
/** 'just now', '4m', '2h' — the short stamps the tab rows use, measured from a run's start. */
|
||||
/** 'just now', '4m', '2h': the short stamps the tab rows use, measured from a run's start. */
|
||||
_gitFetchAgo(ts) {
|
||||
const seconds = Math.max(0, Math.round((Date.now() - ts) / 1000));
|
||||
if (seconds < 60) return seconds < 10 ? 'just now' : `${seconds}s`;
|
||||
|
||||
@@ -606,7 +606,7 @@ Object.assign(CodemanApp.prototype, {
|
||||
document.getElementById('appSettingsGitStatusTimeout').value = settings.gitStatusTimeoutSeconds ?? defaults.gitStatusTimeoutSeconds ?? 30;
|
||||
// Git fetch on an interval: synced, default OFF, interval default 300 s (DEFAULT_GIT_FETCH_INTERVAL_SECONDS).
|
||||
// Synced means the SERVER decides whether to fetch, so these keys stay out of the per-device display list
|
||||
// below and are not stripped from a save — a stripped key would never reach the scheduler.
|
||||
// below and are not stripped from a save: a stripped key would never reach the scheduler.
|
||||
document.getElementById('appSettingsGitFetchEnabled').checked = settings.gitFetchEnabled === true;
|
||||
document.getElementById('appSettingsGitFetchIntervalSeconds').value = settings.gitFetchIntervalSeconds ?? 300;
|
||||
// Gesture control lives in the Input section (alongside Local Echo / CJK Input)
|
||||
|
||||
@@ -36,7 +36,7 @@ import type { EventPort, SessionPort } from '../ports/index.js';
|
||||
|
||||
/**
|
||||
* Host paths of every Docker case workspace: repositories at or inside these are never inspected.
|
||||
* Exported so the interval scheduler (src/git-fetch-scheduler.ts) uses the SAME list — the Docker rule has
|
||||
* Exported so the interval scheduler (src/git-fetch-scheduler.ts) uses the SAME list: the Docker rule has
|
||||
* to be one rule, checked by every path that could run git.
|
||||
*
|
||||
* REJECTS when `docker-cases.json` exists but cannot be read or parsed (its writer truncates and rewrites it
|
||||
@@ -142,11 +142,11 @@ export function registerGitStatusRoutes(
|
||||
// Fetch, and only because the user clicked Fetch in the panel (src/git-fetch.ts): one
|
||||
// `git fetch --quiet` per repository the panel would show, through the same resolver so the two cannot
|
||||
// disagree about which repositories belong to the workspace. This is the only git command the Git panel runs
|
||||
// that writes, and it writes remote-tracking refs only — nothing commits, checks out or merges. Cloning and
|
||||
// that writes, and it writes remote-tracking refs only: nothing commits, checks out or merges. Cloning and
|
||||
// worktree management write too, but those happen when the user asked for them; this route is the one that
|
||||
// can also run later, on a timer. It is not as harmless as a read though: a fetch holds git's ref lock, so
|
||||
// an agent's own `git pull` in the same clone can collide with it, which is why the run goes through
|
||||
// `fetchWorkspaceOnce` — a click while a tick is already fetching this folder joins that run instead of
|
||||
// `fetchWorkspaceOnce`: a click while a tick is already fetching this folder joins that run instead of
|
||||
// starting a second one. It can also run a
|
||||
// repository's own hooks (`reference-transaction`, `pre-auto-gc` through the maintenance git runs after a
|
||||
// fetch) and its config commands such as `credential.helper`, so the `FETCH_CONFIG_ARGS` overrides turn
|
||||
|
||||
@@ -3682,7 +3682,7 @@ export function registerSessionRoutes(
|
||||
// fetched when the first of them is due. `null` on either field clears this session's choice so the
|
||||
// app-wide setting applies again, and a field left out of the body leaves the other half as it was: the
|
||||
// Session Options rows save on their own. Refused for a remote or Docker session, exactly as the Git
|
||||
// panel excludes them — a container can write to the repository it mounts, so git there would run that
|
||||
// panel excludes them: a container can write to the repository it mounts, so git there would run that
|
||||
// repository's own configuration on the host.
|
||||
app.post('/api/sessions/:id/git-fetch-settings', async (req) => {
|
||||
const { id } = req.params as { id: string };
|
||||
|
||||
+2
-2
@@ -1491,8 +1491,8 @@ export const SettingsUpdateSchema = z
|
||||
/**
|
||||
* Git fetch on an interval (src/git-fetch-scheduler.ts): `git fetch` for the repositories the Git panel
|
||||
* lists, run on a timer instead of only on the panel's Fetch click. SYNCED, default OFF, because the
|
||||
* server is what runs it: `git fetch` is the only git command the Git panel runs that writes — cloning
|
||||
* and worktree management write too, but only when the user asked for them at the moment they asked — and
|
||||
* server is what runs it: `git fetch` is the only git command the Git panel runs that writes (cloning
|
||||
* and worktree management write too, but only when the user asked for them at the moment they asked), and
|
||||
* the only one that can run later by itself, on a timer, and the only one that can run a repository's own
|
||||
* hooks (`reference-transaction`, `pre-auto-gc` through the automatic maintenance a fetch triggers, config
|
||||
* commands such as `credential.helper`), so nothing runs on a timer until the user turns this on. Cap in seconds between runs (30 to 3600, default 300). A
|
||||
|
||||
+4
-4
@@ -399,8 +399,8 @@ export class WebServer extends EventEmitter {
|
||||
});
|
||||
// Git fetch on an interval (git-fetch-scheduler.ts): the due-tracking lives in the service; the server
|
||||
// lends it the facts a decision needs and stores what it reports on the session. A field initializer for
|
||||
// the same reason as the keep-warm one above, and the scheduler reads the app setting FRESH on every tick
|
||||
// — that is what makes a live toggle take effect on the next tick, and what makes turning it off actually
|
||||
// the same reason as the keep-warm one above, and the scheduler reads the app setting FRESH on every tick:
|
||||
// that is what makes a live toggle take effect on the next tick, and what makes turning it off actually
|
||||
// stop the fetching. Default OFF, so an install that never enabled it spawns nothing at all.
|
||||
private readonly gitFetchScheduler = new GitFetchScheduler({
|
||||
sessionIds: () => this.sessions.keys(),
|
||||
@@ -413,7 +413,7 @@ export class WebServer extends EventEmitter {
|
||||
// never be handed `pastCap`. A folder on a mount that stopped answering is skipped, not fetched.
|
||||
probePath: (path) => probePathKind(path),
|
||||
// Through the join, so the tick and the panel's Fetch button are the same run: a click on a folder the
|
||||
// tick is already fetching joins it rather than starting a second `git fetch` in the same clone — and the
|
||||
// tick is already fetching joins it rather than starting a second `git fetch` in the same clone, and the
|
||||
// run that gets published is the one that ran, with its own trigger.
|
||||
fetch: (cwd, opts, trigger) => fetchWorkspaceOnce(cwd, opts, trigger),
|
||||
publish: (id, status) => {
|
||||
@@ -1287,7 +1287,7 @@ export class WebServer extends EventEmitter {
|
||||
registerReadMyMindRoutes(this.app, ctx);
|
||||
registerGitStatusRoutes(this.app, ctx);
|
||||
// Git fetch on an interval: this is only the wake-up, the scheduler itself decides what is due. Off in
|
||||
// tests for the same reason as the polls below — a test drives `tick()` directly instead of waiting on
|
||||
// tests for the same reason as the polls below: a test drives `tick()` directly instead of waiting on
|
||||
// a timer the harness would have to keep alive. The setting is read FRESH inside `tick()`, so turning
|
||||
// it on takes effect on the next tick and turning it off actually stops the fetching.
|
||||
if (!this.testMode) {
|
||||
|
||||
Reference in new issue
Block a user